From 38dc8327d24d42881389a4a7a46727097214616e Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 24 Jul 2025 16:02:25 +0200 Subject: [PATCH] you know the drill at this point --- _modules/home/desktop/plasma.nix | 286 ------------------ flake.nix | 8 +- homes/user-configurations/chris.nix | 5 + modules/home/desktop/plasma/default.nix | 3 + modules/home/desktop/plasma/panels.nix | 219 +++++++------- modules/home/desktop/plasma/power.nix | 65 ++-- modules/home/shell/default.nix | 19 +- modules/home/shell/toolset/bat/default.nix | 2 +- modules/home/shell/toolset/btop/default.nix | 2 +- modules/home/shell/toolset/eza/default.nix | 2 +- modules/home/shell/toolset/fzf/default.nix | 2 +- modules/home/shell/toolset/git/default.nix | 4 +- modules/home/shell/toolset/gnugpg/default.nix | 38 +-- .../home/shell/toolset/starship/default.nix | 2 +- modules/home/shell/toolset/tmux/default.nix | 2 +- modules/home/shell/toolset/yazi/default.nix | 5 +- modules/home/shell/toolset/zellij/default.nix | 2 +- modules/home/shell/toolset/zoxide/default.nix | 2 +- .../home/shell/{zsh.nix => zsh/default.nix} | 12 +- modules/home/themes/default.nix | 6 +- modules/nixos/default.nix | 43 --- modules/nixos/shells/default.nix | 2 + .../nixos/shells/{zsh.nix => zsh/default.nix} | 2 + modules/nixos/theming/default.nix | 4 +- systems/x86_64-linux/manwe/default.nix | 11 +- systems/x86_64-linux/tulkas/default.nix | 13 +- systems/x86_64-linux/ulmo/default.nix | 21 +- 27 files changed, 227 insertions(+), 555 deletions(-) delete mode 100644 _modules/home/desktop/plasma.nix rename modules/home/shell/{zsh.nix => zsh/default.nix} (91%) delete mode 100644 modules/nixos/default.nix create mode 100644 modules/nixos/shells/default.nix rename modules/nixos/shells/{zsh.nix => zsh/default.nix} (74%) diff --git a/_modules/home/desktop/plasma.nix b/_modules/home/desktop/plasma.nix deleted file mode 100644 index c7ee813..0000000 --- a/_modules/home/desktop/plasma.nix +++ /dev/null @@ -1,286 +0,0 @@ -{ inputs, config, lib, pkgs, user, ... }: -let - inherit (lib.modules) mkIf; - - cfg = config.modules.${user}.desktop.plasma; -in -{ - options.modules.${user}.desktop.plasma = let - inherit (lib.options) mkEnableOption mkOption; - in { - enable = mkEnableOption "plasma 6"; - - autoLogin = mkOption { - type = lib.types.bool; - default = false; - example = true; - description = "Enable plasma's auto login feature."; - }; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs.kdePackages; [ - kcoreaddons - ]; - - environment.plasma6.excludePackages = with pkgs.kdePackages; [ konsole kate ghostwriter oxygen ]; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; - - services = { - xserver.enable = true; - - desktopManager.plasma6.enable = true; - - displayManager = { - defaultSession = "plasma"; - sddm = { - enable = true; - wayland.enable = true; - }; - autoLogin = mkIf cfg.autoLogin { - enable = true; - inherit user; - }; - }; - }; - - # should enable theme integration with gtk apps (i.e. firefox, thunderbird) - programs.dconf.enable = true; - - home-manager = { - sharedModules = [ - inputs.plasma-manager.homeManagerModules.plasma-manager - ]; - - users.${user}.programs.plasma = { - enable = true; - immutableByDefault = true; - windows.allowWindowsToRememberPositions = true; - - session = { - general.askForConfirmationOnLogout = false; - sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; - }; - - workspace = { - clickItemTo = "select"; - colorScheme = "EverforestDark"; - wallpaper = config.stylix.image; - }; - - spectacle.shortcuts = { - captureRectangularRegion = "Meta+Shift+S"; - }; - - kwin = { - edgeBarrier = 0; - cornerBarrier = false; - - effects = { - translucency.enable = true; - - blur = { - enable = true; - strength = 5; - noiseStrength = 5; - }; - - snapHelper.enable = true; - }; - }; - - panels = [ - # Windows-like panel at the bottom - { - location = "bottom"; - floating = true; - lengthMode = "fill"; - height = 42; - hiding = "none"; - screen = "all"; - widgets = [ - { - panelSpacer = { - expanding = true; - }; - } - { - kickoff = { - applicationsDisplayMode = "list"; - compactDisplayStyle = false; - favoritesDisplayMode = "grid"; - sortAlphabetically = true; - showButtonsFor = { - custom = [ - "shutdown" - "reboot" - "logout" - "lock-screen" - ]; - }; - showActionButtonCaptions = true; - }; - } - # { - # appMenu = { - # compactView = false; - # }; - # } - { - iconTasks = { - appearance = { - fill = false; - highlightWindows = true; - iconSpacing = "medium"; - indicateAudioStreams = true; - rows = { - multirowView = "never"; - maximum = null; - }; - showTooltips = true; - }; - behavior = { - grouping = { - clickAction = "showPresentWindowsEffect"; - method = "byProgramName"; - }; - minimizeActiveTaskOnClick = true; - newTasksAppearOn = "right"; - showTasks = { - onlyInCurrentActivity = true; - onlyInCurrentDesktop = true; - onlyMinimized = false; - onlyInCurrentScreen = false; - }; - sortingMethod = "manually"; - unhideOnAttentionNeeded = true; - wheel = { - ignoreMinimizedTasks = true; - switchBetweenTasks = true; - }; - }; - launchers = [ - "preferred://filemanager" - "preferred://browser" - "preferred://terminalemulator" - "preferred://email" - "applications:zededitor.desktop" - "applications:vesktop.desktop" - "applications:steam.desktop" - ]; - }; - } - { - panelSpacer = { - expanding = true; - }; - } - { - systemTray = { - icons = { - scaleToFit = true; - spacing = "small"; - }; - items = { - hidden = [ - "org.kde.plasma.brightness" - ]; - }; - pin = false; - }; - } - { - digitalClock = { - date = { - enable = true; - format = "shortDate"; - position = "belowTime"; - }; - time = { - format = "24h"; - showSeconds = "onlyInTooltip"; - }; - }; - } - ]; - } - ]; - - powerdevil = { - AC = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - battery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - lowBattery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - }; - - kscreenlocker = { - autoLock = false; - lockOnResume = false; - lockOnStartup = false; - - appearance = { - alwaysShowClock = true; - showMediaControls = true; - }; - }; - - configFile = { - baloofilerc = { - - }; - kdeglobals = { - General = { - # enable font antialiasing - XftAntialias = true; - XftHintStyle = "hintslight"; - XftSubPixel = "rgb"; - }; - }; - kwalletrc = { - Wallet.Enabled = false; - }; - plasmarc = { - General = { - RaiseMaximumVolume = true; - VolumeStep = 2; - }; - }; - kcminputrc = { - Keyboard.NumLock.value = 0; - }; - }; - }; - }; - }; -} diff --git a/flake.nix b/flake.nix index 194c538..c1408a5 100644 --- a/flake.nix +++ b/flake.nix @@ -20,13 +20,15 @@ inputs.home-manager.follows = "home-manager"; }; + # neovim nvf.url = "github:notashelf/nvf"; + # plymouth theme nixos-boot.url = "github:Melkor333/nixos-boot"; firefox.url = "github:nix-community/flake-firefox-nightly"; - stylix.url = "github:danth/stylix"; + stylix.url = "github:nix-community/stylix"; fenix = { url = "github:nix-community/fenix"; @@ -42,12 +44,14 @@ sops-nix.url = "github:Mic92/sops-nix"; himmelblau = { - url = "github:himmelblau-idm/himmelblau/main"; + url = "github:himmelblau-idm/himmelblau"; inputs.nixpkgs.follows = "nixpkgs"; }; + # windows app utilities erosanix.url = "github:emmanuelrosa/erosanix"; + # Steam deck stuff jovian = { url = "github:Jovian-Experiments/Jovian-NixOS"; inputs.nixpkgs.follows = "nixpkgs"; diff --git a/homes/user-configurations/chris.nix b/homes/user-configurations/chris.nix index 3a321e1..26a170b 100644 --- a/homes/user-configurations/chris.nix +++ b/homes/user-configurations/chris.nix @@ -5,6 +5,11 @@ }; sneeuwvlok = { + shell = { + default = "zsh"; + corePkgs.enable = true; + }; + themes = { enable = true; theme = "everforest"; diff --git a/modules/home/desktop/plasma/default.nix b/modules/home/desktop/plasma/default.nix index 12ffce3..8614a97 100644 --- a/modules/home/desktop/plasma/default.nix +++ b/modules/home/desktop/plasma/default.nix @@ -17,6 +17,9 @@ in immutableByDefault = true; windows.allowWindowsToRememberPositions = true; + panels = import ./panels.nix; + powerdevil = import ./power.nix; + session = { general.askForConfirmationOnLogout = false; sessionRestore.restoreOpenApplicationsOnLogin = "onLastLogout"; diff --git a/modules/home/desktop/plasma/panels.nix b/modules/home/desktop/plasma/panels.nix index a35b93c..52212b7 100644 --- a/modules/home/desktop/plasma/panels.nix +++ b/modules/home/desktop/plasma/panels.nix @@ -1,124 +1,109 @@ -{ config, lib, namespace, osConfig ? {}, ... }: -let - inherit (lib) mkIf; - - cfg = config.${namespace}.desktop.plasma; - osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; -in -{ - options.${namespace}.desktop.plasma = { - - }; - - config = mkIf osCfg.enable { - programs.plasma.panels = [ +[ + { + location = "bottom"; + floating = true; + lengthMode = "fill"; + height = 42; + hiding = "none"; + screen = "all"; + widgets = [ { - location = "bottom"; - floating = true; - lengthMode = "fill"; - height = 42; - hiding = "none"; - screen = "all"; - widgets = [ - { - panelSpacer = { - expanding = true; + panelSpacer = { + expanding = true; + }; + } + { + kickoff = { + applicationsDisplayMode = "list"; + compactDisplayStyle = false; + favoritesDisplayMode = "grid"; + sortAlphabetically = true; + showButtonsFor = { + custom = [ + "shutdown" + "reboot" + "logout" + "lock-screen" + ]; + }; + showActionButtonCaptions = true; + }; + } + { + iconTasks = { + appearance = { + fill = false; + highlightWindows = true; + iconSpacing = "medium"; + indicateAudioStreams = true; + rows = { + multirowView = "never"; + maximum = null; }; - } - { - kickoff = { - applicationsDisplayMode = "list"; - compactDisplayStyle = false; - favoritesDisplayMode = "grid"; - sortAlphabetically = true; - showButtonsFor = { - custom = [ - "shutdown" - "reboot" - "logout" - "lock-screen" - ]; - }; - showActionButtonCaptions = true; + showTooltips = true; + }; + behavior = { + grouping = { + clickAction = "showPresentWindowsEffect"; + method = "byProgramName"; }; - } - { - iconTasks = { - appearance = { - fill = false; - highlightWindows = true; - iconSpacing = "medium"; - indicateAudioStreams = true; - rows = { - multirowView = "never"; - maximum = null; - }; - showTooltips = true; - }; - behavior = { - grouping = { - clickAction = "showPresentWindowsEffect"; - method = "byProgramName"; - }; - minimizeActiveTaskOnClick = true; - newTasksAppearOn = "right"; - showTasks = { - onlyInCurrentActivity = true; - onlyInCurrentDesktop = true; - onlyMinimized = false; - onlyInCurrentScreen = false; - }; - sortingMethod = "manually"; - unhideOnAttentionNeeded = true; - wheel = { - ignoreMinimizedTasks = true; - switchBetweenTasks = true; - }; - }; - launchers = [ - "preferred://filemanager" - "preferred://browser" - "preferred://terminalemulator" - "preferred://email" - "applications:vesktop.desktop" - "applications:steam.desktop" - ]; + minimizeActiveTaskOnClick = true; + newTasksAppearOn = "right"; + showTasks = { + onlyInCurrentActivity = true; + onlyInCurrentDesktop = true; + onlyMinimized = false; + onlyInCurrentScreen = false; }; - } - { - panelSpacer = { - expanding = true; + sortingMethod = "manually"; + unhideOnAttentionNeeded = true; + wheel = { + ignoreMinimizedTasks = true; + switchBetweenTasks = true; }; - } - { - systemTray = { - icons = { - scaleToFit = true; - spacing = "small"; - }; - items = { - hidden = [ - "org.kde.plasma.brightness" - ]; - }; - pin = false; - }; - } - { - digitalClock = { - date = { - enable = true; - format = "shortDate"; - position = "belowTime"; - }; - time = { - format = "24h"; - showSeconds = "onlyInTooltip"; - }; - }; - } - ]; + }; + launchers = [ + "preferred://filemanager" + "preferred://browser" + "preferred://terminalemulator" + "preferred://email" + "applications:vesktop.desktop" + "applications:steam.desktop" + ]; + }; + } + { + panelSpacer = { + expanding = true; + }; + } + { + systemTray = { + icons = { + scaleToFit = true; + spacing = "small"; + }; + items = { + hidden = [ + "org.kde.plasma.brightness" + ]; + }; + pin = false; + }; + } + { + digitalClock = { + date = { + enable = true; + format = "shortDate"; + position = "belowTime"; + }; + time = { + format = "24h"; + showSeconds = "onlyInTooltip"; + }; + }; } ]; - }; -} + } +] \ No newline at end of file diff --git a/modules/home/desktop/plasma/power.nix b/modules/home/desktop/plasma/power.nix index 50e7cfe..e7cc4e2 100644 --- a/modules/home/desktop/plasma/power.nix +++ b/modules/home/desktop/plasma/power.nix @@ -1,52 +1,37 @@ -{ config, lib, namespace, osConfig ? {}, ... }: -let - inherit (lib) mkIf; - - cfg = config.${namespace}.desktop.plasma; - osCfg = osConfig.${namespace}.desktop.plasma or { enable = false; }; -in { - options.${namespace}.desktop.plasma = { + AC = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; + + turnOffDisplay = { + idleTimeout = "never"; + }; }; - config = mkIf osCfg.enable { - programs.plasma.powerdevil = { - AC = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; + battery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; - autoSuspend.action = "nothing"; - dimDisplay.enable = false; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; - turnOffDisplay = { - idleTimeout = "never"; - }; - }; + turnOffDisplay = { + idleTimeout = "never"; + }; + }; - battery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; + lowBattery = { + powerButtonAction = "shutDown"; + whenLaptopLidClosed = "doNothing"; - autoSuspend.action = "nothing"; - dimDisplay.enable = false; + autoSuspend.action = "nothing"; + dimDisplay.enable = false; - turnOffDisplay = { - idleTimeout = "never"; - }; - }; - - lowBattery = { - powerButtonAction = "shutDown"; - whenLaptopLidClosed = "doNothing"; - - autoSuspend.action = "nothing"; - dimDisplay.enable = false; - - turnOffDisplay = { - idleTimeout = "never"; - }; - }; + turnOffDisplay = { + idleTimeout = "never"; }; }; } diff --git a/modules/home/shell/default.nix b/modules/home/shell/default.nix index ab4f6b3..2a0837c 100644 --- a/modules/home/shell/default.nix +++ b/modules/home/shell/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, namespace, ... }: let - inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption; + inherit (lib) attrValues mkIf mkMerge mkOption mkEnableOption mkDefault; inherit (lib.types) nullOr enum; cfg = config.${namespace}.shell; @@ -12,17 +12,18 @@ in default = null; description = "Default system shell"; }; - + corePkgs.enable = mkEnableOption "core shell packages"; }; config = mkMerge [ - (mkIf (cfg.default != null) { - users.defaultUserShell = pkgs."${cfg.default}"; - }) + # (if (cfg.default != null) then { + # shell = pkgs."${cfg.default}"; + # } else {}) - (mkIf cfg.corePkgs.enable { - ${namespace}.shell.toolset = { + + (mkIf (cfg.corePkgs.enable) { + ${namespace}.shell.toolset = mkDefault { bat.enable = true; btop.enable = true; eza.enable = true; @@ -33,7 +34,9 @@ in yazi.enable = true; zoxide.enable = true; }; + }) + ({ home.packages = with pkgs; [ any-nix-shell pwgen yt-dlp ripdrag fd (ripgrep.override {withPCRE2 = true;}) ]; programs = { @@ -50,4 +53,4 @@ in }; }) ]; -} +} \ No newline at end of file diff --git a/modules/home/shell/toolset/bat/default.nix b/modules/home/shell/toolset/bat/default.nix index 9a1d904..78899df 100644 --- a/modules/home/shell/toolset/bat/default.nix +++ b/modules/home/shell/toolset/bat/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/btop/default.nix b/modules/home/shell/toolset/btop/default.nix index ec30da6..b490acc 100644 --- a/modules/home/shell/toolset/btop/default.nix +++ b/modules/home/shell/toolset/btop/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; inherit (lib.strings) concatStringsSep; diff --git a/modules/home/shell/toolset/eza/default.nix b/modules/home/shell/toolset/eza/default.nix index 936c335..00026cf 100644 --- a/modules/home/shell/toolset/eza/default.nix +++ b/modules/home/shell/toolset/eza/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/fzf/default.nix b/modules/home/shell/toolset/fzf/default.nix index 031e4ce..1536083 100644 --- a/modules/home/shell/toolset/fzf/default.nix +++ b/modules/home/shell/toolset/fzf/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/git/default.nix b/modules/home/shell/toolset/git/default.nix index 274f579..48320f4 100644 --- a/modules/home/shell/toolset/git/default.nix +++ b/modules/home/shell/toolset/git/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkEnableOption mkIf; @@ -10,7 +10,7 @@ in }; config = mkIf cfg.enable { - environment.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; + home.sessionVariables.GITHUB_TOKEN = "$(cat /run/agenix/tokenGH)"; home.packages = with pkgs; [ lazygit lazyjj jujutsu ]; diff --git a/modules/home/shell/toolset/gnugpg/default.nix b/modules/home/shell/toolset/gnugpg/default.nix index 3a69c23..8b6ae38 100644 --- a/modules/home/shell/toolset/gnugpg/default.nix +++ b/modules/home/shell/toolset/gnugpg/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; @@ -10,27 +10,27 @@ in }; config = mkIf cfg.enable { - user.package = with pkgs; [ gnupg ]; + # home.packages = with pkgs; [ gnupg ]; - environment.variables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg"; + # home.sessionVariables.GNUPGHOME = "$XDG_CONFIG_HOME/gnupg"; - programs.gnupg = { - enable = true; + # programs.gnupg = { + # enable = true; - agent = { - enable = true; - enableSSHSupport = true; - pinentryPackage = pkgs.pinentry-gnome3; + # agent = { + # enable = true; + # enableSSHSupport = true; + # pinentryPackage = pkgs.pinentry-gnome3; - settings = let - cacheTTL = 86400; - in { - default-cache-ttl = cacheTTL; - default-cache-ttl-ssh = cacheTTL; - max-cache-ttl = cacheTTL; - max-cache-ttl-ssh = cacheTTL; - }; - }; - }; + # settings = let + # cacheTTL = 86400; + # in { + # default-cache-ttl = cacheTTL; + # default-cache-ttl-ssh = cacheTTL; + # max-cache-ttl = cacheTTL; + # max-cache-ttl-ssh = cacheTTL; + # }; + # }; + # }; }; } diff --git a/modules/home/shell/toolset/starship/default.nix b/modules/home/shell/toolset/starship/default.nix index 507d421..28d57f7 100644 --- a/modules/home/shell/toolset/starship/default.nix +++ b/modules/home/shell/toolset/starship/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/tmux/default.nix b/modules/home/shell/toolset/tmux/default.nix index 26fe163..ed14ba6 100644 --- a/modules/home/shell/toolset/tmux/default.nix +++ b/modules/home/shell/toolset/tmux/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/yazi/default.nix b/modules/home/shell/toolset/yazi/default.nix index 382c661..37138a0 100644 --- a/modules/home/shell/toolset/yazi/default.nix +++ b/modules/home/shell/toolset/yazi/default.nix @@ -1,7 +1,6 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let - inherit (lib.${namespace}) mkIf; - inherit (lib.options) mkEnableOption; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.shell.toolset.yazi; in diff --git a/modules/home/shell/toolset/zellij/default.nix b/modules/home/shell/toolset/zellij/default.nix index da6eae5..db5b7bd 100644 --- a/modules/home/shell/toolset/zellij/default.nix +++ b/modules/home/shell/toolset/zellij/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/toolset/zoxide/default.nix b/modules/home/shell/toolset/zoxide/default.nix index 087f216..5b8acb6 100644 --- a/modules/home/shell/toolset/zoxide/default.nix +++ b/modules/home/shell/toolset/zoxide/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, user, ... }: +{ config, lib, pkgs, namespace, ... }: let inherit (lib) mkIf mkEnableOption; diff --git a/modules/home/shell/zsh.nix b/modules/home/shell/zsh/default.nix similarity index 91% rename from modules/home/shell/zsh.nix rename to modules/home/shell/zsh/default.nix index e26cd16..b37cc4c 100644 --- a/modules/home/shell/zsh.nix +++ b/modules/home/shell/zsh/default.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, namespace, ... }: let - inherit (lib) mkIf; + inherit (lib) mkIf mkEnableOption; cfg = config.${namespace}.shell.zsh; in @@ -10,13 +10,9 @@ in }; config = mkIf cfg.enable { - ${namespace}.shell = { - zsh.enable = true; - corePkgs.enable = true; - }; - - # Enable completion for sys-packages: - environment.pathsToLink = ["/share/zsh"]; + # ${namespace}.shell = { + # zsh.enable = true; + # }; programs = { starship.enableZshIntegration = true; diff --git a/modules/home/themes/default.nix b/modules/home/themes/default.nix index 8acf633..55bccfe 100644 --- a/modules/home/themes/default.nix +++ b/modules/home/themes/default.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, namespace, ... }: +{ config, lib, pkgs, namespace, osConfig ? {}, ... }: let inherit (lib) mkIf mkDefault; inherit (lib.options) mkOption mkEnableOption; @@ -23,9 +23,7 @@ in { }; }; - config = mkIf cfg.enable { - ${namespace}.theming.enable = true; - + config = mkIf (cfg.enable && osConfig.${namespace}.theming.enable) { stylix = { base16Scheme = "${pkgs.base16-schemes}/share/themes/${cfg.theme}.yaml"; image = ./${cfg.theme}.jpg; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix deleted file mode 100644 index 46a454b..0000000 --- a/modules/nixos/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ config, lib, namespace, ... }: -let - inherit (lib) mkIf mkDefault mkOption mkMerge; - inherit (lib.types) nullOr enum; - - cfg = config.${namespace}; -in -{ - options.${namespace} = { - preset = mkOption { - type = nullOr (enum [ "server" "desktop" ]); - default = null; - example = "desktop"; - description = "Which defaults profile to start with"; - }; - }; - - config = mkMerge [ - (mkIf (cfg.preset == "desktop") { - ${namespace} = mkDefault { - hardware.has = { - audio = true; - }; - - boot = { - quiet = true; - animated = true; - }; - - desktop.use = "plasma"; - theming.enable = true; - }; - }) - - (mkIf (cfg.preset == "server") { - ${namespace} = mkDefault { - services = { - networking.ssh.enable = true; - }; - }; - }) - ]; -} diff --git a/modules/nixos/shells/default.nix b/modules/nixos/shells/default.nix new file mode 100644 index 0000000..6b5c058 --- /dev/null +++ b/modules/nixos/shells/default.nix @@ -0,0 +1,2 @@ +{ ... }: +{} \ No newline at end of file diff --git a/modules/nixos/shells/zsh.nix b/modules/nixos/shells/zsh/default.nix similarity index 74% rename from modules/nixos/shells/zsh.nix rename to modules/nixos/shells/zsh/default.nix index b9cf75b..399e7dd 100644 --- a/modules/nixos/shells/zsh.nix +++ b/modules/nixos/shells/zsh/default.nix @@ -10,5 +10,7 @@ in }; config = mkIf cfg.enable { + # Enable completion for sys-packages: + environment.pathsToLink = ["/share/zsh"]; }; } diff --git a/modules/nixos/theming/default.nix b/modules/nixos/theming/default.nix index d7ddb8e..78adb94 100644 --- a/modules/nixos/theming/default.nix +++ b/modules/nixos/theming/default.nix @@ -10,7 +10,9 @@ in ]; options.${namespace}.theming = { - enable = mkEnableOption "enable theming"; + enable = mkEnableOption "enable theming" // { + default = true; + }; }; config = mkIf cfg.enable { diff --git a/systems/x86_64-linux/manwe/default.nix b/systems/x86_64-linux/manwe/default.nix index f10ca22..19ea4fb 100644 --- a/systems/x86_64-linux/manwe/default.nix +++ b/systems/x86_64-linux/manwe/default.nix @@ -8,12 +8,19 @@ in ]; sneeuwvlok = { - preset = "desktop"; - hardware.has = { gpu.amd = true; bluetooth = true; + audio = true; }; + + boot = { + quiet = true; + animated = true; + }; + + desktop.use = "plasma"; + theming.enable = true; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/tulkas/default.nix b/systems/x86_64-linux/tulkas/default.nix index 792956e..0bbcd60 100644 --- a/systems/x86_64-linux/tulkas/default.nix +++ b/systems/x86_64-linux/tulkas/default.nix @@ -8,8 +8,19 @@ in ]; sneeuwvlok = { - preset = "desktop"; + hardware.has = { + gpu.amd = true; + bluetooth = true; + audio = true; + }; + + boot = { + quiet = true; + animated = true; + }; + desktop.use = "gamescope"; + theming.enable = true; }; system.stateVersion = "23.11"; diff --git a/systems/x86_64-linux/ulmo/default.nix b/systems/x86_64-linux/ulmo/default.nix index d28c19f..26df5e1 100644 --- a/systems/x86_64-linux/ulmo/default.nix +++ b/systems/x86_64-linux/ulmo/default.nix @@ -2,18 +2,17 @@ let in { - imports = [ - ./disks.nix - ./hardware.nix - ]; + imports = [ + ./disks.nix + ./hardware.nix + ]; - sneeuwvlok = { - preset = "server"; - - services = { - media.enable = true; - }; + sneeuwvlok = { + services = { + networking.ssh.enable = true; + media.enable = true; }; + }; - system.stateVersion = "23.11"; + system.stateVersion = "23.11"; } \ No newline at end of file