commit 26ea2eba7eb604bcfe276f0d33dfc82deb73a859
parent ae6b51cb71b5495344144d89fe89062899458ec6
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Sat, 28 Jun 2025 17:07:28 +0200
parent ae6b51cb71b5495344144d89fe89062899458ec6
Author: Katja Ramona Sophie Kwast (zaphyra) <git@zaphyra.eu>
Date: Sat, 28 Jun 2025 17:07:28 +0200
config/nixos/modules/presets/graphical: add type `niri` :3
4 files changed, 152 insertions(+), 1 deletion(-)
diff --git a/config/nixos/modules/presets/graphical/type.nix b/config/nixos/modules/presets/graphical/type.nix @@ -15,6 +15,7 @@ in type = types.nullOr ( types.enum [ "gnomeMinimal" + "niri" ] ); default = null;
diff --git a/config/nixos/modules/presets/graphical/typeNiri.nix b/config/nixos/modules/presets/graphical/typeNiri.nix @@ -0,0 +1,42 @@ +{ + inputs, + pov, + config, + lib, + pkgs, + ... +}: +let + inherit (lib) types; + cfg = lib.getAttrFromPath pov config; + +in +{ + + config = lib.mkIf (cfg.enable && (cfg.type == "niri")) { + nixpkgs.overlays = [ inputs.niriFlake.overlays.niri ]; + + modules = { + hardware.bluetooth.enable = true; + networking.NetworkManager.enable = true; + + services = { + upower.enable = true; + power-profiles-daemon.enable = true; + swaylock.enable = true; + }; + }; + + security.polkit.enable = true; + + programs = { + dconf.enable = true; + + niri = { + enable = true; + package = pkgs.niri-stable; + }; + }; + }; + +}
diff --git a/flake.lock b/flake.lock @@ -640,6 +640,62 @@ "url": "https://git.zaphyra.eu/mqtt-webui" } }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1748151941, + "narHash": "sha256-z4viQZLgC2bIJ3VrzQnR+q2F3gAOEQpU1H5xHtX/2fs=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "8ba57fcf25d2fc9565131684a839d58703f1dae7", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.05.1", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1750334747, + "narHash": "sha256-nsD1Z6vVP2Hhdgrd0uYHacre2+NhaH/53TFRXn6pRcs=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "e0b0b04b445f7044f383e50104f861e632e1c905", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, + "niriFlake": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs_2", + "nixpkgs-stable": "nixpkgs-stable_3", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1750417464, + "narHash": "sha256-PKOpEqaOn6ZYgNIuP1FF04d+3AYusxSydu764z007ac=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "21a26d38e174b418a2649db76505041b8b4eccbb", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, "nix-filter": { "locked": { "lastModified": 1731533336, @@ -756,6 +812,22 @@ "type": "github" } }, + "nixpkgs-stable_3": { + "locked": { + "lastModified": 1750259320, + "narHash": "sha256-H8J4H2XCIMEJ5g6fZ179QfQvsc2dUqhqfBjC8RAHNRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9ba04bda9249d5d5e5238303c9755de5a49a79c5", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgsUnstable": { "locked": { "lastModified": 1749903597, @@ -873,9 +945,10 @@ "lanzaboote": "lanzaboote", "lixModule": "lixModule", "mqttWebUI": "mqttWebUI", + "niriFlake": "niriFlake", "nixStd": "nixStd", "nixSystemsDefault": "nixSystemsDefault", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nixpkgsUnstable": "nixpkgsUnstable", "oeffisearch": "oeffisearch", "simpleNixosMailserver": "simpleNixosMailserver", @@ -1012,6 +1085,39 @@ "url": "https://git.zaphyra.eu/things" } }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1748488455, + "narHash": "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.6", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1750388715, + "narHash": "sha256-6WMpcn3Ga/L71NiX9SdWw7ZELpNfrFnWJ0Gt2uAHjJg=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "03cbb2ee3a9da931bb9a39eb917674297a0b9318", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + }, "zaphyraWebsite": { "inputs": { "nixpkgs": [
diff --git a/flake.nix b/flake.nix @@ -261,6 +261,8 @@ homeManagerUnstable.url = "github:nix-community/home-manager/master"; homeManagerUnstable.inputs.nixpkgs.follows = "nixpkgsUnstable"; + niriFlake.url = "github:sodiboo/niri-flake"; + lanzaboote.url = "github:nix-community/lanzaboote/v0.4.2"; lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; lanzaboote.inputs.flake-parts.follows = "flakeParts";