nixos/nixos/configurations.nix

63 lines
1.4 KiB
Nix
Raw Normal View History

{ self
, nixpkgs
, nixpkgs-unstable
, sops-nix
, inputs
, nixos-hardware
, nix
, ...
}:
let
nixosSystem = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem;
customModules = import ./modules/default.nix;
overlay-unstable = final: prev: {
unstable = import nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = true;
};
};
baseModules = [
2022-06-16 12:13:58 +02:00
# make flake inputs accessable in NixOS
{
_module.args.self = self;
_module.args.inputs = inputs;
}
{
imports = [
({ pkgs, ... }: {
nixpkgs.overlays = [ overlay-unstable ];
nix.nixPath = [
"nixpkgs=${pkgs.path}"
];
documentation.info.enable = false;
})
sops-nix.nixosModules.sops
];
}
];
defaultModules = baseModules ++ customModules;
in
{
2022-06-03 23:33:25 +02:00
# use your hardware- model from this list: https://github.com/NixOS/nixos-hardware/blob/master/flake.nix
thinkman = nixosSystem {
system = "x86_64-linux";
modules = defaultModules ++ [
nixos-hardware.nixosModules.lenovo-thinkpad-t14
./thinkman/configuration.nix
];
};
serverle = nixosSystem {
system = "aarch64-linux";
modules = defaultModules ++ [
nixos-hardware.nixosModules.raspberry-pi-4
./serverle/configuration.nix
];
};
2022-06-09 23:20:17 +02:00
newton = nixosSystem {
system = "x86_64-linux";
modules = defaultModules ++ [
./newton/configuration.nix
];
};
}