treewide: update options API

The options API has been updated, in order for a more flexible setup
with `local.modules.desktop.enable` being replaced with an enum of
desktops at `local.systemVars.desktop`, which allows for switching
desktop environments by changing a single option. This is so that we can
switch to cosmic and only enable the programs we need (i.e. disable
greetd because we use cosmic-greeter and enable terminals since that is
desktop related). This is simpler than having a different module per
desktop.
This commit is contained in:
Anthony Rodriguez 2025-02-06 18:40:30 +01:00
parent 51e295caf2
commit fc876b2ea5
Signed by: nezia
SSH key fingerprint: SHA256:Ihfpl0rUpqDevYqnzSR34OYfVLbDNkBiUjs3CpX4ykA
57 changed files with 83 additions and 96 deletions

View file

@ -5,6 +5,7 @@ _: {
systemVars = { systemVars = {
hostName = "solaire"; hostName = "solaire";
username = "nezia"; username = "nezia";
desktop = "Hyprland";
}; };
homeVars = { homeVars = {
fullName = "Anthony Rodriguez"; fullName = "Anthony Rodriguez";
@ -13,12 +14,10 @@ _: {
}; };
profiles = { profiles = {
desktop.enable = true;
gaming.enable = true; gaming.enable = true;
}; };
modules = { modules = {
hyprland.enable = true;
nvidia.enable = true; nvidia.enable = true;
}; };
}; };

View file

@ -8,6 +8,7 @@ _: {
systemVars = { systemVars = {
hostName = "vamos"; hostName = "vamos";
username = "nezia"; username = "nezia";
desktop = "Hyprland";
}; };
homeVars = { homeVars = {
@ -17,12 +18,7 @@ _: {
}; };
profiles = { profiles = {
desktop.enable = true;
laptop.enable = true; laptop.enable = true;
}; };
modules = {
hyprland.enable = true;
};
}; };
} }

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
fonts = { fonts = {
enableDefaultPackages = false; enableDefaultPackages = false;
packages = [ packages = [

View file

@ -3,7 +3,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
services.fwupd.enable = true; services.fwupd.enable = true;
}; };
} }

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
services = { services = {
# setup printing service # setup printing service
printing.enable = true; printing.enable = true;

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
security = { security = {
polkit.enable = true; polkit.enable = true;
polkit = { polkit = {

View file

@ -4,14 +4,13 @@
... ...
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config.local.systemVars) username; inherit (config.local.systemVars) desktop username;
inherit (config.local.homeVars) fullName; inherit (config.local.homeVars) fullName;
inherit (config.local.profiles) desktop;
in { in {
users.users.${username} = { users.users.${username} = {
isNormalUser = true; isNormalUser = true;
description = fullName; description = fullName;
extraGroups = mkIf desktop.enable [ extraGroups = mkIf (desktop != "none") [
"networkmanager" "networkmanager"
"audio" "audio"
"video" "video"
@ -20,7 +19,7 @@ in {
]; ];
}; };
hjem = mkIf desktop.enable { hjem = mkIf (desktop != "none") {
clobberByDefault = true; clobberByDefault = true;
users.${username} = { users.${username} = {
enable = true; enable = true;

View file

@ -4,23 +4,30 @@
options, options,
... ...
}: let }: let
inherit (lib) mkIf mkOption; inherit (lib) mkOption;
inherit (lib.modules) mkIf;
inherit (lib.types) str; inherit (lib.types) str;
in { in {
options.local.homeVars = { options.local.homeVars = {
fullName = mkOption { fullName = mkOption {
type = str; type = str;
description = "your full name (used for git commits and user description)"; description = ''
your full name (used for git commits and user description)
'';
default = "User"; default = "User";
}; };
email = mkOption { email = mkOption {
type = str; type = str;
description = "your email (used for git commits)"; description = ''
your email (used for git commits)
'';
default = null; default = null;
}; };
signingKey = mkOption { signingKey = mkOption {
type = str; type = str;
description = "your ssh public key (used for signing git commits)"; description = ''
your ssh public key (used for signing git commits)"
'';
}; };
}; };

View file

@ -1,6 +1,5 @@
{ {
imports = [ imports = [
./hyprland.nix
./nvidia.nix ./nvidia.nix
]; ];
} }

View file

@ -1,7 +0,0 @@
{lib, ...}: let
inherit (lib) mkEnableOption;
in {
options.local.modules.hyprland = {
enable = mkEnableOption "Hyprland modules";
};
}

View file

@ -1,6 +1,5 @@
{ {
imports = [ imports = [
./desktop.nix
./gaming.nix ./gaming.nix
./laptop.nix ./laptop.nix
./server.nix ./server.nix

View file

@ -1,18 +0,0 @@
{
lib,
config,
...
}: let
inherit (lib) mkEnableOption;
in {
options = {
local.profiles.desktop.enable = mkEnableOption "the desktop profile";
};
config.assertions = lib.mkIf config.local.profiles.desktop.enable [
{
assertion = !config.local.profiles.server.enable;
message = "The desktop profile cannot be enabled if `local.profiles.server.enable` is set to true.";
}
];
}

View file

@ -11,7 +11,7 @@ in {
config.assertions = lib.mkIf config.local.profiles.server.enable [ config.assertions = lib.mkIf config.local.profiles.server.enable [
{ {
assertion = !config.local.profiles.desktop.enable; assertion = !(config.local.systemVars.desktop != "none");
message = "The server profile cannot be enabled if `local.profiles.desktop.enable` is set to true."; message = "The server profile cannot be enabled if `local.profiles.desktop.enable` is set to true.";
} }

View file

@ -4,19 +4,30 @@
... ...
}: let }: let
inherit (lib) mkOption; inherit (lib) mkOption;
inherit (lib.types) str; inherit (lib.types) enum str;
in { in {
options.local.systemVars = { options.local.systemVars = {
hostName = mkOption { hostName = mkOption {
type = str; type = str;
description = "hostname for the current host"; description = ''
hostname for the current host
'';
default = null; default = null;
}; };
username = mkOption { username = mkOption {
type = str; type = str;
description = "username for the home directory"; description = ''
username for the home directory
'';
default = "user"; default = "user";
}; };
desktop = mkOption {
type = enum ["none" "Hyprland" "cosmic"];
default = "none";
description = ''
the desktop environment to be used
'';
};
}; };
config.assertions = [ config.assertions = [
@ -26,5 +37,8 @@ in {
{ {
assertion = options.local.systemVars.username.isDefined; assertion = options.local.systemVars.username.isDefined;
} }
{
assertion = options.local.systemVars.desktop.isDefined;
}
]; ];
} }

View file

@ -8,7 +8,7 @@
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
in { in {
config = mkIf config.local.modules.hyprland.enable { config = mkIf (config.local.systemVars.desktop == "Hyprland") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [inputs.anyrun.packages.${pkgs.system}.anyrun-with-all-plugins]; packages = [inputs.anyrun.packages.${pkgs.system}.anyrun-with-all-plugins];
files = { files = {

View file

@ -22,7 +22,7 @@
]; ];
} (builtins.readFile ./krisp-patcher.py); } (builtins.readFile ./krisp-patcher.py);
in { in {
config = mkIf config.local.profiles.desktop.enable { config = mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [discord krisp-patcher]; packages = [discord krisp-patcher];
files.".config/Vencord/themes/midnight-base16.css".text = with styleCfg.scheme.palette; files.".config/Vencord/themes/midnight-base16.css".text = with styleCfg.scheme.palette;

View file

@ -10,7 +10,7 @@ in {
./neovim.nix ./neovim.nix
]; ];
config = mkIf config.local.profiles.desktop.enable { config = mkIf (config.local.systemVars.desktop != "none") {
/* /*
we don't want the default NixOS EDITOR value, which is nano and will override the `environment.d` setting. we don't want the default NixOS EDITOR value, which is nano and will override the `environment.d` setting.
we have to unset it like this so that our systemd user variable will take precedence: we have to unset it like this so that our systemd user variable will take precedence:

View file

@ -239,7 +239,7 @@
}; };
}; };
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [customNeovim.neovim]; packages = [customNeovim.neovim];
}; };

View file

@ -10,7 +10,7 @@
sha256 = "137k3i7z4va68v4rvrazy26szc7p2w59h7bc2h8japzjyj6xjs71"; sha256 = "137k3i7z4va68v4rvrazy26szc7p2w59h7bc2h8japzjyj6xjs71";
}; };
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.fastfetch]; packages = [pkgs.fastfetch];
files = { files = {

View file

@ -144,7 +144,7 @@
}; };
}; };
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [firefox]; packages = [firefox];
files = { files = {

View file

@ -12,7 +12,7 @@
hyprlock = "${inputs.hyprlock.packages.${pkgs.system}.hyprlock}/bin/hyprlock"; hyprlock = "${inputs.hyprlock.packages.${pkgs.system}.hyprlock}/bin/hyprlock";
in { in {
config = lib.mkIf config.local.modules.hyprland.enable { config = lib.mkIf (config.local.systemVars.desktop == "Hyprland") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [hypridle]; packages = [hypridle];
files = { files = {

View file

@ -29,7 +29,7 @@
''; '';
}); });
in { in {
config = mkIf config.local.modules.hyprland.enable { config = mkIf (config.local.systemVars.desktop == "Hyprland") {
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland; package = inputs.hyprland.packages.${pkgs.system}.hyprland;

View file

@ -14,7 +14,7 @@
styleCfg = config.local.style; styleCfg = config.local.style;
rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) styleCfg.scheme.palette; rgbaPalette = builtins.mapAttrs (_: c: (lib'.rgba c 1)) styleCfg.scheme.palette;
in { in {
config = mkIf config.local.modules.hyprland.enable { config = mkIf (config.local.systemVars.desktop == "Hyprland") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [hyprlock]; packages = [hyprlock];
files = { files = {

View file

@ -11,7 +11,7 @@
inherit (config.local.style) wallpaper; inherit (config.local.style) wallpaper;
inherit (inputs.hyprpaper.packages.${pkgs.system}) hyprpaper; inherit (inputs.hyprpaper.packages.${pkgs.system}) hyprpaper;
in { in {
config = lib.mkIf config.local.modules.hyprland.enable { config = lib.mkIf (config.local.systemVars.desktop == "Hyprland") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [hyprpaper]; packages = [hyprpaper];
files = { files = {

View file

@ -11,7 +11,7 @@ in {
./zathura.nix ./zathura.nix
]; ];
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username}.packages = [ hjem.users.${username}.packages = [
pkgs.gnome-calculator pkgs.gnome-calculator
pkgs.gthumb pkgs.gthumb

View file

@ -7,7 +7,7 @@
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
styleCfg = config.local.style; styleCfg = config.local.style;
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.tidal-hifi]; packages = [pkgs.tidal-hifi];
files = { files = {

View file

@ -9,7 +9,7 @@
builtins.concatStringsSep "\n" builtins.concatStringsSep "\n"
(lib.mapAttrsToList (option: value: "set ${option} \"${toString value}\"") attrs); (lib.mapAttrsToList (option: value: "set ${option} \"${toString value}\"") attrs);
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.zathura]; packages = [pkgs.zathura];
files = { files = {

View file

@ -8,7 +8,7 @@
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
in { in {
config = mkIf config.local.profiles.desktop.enable { config = mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = with pkgs; [ packages = with pkgs; [
entr entr

View file

@ -4,10 +4,9 @@
... ...
}: let }: let
inherit (lib.modules) mkIf; inherit (lib.modules) mkIf;
inherit (config.local.profiles) desktop; inherit (config.local.systemVars) desktop username;
inherit (config.local.systemVars) username;
in { in {
config = mkIf desktop.enable { config = mkIf (desktop != "none") {
programs.nh = { programs.nh = {
enable = true; enable = true;
clean = { clean = {

View file

@ -5,6 +5,7 @@
... ...
}: let }: let
inherit (lib) optionalAttrs; inherit (lib) optionalAttrs;
inherit (lib.modules) mkIf;
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
styleCfg = config.local.style; styleCfg = config.local.style;
@ -38,7 +39,7 @@
"21" = palette.base06; "21" = palette.base06;
}; };
in { in {
config = lib.mkIf config.local.modules.hyprland.enable { config = mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.foot]; packages = [pkgs.foot];
files = { files = {

View file

@ -45,7 +45,7 @@
selection-foreground = colors.base05; selection-foreground = colors.base05;
}; };
in { in {
config = mkIf config.local.profiles.desktop.enable { config = mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
files = mkMerge [ files = mkMerge [
{ {

View file

@ -9,7 +9,7 @@
builtins.concatStringsSep "\n" builtins.concatStringsSep "\n"
(lib.mapAttrsToList (option: value: "--${option}=\"${value}\"") attrs); (lib.mapAttrsToList (option: value: "--${option}=\"${value}\"") attrs);
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [ packages = [
pkgs.bat pkgs.bat

View file

@ -3,7 +3,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
programs.direnv.enable = true; programs.direnv.enable = true;
}; };
} }

View file

@ -8,7 +8,7 @@
inherit (config.local.homeVars) signingKey; inherit (config.local.homeVars) signingKey;
toINI = lib.generators.toINI {}; toINI = lib.generators.toINI {};
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = with pkgs; [git lazygit]; packages = with pkgs; [git lazygit];
files = { files = {

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = with pkgs; [ packages = with pkgs; [
# archives # archives

View file

@ -4,7 +4,7 @@
osConfig, osConfig,
... ...
}: { }: {
config = lib.mkIf osConfig.local.profiles.desktop.enable { config = lib.mkIf (osConfig.local.systemVars.desktop != "none") {
programs.tmux = { programs.tmux = {
enable = true; enable = true;
prefix = "C-space"; prefix = "C-space";

View file

@ -14,7 +14,7 @@ in {
./zsh.nix ./zsh.nix
]; ];
config = mkIf config.local.profiles.desktop.enable { config = mkIf (config.local.systemVars.desktop != "none") {
users.users.${username}.shell = pkgs.zsh; users.users.${username}.shell = pkgs.zsh;
}; };
} }

View file

@ -12,7 +12,7 @@
starshipCache = "${config.hjem.users.${username}.directory}/.cache/starship"; starshipCache = "${config.hjem.users.${username}.directory}/.cache/starship";
zoxideCache = "${config.hjem.users.${username}.directory}/.cache/zoxide"; zoxideCache = "${config.hjem.users.${username}.directory}/.cache/zoxide";
in { in {
config = mkIf config.local.profiles.desktop.enable { config = mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = with pkgs; [carapace nushell]; packages = with pkgs; [carapace nushell];
files = { files = {

View file

@ -7,7 +7,7 @@
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
toTOML = (pkgs.formats.toml {}).generate; toTOML = (pkgs.formats.toml {}).generate;
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.starship]; packages = [pkgs.starship];
files = { files = {

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.zoxide]; packages = [pkgs.zoxide];
}; };

View file

@ -7,7 +7,7 @@
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
in { in {
config = mkIf config.local.profiles.desktop.enable { config = mkIf (config.local.systemVars.desktop != "none") {
programs.zsh.enable = true; programs.zsh.enable = true;
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.zsh]; packages = [pkgs.zsh];

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (lib) mkIf; inherit (lib) mkIf;
in { in {
config = mkIf config.local.profiles.desktop.enable { config = mkIf (config.local.systemVars.desktop != "none") {
programs = { programs = {
thunar = { thunar = {
enable = true; enable = true;

View file

@ -10,7 +10,7 @@
styleCfg = config.local.style; styleCfg = config.local.style;
betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)"; betterTransition = "all 0.3s cubic-bezier(.55,-0.68,.48,1.682)";
in { in {
config = mkIf config.local.modules.hyprland.enable { config = mkIf (config.local.systemVars.desktop == "Hyprland") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [ packages = [
pkgs.waybar pkgs.waybar

View file

@ -17,7 +17,7 @@
in in
builtins.concatStringsSep "\n" (map formatItem items); builtins.concatStringsSep "\n" (map formatItem items);
in { in {
config = lib.mkIf config.local.modules.hyprland.enable { config = lib.mkIf (config.local.systemVars.desktop == "Hyprland") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.wlogout]; packages = [pkgs.wlogout];
files = { files = {

View file

@ -6,7 +6,7 @@
}: let }: let
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
files = { files = {
".config/mimeapps.list".text = '' ".config/mimeapps.list".text = ''

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
virtualisation.podman = { virtualisation.podman = {
enable = true; enable = true;
dockerCompat = true; dockerCompat = true;

View file

@ -3,7 +3,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
documentation = { documentation = {
enable = true; enable = true;

View file

@ -3,7 +3,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
services.flatpak.enable = true; services.flatpak.enable = true;
}; };
} }

View file

@ -7,7 +7,7 @@
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
toINI = lib.generators.toINI {}; toINI = lib.generators.toINI {};
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
hjem.users.${username} = { hjem.users.${username} = {
packages = [pkgs.gammastep]; packages = [pkgs.gammastep];
files = { files = {

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
services = { services = {
# needed for GNOME services outside of GNOME Desktop # needed for GNOME services outside of GNOME Desktop
dbus.packages = with pkgs; [ dbus.packages = with pkgs; [

View file

@ -49,8 +49,7 @@ let
}; };
}); });
in { in {
# TODO: perhaps turn this into a more generic module if we wanna use other wayland compositors config = lib.mkIf (config.local.systemVars.desktop == "Hyprland") {
config = lib.mkIf config.local.modules.hyprland.enable {
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = { settings = {

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
services.keyd = { services.keyd = {
enable = true; enable = true;
keyboards.default = { keyboards.default = {

View file

@ -4,7 +4,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
services.kmscon = { services.kmscon = {
enable = true; enable = true;
fonts = [ fonts = [

View file

@ -3,7 +3,7 @@
config, config,
... ...
}: { }: {
config = lib.mkIf config.local.modules.hyprland.enable { config = lib.mkIf (config.local.systemVars.desktop == "Hyprland") {
location.provider = "geoclue2"; location.provider = "geoclue2";
services.geoclue2 = { services.geoclue2 = {

View file

@ -8,7 +8,7 @@
inputs.nix-gaming.nixosModules.pipewireLowLatency inputs.nix-gaming.nixosModules.pipewireLowLatency
]; ];
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
services = { services = {
pulseaudio.enable = false; pulseaudio.enable = false;
pipewire = { pipewire = {

View file

@ -5,7 +5,7 @@
}: let }: let
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
in { in {
config = lib.mkIf config.local.profiles.desktop.enable { config = lib.mkIf (config.local.systemVars.desktop != "none") {
programs.ssh = { programs.ssh = {
startAgent = true; startAgent = true;
}; };

View file

@ -9,7 +9,7 @@
inherit (config.local.systemVars) username; inherit (config.local.systemVars) username;
inherit (lib') generateGtkColors; inherit (lib') generateGtkColors;
in { in {
config = lib.mkIf config.local.modules.hyprland.enable { config = lib.mkIf (config.local.systemVars.desktop == "Hyprland") {
hjem.users.${username} = { hjem.users.${username} = {
files = { files = {
".config/swaync/config.json".text = toJSON { ".config/swaync/config.json".text = toJSON {