From f7c4be7334a2df63ed96cda2f310ce0255b11a51 Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Wed, 2 Oct 2024 11:54:15 +0200 Subject: [PATCH] niri: add functioning base --- flake.lock | 167 +++++++++++++++++++++++++++++-- flake.nix | 4 + home/profiles/vamos/default.nix | 12 +-- home/programs/fuzzel.nix | 14 +++ home/programs/plasma/default.nix | 6 +- hosts/default.nix | 5 +- system/programs/niri/default.nix | 10 ++ system/services/greetd.nix | 24 +++++ 8 files changed, 224 insertions(+), 18 deletions(-) create mode 100644 home/programs/fuzzel.nix create mode 100644 system/programs/niri/default.nix create mode 100644 system/services/greetd.nix diff --git a/flake.lock b/flake.lock index 95f76b3..5442891 100644 --- a/flake.lock +++ b/flake.lock @@ -78,6 +78,24 @@ "inputs": { "nixpkgs-lib": "nixpkgs-lib_2" }, + "locked": { + "lastModified": 1726153070, + "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_4": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" + }, "locked": { "lastModified": 1715865404, "narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=", @@ -282,6 +300,63 @@ "type": "github" } }, + "niri": { + "inputs": { + "flake-parts": "flake-parts_3", + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs_2", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1727780469, + "narHash": "sha256-ujDpvGKpYLLFP5qPA4eSV0AAYllWT/J7zqJRFGmZuSo=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "72216d18036d31a22791af605b827a2dff64deb4", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1726304152, + "narHash": "sha256-4YDrKMwXGVOBkeaISbxqf24rLuHvO98TnqxWYfgiSeg=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "6a48728ffb1e638839b07f9ab2f06b2adb41dc61", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v0.1.9", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1727778508, + "narHash": "sha256-9oMBzXZZzEVZAqHA79aJSQmNJ75hQuCpq0POB0Lxt7Q=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "0cca7a21163f0d4c1e99c12844da027a23e76003", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1727665282, @@ -326,6 +401,18 @@ } }, "nixpkgs-lib_2": { + "locked": { + "lastModified": 1725233747, + "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + } + }, + "nixpkgs-lib_3": { "locked": { "lastModified": 1714640452, "narHash": "sha256-QBx10+k6JWz6u7VsohfSw8g8hjdBZEf8CFzXH1/1Z94=", @@ -337,6 +424,22 @@ "url": "https://github.com/NixOS/nixpkgs/archive/50eb7ecf4cd0a5756d7275c8ba36790e5bd53e33.tar.gz" } }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1727672256, + "narHash": "sha256-9/79hjQc9+xyH+QxeMcRsA6hDyw6Z9Eo1/oxjvwirLk=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "1719f27dd95fd4206afb9cec9f415b539978827e", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.05", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1727634051, @@ -354,6 +457,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1727634051, + "narHash": "sha256-S5kVU7U82LfpEukbn/ihcyNt2+EvG7Z5unsKW9H/yFA=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "06cf0e1da4208d3766d898b7fdab6513366d45b9", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1726871744, "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", @@ -369,7 +488,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1656753965, "narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=", @@ -385,7 +504,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1726871744, "narHash": "sha256-V5LpfdHyQkUF7RfOaDPrZDP+oqz88lTJrMT1+stXNwo=", @@ -419,11 +538,11 @@ }, "nvf": { "inputs": { - "flake-parts": "flake-parts_3", + "flake-parts": "flake-parts_4", "flake-utils": "flake-utils_2", "mnw": "mnw", "nil": "nil", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nmd": "nmd", "plugin-alpha-nvim": "plugin-alpha-nvim", "plugin-bufdelete-nvim": "plugin-bufdelete-nvim", @@ -2186,7 +2305,7 @@ "rnix-lsp": { "inputs": { "naersk": "naersk", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "utils": "utils" }, "locked": { @@ -2209,8 +2328,9 @@ "flake-parts": "flake-parts_2", "flake-utils": "flake-utils", "home-manager": "home-manager", + "niri": "niri", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_3", "nvf": "nvf", "plasma-manager": "plasma-manager", "systems": "systems_3", @@ -2328,7 +2448,7 @@ }, "treefmt-nix": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_6" }, "locked": { "lastModified": 1727431250, @@ -2388,6 +2508,39 @@ "type": "github" } }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1718165778, + "narHash": "sha256-dwF9nI54a6Fo9XU5s4qmvMXSgCid3YQVGxch00qEMvI=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "b6d281967cb0b7bf1dfdb8d0f597b517dc4aa5c5", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.4", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1726378112, + "narHash": "sha256-OANPb73V/RQDqtpIcbzeJ93KuOHKFQv+1xXC44Ut7tY=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "b962a0f33b503aa39c9cf6919f488b664e5b79b4", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } + }, "zlib": { "flake": false, "locked": { diff --git a/flake.nix b/flake.nix index cd586ea..c6d832c 100644 --- a/flake.nix +++ b/flake.nix @@ -59,6 +59,10 @@ inputs.home-manager.follows = "home-manager"; }; + niri = { + url = "github:sodiboo/niri-flake"; + }; + treefmt-nix.url = "github:numtide/treefmt-nix"; nixos-hardware.url = "github:NixOS/nixos-hardware"; diff --git a/home/profiles/vamos/default.nix b/home/profiles/vamos/default.nix index 95bb3a1..1031b40 100644 --- a/home/profiles/vamos/default.nix +++ b/home/profiles/vamos/default.nix @@ -1,18 +1,12 @@ -{ - self, - inputs, - ... -}: { +{self, ...}: { imports = [ "${self}/home/services/udiskie.nix" "${self}/home/programs" - "${self}/home/programs/plasma" + "${self}/home/programs/fuzzel.nix" - "${self}/home/terminal/emulators/konsole.nix" + "${self}/home/terminal/emulators/foot.nix" "${self}/home/programs/editors/neovim.nix" - - inputs.plasma-manager.homeManagerModules.plasma-manager ]; } diff --git a/home/programs/fuzzel.nix b/home/programs/fuzzel.nix new file mode 100644 index 0000000..e3cbaea --- /dev/null +++ b/home/programs/fuzzel.nix @@ -0,0 +1,14 @@ +{ + lib, + pkgs, + ... +}: { + programs.fuzzel = { + enable = true; + settings = { + main = { + terminal = lib.getExe pkgs.foot; + }; + }; + }; +} diff --git a/home/programs/plasma/default.nix b/home/programs/plasma/default.nix index 538e750..4da779b 100644 --- a/home/programs/plasma/default.nix +++ b/home/programs/plasma/default.nix @@ -1,9 +1,13 @@ { + inputs, config, pkgs, ... }: { - programs.plasma = { + imports = [ + inputs.plasma-manager.homeManagerModules.plasma-manager + ]; + rograms.plasma = { enable = true; workspace = { lookAndFeel = "org.kde.breezedark.desktop"; diff --git a/hosts/default.nix b/hosts/default.nix index 3e0b6f8..83f4170 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -19,7 +19,10 @@ ++ [ ./vamos - "${mod}/programs/kde.nix" + ../system/services/greetd.nix + + # "${mod}/programs/kde.nix" + "${mod}/programs/niri" { home-manager = { diff --git a/system/programs/niri/default.nix b/system/programs/niri/default.nix new file mode 100644 index 0000000..92dd5c3 --- /dev/null +++ b/system/programs/niri/default.nix @@ -0,0 +1,10 @@ +{ + inputs, + pkgs, + ... +}: { + imports = [inputs.niri.nixosModules.niri]; + programs.niri = { + enable = true; + }; +} diff --git a/system/services/greetd.nix b/system/services/greetd.nix new file mode 100644 index 0000000..4195e3f --- /dev/null +++ b/system/services/greetd.nix @@ -0,0 +1,24 @@ +{ + pkgs, + config, + lib, + ... +}: { + programs.regreet.enable = true; + + # greetd display manager + services.greetd = { + enable = true; + settings = { + default_session = let + greeter = lib.getExe config.programs.regreet.package; + program = "${lib.getExe pkgs.cage} -s"; + in { + command = "${program} -- ${greeter}"; + user = "nezia"; + }; + # unlock GPG keyring on login + security.pam.services.greetd.enableGnomeKeyring = true; + }; + }; +}