From 51d6111302d99c4582070f33157557bfe6a1f5a4 Mon Sep 17 00:00:00 2001 From: Adithya Nair Date: Sat, 25 Mar 2023 22:10:42 +0530 Subject: [PATCH] cleanup flake --- flake.nix | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/flake.nix b/flake.nix index 9e955ea..7ca2933 100644 --- a/flake.nix +++ b/flake.nix @@ -1,4 +1,6 @@ { + description = "NixOS Configuration"; + inputs = { nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; @@ -19,22 +21,28 @@ }; }; - outputs = { self, nixpkgs, home-manager, impermanence, lanzaboote }@inputs: { + outputs = { + self, + nixpkgs, + home-manager, + impermanence, + lanzaboote, + } @ inputs: let + system = "x86_64-linux"; + lib = nixpkgs.lib; + in { + formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra; nixosConfigurations = { - Skipper = nixpkgs.lib.nixosSystem rec { - system = "x86_64-linux"; + Skipper = lib.nixosSystem { specialArgs = inputs; modules = [ ./system/nix.nix { - nixpkgs.overlays = [ - (import ./packages) # Overlay adding all custom packages - ]; + nixpkgs.overlays = [(import ./packages)]; + system.configurationRevision = lib.mkIf (self ? rev) self.rev; } - { system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev; } - home-manager.nixosModules.home-manager impermanence.nixosModules.impermanence lanzaboote.nixosModules.lanzaboote