diff --git a/flake.nix b/flake.nix index 2f2bda4..31e150b 100644 --- a/flake.nix +++ b/flake.nix @@ -41,10 +41,6 @@ home-manager.nixosModules.home-manager agenix.nixosModules.default ]; - - # home-manager.useGlobalPkgs = true; - # home-manager.useUserPackages = true; - # home-manager.extraSpecialArgs = inputs; }; }) {} systems; }; diff --git a/hosts/nixos-test/default.nix b/hosts/nixos-test/default.nix index 40ca3c9..29692d8 100644 --- a/hosts/nixos-test/default.nix +++ b/hosts/nixos-test/default.nix @@ -43,9 +43,9 @@ }; modules = { - # users.florian = { + home.users.florian = { - # }; + }; desktop = { plasma.enable = true; diff --git a/modules/default.nix b/modules/default.nix index 5e136d4..3629195 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,8 +2,8 @@ { imports = [ - # ./cli ./desktop + ./home ./server ./system ]; diff --git a/modules/home/apps/default.nix b/modules/home/apps/default.nix new file mode 100644 index 0000000..ff42f42 --- /dev/null +++ b/modules/home/apps/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: + +{ + imports = [ + ./chromium + ./flatpak + ./jetbrainsToolbox + ./kitty + ./vscode + ]; +} \ No newline at end of file diff --git a/modules/home/default.nix b/modules/home/default.nix index ef55d72..88cf1ad 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,6 +1,43 @@ -{ config, pkgs, ... }: +inputs@{ config, pkgs, lib, ... }: +with lib; +let + cfg = config.modules.home; + + userOpts = { name, userconfig, ... }: { + options = {}; + config = { + # home = { + # username = name; + # homeDirectory = "/home/${name}"; + # stateVersion = "24.05"; + # }; + }; + }; +in { - imports = [ - ]; -} \ No newline at end of file + options.modules.home = { + users = mkOption { + default = {}; + type = with types; attrsOf (submodule userOpts); + example = { + alice = { + shell.atuin.enable = true; + shell.direnv.enable = true; + shell.git.enable = true; + shell.zsh.enable = true; + }; + }; + description = '' + Additional user home configuration + ''; + }; + }; + config = { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = inputs; + home-manager.users = mapAttrs (name: userconfig: (import ./home.nix (inputs // { name = name; userconfig = userconfig; }))) cfg.users; + }; +} + diff --git a/modules/home/home.nix b/modules/home/home.nix new file mode 100644 index 0000000..b40d028 --- /dev/null +++ b/modules/home/home.nix @@ -0,0 +1,8 @@ +{ config, pkgs, ... }: + +{ + imports = [ + # ./apps + # ./shell + ]; +} \ No newline at end of file diff --git a/modules/home/cli/atuin/default.nix b/modules/home/shell/atuin/default.nix similarity index 100% rename from modules/home/cli/atuin/default.nix rename to modules/home/shell/atuin/default.nix diff --git a/modules/home/cli/default.nix b/modules/home/shell/default.nix similarity index 100% rename from modules/home/cli/default.nix rename to modules/home/shell/default.nix diff --git a/modules/home/cli/direnv/default.nix b/modules/home/shell/direnv/default.nix similarity index 100% rename from modules/home/cli/direnv/default.nix rename to modules/home/shell/direnv/default.nix diff --git a/modules/home/cli/git/default.nix b/modules/home/shell/git/default.nix similarity index 100% rename from modules/home/cli/git/default.nix rename to modules/home/shell/git/default.nix diff --git a/modules/home/cli/zsh/default.nix b/modules/home/shell/zsh/default.nix similarity index 100% rename from modules/home/cli/zsh/default.nix rename to modules/home/shell/zsh/default.nix diff --git a/modules/home/cli/zsh/p10k.zsh b/modules/home/shell/zsh/p10k.zsh similarity index 100% rename from modules/home/cli/zsh/p10k.zsh rename to modules/home/shell/zsh/p10k.zsh