From b9d4d57b6d493eaa2d5baac9d36ec49064cbdaa8 Mon Sep 17 00:00:00 2001 From: serenity-F Date: Thu, 26 Dec 2024 19:16:24 +1000 Subject: [PATCH] adding global username option maybe? --- flake.nix | 115 ++++++++++++++++--------------- hosts/hades/modules/hardware.nix | 5 ++ 2 files changed, 63 insertions(+), 57 deletions(-) diff --git a/flake.nix b/flake.nix index 4b00182..16c413a 100755 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,4 @@ -## SerenityOS +# # SerenityOS ## ## - A study in linux, packaging, user experience, ## system and desktop environments, themeing, @@ -37,7 +37,7 @@ ## - Work on commenting and reformating flake is ongoing inputs = { - + ## Nixpkgs version ## there was a way to have unstable as an overlay, ## will set it back up, lazy rn, for now pick one @@ -52,12 +52,10 @@ }; ## Flake parts - flake-utils = { - url = "github:numtide/flake-utils"; - }; + flake-utils = { url = "github:numtide/flake-utils"; }; flake-parts = { url = "github:hercules-ci/flake-parts"; - #inputs.nixpkgs.follows = "nixpkgs"; + #inputs.nixpkgs.follows = "nixpkgs"; }; ## Lix, alternative nix implementation @@ -72,9 +70,7 @@ }; ## Musnix - https://github.com/musnix/musnix - musnix = { - url = "github:musnix/musnix"; - }; + musnix = { url = "github:musnix/musnix"; }; ## Secrets management sops-nix = { @@ -82,13 +78,13 @@ ## optional, not necessary for the module inputs.nixpkgs.follows = "nixpkgs"; }; - + ## Dots management home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - + ## Zoomer text editor nixvim = { url = "github:nix-community/nixvim"; @@ -100,7 +96,7 @@ ## Easy themeing <3 nix-colors.url = "github:misterio77/nix-colors"; - + ## nixos generators nixos-generators = { url = "github:nix-community/nixos-generators"; @@ -111,58 +107,63 @@ outputs = { self, nixpkgs, disko, sops-nix, musnix, nixos-generators, ... } - @ inputs: let - inherit (self) outputs; - in { + @inputs: + let - ## Installer for easy nuke-n-paves - packages.x86_64-linux = { - install-iso = nixos-generators.nixosGenerate { - system = "x86_64-linux"; - modules = [ - ./hosts/iso - ]; - format = "install-iso"; - specialArgs = {inherit inputs outputs;}; - }; - }; + inherit (self) outputs; - ## Available through 'nixos-rebuild --flake /path/to/flake/directory#yourhostname' - nixosConfigurations = { + username = "Serenity"; - ## Desktop - hades = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - modules = [ - musnix.nixosModules.musnix - disko.nixosModules.disko - sops-nix.nixosModules.sops - ./hosts/hades/default.nix - ]; + in { + + ## Installer for easy nuke-n-paves + packages.x86_64-linux = { + install-iso = nixos-generators.nixosGenerate { + system = "x86_64-linux"; + modules = [ ./hosts/iso ]; + format = "install-iso"; + specialArgs = { inherit inputs outputs; }; + }; }; - ## Home server - orcus = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - modules = [ - disko.nixosModules.disko - sops-nix.nixosModules.sops - ./hosts/orcus - ]; - }; + ## Available through 'nixos-rebuild --flake /path/to/flake/directory#yourhostname' + nixosConfigurations = { + + ## Desktop + hades = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs outputs; + inherit username; + }; + modules = [ + musnix.nixosModules.musnix + disko.nixosModules.disko + sops-nix.nixosModules.sops + ./hosts/hades + ]; + }; + + ## Home server + orcus = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs outputs; }; + modules = [ + disko.nixosModules.disko + sops-nix.nixosModules.sops + ./hosts/orcus + ]; + }; + + ## Laptop + persephone = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs outputs; }; + modules = [ + disko.nixosModules.disko + sops-nix.nixosModules.sops + ./hosts/persephone + ]; + }; - ## Laptop - persephone = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs outputs;}; - modules = [ - disko.nixosModules.disko - sops-nix.nixosModules.sops - ./hosts/persephone - ]; }; }; - - }; } - diff --git a/hosts/hades/modules/hardware.nix b/hosts/hades/modules/hardware.nix index 9526d90..37388a1 100755 --- a/hosts/hades/modules/hardware.nix +++ b/hosts/hades/modules/hardware.nix @@ -34,6 +34,11 @@ options = [ "fmask=0022" "dmask=0022" ]; }; + fileSystems."/run/media/${username}/Tartarus" = { + device = "/dev/disk/by-uuid/26d8d9d1-67d2-4d61-a092-10ed7368b9f6"; + fsType = "ext4"; + }; + swapDevices = [{ device = "/dev/disk/by-uuid/b7ccf8c3-3641-4035-b91f-f7e54c6dd380"; }];