diff --git a/home/programs/games.nix b/home/programs/games.nix index ad099da..b9d63e5 100644 --- a/home/programs/games.nix +++ b/home/programs/games.nix @@ -5,7 +5,9 @@ lib, ... }: let - inherit (osConfig.niksos) games bluetooth; + inherit (osConfig.niksos) desktop hardware; + inherit (desktop) games; + inherit (hardware) bluetooth; in { # Also look at system/programs/games.nix (some programs have to be overlayed or have systemwide modules that have to be installed.) home.packages = lib.mkIf games ([ diff --git a/home/programs/kodi.nix b/home/programs/kodi.nix index b956d0c..a4afd14 100644 --- a/home/programs/kodi.nix +++ b/home/programs/kodi.nix @@ -1,5 +1,10 @@ -{pkgs, ...}: { - home.packages = [ +{ + pkgs, + osConfig, + lib, + ... +}: { + home.packages = lib.mkIf osConfig.niksos.desktop.apps [ (pkgs.kodi-wayland.withPackages (exts: [exts.inputstream-adaptive exts.inputstreamhelper])) ]; } diff --git a/home/programs/nixcord.nix b/home/programs/nixcord.nix index b64db78..9a72e27 100644 --- a/home/programs/nixcord.nix +++ b/home/programs/nixcord.nix @@ -1,6 +1,6 @@ {osConfig, ...}: { programs.nixcord = { - enable = true; + enable = osConfig.niksos.desktop.apps; discord.enable = false; vesktop.enable = true; vesktopConfig = { diff --git a/home/programs/other.nix b/home/programs/other.nix index fd53b51..4c0b742 100644 --- a/home/programs/other.nix +++ b/home/programs/other.nix @@ -4,7 +4,7 @@ osConfig, ... }: { - home.packages = [ + home.packages = lib.mkIf osConfig.niksos.desktop.apps [ pkgs.spotify pkgs.signal-desktop ]; diff --git a/home/services/udiskie.nix b/home/services/udiskie.nix index 04c0522..21ee6fc 100644 --- a/home/services/udiskie.nix +++ b/home/services/udiskie.nix @@ -1,6 +1,6 @@ -{ +{osConfig, ...}: { services.udiskie = { - enable = true; + inherit (osConfig.services.udisks2) enable; tray = "never"; #NOTE: Don't have a bar (yet?) }; } diff --git a/home/shell/default.nix b/home/shell/default.nix index 4c4c4f6..20baf04 100644 --- a/home/shell/default.nix +++ b/home/shell/default.nix @@ -6,7 +6,6 @@ ./other.nix ./repl ./starship.nix - ./transfer.nix ./yazi.nix ./zoxide.nix ]; diff --git a/home/shell/git.nix b/home/shell/git.nix index 1c81438..83ae2a0 100644 --- a/home/shell/git.nix +++ b/home/shell/git.nix @@ -7,6 +7,6 @@ extraConfig.push.autoSetupRemote = true; lfs.enable = true; }; - git-credential-oauth.enable = true; + git-credential-oauth.enable = true; #FIXME: need to relogin for each push for some reason. }; } diff --git a/home/shell/other.nix b/home/shell/other.nix index f90f855..cdc4e5a 100644 --- a/home/shell/other.nix +++ b/home/shell/other.nix @@ -4,25 +4,35 @@ osConfig, inputs, ... -}: { +}: let + inherit (lib) optionals; + inherit (osConfig.niksos.hardware) bluetooth portable; + inherit (osConfig.niksos.desktop) apps; +in { home.packages = [ pkgs.ripgrep + pkgs.fzf + pkgs.p7zip + pkgs.dua + pkgs.usbutils pkgs.pciutils pkgs.inetutils pkgs.aria2 - pkgs.dua pkgs.file - pkgs.ffmpeg - pkgs.gurk-rs - pkgs.playerctl ] - ++ lib.optionals osConfig.niksos.bluetooth [ + ++ optionals apps [ + # Kinda don't need to include these on more minimal installs. + pkgs.ffmpeg + pkgs.imagemagick + pkgs.ghostscript + ] + ++ optionals bluetooth [ pkgs.ear2ctl ] - ++ lib.optionals osConfig.niksos.portable.enable [ + ++ optionals portable.enable [ inputs.somcli.defaultPackage.${pkgs.system} ]; } diff --git a/home/shell/transfer.nix b/home/shell/transfer.nix deleted file mode 100644 index 97eaaf5..0000000 --- a/home/shell/transfer.nix +++ /dev/null @@ -1,37 +0,0 @@ -{ - pkgs, - osConfig, - ... -}: { - home.packages = [ - (pkgs.writeShellScriptBin "transfer" '' - PASSWORD=$(sed 's/.*="\(.*\)"/\1/' ${osConfig.age.secrets.transferSh.path}) - - - if [ -z "$PASSWORD" ]; then - echo "Error: Password not found." - return 1 - fi - - file_path="$1" - if [ -z "$file_path" ]; then - echo "Usage: transfer " - return 1 - fi - - response=$(curl -sD - --user "jsw:$PASSWORD" --progress-bar --upload-file "$file_path" "https://share.jsw.tf/$(basename "$file_path")") - - if [ $? -eq 0 ]; then - DELETE=$(echo "$response" | grep x-url-delete | sed "s/.*\///") - URL=$(echo "$response" | tail -n1) - - echo "Delete code: $DELETE" - echo "URL: $URL" - else - echo "Upload failed." - return 1 - fi - echo - '') - ]; -} diff --git a/home/wayland/default.nix b/home/wayland/default.nix index f6d8900..e74aded 100644 --- a/home/wayland/default.nix +++ b/home/wayland/default.nix @@ -5,7 +5,7 @@ ... }: let inherit (lib) mkIf; - cfg = osConfig.niksos.desktop.hyprland; + cfg = osConfig.programs.hyprland.enable; in { imports = [ ./fuzzel.nix diff --git a/home/wayland/fuzzel.nix b/home/wayland/fuzzel.nix index 0b8649c..33eb17c 100644 --- a/home/wayland/fuzzel.nix +++ b/home/wayland/fuzzel.nix @@ -5,7 +5,7 @@ ... }: { programs.fuzzel = { - enable = osConfig.niksos.desktop.hyprland; + inherit (osConfig.programs.hyprland) enable; settings.main = { launch-prefix = "${lib.getExe pkgs.uwsm} app --"; }; diff --git a/home/wayland/hyprland/binds.nix b/home/wayland/hyprland/binds.nix index 69d0e0c..405c4ec 100644 --- a/home/wayland/hyprland/binds.nix +++ b/home/wayland/hyprland/binds.nix @@ -8,7 +8,9 @@ }: let inherit (lib) getExe; inherit (config.lib.stylix.colors) base0D; - inherit (osConfig.niksos) games portable; + inherit (osConfig.niksos) desktop hardware; + inherit (hardware) portable bluetooth; + inherit (desktop) games; runOnce = program: "pgrep ${program} || uwsm app -- ${program}"; uwsm = getExe pkgs.uwsm; @@ -86,7 +88,7 @@ in { "$m, Escape, exec, ${hyprlock}" "$m, A, exec, ${pulsemixer}" - "$m, B, exec, ${bluetui}" + "$m, N, exec, ${nmtui}" '' $m, S, exec, bash -c 'hyprctl notify -1 5000 "rgb(${base0D})" "$(${getExe (import ./scripts.nix {inherit pkgs;}).statusnotify})"' @@ -106,6 +108,7 @@ in { "$m SHIFT, j, movewindow, d" ] ++ workspaces + ++ lib.optional bluetooth "$m, B, exec, ${bluetui}" ++ lib.optionals games (let torzu = "${ appE inputs.nixpkgs-torzu.legacyPackages.${pkgs.system}.torzu diff --git a/home/wayland/hyprland/default.nix b/home/wayland/hyprland/default.nix index 98d05ad..2481fad 100644 --- a/home/wayland/hyprland/default.nix +++ b/home/wayland/hyprland/default.nix @@ -15,7 +15,7 @@ in { ]; wayland.windowManager.hyprland = { - enable = osConfig.niksos.desktop.hyprland; + inherit (osConfig.programs.hyprland) enable; settings = { env = [ "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" @@ -26,7 +26,7 @@ in { "${uwsm} finalize" "${hyprlock}" # Lock screen ] - ++ lib.optional osConfig.niksos.portable.enable "powermode sync"; + ++ lib.optional osConfig.niksos.hardware.portable.enable "powermode sync"; }; }; } diff --git a/home/wayland/hyprlock.nix b/home/wayland/hyprlock.nix index cfdc5e8..0ffacaf 100644 --- a/home/wayland/hyprlock.nix +++ b/home/wayland/hyprlock.nix @@ -6,7 +6,7 @@ inherit (config.lib.stylix.colors) base05; in { programs.hyprlock = { - enable = osConfig.niksos.desktop.hyprland; + inherit (osConfig.programs.hyprland) enable; settings = { general = { @@ -15,7 +15,7 @@ in { hide_cursor = false; no_fade_in = true; }; - auth."fingerprint:enabled" = true; + auth."fingerprint:enabled" = osConfig.niksos.hardware.fingerprint; label = [ { diff --git a/home/wayland/mako.nix b/home/wayland/mako.nix index 57343b9..7ccbfd9 100644 --- a/home/wayland/mako.nix +++ b/home/wayland/mako.nix @@ -1,6 +1,8 @@ -{osConfig, ...}: { +{osConfig, ...}: let + inherit (osConfig.niksos) desktop; +in { services.mako = { - enable = osConfig.niksos.desktop.hyprland; + inherit (osConfig.programs.hyprland) enable; settings.defaultTimeout = 5000; }; } diff --git a/hosts/lapserv/default.nix b/hosts/lapserv/default.nix index b187cb8..680d1a9 100644 --- a/hosts/lapserv/default.nix +++ b/hosts/lapserv/default.nix @@ -5,8 +5,10 @@ niksos = { server = true; - graphics.nvidia = false; #FIXME: Compile error - graphics.intel = true; + hardware.graphics = { + nvidia = false; #FIXME: Compile error + intel = true; + }; }; services.immich = { diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 3b8f8aa..a4f0d08 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -23,24 +23,27 @@ # programs.evolution.enable = true; # FIXME: move to appropiate place. niksos = { - joycond = false; #NOTE: enable when game night lol - fingerprint = true; - bluetooth = true; - portable = { - enable = true; - hyprland = { - powerSaver = '' - hyprctl keyword monitor eDP-1,2880x1920@60,0x0,1.5,vrr,1 - ''; - performance = '' - hyprctl keyword monitor eDP-1,2880x1920@120,0x0,1.5,vrr,1 - ''; + hardware = { + joycond = false; #NOTE: enable when game night lol + fingerprint = true; + bluetooth = true; + + portable = { + enable = true; + hyprland = { + powerSaver = '' + hyprctl keyword monitor eDP-1,2880x1920@60,0x0,1.5,vrr,1 + ''; + performance = '' + hyprctl keyword monitor eDP-1,2880x1920@120,0x0,1.5,vrr,1 + ''; + }; }; }; neovim = true; - games = true; desktop = { + games = true; enable = true; hyprland = true; kde = true; diff --git a/hosts/minimal/default.nix b/hosts/minimal/default.nix index 4d05acd..ee6495e 100644 --- a/hosts/minimal/default.nix +++ b/hosts/minimal/default.nix @@ -9,27 +9,31 @@ services.fwupd.enable = false; niksos = { - bluetooth = false; desktop = { enable = false; hyprland = false; kde = false; + apps = false; + games = false; }; - fingerprint = false; - games = false; - graphics = { - enable = false; - intel = false; - nvidia = false; - }; - neovim = false; - portable = { - enable = false; - hyprland = { - powerSaver = ""; - performance = ""; + hardware = { + fingerprint = false; + bluetooth = false; + joycond = false; + graphics = { + enable = false; + intel = false; + nvidia = false; + }; + portable = { + enable = false; + hyprland = { + powerSaver = ""; + performance = ""; + }; }; }; + neovim = false; server = false; }; diff --git a/system/desktop/default.nix b/system/desktop/default.nix index db4f920..d8d9a7f 100644 --- a/system/desktop/default.nix +++ b/system/desktop/default.nix @@ -18,9 +18,23 @@ in { ]; options.niksos.desktop = { - enable = mkEO "enable desktop related programs."; + enable = mkEO "enable desktop related programs (+home manager)."; + apps = mkEO "extra bloat."; + games = mkEO "gaming related programs"; + hyprland = mkEO "enable hyprland related programs."; kde = mkEO "enable kde specialisation."; + activeDesktop = lib.mkOption { + type = lib.types.enum ["hyprland" "kde"]; + description = "What desktop should be the default, other enabled desktops will be specialized."; + default = + if cfg.hyprland + then "hyprland" + else if cfg.kde + then "kde" + else "hyprland"; + example = "hyprland"; + }; }; config.assertions = mkIf (cfg.hyprland @@ -29,5 +43,9 @@ in { assertion = cfg.enable; message = "You need to enable desktop for the hyprland/kde module to work"; } + { + assertion = config.niksos.desktop.enable; + message = "The games option needs desktop to be enabled for it to work properly (it enables home-manager)."; + } ]; } diff --git a/system/desktop/greetd.nix b/system/desktop/greetd.nix index 5cb4982..943ce8a 100644 --- a/system/desktop/greetd.nix +++ b/system/desktop/greetd.nix @@ -5,21 +5,9 @@ }: { config = lib.mkIf config.niksos.desktop.enable { # greetd display manager - services.greetd = let - session = { - command = lib.mkDefault "${lib.getExe config.programs.uwsm.package} start hyprland-uwsm.desktop"; - user = "jsw"; - }; - in { + services.greetd = { enable = true; - - settings = { - terminal.vt = 1; - default_session = session; - initial_session = session; - }; + settings.terminal.vt = 1; }; - - programs.uwsm.enable = config.niksos.desktop.hyprland; }; } diff --git a/system/desktop/hyprland.nix b/system/desktop/hyprland.nix index 4ea2a18..cdc79a5 100644 --- a/system/desktop/hyprland.nix +++ b/system/desktop/hyprland.nix @@ -1,16 +1,37 @@ { - config, - pkgs, lib, + pkgs, + config, ... }: let - cfg = config.niksos.desktop.enable && config.niksos.desktop.hyprland; + inherit (config.niksos) desktop; + cfg = desktop.enable && desktop.hyprland; + active = cfg && desktop.activeDesktop == "hyprland"; + ifActive = x: lib.mkIf active x; in { - config = lib.mkIf cfg { - programs.hyprland = { + specialisation.de.configuration = + lib.mkIf cfg + && !active { + niksos.desktop.activeDesktop = lib.mkForce "hyprland"; + }; + + programs = ifActive { + hyprland = { enable = true; withUWSM = true; }; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; # Makes electron apps use wayland. + uwsm.enable = true; }; + + services.greetd.settings = let + session = { + command = "${lib.getExe config.programs.uwsm.package} start hyprland-uwsm.desktop"; + user = "jsw"; + }; + in + ifActive { + default_session = session; + initial_session = session; + }; + environment.sessionVariables.NIXOS_OZONE_WL = ifActive "1"; # Makes electron apps use wayland. } diff --git a/system/desktop/plasma6.nix b/system/desktop/plasma6.nix index cca4cce..2535753 100644 --- a/system/desktop/plasma6.nix +++ b/system/desktop/plasma6.nix @@ -4,25 +4,28 @@ config, ... }: let - cfg = config.niksos.desktop.enable && config.niksos.desktop.kde; + inherit (config.niksos) desktop; + cfg = desktop.enable && desktop.kde; + active = cfg && desktop.activeDesktop == "kde"; + ifActive = x: lib.mkIf active x; in { - specialisation.de.configuration = lib.mkIf cfg { - niksos.desktop.hyprland = lib.mkForce false; - services = { - greetd = let - session.command = "${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland"; - in { - enable = true; - settings = { - terminal.vt = 1; - default_session = session; - initial_session = session; - }; - }; - - desktopManager.plasma6.enable = true; + specialisation.de.configuration = + lib.mkIf cfg + && !active { + niksos.desktop.activeDesktop = lib.mkForce "kde"; }; - home-manager.users.jsw.stylix.autoEnable = false; + services = ifActive { + greetd.settings = let + session.command = "${pkgs.kdePackages.plasma-workspace}/bin/startplasma-wayland"; + in { + default_session = session; + initial_session = session; + }; + + desktopManager.plasma6.enable = true; + }; + home-manager.users = ifActive { + jsw.stylix.autoEnable = false; }; } diff --git a/system/desktop/polkit.nix b/system/desktop/polkit.nix index eedb594..83e4f34 100644 --- a/system/desktop/polkit.nix +++ b/system/desktop/polkit.nix @@ -3,10 +3,8 @@ lib, pkgs, ... -}: let - cfg = config.niksos.desktop.enable && config.niksos.desktop.hyprland; -in { - systemd.user.services.polkit-gnome-authentication-agent-1 = lib.mkIf cfg { +}: { + systemd.user.services.polkit-gnome-authentication-agent-1 = lib.mkIf config.programs.hyprland.enable { description = "polkit-gnome-authentication-agent-1"; wantedBy = ["graphical-session.target"]; wants = ["graphical-session.target"]; diff --git a/system/desktop/xdg.nix b/system/desktop/xdg.nix index 75f243e..077224d 100644 --- a/system/desktop/xdg.nix +++ b/system/desktop/xdg.nix @@ -3,10 +3,8 @@ config, lib, ... -}: let - cfg = config.niksos.desktop.enable && config.niksos.desktop.hyprland; -in { - xdg.portal = lib.mkIf cfg { +}: { + xdg.portal = lib.mkIf config.programs.hyprland.enable { enable = true; xdgOpenUsePortal = true; config = { diff --git a/system/hardware/bluetooth.nix b/system/hardware/bluetooth.nix index 5d08c73..72d31e2 100644 --- a/system/hardware/bluetooth.nix +++ b/system/hardware/bluetooth.nix @@ -4,9 +4,7 @@ pkgs, ... }: { - options.niksos.bluetooth = lib.mkEnableOption "bluetooth related stuff."; - - config = lib.mkIf config.niksos.bluetooth { + config = lib.mkIf config.niksos.hardware.bluetooth { hardware.bluetooth = { enable = true; input.General.ClassicBondedOnly = false; diff --git a/system/hardware/default.nix b/system/hardware/default.nix index f513c91..720648d 100644 --- a/system/hardware/default.nix +++ b/system/hardware/default.nix @@ -1,5 +1,7 @@ -{ - hardware.enableRedistributableFirmware = true; +{lib, ...}: let + mkEO = lib.mkEnableOption; +in { + config.hardware.enableRedistributableFirmware = true; imports = [ ./bluetooth.nix @@ -9,4 +11,32 @@ ./joycond.nix ./power.nix ]; + + options.niksos.hardware = { + bluetooth = mkEO "bluetooth related stuff."; + fingerprint = mkEO "fingerprint support."; + + graphics = { + enable = mkEO "core graphics"; + intel = mkEO "additional intel drivers"; + nvidia = mkEO "additoinal nvidia drivers"; + }; + + joycond = mkEO "support for nintendo switch controllers."; + + portable = { + enable = mkEO "battery optimisers"; + hyprland = let + gen = mode: + lib.mkOption { + default = ""; + description = "Shell commands to run when switching to ${mode} mode."; + type = lib.types.lines; + }; + in { + powerSaver = gen "power-saver"; + performance = gen "performance"; + }; + }; + }; } diff --git a/system/hardware/fingerprint.nix b/system/hardware/fingerprint.nix index f3a16fc..a506268 100644 --- a/system/hardware/fingerprint.nix +++ b/system/hardware/fingerprint.nix @@ -4,22 +4,22 @@ pkgs, ... }: let - inherit (config.niksos) fingerprint desktop; - inherit (lib) mkIf mkEnableOption; + inherit (config.niksos) hardware desktop; + inherit (lib) mkIf; uwsm = lib.getExe pkgs.uwsm; foot = lib.getExe pkgs.foot; + hypr = config.programs.hyprland.enable; in { - options.niksos.fingerprint = mkEnableOption "fingerprint support."; - config = mkIf fingerprint { + config = mkIf hardware.fingerprint { services = { fprintd.enable = true; - logind.extraConfig = mkIf desktop.hyprland '' + logind.extraConfig = mkIf hypr '' # don’t shutdown when power button is short-pressed HandlePowerKey=ignore ''; }; - home-manager.users.jsw.wayland.windowManager.hyprland.settings = mkIf desktop.hyprland { + home-manager.users.jsw.wayland.windowManager.hyprland.settings = mkIf hypr { bind = [ ", XF86PowerOff, exec, ${uwsm} app -- pgrep fprintd-verify && exit 0 || ${foot} -a 'foot-fprintd' sh -c 'fprintd-verify && systemctl sleep'" ]; diff --git a/system/hardware/graphics.nix b/system/hardware/graphics.nix index ee1c34e..af4fc1d 100644 --- a/system/hardware/graphics.nix +++ b/system/hardware/graphics.nix @@ -4,21 +4,15 @@ lib, ... }: let - inherit (lib) optionals mkEnableOption mkDefault; - inherit (config.niksos) graphics; - inherit (graphics) enable; + inherit (lib) optionals mkDefault; + inherit (config.niksos.hardware) graphics; + inherit (graphics) enable nvidia intel; - nvidia = graphics.enable && graphics.nvidia; - intel = graphics.enable && graphics.intel; + Nvidia = enable && nvidia; + Intel = enable && intel; in { - options.niksos.graphics = { - enable = mkEnableOption "core graphics"; - intel = mkEnableOption "additional intel drivers"; - nvidia = mkEnableOption "additoinal nvidia drivers"; - }; - config = { - niksos.graphics.enable = mkDefault true; + niksos.hardware.graphics.enable = mkDefault true; hardware.graphics = { inherit enable; @@ -29,10 +23,10 @@ in { vaapiVdpau libvdpau-va-gl ] - ++ optionals intel [ + ++ optionals Intel [ pkgs.intel-media-driver ] - ++ optionals nvidia [ + ++ optionals Nvidia [ nvidia-vaapi-driver ]; extraPackages32 = with pkgs.pkgsi686Linux; @@ -41,18 +35,18 @@ in { vaapiVdpau libvdpau-va-gl ] - ++ optionals intel [ + ++ optionals Intel [ pkgs.pkgsi686Linux.intel-media-driver ] - ++ optionals nvidia [ + ++ optionals Nvidia [ pkgs.pkgsi686Linux.nvidia-vaapi-driver ]; }; hardware.nvidia = { - modesetting.enable = nvidia; + modesetting.enable = Nvidia; open = false; }; - services.xserver.videoDrivers = optionals nvidia ["nvidia"]; + services.xserver.videoDrivers = optionals Nvidia ["nvidia"]; }; } diff --git a/system/hardware/joycond.nix b/system/hardware/joycond.nix index a87d760..a228daf 100644 --- a/system/hardware/joycond.nix +++ b/system/hardware/joycond.nix @@ -3,9 +3,7 @@ lib, ... }: { - options.niksos.joycond = lib.mkEnableOption "support for nintendo switch controllers."; - - config.services = lib.mkIf config.niksos.joycond { + services = lib.mkIf config.niksos.hardware.joycond { usbmuxd.enable = true; joycond.enable = true; }; diff --git a/system/hardware/power.nix b/system/hardware/power.nix index 0f22c63..114c9dc 100644 --- a/system/hardware/power.nix +++ b/system/hardware/power.nix @@ -5,22 +5,8 @@ ... }: let inherit (config) niksos; - cfg = niksos.portable; + cfg = niksos.hardware.portable; in { - options.niksos.portable = { - enable = lib.mkEnableOption "battery optimisers"; - hyprland = let - gen = mode: - lib.mkOption { - default = ""; - description = "Shell commands to run when switching to ${mode} mode."; - type = lib.types.lines; - }; - in { - powerSaver = gen "power-saver"; - performance = gen "performance"; - }; - }; config = { services = lib.mkIf cfg.enable { logind = { @@ -31,7 +17,7 @@ in { power-profiles-daemon.enable = true; }; - environment.systemPackages = lib.mkIf niksos.desktop.hyprland [ + environment.systemPackages = lib.mkIf config.programs.hyprland.enable [ (pkgs.writeScriptBin "powermode" '' #!/usr/bin/env bash diff --git a/system/programs/games.nix b/system/programs/games.nix index e4ee0d3..05f61f1 100644 --- a/system/programs/games.nix +++ b/system/programs/games.nix @@ -4,16 +4,9 @@ lib, ... }: let - cfg = config.niksos.games; + cfg = config.niksos.desktop.games; in { - options.niksos.games = lib.mkEnableOption "gaming related stuff."; config = lib.mkIf cfg { - assertions = [ - { - assertion = config.niksos.desktop.enable; - message = "The games option needs desktop to be enabled for it to work properly (it enables home-manager)."; - } - ]; # nixpkgs.overlays = [ # (final: prev: let # version = "1.4.2"; diff --git a/system/services/ssh.nix b/system/services/ssh.nix index fddd575..dc386eb 100644 --- a/system/services/ssh.nix +++ b/system/services/ssh.nix @@ -1,7 +1,7 @@ {config, ...}: { services.openssh = { enable = true; - openFirewall = !config.niksos.portable.enable; + openFirewall = !config.niksos.hardware.portable.enable; settings.UseDns = true; }; }