From cb2e2f39068bc964a7ec562fd5ad7eaad0b033e9 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Sat, 24 Feb 2024 22:07:53 +0100 Subject: [PATCH] Move to flake-parts --- flake.lock | 21 +++++++++++++++++++++ flake.nix | 23 ++++++++++++++++------- 2 files changed, 37 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index c9f8407..175fa65 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1708655239, @@ -18,6 +38,7 @@ }, "root": { "inputs": { + "flake-parts": "flake-parts", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 744ea78..4fafe47 100644 --- a/flake.nix +++ b/flake.nix @@ -3,14 +3,23 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - }; - outputs = { self, nixpkgs, ...} @ inputs: { - nixosConfigurations = { - nixos = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ ./configuration.nix ]; - }; + flake-parts = { + url = "github:hercules-ci/flake-parts"; + inputs.nixpkgs-lib.follows = "nixpkgs"; }; }; + + outputs = {nixpkgs, ...} @ inputs: + inputs.flake-parts.lib.mkFlake { inherit inputs; } { + systems = ["x86_64-linux"]; + + flake = { + nixosConfigurations = { + nixos = nixpkgs.lib.nixosSystem { + modules = [ ./configuration.nix ]; + }; + }; + }; + }; }