Moved DE config to the generic folder

This commit is contained in:
2025-05-24 08:14:29 +02:00
parent 80e8435f47
commit 5b5372182d
7 changed files with 93 additions and 82 deletions

90
flake.lock generated
View File

@@ -20,11 +20,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1745357003, "lastModified": 1747864449,
"narHash": "sha256-jYwzQkv1r7HN/4qrAuKp+NR4YYNp2xDrOX5O9YVqkWo=", "narHash": "sha256-PIjVAWghZhr3L0EFM2UObhX84UQxIACbON0IC0zzSKA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "a19cf76ee1a15c1c12083fa372747ce46387289f", "rev": "389372c5f4dc1ac0e7645ed29a35fd6d71672ef5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -117,11 +117,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747439237, "lastModified": 1747978958,
"narHash": "sha256-5rCGrnkglKKj4cav1U3HC+SIUNJh08pqOK4spQv9RjA=", "narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ae755329092c87369b9e9a1510a8cf1ce2b1c708", "rev": "7419250703fd5eb50e99bdfb07a86671939103ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -137,11 +137,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747331121, "lastModified": 1747688870,
"narHash": "sha256-3MmiUN/jOHBHQUnjqzg6qKArc17j2OS6jisEppDY4g8=", "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1eec32f0efe3b830927989767a9e6ece0d82d608", "rev": "d5f1f641b289553927b3801580598d200a501863",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -158,11 +158,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747331121, "lastModified": 1747688870,
"narHash": "sha256-3MmiUN/jOHBHQUnjqzg6qKArc17j2OS6jisEppDY4g8=", "narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1eec32f0efe3b830927989767a9e6ece0d82d608", "rev": "d5f1f641b289553927b3801580598d200a501863",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -179,11 +179,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1747439237, "lastModified": 1747978958,
"narHash": "sha256-5rCGrnkglKKj4cav1U3HC+SIUNJh08pqOK4spQv9RjA=", "narHash": "sha256-pQQnbxWpY3IiZqgelXHIe/OAE/Yv4NSQq7fch7M6nXQ=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "ae755329092c87369b9e9a1510a8cf1ce2b1c708", "rev": "7419250703fd5eb50e99bdfb07a86671939103ea",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -266,11 +266,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1747431568, "lastModified": 1747926140,
"narHash": "sha256-pYwBbtvjHgJzvrHkZHsaqgMcCpOmQ4/9kymUgAnAjgk=", "narHash": "sha256-QhbtDAlufsLYsoC+8j6XWiyANWCGuZBHwuC2Nn+VnQU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "2946009006bd8a988ff8a51b83528f6e1d8f0e98", "rev": "bd4733a0ff2b89fd3f22dc6ec9ff00e070753662",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -388,11 +388,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1746655412, "lastModified": 1747484975,
"narHash": "sha256-kVQ0bHVtX6baYxRWWIh4u3LNJZb9Zcm2xBeDPOGz5BY=", "narHash": "sha256-+LAQ81HBwG0lwshHlWe0kfWg4KcChIPpnwtnwqmnoEU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprlang", "repo": "hyprlang",
"rev": "557241780c179cf7ef224df392f8e67dab6cef83", "rev": "163c83b3db48a17c113729c220a60b94596c9291",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -438,11 +438,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1739870480, "lastModified": 1747584298,
"narHash": "sha256-SiDN5BGxa/1hAsqhgJsS03C3t2QrLgBT8u+ENJ0Qzwc=", "narHash": "sha256-PH9qZqWLHvSBQiUnA0NzAyQA3tu2no2z8kz0ZeHWj4w=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "206367a08dc5ac4ba7ad31bdca391d098082e64b", "rev": "e511882b9c2e1d7a75d45d8fddd2160daeafcbc3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -481,11 +481,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1746461020, "lastModified": 1747744144,
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=", "narHash": "sha256-W7lqHp0qZiENCDwUZ5EX/lNhxjMdNapFnbErcbnP11Q=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae", "rev": "2795c506fe8fb7b03c36ccb51f75b6df0ab2553f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -497,11 +497,11 @@
}, },
"nixpkgs-stable-darwin": { "nixpkgs-stable-darwin": {
"locked": { "locked": {
"lastModified": 1747397834, "lastModified": 1747862697,
"narHash": "sha256-JKNliE06f0B6171bGFMIGNJnr1QO/RtkDJ3ifqg7fGQ=", "narHash": "sha256-U4HaNZ1W26cbOVm0Eb5OdGSnfQVWQKbLSPrSSa78KC0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2aa9b5338551238f2981c385ef01a949b9f578d1", "rev": "2baa12ff69913392faf0ace833bc54bba297ea95",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -513,11 +513,11 @@
}, },
"nixpkgs-stable-nixos": { "nixpkgs-stable-nixos": {
"locked": { "locked": {
"lastModified": 1747209494, "lastModified": 1747862697,
"narHash": "sha256-fLise+ys+bpyjuUUkbwqo5W/UyIELvRz9lPBPoB0fbM=", "narHash": "sha256-U4HaNZ1W26cbOVm0Eb5OdGSnfQVWQKbLSPrSSa78KC0=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5d736263df906c5da72ab0f372427814de2f52f8", "rev": "2baa12ff69913392faf0ace833bc54bba297ea95",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -529,11 +529,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1747312588, "lastModified": 1747958103,
"narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=", "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b1bebd0fe266bbd1820019612ead889e96a8fa2d", "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -545,11 +545,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1747312588, "lastModified": 1747958103,
"narHash": "sha256-MmJvj6mlWzeRwKGLcwmZpKaOPZ5nJb/6al5CXqJsgjo=", "narHash": "sha256-qmmFCrfBwSHoWw7cVK4Aj+fns+c54EBP8cGqp/yK410=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b1bebd0fe266bbd1820019612ead889e96a8fa2d", "rev": "fe51d34885f7b5e3e7b59572796e1bcb427eccb1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -569,11 +569,11 @@
"systems": "systems_3" "systems": "systems_3"
}, },
"locked": { "locked": {
"lastModified": 1747449013, "lastModified": 1748003861,
"narHash": "sha256-GJn1RYCdCOhd4lMfGtrn2u+k6h2XnWFHpkyzlj+/pPw=", "narHash": "sha256-52csJsvCxH/2iUvwuWXbbk1SHnZMuZ4VRs9K9gvs9nU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "61c44d7a7fdb3d9ab1c36fdb6f16bffca01cb87d", "rev": "73c1a755f0ac6d09d312daffd13c1ce6572d6fe5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -615,11 +615,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1746537231, "lastModified": 1747372754,
"narHash": "sha256-Wb2xeSyOsCoTCTj7LOoD6cdKLEROyFAArnYoS+noCWo=", "narHash": "sha256-2Y53NGIX2vxfie1rOW0Qb86vjRZ7ngizoo+bnXU9D9k=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "fa466640195d38ec97cf0493d6d6882bc4d14969", "rev": "80479b6ec16fefd9c1db3ea13aeb038c60530f46",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -1,42 +1,8 @@
{ pkgs, lib, currentSystemDe, ... }: { ... }:
{ {
services.flatpak.enable = true; services.flatpak.enable = true;
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = ["nvidia"];
services.xserver.enable = true;
# Display managers
services.displayManager.sddm = lib.mkIf (currentSystemDe == "plasma") {
enable = true;
wayland.enable = true;
};
services.xserver.displayManager.gdm.enable = lib.mkIf (currentSystemDe == "gnome") true;
# Desktop environments
services.desktopManager.plasma6.enable = lib.mkIf (currentSystemDe == "plasma") true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
konsole
];
services.xserver.desktopManager.gnome.enable = lib.mkIf (currentSystemDe == "gnome") true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
} }

19
modules/nix-config/de.nix Normal file
View File

@@ -0,0 +1,19 @@
{ pkgs, lib, currentSystemDe, ... }:
{
services.xserver.enable = true;
# Display managers
services.displayManager.sddm = lib.mkIf (currentSystemDe == "plasma") {
enable = true;
wayland.enable = true;
};
services.xserver.displayManager.gdm.enable = lib.mkIf (currentSystemDe == "gnome") true;
# Desktop environments
services.desktopManager.plasma6.enable = lib.mkIf (currentSystemDe == "plasma") true;
environment.plasma6.excludePackages = with pkgs.kdePackages; [
elisa
konsole
];
services.xserver.desktopManager.gnome.enable = lib.mkIf (currentSystemDe == "gnome") true;
}

View File

@@ -2,6 +2,9 @@
{ {
imports = [ imports = [
./fonts.nix ./fonts.nix
./de.nix
./sound.nix
./keyboard.nix
]; ];
time.timeZone = "Europe/Rome"; time.timeZone = "Europe/Rome";
@@ -31,7 +34,7 @@
users.users.${currentSystemUser} = { users.users.${currentSystemUser} = {
isNormalUser = true; isNormalUser = true;
description = "Patrick Canal"; description = "Patrick Canal";
extraGroups = [ "networkmanager" "wheel" "docker" ]; extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.fish; shell = pkgs.fish;
}; };

View File

@@ -0,0 +1,8 @@
{ ... }:
{
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
}

View File

@@ -0,0 +1,13 @@
{ ... }:
{
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

View File

@@ -42,14 +42,16 @@
# GUI applications # GUI applications
baobab baobab
brave brave
floorp
gnome-boxes
kitty kitty
mpv mpv
nextcloud-client nextcloud-client
telegram-desktop telegram-desktop
] ++ (if gamingSystem then [ ] ++ (if gamingSystem then [
libresprite
dolphin-emu dolphin-emu
heroic heroic
libresprite
mangohud mangohud
prismlauncher prismlauncher
steam steam