From ab22403cb29a37b2a872b8fe546e768593aa6fc6 Mon Sep 17 00:00:00 2001 From: Kristian Krsnik Date: Sun, 7 Apr 2024 20:19:32 +0200 Subject: [PATCH] updated --- template/flake.lock | 98 ++++++++++++++++++++++++++++++++ template/flake.nix | 33 ++++++----- template/system/default.nix | 4 +- template/system/impermanence.nix | 1 + 4 files changed, 119 insertions(+), 17 deletions(-) create mode 100644 template/flake.lock diff --git a/template/flake.lock b/template/flake.lock new file mode 100644 index 0000000..1f3b384 --- /dev/null +++ b/template/flake.lock @@ -0,0 +1,98 @@ +{ + "nodes": { + "disko": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1712356478, + "narHash": "sha256-kTcEtrQIRnexu5lAbLsmUcfR2CrmsACF1s3ZFw1NEVA=", + "owner": "nix-community", + "repo": "disko", + "rev": "0a17298c0d96190ef3be729d594ba202b9c53beb", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "disko", + "type": "github" + } + }, + "impermanence": { + "locked": { + "lastModified": 1708968331, + "narHash": "sha256-VUXLaPusCBvwM3zhGbRIJVeYluh2uWuqtj4WirQ1L9Y=", + "owner": "nix-community", + "repo": "impermanence", + "rev": "a33ef102a02ce77d3e39c25197664b7a636f9c30", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "impermanence", + "type": "github" + } + }, + "nixos-hardware": { + "locked": { + "lastModified": 1712324865, + "narHash": "sha256-+BatEWd4HlMeK7Ora+gYIkarjxFVCg9oKrIeybHIIX4=", + "owner": "NixOS", + "repo": "nixos-hardware", + "rev": "f3b959627bca46a9f7052b8fbc464b8323e68c2c", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "master", + "repo": "nixos-hardware", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1712437997, + "narHash": "sha256-g0whLLwRvgO2FsyhY8fNk+TWenS3jg5UdlWL4uqgFeo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e38d7cb66ea4f7a0eb6681920615dfcc30fc2920", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-23.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-unstable": { + "locked": { + "lastModified": 1712439257, + "narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "disko": "disko", + "impermanence": "impermanence", + "nixos-hardware": "nixos-hardware", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/template/flake.nix b/template/flake.nix index f793018..4d194d7 100644 --- a/template/flake.nix +++ b/template/flake.nix @@ -16,34 +16,39 @@ }; }; - outputs = { - self, - nixpkgs, - ... - } @ inputs: let + outputs = {self, ...} @ inputs: let system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + pkgs = inputs.nixpkgs.legacyPackages.${system}; in { nixosConfigurations = { - minimal = nixpkgs.lib.nixosSystem { + minimal = inputs.nixpkgs.lib.nixosSystem { inherit system; + modules = [ inputs.disko.nixosModules.default + { + imports = [ + (import ./system/disko.nix {}) + ]; + } + inputs.impermanence.nixosModules.impermanence ./system + { + system.stateVersion = "23.11"; + } ]; }; formatter = pkgs.alejandra; + }; - devShells.${system} = { - default = pkgs.mkShellNoCC { - packages = with pkgs; [ - git - inputs.disko.packages.default - ]; - }; + devShells.${system} = { + default = pkgs.mkShellNoCC { + packages = [ + inputs.disko.packages.${system}.default + ]; }; }; }; diff --git a/template/system/default.nix b/template/system/default.nix index e3b1a36..87afea0 100644 --- a/template/system/default.nix +++ b/template/system/default.nix @@ -1,8 +1,6 @@ {...}: { imports = [ - ./disko.nix + (import ./disko.nix {}) ./impermanence.nix - - ./configurations.nix ]; } diff --git a/template/system/impermanence.nix b/template/system/impermanence.nix index e69de29..6462967 100644 --- a/template/system/impermanence.nix +++ b/template/system/impermanence.nix @@ -0,0 +1 @@ +{...}: {}