mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-25 02:14:41 +02:00
refactor: use flakes with deploy-rs & nixos-hardware
This commit is contained in:
parent
b1ef65594a
commit
d17c2b69a0
81 changed files with 1179 additions and 317 deletions
28
outputs.nix
Normal file
28
outputs.nix
Normal file
|
@ -0,0 +1,28 @@
|
|||
{ self
|
||||
, flake-utils
|
||||
, nixpkgs
|
||||
, nixpkgs-unstable
|
||||
, sops-nix
|
||||
, deploy
|
||||
, ...
|
||||
} @ inputs:
|
||||
(flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
in
|
||||
{
|
||||
devShell = pkgs.callPackage ./shell.nix {
|
||||
inherit (sops-nix.packages."${pkgs.system}") sops-import-keys-hook ssh-to-pgp sops-init-gpg-key;
|
||||
inherit (deploy.packages."${pkgs.system}") deploy-rs;
|
||||
};
|
||||
})) // {
|
||||
nixosConfigurations = import ./nixos/configurations.nix (inputs // {
|
||||
inherit inputs;
|
||||
});
|
||||
deploy = import ./nixos/deploy.nix (inputs // {
|
||||
inherit inputs;
|
||||
});
|
||||
|
||||
hydraJobs = nixpkgs.lib.mapAttrs' (name: config: nixpkgs.lib.nameValuePair "nixos-${name}" config.config.system.build.toplevel) self.nixosConfigurations;
|
||||
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy.lib;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue