Removed unknon stuff from flake.nix
This commit is contained in:
@@ -12,59 +12,8 @@
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./machines/configurations.nix
|
./machines/configurations.nix
|
||||||
./images/flake-module.nix
|
|
||||||
inputs.pre-commit-hooks-nix.flakeModule
|
|
||||||
];
|
];
|
||||||
|
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||||
|
|
||||||
perSystem = { self', inputs', config, pkgs, system, ... }: {
|
|
||||||
# make pkgs available to all `perSystem` functions
|
|
||||||
_module.args.pkgs = import inputs.nixpkgs {
|
|
||||||
inherit system;
|
|
||||||
# prevent rebuilding deploy-rs everytime when nixpkgs changes
|
|
||||||
overlays = [
|
|
||||||
deploy-rs.overlay
|
|
||||||
(self: super: { deploy-rs = { inherit (pkgs) deploy-rs; lib = super.deploy-rs.lib; }; })
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# enable pre-commit checks
|
|
||||||
pre-commit.settings = {
|
|
||||||
hooks = {
|
|
||||||
shellcheck.enable = true;
|
|
||||||
nixpkgs-fmt.enable = true;
|
|
||||||
typos = {
|
|
||||||
enable = true;
|
|
||||||
excludes = [ "secrets\\.yaml" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
devShells.default = pkgs.mkShellNoCC {
|
|
||||||
nativeBuildInputs = [
|
|
||||||
inputs'.sops-nix.packages.sops-import-keys-hook
|
|
||||||
inputs'.deploy-rs.packages.deploy-rs
|
|
||||||
inputs'.disko.packages.disko
|
|
||||||
# formatters
|
|
||||||
pkgs.shellcheck
|
|
||||||
pkgs.nixpkgs-fmt
|
|
||||||
pkgs.typos
|
|
||||||
];
|
|
||||||
shellHook = ''
|
|
||||||
${config.pre-commit.installationScript}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
flake = {
|
|
||||||
# currently disabled, because this causes rebuilds
|
|
||||||
# checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
|
||||||
|
|
||||||
deploy = import ./machines/deploy.nix (inputs // {
|
|
||||||
inherit inputs;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user