1
0
mirror of https://github.com/ellmau/nixos.git synced 2025-12-20 09:39:39 +01:00

Compare commits

...

9 Commits

Author SHA1 Message Date
a27a93520f
Fix aphelaia for nix (use alejandra) 2023-06-01 17:33:08 +02:00
f28d0a3764
Update emacs config 2023-06-01 17:19:40 +02:00
0e194a8034
Alacritty alt_send no longer needed to be set true 2023-06-01 17:18:55 +02:00
24afa73feb flake.lock: Update
Flake lock file updates:

• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/d0fc4dae0e0248453324e8d05733163a6a2f102e' (2023-05-31)
  → 'github:nix-community/emacs-overlay/dbb2bb4f40a27e2bba0bee5fe6f97e832a4583c6' (2023-06-01)
• Added input 'emacs-overlay/nixpkgs-stable':
    'github:NixOS/nixpkgs/9af373a61647257d16ae6062cddaa9094d24920c' (2023-05-30)
• Updated input 'home-manager':
    'github:nix-community/home-manager/54a9d6456eaa6195998a0f37bdbafee9953ca0fb' (2023-05-30)
  → 'github:nix-community/home-manager/93db05480c0c0f30382d3e80779e8386dcb4f9dd' (2023-06-01)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/6b0edc9c690c1d8a729f055e0d73439045cfda55' (2023-05-30)
  → 'github:NixOS/nixpkgs/3a70dd92993182f8e514700ccf5b1ae9fc8a3b8d' (2023-05-31)
2023-06-01 14:57:02 +02:00
548972f14c nix fmt 2023-06-01 14:57:02 +02:00
d87d39f4e5 Fix grocy to use php 8.1 2023-06-01 14:57:02 +02:00
7726539937 Upgrade to nixos 23.05 2023-06-01 14:57:02 +02:00
c49e3a2ff0 flake.lock: Update
Flake lock file updates:

• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/04f25058fbe3ae1aadd435aba49b66493e939f83' (2023-05-30)
  → 'github:nix-community/emacs-overlay/d0fc4dae0e0248453324e8d05733163a6a2f102e' (2023-05-31)
• Updated input 'emacs-overlay/flake-utils':
    'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
  → 'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31)
• Added input 'emacs-overlay/flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/3e016341d4dca6ce7c62316f90e66341841a30f9' (2023-05-28)
  → 'github:Mic92/sops-nix/876846cde9762ae563f018c17993354875e2538e' (2023-05-30)
2023-06-01 14:57:02 +02:00
103a3e233d
flake.lock: Update
Flake lock file updates:

• Updated input 'emacs-overlay':
    'github:nix-community/emacs-overlay/04f25058fbe3ae1aadd435aba49b66493e939f83' (2023-05-30)
  → 'github:nix-community/emacs-overlay/d0fc4dae0e0248453324e8d05733163a6a2f102e' (2023-05-31)
• Updated input 'emacs-overlay/flake-utils':
    'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
  → 'github:numtide/flake-utils/a1720a10a6cfe8234c0e93907ffe81be440f4cef' (2023-05-31)
• Added input 'emacs-overlay/flake-utils/systems':
    'github:nix-systems/default/da67096a3b9bf56a91d16901293e51ba5b49a27e' (2023-04-09)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c8a17ce7abc03c50cd072e9e6c9b389c5f61836b' (2023-05-28)
  → 'github:NixOS/nixpkgs/9af373a61647257d16ae6062cddaa9094d24920c' (2023-05-30)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/3e016341d4dca6ce7c62316f90e66341841a30f9' (2023-05-28)
  → 'github:Mic92/sops-nix/876846cde9762ae563f018c17993354875e2538e' (2023-05-30)
2023-05-31 17:02:50 +02:00
18 changed files with 557 additions and 502 deletions

96
flake.lock generated
View File

@ -68,14 +68,15 @@
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
] ],
"nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1685412232, "lastModified": 1685614843,
"narHash": "sha256-Oifn6uAP+IS0jEGs50tlRBCIwtUVIN4f+8RdlxbvK88=", "narHash": "sha256-FwQ0fhGPom0fKXdKJg6KNiKwTrK0fV3+6w9eE4YfG88=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "04f25058fbe3ae1aadd435aba49b66493e939f83", "rev": "dbb2bb4f40a27e2bba0bee5fe6f97e832a4583c6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -101,12 +102,15 @@
} }
}, },
"flake-utils": { "flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1685518550,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -152,20 +156,19 @@
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ]
"utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1681092193, "lastModified": 1685599623,
"narHash": "sha256-JerCqqOqbT2tBnXQW4EqwFl0hHnuZp21rIQ6lu/N4rI=", "narHash": "sha256-Tob4CMOVHue0D3RzguDBCtUmX5ji2PsdbQDbIOIKvsc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f9edbedaf015013eb35f8caacbe0c9666bbc16af", "rev": "93db05480c0c0f30382d3e80779e8386dcb4f9dd",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-22.11", "ref": "release-23.05",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -291,6 +294,22 @@
} }
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": {
"lastModified": 1685468986,
"narHash": "sha256-YSj3K71KjRZgeL0hS3sYLYHI0g8aIVIf9lcsRMCIW2A=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9af373a61647257d16ae6062cddaa9094d24920c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-22.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1685215858, "lastModified": 1685215858,
"narHash": "sha256-IRMFoDXA6cYx3ifVw3B2JcC4JrjT5v7tRAx2vro2Ffs=", "narHash": "sha256-IRMFoDXA6cYx3ifVw3B2JcC4JrjT5v7tRAx2vro2Ffs=",
@ -324,16 +343,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1685314633, "lastModified": 1685533922,
"narHash": "sha256-8LXBPqTQXl5ofkjpJ18JcbmLJ/lWDoMxtUwiDYv0wro=", "narHash": "sha256-y4FCQpYafMQ42l1V+NUrMel9RtFtZo59PzdzflKR/lo=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c8a17ce7abc03c50cd072e9e6c9b389c5f61836b", "rev": "3a70dd92993182f8e514700ccf5b1ae9fc8a3b8d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-22.11", "ref": "nixos-23.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -359,7 +378,7 @@
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-22_11": "nixpkgs-22_11", "nixpkgs-22_11": "nixpkgs-22_11",
"utils": "utils_2" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1671659164, "lastModified": 1671659164,
@ -381,14 +400,14 @@
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable_2"
}, },
"locked": { "locked": {
"lastModified": 1685242617, "lastModified": 1685434555,
"narHash": "sha256-UBPXGfGwGMJm2Wj9kDj8+TMMK2PTouSM/TpiXYtaqtQ=", "narHash": "sha256-aZl0yeaYX3T2L3W3yXOd3S9OfpS+8YUOT2b1KwrSf6E=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "3e016341d4dca6ce7c62316f90e66341841a30f9", "rev": "876846cde9762ae563f018c17993354875e2538e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -398,22 +417,37 @@
"type": "github" "type": "github"
} }
}, },
"utils": { "systems": {
"locked": { "locked": {
"lastModified": 1667395993, "lastModified": 1681028828,
"narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "numtide", "owner": "nix-systems",
"repo": "flake-utils", "repo": "default",
"rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "numtide", "owner": "nix-systems",
"repo": "flake-utils", "repo": "default",
"type": "github" "type": "github"
} }
}, },
"utils_2": { "utils": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"locked": { "locked": {
"lastModified": 1605370193, "lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=", "narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",

View File

@ -1,9 +1,8 @@
{ {
description = description = "Flake to define configurations of 'elss' - ellmauthaler stefan's systems";
"Flake to define configurations of 'elss' - ellmauthaler stefan's systems";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
#nix = { #nix = {
@ -12,14 +11,14 @@
# inputs.nixpkgs.follows = "nixpkgs"; # inputs.nixpkgs.follows = "nixpkgs";
#}; #};
nixos-hardware = { url = "github:NixOS/nixos-hardware/master"; }; nixos-hardware = {url = "github:NixOS/nixos-hardware/master";};
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-22.11"; url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-utils-plus = { url = "github:gytis-ivaskevicius/flake-utils-plus"; }; flake-utils-plus = {url = "github:gytis-ivaskevicius/flake-utils-plus";};
emacs-overlay = { emacs-overlay = {
url = "github:nix-community/emacs-overlay"; url = "github:nix-community/emacs-overlay";
@ -53,16 +52,27 @@
}; };
}; };
outputs = { self, nixpkgs, flake-utils-plus, ... }@inputs: outputs = {
let self,
extended-lib = nixpkgs.lib.extend nixpkgs,
(final: prev: { elss = (import ./lib { lib = final; }) prev; }); flake-utils-plus,
inherit (extended-lib.elss) ...
discoverModules moduleNames discoverMachines withModules } @ inputs: let
discoverTemplates; extended-lib =
in flake-utils-plus.lib.mkFlake rec { nixpkgs.lib.extend
(final: prev: {elss = (import ./lib {lib = final;}) prev;});
inherit
(extended-lib.elss)
discoverModules
moduleNames
discoverMachines
withModules
discoverTemplates
;
in
flake-utils-plus.lib.mkFlake rec {
inherit self inputs; inherit self inputs;
supportedSystems = [ "x86_64-linux" ]; supportedSystems = ["x86_64-linux"];
lib = extended-lib; lib = extended-lib;
@ -82,7 +92,7 @@
}; };
channels.nixpkgs.overlaysBuilder = channels: [ channels.nixpkgs.overlaysBuilder = channels: [
(final: prev: { unstable = channels.nixpkgs-unstable; }) (final: prev: {unstable = channels.nixpkgs-unstable;})
(flake-utils-plus.lib.genPkgOverlay inputs.comma "comma") (flake-utils-plus.lib.genPkgOverlay inputs.comma "comma")
#inputs.nix.overlay #inputs.nix.overlay
inputs.emacs-overlay.overlay inputs.emacs-overlay.overlay
@ -91,32 +101,38 @@
hostDefaults = { hostDefaults = {
system = "x86_64-linux"; system = "x86_64-linux";
channelName = "nixpkgs"; channelName = "nixpkgs";
modules = [ modules =
[
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
inputs.dwarffs.nixosModules.dwarffs inputs.dwarffs.nixosModules.dwarffs
inputs.simple-nixos-mailserver.nixosModules.mailserver inputs.simple-nixos-mailserver.nixosModules.mailserver
./common/wireguard.nix ./common/wireguard.nix
] ++ (map (name: ./modules + "/${name}") (moduleNames ./modules)); ]
++ (map (name: ./modules + "/${name}") (moduleNames ./modules));
specialArgs = { specialArgs = {
nixos-hardware = inputs.nixos-hardware.nixosModules; nixos-hardware = inputs.nixos-hardware.nixosModules;
inherit inputs; inherit inputs;
}; };
extraArgs = { extraArgs = {
homeConfigurations = withModules ./users ({ name, path, }: homeConfigurations = withModules ./users ({
name,
path,
}:
#import (./users + "/${name}") #import (./users + "/${name}")
import path); import path);
}; };
}; };
hosts = hosts =
discoverMachines ./machines { specialArgs = { lib = extended-lib; }; }; discoverMachines ./machines {specialArgs = {lib = extended-lib;};};
nixosModules = discoverModules ./modules; nixosModules = discoverModules ./modules;
homeConfigurations = withModules ./users (name: homeConfigurations = withModules ./users (name: let
let username = extended-lib.removeSuffix ".nix" name; username = extended-lib.removeSuffix ".nix" name;
in inputs.home-manager.lib.homeManagerConfiguration { in
inputs.home-manager.lib.homeManagerConfiguration {
configuration = import (./users + "/${name}"); configuration = import (./users + "/${name}");
inherit username; inherit username;
system = "x86_64-linux"; system = "x86_64-linux";
@ -125,7 +141,8 @@
}); });
outputsBuilder = channels: { outputsBuilder = channels: {
devShells = let pkgs = channels.nixpkgs; devShells = let
pkgs = channels.nixpkgs;
in rec { in rec {
sops = import ./secrets/shell.nix { sops = import ./secrets/shell.nix {
pkgs = channels.nixpkgs; pkgs = channels.nixpkgs;
@ -164,14 +181,12 @@
templates = discoverTemplates ./templates { templates = discoverTemplates ./templates {
base = { base = {
description = "Basic setup of tools in nixpkgs/unstable"; description = "Basic setup of tools in nixpkgs/unstable";
welcomeText = welcomeText = "Change into the folder and add the wanted packages to the buildInputs";
"Change into the folder and add the wanted packages to the buildInputs";
}; };
rust = { rust = {
description = "Rust development environment flake"; description = "Rust development environment flake";
welcomeText = welcomeText = "Change into the folder and follow the prompt to create an automatic rust environment in this folder";
"Change into the folder and follow the prompt to create an automatic rust environment in this folder";
}; };
jupyter = { jupyter = {
description = "Jupyter server flake"; description = "Jupyter server flake";

View File

@ -8,9 +8,7 @@
modulesPath, modulesPath,
... ...
}: { }: {
imports = [ imports = [(modulesPath + "/installer/scan/not-detected.nix")];
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"]; boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
@ -32,11 +30,7 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ swapDevices = [{device = "/dev/disk/by-uuid/0069f1fa-dd8e-4c0a-8f01-a576af29909e";}];
{device = "/dev/disk/by-uuid/0069f1fa-dd8e-4c0a-8f01-a576af29909e";}
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
} }

View File

@ -8,9 +8,7 @@
modulesPath, modulesPath,
... ...
}: { }: {
imports = [ imports = [(modulesPath + "/installer/scan/not-detected.nix")];
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"];
boot.initrd.kernelModules = []; boot.initrd.kernelModules = [];
@ -29,11 +27,7 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ swapDevices = [{device = "/dev/disk/by-uuid/93381a25-6704-408e-b091-cfda6cddbda0";}];
{device = "/dev/disk/by-uuid/93381a25-6704-408e-b091-cfda6cddbda0";}
];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
} }

View File

@ -630,9 +630,9 @@
(gofmt . ("gofmt")) (gofmt . ("gofmt"))
(google-java-format . ("google-java-format" "-")) (google-java-format . ("google-java-format" "-"))
(isort . ("isort" "-")) (isort . ("isort" "-"))
;(latexindent . ("latexindent" "--logfile=/dev/null")) (latexindent . ("latexindent" "--logfile=/dev/null"))
(mix-format . ("mix" "format" "-")) (mix-format . ("mix" "format" "-"))
(nixfmt . ("nixfmt")) (nixfmt . ("alejandra" "-"))
(rustfmt . ("rustfmt" "--quiet" "--emit" "stdout")) (rustfmt . ("rustfmt" "--quiet" "--emit" "stdout"))
(terraform . ("terraform" "fmt" "-")))) (terraform . ("terraform" "fmt" "-"))))
:preface :preface

View File

@ -12,27 +12,23 @@ with lib; {
services.nginx.virtualHosts."git.ellmauthaler.net" = { services.nginx.virtualHosts."git.ellmauthaler.net" = {
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
locations."/" = { locations."/" = {proxyPass = "http://localhost:3001";};
proxyPass = "http://localhost:3001";
};
}; };
services.gitea = { services.gitea = {
enable = true; enable = true;
settings.service = { settings.service = {DISABLE_REGISTRATION = true;};
DISABLE_REGISTRATION = true;
};
appName = "gitea: ellmauthaler.net gitea service"; appName = "gitea: ellmauthaler.net gitea service";
database = { database = {
type = "postgres"; type = "postgres";
host = "/run/posgresql"; host = "/run/posgresql";
}; };
domain = "git.ellmauthaler.net";
rootUrl = "https://git.ellmauthaler.net";
httpPort = 3001;
settings = { settings = {
repository = { repository = {DEFAULT_BRANCH = "main";};
DEFAULT_BRANCH = "main"; server = {
ROOT_URL = "https://git.ellmauthaler.net";
HTTP_PORT = 3001;
DOMAIN = "git.ellmauthaler.net";
}; };
}; };
}; };

View File

@ -9,7 +9,8 @@ with lib; {
cfg = config.elss.server.grocy; cfg = config.elss.server.grocy;
in in
mkIf cfg.enable { mkIf cfg.enable {
services.grocy = { services = {
grocy = {
enable = true; enable = true;
hostName = "grocy.ellmauthaler.net"; hostName = "grocy.ellmauthaler.net";
settings = { settings = {
@ -22,8 +23,8 @@ with lib; {
}; };
}; };
services.nginx.virtualHosts."grocy.ellmauthaler.net" = { nginx.virtualHosts."grocy.ellmauthaler.net" = {forceSSL = true;};
forceSSL = true; phpfpm.pools.grocy.phpPackage = mkForce pkgs.php81;
}; };
}; };
} }

View File

@ -12,7 +12,7 @@ with lib; {
elss.server.sql.enable = mkDefault true; elss.server.sql.enable = mkDefault true;
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud25; package = pkgs.nextcloud26;
hostName = "cloudstore.ellmauthaler.net"; hostName = "cloudstore.ellmauthaler.net";
https = true; https = true;
enableBrokenCiphersForSSE = false; enableBrokenCiphersForSSE = false;

View File

@ -13,8 +13,10 @@ with lib; {
mkIf cfg.enable { mkIf cfg.enable {
services.openssh = { services.openssh = {
enable = true; enable = true;
passwordAuthentication = false; settings = {
permitRootLogin = "no"; PasswordAuthentication = false;
PermitRootLogin = "no";
};
}; };
}; };
} }

View File

@ -1,7 +1,14 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
with lib; { with lib; {
config = let cfg = config.elss.graphical.xmonad; config = let
in mkIf cfg.enable { cfg = config.elss.graphical.xmonad;
in
mkIf cfg.enable {
elss.graphical.xserver = { elss.graphical.xserver = {
enable = true; enable = true;
autorandr.enable = true; autorandr.enable = true;
@ -17,7 +24,7 @@ with lib; {
displayManager.defaultSession = "none+xmonad"; displayManager.defaultSession = "none+xmonad";
libinput = { libinput = {
enable = true; enable = true;
touchpad = { disableWhileTyping = true; }; touchpad = {disableWhileTyping = true;};
}; };
}; };
upower.enable = true; upower.enable = true;
@ -28,6 +35,6 @@ with lib; {
pulse.enable = true; pulse.enable = true;
}; };
}; };
environment.systemPackages = with pkgs; [ firefox thunderbird ]; environment.systemPackages = with pkgs; [firefox thunderbird];
}; };
} }

View File

@ -1,11 +1,15 @@
{ pkgs ? import <nixpkgs> { }, sops-nix ? pkgs.callPackage <sops-nix> { } {
, name ? "secrets", ... }: pkgs ? import <nixpkgs> {},
let sops-nix ? pkgs.callPackage <sops-nix> {},
name ? "secrets",
...
}: let
sops-rekey = pkgs.writeShellScriptBin "sops-rekey" '' sops-rekey = pkgs.writeShellScriptBin "sops-rekey" ''
${pkgs.findutils}/bin/find . -wholename '*/secrets/*.yaml' -exec ${pkgs.sops}/bin/sops updatekeys {} \; ${pkgs.findutils}/bin/find . -wholename '*/secrets/*.yaml' -exec ${pkgs.sops}/bin/sops updatekeys {} \;
''; '';
in pkgs.mkShell { in
sopsPGPKeyDirs = [ ./keys/users ./keys/hosts ]; pkgs.mkShell {
sopsPGPKeyDirs = [./keys/users ./keys/hosts];
name = name; name = name;
nativeBuildInputs = [ nativeBuildInputs = [
sops-nix.sops-import-keys-hook sops-nix.sops-import-keys-hook
@ -13,4 +17,4 @@ in pkgs.mkShell {
sops-rekey sops-rekey
pkgs.wireguard-tools pkgs.wireguard-tools
]; ];
} }

View File

@ -2,7 +2,7 @@
description = "basic tool setup flake"; description = "basic tool setup flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus"; flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus";
@ -17,14 +17,9 @@
... ...
} @ inputs: } @ inputs:
{} {}
// (flake-utils.lib.eachDefaultSystem ( // (flake-utils.lib.eachDefaultSystem (system: let
system: let unstable = import nixpkgs-unstable {inherit system;};
unstable = import nixpkgs-unstable { pkgs = import nixpkgs {inherit system;};
inherit system;
};
pkgs = import nixpkgs {
inherit system;
};
in rec { in rec {
devShell = pkgs.mkShell { devShell = pkgs.mkShell {
buildInputs = [ buildInputs = [
@ -32,6 +27,5 @@
# pkgs.clingo # pkgs.clingo
]; ];
}; };
} }));
));
} }

View File

@ -2,7 +2,7 @@
description = "basic rust flake"; description = "basic rust flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay = { rust-overlay = {
url = "github:oxalica/rust-overlay"; url = "github:oxalica/rust-overlay";
@ -30,8 +30,7 @@
{ {
#overlay = import ./nix { inherit gitignoresrc; }; #overlay = import ./nix { inherit gitignoresrc; };
} }
// (flake-utils.lib.eachDefaultSystem ( // (flake-utils.lib.eachDefaultSystem (system: let
system: let
unstable = import nixpkgs-unstable {inherit system;}; unstable = import nixpkgs-unstable {inherit system;};
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
@ -54,6 +53,5 @@
pkgs.kcov pkgs.kcov
]; ];
}; };
} }));
));
} }

View File

@ -7,10 +7,7 @@
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
window = { window = {decorations = "none";};
decorations = "none";
};
alt_send_esc = true;
font = { font = {
normal.family = "Hasklug Nerd Font"; normal.family = "Hasklug Nerd Font";
size = 14; size = 14;

View File

@ -1,17 +1,23 @@
{ config, pkgs, lib, nixosConfig, ... }: {
config,
pkgs,
lib,
nixosConfig,
...
}:
with lib; { with lib; {
config = let cfg = nixosConfig.elss.graphical.xserver.autorandr; config = let
in mkIf cfg.enable { cfg = nixosConfig.elss.graphical.xserver.autorandr;
in
mkIf cfg.enable {
#services.autorandr = { enable = true; }; #services.autorandr = { enable = true; };
programs.autorandr = { programs.autorandr = {
enable = true; enable = true;
profiles = { profiles = {
"home" = { "home" = {
fingerprint = { fingerprint = {
DP-1 = DP-1 = "00ffffffffffff0009d1507945540000221e0104b54627783f5995af4f42af260f5054a56b80d1c0b300a9c08180810081c0010101014dd000a0f0703e8030203500ba892100001a000000ff004e384c30323634373031390a20000000fd00283c87873c010a202020202020000000fc0042656e5120455733323730550a01bc02033af1515d5e5f6061101f222120051404131203012309070783010000e200c06d030c0020003878200060010203e305e001e6060501544c2ca36600a0f0701f8030203500ba892100001a565e00a0a0a029502f203500ba892100001abf650050a0402e6008200808ba892100001c000000000000000000000000000000bf";
"00ffffffffffff0009d1507945540000221e0104b54627783f5995af4f42af260f5054a56b80d1c0b300a9c08180810081c0010101014dd000a0f0703e8030203500ba892100001a000000ff004e384c30323634373031390a20000000fd00283c87873c010a202020202020000000fc0042656e5120455733323730550a01bc02033af1515d5e5f6061101f222120051404131203012309070783010000e200c06d030c0020003878200060010203e305e001e6060501544c2ca36600a0f0701f8030203500ba892100001a565e00a0a0a029502f203500ba892100001abf650050a0402e6008200808ba892100001c000000000000000000000000000000bf"; eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
eDP-1 =
"00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
}; };
config = { config = {
eDP-1.enable = false; eDP-1.enable = false;
@ -26,8 +32,7 @@ with lib; {
}; };
}; };
"mobile" = { "mobile" = {
fingerprint.eDP-1 = fingerprint.eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
"00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
config = { config = {
eDP-1 = { eDP-1 = {
enable = true; enable = true;
@ -39,10 +44,8 @@ with lib; {
}; };
"work" = { "work" = {
fingerprint = { fingerprint = {
eDP-1 = eDP-1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
"00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006"; DP-2 = "00ffffffffffff0010acb5414c4133452c1e0104b53c22783eee95a3544c99260f5054a54b00e1c0d100d1c0b300a94081808100714f4dd000a0f0703e803020350055502100001a000000ff0031444e593132330a2020202020000000fd00184b1e8c36010a202020202020000000fc0044454c4c205532373230510a2001af020319f14c101f2005140413121103020123097f0783010000a36600a0f0703e803020350055502100001a565e00a0a0a029503020350055502100001a114400a0800025503020360055502100001a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d9";
DP-2 =
"00ffffffffffff0010acb5414c4133452c1e0104b53c22783eee95a3544c99260f5054a54b00e1c0d100d1c0b300a94081808100714f4dd000a0f0703e803020350055502100001a000000ff0031444e593132330a2020202020000000fd00184b1e8c36010a202020202020000000fc0044454c4c205532373230510a2001af020319f14c101f2005140413121103020123097f0783010000a36600a0f0703e803020350055502100001a565e00a0a0a029503020350055502100001a114400a0800025503020360055502100001a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d9";
}; };
config = { config = {
eDP-1 = { eDP-1 = {
@ -65,8 +68,7 @@ with lib; {
}; };
"home-nuc" = { "home-nuc" = {
fingerprint = { fingerprint = {
DP-2 = DP-2 = "00ffffffffffff0009d1507945540000221e0104b54627783f5995af4f42af260f5054a56b80d1c0b300a9c08180810081c0010101014dd000a0f0703e8030203500ba892100001a000000ff004e384c30323634373031390a20000000fd00283c87873c010a202020202020000000fc0042656e5120455733323730550a01bc02033af1515d5e5f6061101f222120051404131203012309070783010000e200c06d030c0020003878200060010203e305e001e6060501544c2ca36600a0f0701f8030203500ba892100001a565e00a0a0a029502f203500ba892100001abf650050a0402e6008200808ba892100001c000000000000000000000000000000bf";
"00ffffffffffff0009d1507945540000221e0104b54627783f5995af4f42af260f5054a56b80d1c0b300a9c08180810081c0010101014dd000a0f0703e8030203500ba892100001a000000ff004e384c30323634373031390a20000000fd00283c87873c010a202020202020000000fc0042656e5120455733323730550a01bc02033af1515d5e5f6061101f222120051404131203012309070783010000e200c06d030c0020003878200060010203e305e001e6060501544c2ca36600a0f0701f8030203500ba892100001a565e00a0a0a029502f203500ba892100001abf650050a0402e6008200808ba892100001c000000000000000000000000000000bf";
}; };
config = { config = {
DP-2 = { DP-2 = {
@ -82,10 +84,8 @@ with lib; {
"e3027" = { "e3027" = {
fingerprint = { fingerprint = {
e-DP1 = e-DP1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
"00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006"; DP-1 = "00ffffffffffff004ca306a7010101011715010380a05a780ade50a3544c99260f5054a10800814081c0950081809040b300a9400101283c80a070b023403020360040846300001a9e20009051201f304880360040846300001c000000fd0017550f5c11000a202020202020000000fc004550534f4e20504a0a202020200116020328f651901f202205140413030212110706161501230907078301000066030c00100080e200fd023a801871382d40582c450040846300001e011d801871382d40582c450040846300001e662156aa51001e30468f330040846300001e302a40c8608464301850130040846300001e00000000000000000000000000000089";
DP-1 =
"00ffffffffffff004ca306a7010101011715010380a05a780ade50a3544c99260f5054a10800814081c0950081809040b300a9400101283c80a070b023403020360040846300001a9e20009051201f304880360040846300001c000000fd0017550f5c11000a202020202020000000fc004550534f4e20504a0a202020200116020328f651901f202205140413030212110706161501230907078301000066030c00100080e200fd023a801871382d40582c450040846300001e011d801871382d40582c450040846300001e662156aa51001e30468f330040846300001e302a40c8608464301850130040846300001e00000000000000000000000000000089";
}; };
config = { config = {
eDP-1 = { eDP-1 = {
@ -105,10 +105,8 @@ with lib; {
"e3027-clone" = { "e3027-clone" = {
fingerprint = { fingerprint = {
e-DP1 = e-DP1 = "00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006";
"00ffffffffffff0006af2b2800000000001c0104a51d117802ee95a3544c99260f50540000000101010101010101010101010101010152d000a0f0703e803020350025a51000001a000000000000000000000000000000000000000000fe0039304e544880423133335a414e0000000000024103a8011100000b010a20200006"; DP-1 = "00ffffffffffff004ca306a7010101011715010380a05a780ade50a3544c99260f5054a10800814081c0950081809040b300a9400101283c80a070b023403020360040846300001a9e20009051201f304880360040846300001c000000fd0017550f5c11000a202020202020000000fc004550534f4e20504a0a202020200116020328f651901f202205140413030212110706161501230907078301000066030c00100080e200fd023a801871382d40582c450040846300001e011d801871382d40582c450040846300001e662156aa51001e30468f330040846300001e302a40c8608464301850130040846300001e00000000000000000000000000000089";
DP-1 =
"00ffffffffffff004ca306a7010101011715010380a05a780ade50a3544c99260f5054a10800814081c0950081809040b300a9400101283c80a070b023403020360040846300001a9e20009051201f304880360040846300001c000000fd0017550f5c11000a202020202020000000fc004550534f4e20504a0a202020200116020328f651901f202205140413030212110706161501230907078301000066030c00100080e200fd023a801871382d40582c450040846300001e011d801871382d40582c450040846300001e662156aa51001e30468f330040846300001e302a40c8608464301850130040846300001e00000000000000000000000000000089";
}; };
config = { config = {
eDP-1 = { eDP-1 = {

View File

@ -1,7 +1,15 @@
{ config, pkgs, lib, nixosConfig, ... }: {
config,
pkgs,
lib,
nixosConfig,
...
}:
with lib; { with lib; {
config = let cfg = nixosConfig.elss.users.dunst; config = let
in mkIf cfg.enable { cfg = nixosConfig.elss.users.dunst;
in
mkIf cfg.enable {
services.dunst = { services.dunst = {
iconTheme = { iconTheme = {
package = pkgs.numix-icon-theme; package = pkgs.numix-icon-theme;

View File

@ -1,7 +1,15 @@
{ config, pkgs, lib, nixosConfig, ... }: {
config,
pkgs,
lib,
nixosConfig,
...
}:
with lib; { with lib; {
config = let cfg = nixosConfig.elss.graphical.xmonad.polybar; config = let
in mkIf cfg.enable { cfg = nixosConfig.elss.graphical.xmonad.polybar;
in
mkIf cfg.enable {
services.polybar = { services.polybar = {
enable = true; enable = true;
package = pkgs.polybarFull; package = pkgs.polybarFull;
@ -59,11 +67,9 @@ with lib; {
"module/dunst" = { "module/dunst" = {
type = "custom/script"; type = "custom/script";
exec = exec = "PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl is-paused | ${pkgs.gnugrep}/bin/grep -q true && echo || echo ";
"PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl is-paused | ${pkgs.gnugrep}/bin/grep -q true && echo || echo ";
interval = 10; interval = 10;
click-left = click-left = "PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl set-paused toggle";
"PATH=${pkgs.dbus}/bin/:$PATH ${pkgs.dunst}/bin/dunstctl set-paused toggle";
}; };
"module/volume" = { "module/volume" = {
@ -71,7 +77,7 @@ with lib; {
format.volume = "<ramp-volume> <label-volume>"; format.volume = "<ramp-volume> <label-volume>";
label.muted.text = "🔇"; label.muted.text = "🔇";
label.muted.foreground = "#666"; label.muted.foreground = "#666";
ramp.volume = [ "🔈" "🔉" "🔊" ]; ramp.volume = ["🔈" "🔉" "🔊"];
click.right = "${pkgs.pavucontrol}/bin/pavucontrol &"; click.right = "${pkgs.pavucontrol}/bin/pavucontrol &";
# format-volume-underline = Base2; # format-volume-underline = Base2;
# format-muted-underline = Base2; # format-muted-underline = Base2;
@ -126,7 +132,7 @@ with lib; {
}; };
systemd.user.services.polybar = { systemd.user.services.polybar = {
Install.WantedBy = [ "graphical-session.target" ]; Install.WantedBy = ["graphical-session.target"];
}; };
}; };
} }

View File

@ -1,7 +1,15 @@
{ config, pkgs, lib, nixosConfig, ... }: {
config,
pkgs,
lib,
nixosConfig,
...
}:
with lib; { with lib; {
config = let cfg = nixosConfig.elss.graphical.xmonad; config = let
in mkIf cfg.enable { cfg = nixosConfig.elss.graphical.xmonad;
in
mkIf cfg.enable {
xsession = { xsession = {
windowManager.xmonad = { windowManager.xmonad = {
enable = true; enable = true;
@ -18,7 +26,6 @@ with lib; {
''; '';
config = conf/xmonad/xmonad.hs; config = conf/xmonad/xmonad.hs;
}; };
}; };
services = { services = {
@ -34,6 +41,6 @@ with lib; {
gtk.enable = true; gtk.enable = true;
home.packages = with pkgs; [ rofi polybarFull firefox pulseaudioFull ]; home.packages = with pkgs; [rofi polybarFull firefox pulseaudioFull];
}; };
} }