From 504d4bab15c6107942303df47c3d59c1801467b6 Mon Sep 17 00:00:00 2001 From: joshashtondev Date: Fri, 24 Jul 2026 18:27:02 -0600 Subject: [PATCH] =?UTF-8?q?nixos:=20gen=20116=20@=20nix-pad=20=E2=80=94=20?= =?UTF-8?q?2026-07-24=2018:27?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 26.05.20260717.293d6ab (Yarara) --- flake.lock | 163 +++++++++++++++++++++++++++++++++++- flake.nix | 13 ++- home/desktop/default.nix | 13 +-- home/desktop/niri.nix | 50 +++++++++++ home/jashton.nix | 2 +- home/programs/default.nix | 2 +- hosts/thinkpad/hardware.nix | 1 + system/packages.nix | 7 ++ 8 files changed, 241 insertions(+), 10 deletions(-) create mode 100644 home/desktop/niri.nix diff --git a/flake.lock b/flake.lock index d39e112..f476033 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,43 @@ { "nodes": { + "dms": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1784341117, + "narHash": "sha256-7VjoVZu+8PC41ZDQ3umi/EXsU3sCLNyRfxZrfJKHy+E=", + "owner": "AvengeMedia", + "repo": "DankMaterialShell", + "rev": "74896fb87cb9e4bb866dbabcfd754e3e649ad0c7", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "ref": "stable", + "repo": "DankMaterialShell", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, "flake-utils": { "inputs": { "systems": "systems" @@ -59,7 +97,95 @@ "type": "github" } }, + "niri": { + "inputs": { + "niri-stable": "niri-stable", + "niri-unstable": "niri-unstable", + "nixpkgs": "nixpkgs", + "nixpkgs-stable": "nixpkgs-stable", + "xwayland-satellite-stable": "xwayland-satellite-stable", + "xwayland-satellite-unstable": "xwayland-satellite-unstable" + }, + "locked": { + "lastModified": 1784874881, + "narHash": "sha256-u4jhSIf/Un0qZB+Cn3hTTaHSI20XeAxYbA5o4faqdJs=", + "owner": "sodiboo", + "repo": "niri-flake", + "rev": "ef7a2a3d719af46b906c22a3ebfb7d65627b2cd2", + "type": "github" + }, + "original": { + "owner": "sodiboo", + "repo": "niri-flake", + "type": "github" + } + }, + "niri-stable": { + "flake": false, + "locked": { + "lastModified": 1756556321, + "narHash": "sha256-RLD89dfjN0RVO86C/Mot0T7aduCygPGaYbog566F0Qo=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "01be0e65f4eb91a9cd624ac0b76aaeab765c7294", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "ref": "v25.08", + "repo": "niri", + "type": "github" + } + }, + "niri-unstable": { + "flake": false, + "locked": { + "lastModified": 1784570726, + "narHash": "sha256-9EMn69JBcFWFgUM7f0VBAX+jBby5b9H3M59U75+5yI4=", + "owner": "YaLTeR", + "repo": "niri", + "rev": "7f26c3ee804fb6ed458ef7fb0e3c794f14e0b3bc", + "type": "github" + }, + "original": { + "owner": "YaLTeR", + "repo": "niri", + "type": "github" + } + }, "nixpkgs": { + "locked": { + "lastModified": 1784796856, + "narHash": "sha256-wWFrV5/Qbm+lyt5x20E/bSbfJiGKMo4RCxZV8cl/WZI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e2587caef70cea85dd97d7daab492899902dbf5d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-stable": { + "locked": { + "lastModified": 1782847189, + "narHash": "sha256-twXPFqFsrrY5r28Zh7Homgcp2gUMBgQ6WDS98Q/3xFI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "b6018f87da91d19d0ab4cf979885689b469cdd41", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { "locked": { "lastModified": 1784280462, "narHash": "sha256-DtoqIqM7VkR6NxAkcLpMwmi02USwWb3JdmNGLyhthc0=", @@ -77,10 +203,12 @@ }, "root": { "inputs": { + "dms": "dms", "flake-utils": "flake-utils", "home-manager": "home-manager", "linger": "linger", - "nixpkgs": "nixpkgs" + "niri": "niri", + "nixpkgs": "nixpkgs_2" } }, "systems": { @@ -97,6 +225,39 @@ "repo": "default", "type": "github" } + }, + "xwayland-satellite-stable": { + "flake": false, + "locked": { + "lastModified": 1755491097, + "narHash": "sha256-m+9tUfsmBeF2Gn4HWa6vSITZ4Gz1eA1F5Kh62B0N4oE=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "388d291e82ffbc73be18169d39470f340707edaa", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "ref": "v0.7", + "repo": "xwayland-satellite", + "type": "github" + } + }, + "xwayland-satellite-unstable": { + "flake": false, + "locked": { + "lastModified": 1784679892, + "narHash": "sha256-Mb7jpqnrcYCfNSItIkkHpuR3YxWFxPuIBfcwNKlRBkk=", + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "rev": "8d135d3b2854b30fd01ea6cd6c27e523dd50a839", + "type": "github" + }, + "original": { + "owner": "Supreeeme", + "repo": "xwayland-satellite", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 15dfe2a..54e4c5c 100644 --- a/flake.nix +++ b/flake.nix @@ -9,23 +9,34 @@ inputs.flake-utils.follows = "flake-utils"; }; + niri.url = "github:sodiboo/niri-flake"; + + dms = { + url = "github:AvengeMedia/DankMaterialShell/stable"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + home-manager = { url = "github:nix-community/home-manager/release-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, flake-utils, home-manager, ... }: { + outputs = inputs@{ self, nixpkgs, flake-utils, home-manager, niri, dms, ... }: { nixosConfigurations = { thinkpad = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + + specialArgs = { inherit inputs; }; modules = [ ./hosts/thinkpad/default.nix + niri.nixosModules.niri home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.users.jashton = import ./home/jashton.nix; } ]; diff --git a/home/desktop/default.nix b/home/desktop/default.nix index 9a9e383..37f9179 100644 --- a/home/desktop/default.nix +++ b/home/desktop/default.nix @@ -1,11 +1,12 @@ -{ config, pkgs, ... }: +{ config, dms, pkgs, ... }: { imports = [ - ./dunst.nix - ./gnome.nix - ./i3.nix - ./polybar.nix - ./rofi.nix + ./niri.nix + #./dunst.nix + #./gnome.nix + #./i3.nix + #./polybar.nix + #./rofi.nix ]; } diff --git a/home/desktop/niri.nix b/home/desktop/niri.nix new file mode 100644 index 0000000..64ff26b --- /dev/null +++ b/home/desktop/niri.nix @@ -0,0 +1,50 @@ +{ config, lib, pkgs, inputs, ... }: + +{ + imports = [ + inputs.dms.homeModules.dank-material-shell + ]; + + + programs.dank-material-shell = { + enable = true; + systemd.enable = true; + }; + + #systemd.user.services.niri-flake-polkit.enable = false; + + # 2. Enable & Configure Niri + programs.niri = { + # Declarative KDL configuration for Niri + settings = { + # Autostart DMS if you prefer launching it directly from Niri instead of systemd + # spawn-at-startup = [ { command = [ "dms" ]; } ]; + + # Core keybindings + binds = { + "Mod+Return".action.spawn = "alacritty"; # Or your preferred terminal + "Mod+X".action.close-window = []; + "Mod+Shift+E".action.quit = []; + + # Focus / Column movement + "Mod+H".action.focus-column-left = []; + "Mod+L".action.focus-column-right = []; + "Mod+J".action.focus-window-or-workspace-down = []; + "Mod+K".action.focus-window-or-workspace-up = []; + + # DMS Launcher integration (if you want a hotkey bound directly) + "Mod+Space".action.spawn = [ "dms" "ipc" "call" "launcher" "toggle" ]; + }; + + # Window & Layer Rules (e.g. enable background blur for DMS components) +# layer-rules = [ +# { +# geometry-corner-radius = 12; +# background-effect = { +# blur = true; +# }; +# } +# ]; + }; + }; +} diff --git a/home/jashton.nix b/home/jashton.nix index 730ae1d..1419c81 100644 --- a/home/jashton.nix +++ b/home/jashton.nix @@ -1,4 +1,4 @@ -{ config, lib, pkgs, ... }: +{ config, lib, pkgs, inputs, ... }: { imports = [ diff --git a/home/programs/default.nix b/home/programs/default.nix index 60c698e..766d8ad 100644 --- a/home/programs/default.nix +++ b/home/programs/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, dms, pkgs, ... }: { imports = [ diff --git a/hosts/thinkpad/hardware.nix b/hosts/thinkpad/hardware.nix index 078a1f1..a4acb48 100644 --- a/hosts/thinkpad/hardware.nix +++ b/hosts/thinkpad/hardware.nix @@ -57,6 +57,7 @@ hardware = { cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; sensor.iio.enable = true; + graphics.enable = true; bluetooth = { enable = true; diff --git a/system/packages.nix b/system/packages.nix index 7e6828c..bf9a54a 100644 --- a/system/packages.nix +++ b/system/packages.nix @@ -84,4 +84,11 @@ $VER" programs.firefox.enable = true; programs.thunar.enable = true; + + + # Optional: Binary cache for pre-built Niri binaries to save build time + nix.settings = { + substituters = [ "https://niri.cachix.org" ]; + trusted-public-keys = [ "niri.cachix.org-1:W3MxdgwBhbNEJHBLAjjkd24hwyLrxVwurqi23v4YBoxs=" ]; + }; }