From c165dbd9a3ed8b37cf6455497ecafc6231627142 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Sun, 23 Mar 2025 21:04:12 +0100 Subject: [PATCH] calling it, multi user is building!!! --- hosts/manwe/default.nix | 11 ++++++ hosts/manwe/users/kaas/default.nix | 50 ++++++++++++++++++++++++ lib/_root.nix | 6 +-- lib/nixos.nix | 13 +++--- modules/home/desktop/editors/default.nix | 2 +- modules/home/themes/default.nix | 25 ------------ modules/system/theming.nix | 31 ++++++++++++++- shell.nix | 4 -- 8 files changed, 100 insertions(+), 42 deletions(-) create mode 100644 hosts/manwe/users/kaas/default.nix delete mode 100644 shell.nix diff --git a/hosts/manwe/default.nix b/hosts/manwe/default.nix index ca2872f..1600b67 100644 --- a/hosts/manwe/default.nix +++ b/hosts/manwe/default.nix @@ -16,5 +16,16 @@ # EXPERIMENTS services.auth.enable = true; + + root = { + user = { + full_name = "__ROOT__"; + email = "__ROOT__@${config.networking.hostName}"; + }; + + shell = { + default = "zsh"; + }; + }; }; } diff --git a/hosts/manwe/users/kaas/default.nix b/hosts/manwe/users/kaas/default.nix new file mode 100644 index 0000000..42a3fed --- /dev/null +++ b/hosts/manwe/users/kaas/default.nix @@ -0,0 +1,50 @@ +{ ... }: +{ + user = { + full_name = "KAAS"; + email = "kaas@kaas.kaas"; + is_trusted = false; + }; + + themes = { + enable = true; + theme = "everforest"; + polarity = "dark"; + }; + + develop = { + rust.enable = true; + js.enable = true; + dotnet.enable = true; + }; + + desktop = { + plasma = { + enable = true; + # autoLogin = true; + }; + + applications = { + email.enable = true; + }; + + terminal = { + default = "ghostty"; + ghostty.enable = true; + }; + + editors = { + default = "nvim"; + nvim.enable = true; + }; + + browsers = { + default = "chromium"; + chrome.enable = true; + }; + }; + + shell = { + default = "zsh"; + }; +} diff --git a/lib/_root.nix b/lib/_root.nix index fc4a10e..214e0eb 100644 --- a/lib/_root.nix +++ b/lib/_root.nix @@ -1,10 +1,8 @@ -args@{ self, inputs, lib, pkgs, system ? "", config, options, ... }: let +args@{ inputs, lib, pkgs, config, options, ... }: let inherit (lib.my) mapModulesRec'; in { - imports = [ - # (import ../modules/home/shell/default.nix (args // { user = "root"; })) - ] + imports = [] ++(mapModulesRec' ../modules/home (file: (import file (args // { user = "root"; })))); config = { diff --git a/lib/nixos.nix b/lib/nixos.nix index f3959f4..82021ca 100644 --- a/lib/nixos.nix +++ b/lib/nixos.nix @@ -38,7 +38,6 @@ in rec imports = [ inputs.home-manager.nixosModules.home-manager "${path}/hardware.nix" - ./_root.nix ] ++ (mapModulesRec' ../modules/system import); @@ -59,15 +58,15 @@ in rec }) (filterAttrs (n: v: !elem n ["system"]) attrs) (import path) + (args@{ inputs, lib, pkgs, config, options, ... }: { + imports = mapModulesRec' ../modules/home (file: (import file (args // { user = "root"; }))); + }) ] - ++ (map (user: { - _module.args.user = user; - - imports = [] - ++ (mapModulesRec' ../modules/home (file: file)); + ++ (map (user: (args@{ inputs, lib, pkgs, config, options, ... }: { + imports = mapModulesRec' ../modules/home (file: (import file (args // { inherit user; }))); modules.${user} = (import "${path}/users/${user}/default.nix" args); - }) users); + })) users); }; mapHosts = dir: attrs @ {system ? system, ...}: diff --git a/modules/home/desktop/editors/default.nix b/modules/home/desktop/editors/default.nix index 2c6d1dc..292f324 100644 --- a/modules/home/desktop/editors/default.nix +++ b/modules/home/desktop/editors/default.nix @@ -32,7 +32,7 @@ in { (mkIf (cfg.default == "nvim") { home-manager.users.${user}.home.packages = attrValues { inherit (pkgs) imagemagick editorconfig-core-c sqlite deno pandoc nuspell; - inherit (pkgs.hunspellDicts) en_GB nl_NL; + inherit (pkgs.hunspellDicts) nl_NL en_GB-ise; }; }) ]; diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix index be08b07..fedc748 100644 --- a/modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -43,34 +43,9 @@ in { # }; stylix = { - enable = true; - autoEnable = true; - base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; image = ./${cfg.theme}.jpg; polarity = cfg.polarity; - - fonts = { - serif = { - package = pkgs.dejavu_fonts; - name = "DejaVu Serif"; - }; - - sansSerif = { - package = pkgs.dejavu_fonts; - name = "DejaVu Sans"; - }; - - monospace = { - package = pkgs.nerd-fonts.jetbrains-mono; - name = "JetBrainsMono Nerd Font Mono"; - }; - - emoji = { - package = pkgs.noto-fonts-emoji; - name = "Noto Color Emoji"; - }; - }; }; }; } diff --git a/modules/system/theming.nix b/modules/system/theming.nix index 64dfa52..be7b853 100644 --- a/modules/system/theming.nix +++ b/modules/system/theming.nix @@ -1,4 +1,4 @@ -{ inputs, config, lib, ... }: +{ inputs, config, lib, pkgs, ... }: let inherit (lib) mkIf; inherit (lib.options) mkEnableOption; @@ -15,6 +15,35 @@ in }; config = mkIf cfg.enable { + stylix = { + enable = true; + autoEnable = true; + # base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; + # image = ./${cfg.theme}.jpg; + # polarity = cfg.polarity; + + fonts = { + serif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Serif"; + }; + + sansSerif = { + package = pkgs.dejavu_fonts; + name = "DejaVu Sans"; + }; + + monospace = { + package = pkgs.nerd-fonts.jetbrains-mono; + name = "JetBrainsMono Nerd Font Mono"; + }; + + emoji = { + package = pkgs.noto-fonts-emoji; + name = "Noto Color Emoji"; + }; + }; + }; }; } diff --git a/shell.nix b/shell.nix deleted file mode 100644 index 59e0938..0000000 --- a/shell.nix +++ /dev/null @@ -1,4 +0,0 @@ -{}: -{ - -}