From 93d12da62bce83be71dacee4d4b2546c811e395b Mon Sep 17 00:00:00 2001 From: Anthony Rodriguez Date: Tue, 28 Jan 2025 23:43:25 +0100 Subject: [PATCH] treewide: move FLAKE env variable to core/nix --- hosts/solaire/default.nix | 2 -- hosts/vamos/default.nix | 2 -- modules/core/nix.nix | 16 +++++++++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/hosts/solaire/default.nix b/hosts/solaire/default.nix index 08fde68..00305b1 100644 --- a/hosts/solaire/default.nix +++ b/hosts/solaire/default.nix @@ -22,6 +22,4 @@ _: { nvidia.enable = true; }; }; - - environment.variables.FLAKE = "/home/nezia/.dotfiles"; } diff --git a/hosts/vamos/default.nix b/hosts/vamos/default.nix index 27d7465..3955ccb 100644 --- a/hosts/vamos/default.nix +++ b/hosts/vamos/default.nix @@ -25,6 +25,4 @@ _: { hyprland.enable = true; }; }; - - environment.variables.FLAKE = "/home/nezia/.dotfiles"; } diff --git a/modules/core/nix.nix b/modules/core/nix.nix index af14dbb..693a960 100644 --- a/modules/core/nix.nix +++ b/modules/core/nix.nix @@ -1,4 +1,12 @@ -{pkgs, ...}: { +{ + lib, + pkgs, + config, + ... +}: let + inherit (lib) mkIf; + inherit (config.local.systemVars) username; +in { nix = { package = pkgs.lix; settings = { @@ -32,4 +40,10 @@ segger-jlink.acceptLicense = true; }; }; + + hjem.users.${username} = { + files.".config/environment.d/${config.local.homeVars.userEnvFile}.conf".text = '' + FLAKE="${config.hjem.users.${username}.directory}/.dotfiles" + ''; + }; }