Skip to content

Commit

Permalink
✅ Add evaluation check for the home-manager module (#75)
Browse files Browse the repository at this point in the history
Add an evaluation check for the `home-manager` module, this is also
exposed in the checks attribute and automatically checked in ci.
  • Loading branch information
a-kenji authored Feb 28, 2024
1 parent fe14fe0 commit cb1c657
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
};
};

outputs = { self, nixpkgs, crane, treefmt-nix, ... }:
outputs = { self, nixpkgs, crane, treefmt-nix, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
Expand Down Expand Up @@ -104,6 +104,31 @@
shell = self.outputs.devShells.${system}.default;
treefmt = treefmt.check self;
inherit cargoClippy;
hmModule = (nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
home-manager.nixosModules.home-manager
{
home-manager.users.alice = {
imports = [ self.outputs.hmModules."x86_64-linux".default ];
programs.centerpiece = {
enable = true;
config.plugin.git_repositories.commands = [ [ "alacritty" ] ];
services.index-git-repositories = {
enable = true;
interval = "3hours";
};
};
home.stateVersion = "23.11";
};
users.users.alice = {
isNormalUser = true;
uid = 1000;
home = "/home/alice";
};
}
];
}).config.system.build.vm;
};
hmModules.${system}.default = import ./home-manager-module.nix {
centerpiece = self.outputs.packages.${system}.default;
Expand Down

0 comments on commit cb1c657

Please sign in to comment.