From e06b409221d4a6a6bd9837109ecdf8c6364fa4fb Mon Sep 17 00:00:00 2001 From: monologiq Date: Wed, 24 Dec 2025 22:35:23 +0100 Subject: [PATCH] Add first implementation of home-manager --- flake.lock | 22 ++++++++++++++++++++++ flake.nix | 20 ++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/flake.lock b/flake.lock index 8585b0e..68fbab4 100644 --- a/flake.lock +++ b/flake.lock @@ -53,6 +53,27 @@ "type": "github" } }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1766553861, + "narHash": "sha256-ZbnG01yA3O8Yr1vUm3+NQ2qk9iRhS5bloAnuXHHy7+c=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "0999ed8f965bbbd991437ad9c5ed3434cecbc30e", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-25.11", + "repo": "home-manager", + "type": "github" + } + }, "lanzaboote": { "inputs": { "crane": "crane", @@ -139,6 +160,7 @@ }, "root": { "inputs": { + "home-manager": "home-manager", "lanzaboote": "lanzaboote", "nix-darwin": "nix-darwin", "nixpkgs": "nixpkgs" diff --git a/flake.nix b/flake.nix index 11ee0fc..781469b 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,9 @@ nix-darwin.url = "github:nix-darwin/nix-darwin?ref=nix-darwin-25.11"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.url = "github:nix-community/home-manager?ref=release-25.11"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + lanzaboote.url = "github:nix-community/lanzaboote?ref=master"; lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; }; @@ -39,6 +42,23 @@ nixosConfigurations."persephone" = nixpkgs.lib.nixosSystem { modules = [ inputs.lanzaboote.nixosModules.lanzaboote + inputs.home-manager.nixosModules.home-manager + ( + { config, lib, ... }: + { + imports = [ + (lib.mkAliasOptionModule [ "hm" ] [ "home-manager" "users" "${config.machine.mainUser}" ]) + ]; + } + ) + + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + hm.programs.bat.enable = true; + hm.home.stateVersion = "25.11"; + } + ./machines/persephone.nix ( { lib, ... }: