diff --git a/modules/hosts/default.nix b/modules/hosts/default.nix deleted file mode 100644 index 18730d7..0000000 --- a/modules/hosts/default.nix +++ /dev/null @@ -1,54 +0,0 @@ -{ self, inputs, ... }: { - - # this module defines all hosts and allocates users to those hosts - flake.nixosConfigurations = - let - - # users to include on machine - username = "serenity"; - #username2 = "foobar"; - - # shorten paths - inherit (inputs.nixpkgs.lib) nixosSystem; - homeImports = import "${self}/home/profiles"; - mod = "${self}/modules/system"; - # get the basic config to build on top of - inherit (import mod) base; - # get these into the module system - specialArgs = { inherit inputs self; }; - in - - { - - # declare hosts here - hades = nixosSystem { - inherit specialArgs; - modules = [ - - # specify host config directory - ./hades - - # users to include on machine - "${mod}/users/u-${username}.nix" - #"${mod}/users/u-${username2}.nix" - - # home manager - "${mod}/misc/hm-parts.nix" - { - home-manager = { - - # misc. hm settings - extraSpecialArgs = specialArgs; - backupFileExtension = ".hm-backup"; - - # user specific hm configurations present on machine - users.${username}.imports = homeImports."${username}"; - #users.${username2}.imports = homeImports."${username2}"; - - }; - } - - ]; - }; - -} diff --git a/modules/hosts/hades/default.nix b/modules/hosts/hades/default.nix index dd84114..0cc43f3 100644 --- a/modules/hosts/hades/default.nix +++ b/modules/hosts/hades/default.nix @@ -1,9 +1,10 @@ -{ - self, - inputs, - config, - ... -}: +{ self, inputs, config, ... }: + +let + + # default username here + username = "serenity"; + { # defines the hades specific config modules @@ -22,13 +23,13 @@ # extra modules self.modules.nixos.gaming + # users to include on host + self.modules.nixos.serenity # home manager and home manager imports inputs.home-manager.nixosModules.home-manager { - home-manager.backupFileExtension = "bak"; home-manager.users.serenity = { imports = [ - config.flake.homeModules.core-home config.flake.homeModules.desktop ]; }; diff --git a/modules/system/misc/flake-parts.nix b/modules/system/flake-parts.nix similarity index 100% rename from modules/system/misc/flake-parts.nix rename to modules/system/flake-parts.nix diff --git a/modules/system/misc/hm-parts.nix b/modules/system/misc/hm-parts.nix deleted file mode 100644 index 9be0bb5..0000000 --- a/modules/system/misc/hm-parts.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ inputs, ... }: - -{ - - # loads home manager modules - imports = [ - inputs.home-manager.flakeModules.home-manager - ]; - -} diff --git a/modules/users/serenity.nix b/modules/users/serenity.nix index 775a0ce..0a4c756 100644 --- a/modules/users/serenity.nix +++ b/modules/users/serenity.nix @@ -4,7 +4,7 @@ let # set your username here - name = "serenity"; + username = "serenity"; # qol variable to make paths shorter home = "/home/${name}"; @@ -14,7 +14,7 @@ in { # user module declaration - flake.modules.nixos.${name} = + flake.modules.nixos.serenity = { pkgs, ... }: @@ -29,7 +29,7 @@ in home-manager = { # home-manager settings - backupFileExtension = "backup"; + backupFileExtension = ".bak"; overwriteBackup = true; verbose = true; @@ -38,7 +38,7 @@ in useGlobalPkgs = true; # hm user declaration - users.${name} = { + users.serenity = { # user specific modules to import imports = [ @@ -54,7 +54,7 @@ in ]; # user declaration - users.users.${name} = { + users.users.serenity = { # remember to change this initialPassword = "password";