Initial commit
This commit is contained in:
26
modules/global/home-manager.nix
Executable file
26
modules/global/home-manager.nix
Executable file
@@ -0,0 +1,26 @@
|
||||
{ lib, username, config, inputs, ... }:
|
||||
with lib;
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
(lib.mkAliasOptionModule [ "hm" ] [
|
||||
"home-manager"
|
||||
"users"
|
||||
username
|
||||
])
|
||||
];
|
||||
|
||||
options.globals.hm = mkOption { type = types.attrs; };
|
||||
config = {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
# backupFileExtension = "hm-backup-" + pkgs.lib.readFile "${pkgs.runCommand "timestamp" {} "echo -n `date '+%Y%m%d%H%M%S'` > $out"}";
|
||||
backupFileExtension = "hm-backup-$(date \"+%Y%m%d%H%M%S\")";
|
||||
sharedModules = [ config.globals.hm ];
|
||||
};
|
||||
hm.home = {
|
||||
inherit (config.system) stateVersion;
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user