nixos/lib/mk_raspi.nix

46 lines
1.2 KiB
Nix
Raw Normal View History

2022-09-07 11:50:25 +02:00
{ custom, hostname, inputs, system ? "aarch64-linux", home-module ? "headless" }:
let
2022-09-07 17:42:36 +02:00
overlay-unstable = final: prev: {
unstable = import inputs.nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
2022-09-07 11:50:25 +02:00
pkgs = import inputs.nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
2022-09-07 17:42:36 +02:00
overlays = [
overlay-unstable
inputs.nix-alien.overlay
];
2022-09-07 11:50:25 +02:00
};
in
inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit custom inputs; };
modules = (
[
# System configuration for this host
2022-09-06 20:14:29 +02:00
(import "${inputs.self}/systems/${hostname}"
2022-11-03 10:58:23 +01:00
{ inherit custom hostname inputs; })
# Common configuration
2022-11-04 12:12:37 +01:00
(import "${inputs.self}/modules/common" { inherit custom inputs; })
inputs.agenix.nixosModules.age
{ environment.systemPackages = [ inputs.agenix.defaultPackage.${system} ]; }
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.${custom.username}.imports = [
2022-11-03 11:08:54 +01:00
(import "${inputs.self}/home-manager/${home-module}.nix" { inherit custom inputs; })
];
}
]);
}