Regenerated

This commit is contained in:
2026-03-22 09:31:44 +00:00
parent c6500eb926
commit 79dbf06ce6
32 changed files with 13 additions and 1568 deletions
@@ -1,48 +0,0 @@
{ lib, config, pkgs, flakeRoot, ... }:
let
username = config.defaultUser or "henrov";
# Base directory in the user's home
homeDir = "${config.home.homeDirectory or "/home/${username}"}/MyStuff";
# Absolute path to your assets folder
assetPath = "${flakeRoot}/assets/copy_2_home";
# Recursively list all files in a folder
recursiveFiles = path:
let
entries = builtins.attrNames (builtins.readDir path);
in
lib.concatMap (name:
let full = "${path}/${name}";
in if builtins.isDir full
then recursiveFiles full
else [ full ]
) entries;
# Get all files in assetPath
allFiles = recursiveFiles assetPath;
# Map each file to a home.file entry using writable symlinks
homeFiles = lib.genAttrs allFiles (f:
let
relative = lib.replaceStrings [ "${assetPath}/" ] [ "" ] f;
target = "${homeDir}/${relative}";
in {
name = target;
value = {
source = lib.makeOutOfStoreSymlink f;
};
}
);
in
{
_module.args.hmUsers = {
${username} = {
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 ];
};
};
}