Add gdm gnome sddm kde
This commit is contained in:
parent
4cd9e462d8
commit
4123f8ccac
7 changed files with 183 additions and 3 deletions
|
|
@ -9,16 +9,18 @@
|
|||
./fish.nix
|
||||
./flatpak.nix
|
||||
./gaming.nix
|
||||
./gdm.nix
|
||||
./git.nix
|
||||
./gnome.nix
|
||||
./gnome_services.nix
|
||||
./gpu.nix
|
||||
./greetd.nix
|
||||
./home_packages.nix
|
||||
./hyprland
|
||||
./kde.nix
|
||||
./kde_connect.nix
|
||||
./keepassxc.nix
|
||||
./kitty.nix
|
||||
./xkb.nix
|
||||
./media.nix
|
||||
./ncspot.nix
|
||||
./nextcloud.nix
|
||||
|
|
@ -27,11 +29,13 @@
|
|||
./podman.nix
|
||||
./printing.nix
|
||||
./scripts.nix
|
||||
./sddm.nix
|
||||
./sops.nix
|
||||
./starship.nix
|
||||
./stylix.nix
|
||||
./teams.nix
|
||||
./virtualbox.nix
|
||||
./xkb.nix
|
||||
./xone.nix
|
||||
./yazi
|
||||
];
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@
|
|||
''
|
||||
+ config.mods.fish.additionalConfig
|
||||
else
|
||||
config.mods.fish.additionalPackages;
|
||||
config.mods.fish.additionalConfig;
|
||||
};
|
||||
}
|
||||
);
|
||||
|
|
|
|||
34
modules/programs/gdm.nix
Normal file
34
modules/programs/gdm.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{
|
||||
lib,
|
||||
options,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.mods.gdm = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables the gdm displayManager";
|
||||
};
|
||||
extraOptions = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Extra options to be applied to the gnome config";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.gdm.enable (
|
||||
lib.optionalAttrs (options ? services.xserver.displayManager.gdm) (
|
||||
{
|
||||
services.xserver.enable = true;
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
}
|
||||
// {
|
||||
services.xserver.displayManager.gdm = config.mods.gdm.extraOptions;
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
74
modules/programs/gnome.nix
Normal file
74
modules/programs/gnome.nix
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
{
|
||||
lib,
|
||||
options,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.mods.gnome = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables the Gnome desktop environment";
|
||||
};
|
||||
useDefaultOptions = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Use default options provided by module. If disabled, will only apply extraOptions.";
|
||||
};
|
||||
extraOptions = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Extra options to be applied to the gnome config";
|
||||
};
|
||||
extraDconf = lib.mkOption {
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Extra options to be applied to the dconf config";
|
||||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
defaultExtensions = with pkgs.gnomeExtensions; [
|
||||
blur-my-shell
|
||||
dash-to-dock
|
||||
tray-icons-reloaded
|
||||
];
|
||||
in
|
||||
lib.mkIf config.mods.gnome.enable (
|
||||
lib.optionalAttrs (options ? services.xserver.desktopManager.gnome) (
|
||||
{
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
}
|
||||
// lib.mkIf config.mods.gnome.useDefaultOptions { environment.systemPackages = defaultExtensions; }
|
||||
// {
|
||||
services.xserver.desktopManager.gnome = config.mods.gnome.extraOptions;
|
||||
}
|
||||
)
|
||||
// lib.optionalAttrs (options ? dconf) (
|
||||
lib.mkIf config.mods.gnome.useDefaultOptions {
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
enabled-extensions = map (extension: extension.extensionUuid) defaultExtensions;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
// {
|
||||
dconf = config.mods.gnome.extraDconf;
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
24
modules/programs/kde.nix
Normal file
24
modules/programs/kde.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
lib,
|
||||
options,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.mods.kde = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables the KDE desktop environment";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.kde.enable (
|
||||
lib.optionalAttrs (options ? services.desktopManager.plasma6) {
|
||||
# apparently kde integration is bad -> kdeconfig is too much even for nix, can't blame them :)
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
44
modules/programs/sddm.nix
Normal file
44
modules/programs/sddm.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
lib,
|
||||
options,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
{
|
||||
options.mods.sddm = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description = "Enables the sddm displayManager";
|
||||
};
|
||||
useDefaultOptions = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Use default options provided by module. If disabled, will only apply extraOptions.";
|
||||
};
|
||||
extraOptions = lib.mkOption {
|
||||
default = { };
|
||||
example = {
|
||||
wayland.enable = false;
|
||||
};
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = "Extra options to be applied to the sddm config";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.sddm.enable (
|
||||
lib.optionalAttrs (options ? services.displayManager.sddm) (
|
||||
{
|
||||
services.displayManager.sddm.enable = true;
|
||||
}
|
||||
// lib.mkIf config.mods.sddm.useDefaultOptions {
|
||||
services.displayManager.sddm.wayland.enable = true;
|
||||
}
|
||||
// {
|
||||
services.displayManager.sddm = config.mods.sddm.extraOptions;
|
||||
}
|
||||
)
|
||||
);
|
||||
}
|
||||
2
result
2
result
|
|
@ -1 +1 @@
|
|||
/nix/store/djp5gc4jd0g7p2waxhhcaliakn9irh7l-dashNix-book
|
||||
/nix/store/3y1kplrb4rnks5hpb3n9c0r3x5x3lw54-dashNix-book
|
||||
Loading…
Add table
Add a link
Reference in a new issue