From 6f12893309898468b1e0c75b828a1960bf8fae16 Mon Sep 17 00:00:00 2001 From: Grisha Shipunov Date: Mon, 2 Jun 2025 20:12:09 +0200 Subject: [PATCH] toaster: back to niri --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 16 ++++++++++++++-- hosts/toaster/default.nix | 2 +- modules/niri.nix | 17 +++++++---------- 4 files changed, 43 insertions(+), 13 deletions(-) diff --git a/flake.lock b/flake.lock index 91b10f0..3699136 100644 --- a/flake.lock +++ b/flake.lock @@ -224,6 +224,26 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs-unstable" + ] + }, + "locked": { + "lastModified": 1748830238, + "narHash": "sha256-EB+LzYHK0D5aqxZiYoPeoZoOzSAs8eqBDxm3R+6wMKU=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "c7fdb7e90bff1a51b79c1eed458fb39e6649a82a", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, "lanzaboote": { "inputs": { "crane": "crane", @@ -513,6 +533,7 @@ "inputs": { "authentik-nix": "authentik-nix", "flake-utils": "flake-utils_2", + "home-manager": "home-manager", "lanzaboote": "lanzaboote", "lix": "lix", "lix-module": "lix-module", diff --git a/flake.nix b/flake.nix index e34868b..fdb5a79 100644 --- a/flake.nix +++ b/flake.nix @@ -46,6 +46,11 @@ inputs.flake-utils.follows = "flake-utils"; }; + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs-unstable"; + }; + tmux-yank = { url = "github:tmux-plugins/tmux-yank"; flake = false; @@ -54,6 +59,7 @@ outputs = inputs@{ + home-manager, lanzaboote, lix-module, microvm, @@ -113,18 +119,24 @@ nixos-hardware.nixosModules.lenovo-thinkpad-t14-amd-gen3 lix-module.nixosModules.default + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users."0xa" = import ./hosts/toaster/0xa-home.nix; + } + ./hosts/toaster ./modules/basic-tools ./modules/binary-caches.nix ./modules/devtools.nix - ./modules/gnome.nix + ./modules/niri.nix ./modules/gnupg.nix ./modules/radio.nix ./modules/science.nix ./modules/tlp.nix ./modules/virtualization.nix - ./modules/emacs.nix ./modules/mail ./modules/wg ]; diff --git a/hosts/toaster/default.nix b/hosts/toaster/default.nix index 7e78114..087b7f3 100644 --- a/hosts/toaster/default.nix +++ b/hosts/toaster/default.nix @@ -4,7 +4,7 @@ ./amd.nix ./hardware-configuration.nix ./irc.nix - ./network + ./network/full-networkd.nix ./secure-boot.nix ./zfs.nix ]; diff --git a/modules/niri.nix b/modules/niri.nix index e769189..4cd541e 100644 --- a/modules/niri.nix +++ b/modules/niri.nix @@ -1,8 +1,5 @@ -# General Desktop-related config -{ pkgs, inputs, ... }: +{ pkgs, ... }: { - nixpkgs.overlays = [ inputs.niri.overlays.niri ]; - programs.niri.enable = true; imports = [ @@ -13,15 +10,15 @@ let xwayland-satellite-git = pkgs.xwayland-satellite.overrideAttrs ( final: _prev: { - version = "git"; - cargoHash = "sha256-MaF2FyR3HvQAKkZKa8OO/5jbO64/Ncv7+JqHda4jN50="; + version = "0.6"; + cargoHash = "sha256-R3xXyXpHQw/Vh5Y4vFUl7n7jwBEEqwUCIZGAf9+SY1M="; src = pkgs.fetchFromGitHub { owner = "Supreeeme"; repo = "xwayland-satellite"; - rev = "cca74a5f6b23742d77dc5db4312dfc40fd4a0fcc"; - sha256 = "sha256-YZ+axsuNsgIKWfnRkt6Qa9UoKfUOIWf42vNUonXxmxM="; + rev = "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73"; + sha256 = "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI="; }; - cargoDeps = pkgs.rustPlatform.fetchCargoTarball { + cargoDeps = pkgs.rustPlatform.fetchCargoVendor { inherit (final) pname src version; hash = final.cargoHash; }; @@ -127,7 +124,7 @@ enable = true; settings = { default_session = { - command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --greeting \"$(${pkgs.fortune}/bin/fortune -s)\" --cmd ${pkgs.niri-stable}/bin/niri-session"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --greeting \"$(${pkgs.fortune}/bin/fortune -s)\" --cmd ${pkgs.niri}/bin/niri-session"; }; }; };