summaryrefslogtreecommitdiff
path: root/util/user.nix
diff options
context:
space:
mode:
Diffstat (limited to 'util/user.nix')
-rw-r--r--util/user.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/util/user.nix b/util/user.nix
new file mode 100644
index 0000000..e69d46c
--- /dev/null
+++ b/util/user.nix
@@ -0,0 +1,23 @@
+{home-manager, ...}: {
+ mkHMUser = {
+ username,
+ stateVersion ? "22.11",
+ system ? "x86_64-linux",
+ channel,
+ }:
+ home-manager.lib.homeManagerConfiguration {
+ pkgs = channel.legacyPackages.${system};
+ modules = [
+ ../users/${username}/home.nix
+ {
+ nixpkgs.config.allowUnfree = true;
+ systemd.user.startServices = true;
+ home = {
+ inherit username stateVersion;
+ homeDirectory = "/home/${username}";
+ };
+ programs.home-manager.enable = true;
+ }
+ ];
+ };
+}