From e70c266659f6c9021d3cc5356903b9a94d1f14ce Mon Sep 17 00:00:00 2001 From: Spectre Date: Thu, 6 Jun 2024 23:26:09 +0200 Subject: [PATCH] flake --- flake.nix | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index 13170d55..99f14276 100644 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,44 @@ description = "Main Flake by LuminiferousLilith"; inputs = { - nixpkgs.url = github:NixOS/nixpkgs/nixpkgs-unstable; - nixpkgs-stable.url = github:NixOS/nixpkgs/release-25.05; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nixpkgs-stable.url = "github:NixOS/nixpkgs/release-25.05"; flake-utils.url = "github:numtide/flake-utils"; - + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + sops-nix = { + url = "github:Mic92/sops-nix"; + inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs-stable.follows = "nixpkgs-stable"; + }; + + impermanence.url = "github:nix-community/impermanence"; + + helix.url = "github:pascalkuthe/helix/inline-diagnostics"; + }; + + outputs = { + self, + nixpkgs, + ... + } @ inputs: let + hosts = builtins.attrNames (builtins.readDir ./hosts); + mkHostConfig = host: + import "./hosts/${host}" { + inherit inputs; + system = "x86_64-linux"; + }; + in { + nixosConfigurations = builtins.listToAttrs ( + map (host: { + name = host; + value = mkHostConfig host; + }) + hosts + ); }; }