diff --git a/core/default.nix b/core/default.nix index abe78bd..1a8185d 100755 --- a/core/default.nix +++ b/core/default.nix @@ -10,7 +10,7 @@ ## Semi-modularised config ./packages.nix # system-level packages - needs tidying ./modules # additional modules to import - ../home/users # user-level packages in ../home/programs/ + ../home # user-level packages in ../home/programs/ ]; diff --git a/home/default.nix b/home/default.nix index 71a9b6d..4787a4a 100755 --- a/home/default.nix +++ b/home/default.nix @@ -1,18 +1,80 @@ -{ ... }: +{ inputs, outputs, config, pkgs, flakePath, disksPath, primaryUser, homeDir, ... }: + +let + hostname = "${config.networking.hostName}"; +in { imports = [ - ## Import desktop configs - ./desktop - ## Import program configs - ./programs + + ## Modules + inputs.home-manager.nixosModules.default # home-manager module + #../../home # home-manager configuration + + ## Users + #./u-username.nix + + ## User themes - + ## to set a different theme for a user, + ## create a theme by copying an existing + ## one as a template and import it here, + ## then - I haven't figured it out yet :D + #../resources # eventually have all theme imports automated + #../resources/themes # base theme options + #../resources/themes/SerenityOS.nix # default theme + ]; - ## Enabling home-manager - programs.home-manager.enable = true; # Declarative dots - systemd.user.startServices = "sd-switch"; + ## Primary user configuration - + ## to create additional users, copy all options + ## below to a new file akin to `u-username.nix`, + ## or `u-username/default.nix` with more modules, + ## making sure to replace all instances of + ## `${primaryUser}` with the new username. - home.stateVersion = "24.11"; + ## System-level user declarations + users.users = { + ${primaryUser} = { + description = "Serenity Amalgam"; + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" "gamemode" "audio" ]; + ## be sure to change this with 'passwd' + initialPassword = "password"; + ## A catgirl's favourite shell + shell = pkgs.fish; + }; + }; + + ## home-manager configuration + home-manager = { + verbose = true; # enables verbose output on activation + extraSpecialArgs = { # passes in specialArgs from flake.nix + inherit inputs outputs; + inherit flakePath disksPath; + inherit primaryUser homeDir; + inherit hostname; + }; + users = { + ${primaryUser} = { + imports = [ + ## Home configuration - + ## currently all users share the same home + ## configuration, though each has separate + ## home directories. Additional modules + ## can be declared alongside `u-username/default.nix` + ## and then imported in this section. + ../../home + ]; + home = { + username = "${primaryUser}"; + homeDirectory = "${homeDir}"; + }; + }; + }; + backupFileExtension = "backup"; # prevents errors on activation + useGlobalPkgs = true; # ensures all packages declared follow - + useUserPackages = true; # the same nix-channel as in the flake.nix + }; } diff --git a/home/home.nix b/home/home.nix new file mode 100755 index 0000000..d83b2c8 --- /dev/null +++ b/home/home.nix @@ -0,0 +1,21 @@ +{ ... }: + +{ + + imports = [ + ## Import desktop configs + ./desktop + ## Import program configs + ./programs + ## Import user themes + ./resources/themes + ./resources/themes/SerenityOS.nix + ]; + + ## Enabling home-manager + programs.home-manager.enable = true; # Declarative dots + systemd.user.startServices = "sd-switch"; + + home.stateVersion = "24.11"; + +} diff --git a/home/users/default.nix b/home/users/default.nix deleted file mode 100755 index af2cb17..0000000 --- a/home/users/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ inputs, outputs, config, pkgs, flakePath, disksPath, primaryUser, homeDir, ... }: - -let - hostname = "${config.networking.hostName}"; -in - -{ - - imports = [ - - ## Modules - inputs.home-manager.nixosModules.default # home-manager module - #../../home # home-manager configuration - - ## Users - #./u-username.nix - - ## User themes - - ## to set a different theme for a user, - ## create a theme by copying an existing - ## one as a template and import it here, - ## then - I haven't figured it out yet :D - #../resources # eventually have all theme imports automated - #../resources/themes # base theme options - #../resources/themes/SerenityOS.nix # default theme - - ]; - - ## Primary user configuration - - ## to create additional users, copy all options - ## below to a new file akin to `u-username.nix`, - ## or `u-username/default.nix` with more modules, - ## making sure to replace all instances of - ## `${primaryUser}` with the new username. - - ## System-level user declarations - users.users = { - ${primaryUser} = { - description = "Serenity Amalgam"; - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" "gamemode" "audio" ]; - ## be sure to change this with 'passwd' - initialPassword = "password"; - ## A catgirl's favourite shell - shell = pkgs.fish; - }; - }; - - ## home-manager configuration - home-manager = { - verbose = true; # enables verbose output on activation - extraSpecialArgs = { # passes in specialArgs from flake.nix - inherit inputs outputs; - inherit flakePath disksPath; - inherit primaryUser homeDir; - inherit hostname; - }; - users = { - ${primaryUser} = { - imports = [ - ## Home configuration - - ## currently all users share the same home - ## configuration, though each has separate - ## home directories. Additional modules - ## can be declared alongside `u-username/default.nix` - ## and then imported in this section. - #../../home - ./u-serenity.nix - ]; - home = { - username = "${primaryUser}"; - homeDirectory = "${homeDir}"; - }; - }; - }; - backupFileExtension = "backup"; # prevents errors on activation - useGlobalPkgs = true; # ensures all packages declared follow - - useUserPackages = true; # the same nix-channel as in the flake.nix - }; - -} diff --git a/home/users/u-serenity.nix b/home/users/u-serenity.nix deleted file mode 100755 index 3a3ec61..0000000 --- a/home/users/u-serenity.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ ... }: - -{ - - imports = [ - ## Import user theme - ../resources/themes - ../resources/themes/SerenityOS.nix - ## Import programs - ../../home - ]; - -}