From e88fed18f499a3e8ac98c772bbb62f00d1f8d1d7 Mon Sep 17 00:00:00 2001 From: stuebinm Date: Sun, 9 Jan 2022 08:09:39 +0100 Subject: use flakes instead of niv & stuff --- flake.nix | 44 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 34 insertions(+), 10 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 069fcfd..e86a636 100644 --- a/flake.nix +++ b/flake.nix @@ -3,18 +3,42 @@ description = "testing nix flakes for server deployment"; inputs = { - nixpkgs = "github:NixOS/nixpkgs#release-21.11"; - nixpkgs-unstalbe = "github:NixOS/nixpkgs#nixpkgs-unstable"; - uplcg = "git:https//stuebinm.eu/git/uplcg"; - woitb = "git:https://stuebinm.eu/git/woitb"; - workadventure = "git:https://stuebinm.eu/git/workadventure-nix"; + nixpkgs.url = "github:NixOS/nixpkgs/release-21.11"; + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + uplcg = { + url = "git+https://stuebinm.eu/git/uplcg?ref=main"; + flake = false; + }; + # woitb = { + # url = "git+https://stuebinm.eu/git/woitb?ref=main"; + # flake = false; + # }; + # workadventure = { + # url = "git+https://stuebinm.eu/git/workadventure-nix"; + # flake = false; + # }; + tracktrain = { + url = "git+https://stuebinm.eu/git/tracktrain?ref=main"; + flake = false; + }; + blog = { + url = "path:/home/stuebinm/Dokumente/blog"; + flake = false; + }; }; - output = { self, nixpkgs, ... }@inputs: { + outputs = { self, nixpkgs, ... }@inputs: { - nixosConfigurations.chaski = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = [ ./hosts/chaski/configuration.nix ]; - }; + nixosConfigurations = + let mkConfig = config: nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ config ./common/default.nix ]; + + specialArgs = { inherit inputs; }; + }; + in { + chaski = mkConfig ./hosts/chaski/configuration.nix; + flora = mkConfig ./hosts/flora/configuration.nix; + }; }; } -- cgit v1.2.3