1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

fix: properly inherit stateVersion on home-manager configs

This commit is contained in:
oddlama 2023-05-01 15:27:56 +02:00
parent de19b23d3d
commit 5d8a60b4d8
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 14 additions and 5 deletions

View file

@ -1,4 +1,8 @@
{pkgs, ...}: { {
pkgs,
stateVersion,
...
}: {
imports = [ imports = [
./modules/uid.nix ./modules/uid.nix
@ -16,7 +20,6 @@
]; ];
home = { home = {
inherit stateVersion;
packages = with pkgs; [ packages = with pkgs; [
bandwhich bandwhich
btop btop

View file

@ -3,6 +3,7 @@
lib, lib,
pkgs, pkgs,
secrets, secrets,
stateVersion,
... ...
}: }:
with lib; let with lib; let
@ -31,8 +32,9 @@ in {
]; ];
home = { home = {
username = config.users.users.${myuser}.name; inherit stateVersion;
inherit (config.users.users.${myuser}) uid; inherit (config.users.users.${myuser}) uid;
username = config.users.users.${myuser}.name;
shellAliases = { shellAliases = {
p = "cd ~/projects"; p = "cd ~/projects";
}; };

View file

@ -2,6 +2,7 @@
config, config,
lib, lib,
pkgs, pkgs,
stateVersion,
... ...
}: }:
with lib; { with lib; {
@ -16,7 +17,10 @@ with lib; {
../common ../common
]; ];
home.username = config.users.users.root.name; home = {
home.uid = config.users.users.root.uid; inherit stateVersion;
inherit (config.users.users.root) uid;
username = config.users.users.root.name;
};
}; };
} }