Regenerated
This commit is contained in:
@@ -1,41 +0,0 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
username = config.defaultUser or "henrov";
|
||||
|
||||
# Absolute path to assets folder
|
||||
assetPath = ../../../assets/copy_2_home;
|
||||
|
||||
# Helper: recursively list all files in assetPath
|
||||
recursiveListFiles = path:
|
||||
let
|
||||
entries = builtins.readDir path;
|
||||
in
|
||||
concatMap (name: let full = "${path}/${name}"; in
|
||||
if builtins.isDir full
|
||||
then recursiveListFiles full
|
||||
else [ full ]
|
||||
) (builtins.attrNames entries);
|
||||
|
||||
# All files in the folder (full paths)
|
||||
allFiles = recursiveListFiles assetPath;
|
||||
|
||||
# Map each file to a home.file entry
|
||||
homeFiles = lib.genAttrs (allFiles) (f: {
|
||||
# Compute relative path from assetPath
|
||||
relative = builtins.substring (builtins.stringLength assetPath + 1) (builtins.stringLength f - builtins.stringLength assetPath - 1) f;
|
||||
name = relative; # target path in $HOME
|
||||
value = { source = f; }; # source path
|
||||
});
|
||||
|
||||
in
|
||||
{
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
# Merge with other modules safely
|
||||
home.file = lib.mkMerge [
|
||||
homeFiles
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let
|
||||
username = "henrov";
|
||||
in
|
||||
{
|
||||
# NixOS user
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
home = "/home/${username}";
|
||||
hashedPassword = "$6$S7iShgBxB.77CwmP$i0njK.2r3OL5UEvgZbmwZ0rnpZ4QyJcv8p9uCmJ4AiVPSMXkQkIwMLzyAOnJ0q8.tPLIp/7EquEIZeK8qbmgw/";
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
};
|
||||
|
||||
# Home Manager user definition
|
||||
_module.args.hmUsers = {
|
||||
${username} = {
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home.stateVersion = "26.05";
|
||||
|
||||
# Example: user packages
|
||||
home.packages = [ pkgs.git pkgs.vim ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user