adding global username option maybe?

This commit is contained in:
serenity-F 2024-12-26 19:16:24 +10:00
parent 5ba9dfbc92
commit b9d4d57b6d
2 changed files with 63 additions and 57 deletions

View file

@ -52,9 +52,7 @@
}; };
## Flake parts ## Flake parts
flake-utils = { flake-utils = { url = "github:numtide/flake-utils"; };
url = "github:numtide/flake-utils";
};
flake-parts = { flake-parts = {
url = "github:hercules-ci/flake-parts"; url = "github:hercules-ci/flake-parts";
#inputs.nixpkgs.follows = "nixpkgs"; #inputs.nixpkgs.follows = "nixpkgs";
@ -72,9 +70,7 @@
}; };
## Musnix - https://github.com/musnix/musnix ## Musnix - https://github.com/musnix/musnix
musnix = { musnix = { url = "github:musnix/musnix"; };
url = "github:musnix/musnix";
};
## Secrets management ## Secrets management
sops-nix = { sops-nix = {
@ -111,17 +107,20 @@
outputs = { self, nixpkgs, disko, sops-nix, musnix, nixos-generators, ... } outputs = { self, nixpkgs, disko, sops-nix, musnix, nixos-generators, ... }
@ inputs: let @inputs:
let
inherit (self) outputs; inherit (self) outputs;
username = "Serenity";
in { in {
## Installer for easy nuke-n-paves ## Installer for easy nuke-n-paves
packages.x86_64-linux = { packages.x86_64-linux = {
install-iso = nixos-generators.nixosGenerate { install-iso = nixos-generators.nixosGenerate {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [ ./hosts/iso ];
./hosts/iso
];
format = "install-iso"; format = "install-iso";
specialArgs = { inherit inputs outputs; }; specialArgs = { inherit inputs outputs; };
}; };
@ -132,12 +131,15 @@
## Desktop ## Desktop
hades = nixpkgs.lib.nixosSystem { hades = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;}; specialArgs = {
inherit inputs outputs;
inherit username;
};
modules = [ modules = [
musnix.nixosModules.musnix musnix.nixosModules.musnix
disko.nixosModules.disko disko.nixosModules.disko
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
./hosts/hades/default.nix ./hosts/hades
]; ];
}; };
@ -165,4 +167,3 @@
}; };
} }

View file

@ -34,6 +34,11 @@
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
fileSystems."/run/media/${username}/Tartarus" = {
device = "/dev/disk/by-uuid/26d8d9d1-67d2-4d61-a092-10ed7368b9f6";
fsType = "ext4";
};
swapDevices = swapDevices =
[{ device = "/dev/disk/by-uuid/b7ccf8c3-3641-4035-b91f-f7e54c6dd380"; }]; [{ device = "/dev/disk/by-uuid/b7ccf8c3-3641-4035-b91f-f7e54c6dd380"; }];