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:
parent
51e295caf2
commit
fc876b2ea5
57 changed files with 83 additions and 96 deletions
|
@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -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;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = [
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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)"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hyprland.nix
|
|
||||||
./nvidia.nix
|
./nvidia.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
{lib, ...}: let
|
|
||||||
inherit (lib) mkEnableOption;
|
|
||||||
in {
|
|
||||||
options.local.modules.hyprland = {
|
|
||||||
enable = mkEnableOption "Hyprland modules";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,6 +1,5 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./desktop.nix
|
|
||||||
./gaming.nix
|
./gaming.nix
|
||||||
./laptop.nix
|
./laptop.nix
|
||||||
./server.nix
|
./server.nix
|
||||||
|
|
|
@ -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.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -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.";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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:
|
||||||
|
|
|
@ -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];
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 [
|
||||||
{
|
{
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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";
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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];
|
||||||
};
|
};
|
||||||
|
|
|
@ -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];
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = ''
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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; [
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = [
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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 = {
|
||||||
|
|
|
@ -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;
|
||||||
};
|
};
|
||||||
|
|
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Reference in a new issue