working on machines

This commit is contained in:
2026-03-12 15:52:37 +01:00
parent e749e1068f
commit d81e57778e
+28 -22
View File
@@ -56,7 +56,10 @@
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit user inputs; flakeRoot = ./.; };
home-manager.extraSpecialArgs = {
inherit user inputs;
flakeRoot = ./.;
};
}
# Catppuccin theme module
@@ -66,37 +69,40 @@
./generated/top.nix
# Ensure Home Manager is enabled for the user
({ config, pkgs, ... }: {
programs.home-manager.enable = true;
systemd.users.services."home-manager-${user.username}" = {
description = "Home Manager service for ${user.username}";
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
serviceConfig.ExecStart = "${pkgs.home-manager}/bin/home-manager switch --flake ${self}#${user.username}@${machine}";
};
})
(
{ config, pkgs, ... }:
{
programs.home-manager.enable = true;
systemd.users.services."home-manager-${user.username}" = {
description = "Home Manager service for ${user.username}";
wantedBy = [ "multi-user.target" ];
serviceConfig.Type = "oneshot";
serviceConfig.RemainAfterExit = true;
serviceConfig.ExecStart = "${pkgs.home-manager}/bin/home-manager switch --flake ${self}#${user.username}@${machine}";
};
}
)
];
specialArgs = { inherit user inputs; flakeRoot = ./.; };
specialArgs = {
inherit user inputs;
flakeRoot = ./.;
};
}
);
# Home Manager configurations for each user/machine
homeConfigurations = lib.genAttrs [
(user.username + "@" + machine) for machine in machines
] (
userMachine:
let
username = lib.splitString "@" userMachine !!"";
machine = lib.splitString "@" userMachine !!"";
in
homeConfigurations = lib.genAttrs machines (
machine:
home-manager.lib.homeManagerConfiguration {
inherit system;
configuration = import ./assets/flake/users/${username}/home.nix {
configuration = import ./assets/flake/users/${user.username}/home.nix {
inherit inputs user;
pkgs = import nixpkgs { inherit system; };
};
extraSpecialArgs = { inherit user inputs; flakeRoot = ./.; };
extraSpecialArgs = {
inherit user inputs;
flakeRoot = ./.;
};
}
);