update using flak-parts

This commit is contained in:
Felix Buehler 2022-06-27 22:43:23 +02:00
parent 312632ac57
commit 8daa2b2266

View file

@ -1,26 +1,27 @@
{ self
, nixpkgs
, nixpkgs-unstable
, sops-nix
, inputs
, nixos-hardware
, nix
, ...
}:
{ self, ... }:
let
inherit
(self.inputs)
nixpkgs
nixpkgs-unstable
sops-nix
nixos-hardware
#nix
;
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;
};
};
customModules = import ./modules/default.nix;
baseModules = [
# make flake inputs accessable in NixOS
# make flake inputs accessiable in NixOS
{
_module.args.self = self;
_module.args.inputs = inputs;
_module.args.inputs = self.inputs;
}
{
imports = [
@ -38,6 +39,7 @@ let
defaultModules = baseModules ++ customModules;
in
{
flake.nixosConfigurations = {
# use your hardware- model from this list: https://github.com/NixOS/nixos-hardware/blob/master/flake.nix
thinkman = nixosSystem {
system = "x86_64-linux";
@ -46,6 +48,12 @@ in
./thinkman/configuration.nix
];
};
newton = nixosSystem {
system = "x86_64-linux";
modules = defaultModules ++ [
./newton/configuration.nix
];
};
serverle = nixosSystem {
system = "aarch64-linux";
modules = defaultModules ++ [
@ -53,10 +61,5 @@ in
./serverle/configuration.nix
];
};
newton = nixosSystem {
system = "x86_64-linux";
modules = defaultModules ++ [
./newton/configuration.nix
];
};
}