From 4be4b1cc1ca161072418786b85d81d295c3e9e98 Mon Sep 17 00:00:00 2001 From: Yorick Barbanneau Date: Sat, 2 Sep 2023 14:43:54 +0200 Subject: [PATCH] Begin to variabilize configurations --- flake.nix | 8 +++++++- hosts/mrmeeseeks/configuration.nix | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/flake.nix b/flake.nix index ce932a0..58ed0cf 100644 --- a/flake.nix +++ b/flake.nix @@ -7,10 +7,16 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, home-manager, ... }@inputs: { + outputs = { self, nixpkgs, home-manager, ... }@inputs: +let + stateVersion = "23.05"; +in rec { nixosConfigurations = { mrmeeseeks = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + specialArgs = { + inherit stateVersion; + }; modules = [ ./hosts/mrmeeseeks/configuration.nix home-manager.nixosModule diff --git a/hosts/mrmeeseeks/configuration.nix b/hosts/mrmeeseeks/configuration.nix index e9aa15e..6d60e2b 100644 --- a/hosts/mrmeeseeks/configuration.nix +++ b/hosts/mrmeeseeks/configuration.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, stateVersion, ... }: { imports = @@ -56,7 +56,7 @@ useGlobalPkgs = true; useUserPackages = true; users.ephase = { - home.stateVersion = "23.05"; + home.stateVersion = stateVersion; programs.home-manager.enable = true; imports = [ ../../modules/home/desktop