updates
This commit is contained in:
13
flake.nix
13
flake.nix
@@ -18,7 +18,7 @@
|
|||||||
lib = pkgs.lib;
|
lib = pkgs.lib;
|
||||||
|
|
||||||
# Define a module that contains the user option
|
# Define a module that contains the user option
|
||||||
userModule = { config, ... }: {
|
optionsModule = { config, ... }: {
|
||||||
options.user = lib.mkOption {
|
options.user = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
description = "The username for the Home Manager configuration.";
|
description = "The username for the Home Manager configuration.";
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
modules = [
|
modules = [
|
||||||
./home.nix
|
./home.nix
|
||||||
userModule
|
optionsModule
|
||||||
# Override the user option for this specific configuration
|
# Override the user option for this specific configuration
|
||||||
{ user = username; }
|
{ user = username; }
|
||||||
];
|
];
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
|
|
||||||
# Default username from the module evaluation
|
# Default username from the module evaluation
|
||||||
moduleEval = lib.evalModules {
|
moduleEval = lib.evalModules {
|
||||||
modules = [ userModule ];
|
modules = [ optionsModule ];
|
||||||
};
|
};
|
||||||
defaultUsername = moduleEval.config.user;
|
defaultUsername = moduleEval.config.user;
|
||||||
in
|
in
|
||||||
@@ -57,12 +57,7 @@
|
|||||||
homeManagerModules = {
|
homeManagerModules = {
|
||||||
default = ./home.nix;
|
default = ./home.nix;
|
||||||
john-config = ./home.nix;
|
john-config = ./home.nix;
|
||||||
user-module = userModule;
|
options-module = optionsModule;
|
||||||
};
|
|
||||||
|
|
||||||
# Export packages if you have any custom ones
|
|
||||||
packages.${system} = {
|
|
||||||
# Add any custom packages here
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user