System Gen182 @ 2025-05-02-23:48:15 by jonas@comfy-station

This commit is contained in:
2025-05-02 23:48:16 +02:00
parent 87db9887c2
commit 7add5e0db6
23 changed files with 302 additions and 247 deletions

View File

@@ -1,6 +1,7 @@
{...}: {
imports = [
./hyprland.nix
./kwallet.nix
./plasma.nix
];
}

View File

@@ -4,9 +4,9 @@
pkgs,
...
}: let
cfg = config.desktop.de.hyprland;
cfg = config.hive.hyprland;
in {
options.desktop.de.hyprland = {
options.hive.hyprland = {
enable = lib.mkEnableOption "enable hyprland desktop environment";
};
config = lib.mkIf cfg.enable {

View File

@@ -0,0 +1,31 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.hive.kwallet;
in {
options.hive.kwallet = {
enable = lib.mkEnableOption "Enable kwallet";
forUsers = lib.mkOption {
type = lib.types.listOf lib.types.str;
default = [];
description = ''
List of users that should unlock kwallet via pam.
'';
};
};
config = lib.mkIf cfg.enable {
security.pam.services = builtins.listToAttrs (map (user: {
name = user;
value = {
kwallet.enable = true;
kwallet.forceRun = true;
kwallet.package = pkgs.kdePackages.kwallet-pam;
};
})
cfg.forUsers);
};
}

View File

@@ -1,17 +1,15 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.desktop.de.plasma;
cfg = config.hive.plasma;
in {
options.desktop.de.plasma = {
options.hive.plasma = {
enable = lib.mkEnableOption "Enable Plasma desktop environment with sddm";
};
config = lib.mkIf cfg.enable {
# Enable plasma
services.xserver.desktopManager.plasma5.enable = true;
};
}

View File

@@ -3,12 +3,12 @@
lib,
...
}: let
cfg = config.desktop.dm;
cfg = config.hive.displayManager;
in {
options.desktop.dm = with lib; {
options.hive.displayManager = with lib; {
name = mkOption {
type = types.nullOr (types.enum ["sddm" "gdm"]);
default = null;
type = types.enum ["sddm" "gdm" "cosmic"];
default = "sddm";
description = "The display manager to use.";
};
autologin = mkOption {
@@ -16,11 +16,6 @@ in {
default = null;
description = "The autologin username or null for no autologin.";
};
wayland = mkOption {
type = types.bool;
default = false;
description = "Enable wayland";
};
};
imports = [

View File

@@ -3,7 +3,7 @@
config,
...
}: let
cfg = config.desktop.dm;
cfg = config.hive.displayManager;
in {
config = lib.mkIf (cfg.name == "gdm") {
services.xserver.displayManager.gdm = {

View File

@@ -4,21 +4,16 @@
pkgs,
...
}: let
cfg = config.desktop.dm;
cfg = config.hive.displayManager;
in {
config = lib.mkIf (cfg.name == "sddm") {
services.displayManager.sddm = {
enable = true;
wayland.enable = cfg.wayland;
wayland.enable = true;
};
environment.systemPackages = with pkgs; [
kdePackages.kwallet
kdePackages.kwalletmanager
];
security.pam.services.jonas.kwallet = {
enable = true;
forceRun = true;
package = pkgs.kdePackages.kwallet-pam;
};
};
}

View File

@@ -1,5 +0,0 @@
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
fira-code
];
}