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

View File

@@ -1,42 +1,8 @@
{ pkgs, lib, currentSystemDe, ... }:
{ ... }:
{
services.flatpak.enable = true;
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.
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 = [
./fonts.nix
./de.nix
./sound.nix
./keyboard.nix
];
time.timeZone = "Europe/Rome";
@@ -31,7 +34,7 @@
users.users.${currentSystemUser} = {
isNormalUser = true;
description = "Patrick Canal";
extraGroups = [ "networkmanager" "wheel" "docker" ];
extraGroups = [ "networkmanager" "wheel" ];
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
baobab
brave
floorp
gnome-boxes
kitty
mpv
nextcloud-client
telegram-desktop
] ++ (if gamingSystem then [
libresprite
dolphin-emu
heroic
libresprite
mangohud
prismlauncher
steam