From 8daa2b2266d261778e71a11d8f2c0292df1b9636 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Mon, 27 Jun 2022 22:43:23 +0200 Subject: [PATCH] update using flak-parts --- nixos/configurations.nix | 67 +++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/nixos/configurations.nix b/nixos/configurations.nix index b9743a4..1ecc4ad 100644 --- a/nixos/configurations.nix +++ b/nixos/configurations.nix @@ -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,25 +39,27 @@ let defaultModules = baseModules ++ customModules; in { - # 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 - ]; - }; - newton = nixosSystem { - system = "x86_64-linux"; - modules = defaultModules ++ [ - ./newton/configuration.nix - ]; + 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"; + modules = defaultModules ++ [ + nixos-hardware.nixosModules.lenovo-thinkpad-t14 + ./thinkman/configuration.nix + ]; + }; + newton = nixosSystem { + system = "x86_64-linux"; + modules = defaultModules ++ [ + ./newton/configuration.nix + ]; + }; + serverle = nixosSystem { + system = "aarch64-linux"; + modules = defaultModules ++ [ + nixos-hardware.nixosModules.raspberry-pi-4 + ./serverle/configuration.nix + ]; + }; }; }