Skip to content

Commit

Permalink
add basic home-manager test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 17, 2024
1 parent fba0aac commit a00b427
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
14 changes: 14 additions & 0 deletions checks/home-manager.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{ config, ... }: {
imports = [
../modules/home-manager/sops.nix
];
home.stateVersion = "25.05";
home.username = "sops-user";
home.homeDirectory = "/home/sops-user";
home.enableNixpkgsReleaseCheck = false;

sops.age.generateKey = true;
sops.age.keyFile = "${config.home.homeDirectory}/.age-key.txt";
sops.secrets.test_key = { };
sops.defaultSopsFile = ../pkgs/sops-install-secrets/test-assets/secrets.yaml;
}
21 changes: 21 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@
inputs.nix-darwin.url = "github:LnL7/nix-darwin";
inputs.nix-darwin.inputs.nixpkgs.follows = "nixpkgs";

inputs.home-manager.url = "github:nix-community/home-manager";
inputs.home-manager.inputs.nixpkgs.follows = "nixpkgs";

nixConfig.extra-substituters = ["https://cache.thalheim.io"];
nixConfig.extra-trusted-public-keys = ["cache.thalheim.io-1:R7msbosLEZKrxk/lKxf9BTjOOH7Ax3H0Qj0/6wiHOgc="];
outputs = {
self,
nixpkgs,
nixpkgs-stable,
nix-darwin,
home-manager,
} @ inputs: let
systems = [
"x86_64-linux"
Expand Down Expand Up @@ -49,6 +53,16 @@
inherit inputs;
};
};
legacyPackages = nixpkgs.lib.genAttrs ["x86_64-linux" "aarch64-linux" "aarch64-darwin"] (system: let
pkgs = nixpkgs.legacyPackages.${system};
in {
homeConfigurations.sops = home-manager.lib.homeManagerConfiguration {
modules = [
./checks/home-manager.nix
];
inherit pkgs;
};
});

packages = forAllSystems (system:
import ./default.nix {
Expand Down

0 comments on commit a00b427

Please sign in to comment.