diff --git a/lib/user.nix b/lib/user.nix index 4a3e40e..72d4de0 100644 --- a/lib/user.nix +++ b/lib/user.nix @@ -22,5 +22,15 @@ home-manager.users.${name}.imports = [ (mkRole "common") ] ++ roles_mod; - }; + }; + + mkHMUser = { name, roles ? [] }: + let + mkRole = role: import (../roles/home + "/${role}.nix"); + in{ + home-manager.users.${name}.imports = [ (mkRole "common") ] + ++ roles_mod; + }; + + }; } diff --git a/roles/home/common.nix b/roles/home/common.nix index 49cf2a4..7589488 100644 --- a/roles/home/common.nix +++ b/roles/home/common.nix @@ -1,6 +1,7 @@ -{ config, pkgs, unstable, ... }: +{ config, pkgs, ... }: -{ +let unstable = import { }; +in { imports = [ ./zsh.nix ./git.nix ]; home = { @@ -9,8 +10,6 @@ EDITOR = "nvim"; VISUAL = "nvim"; }; - - packages = with pkgs; [ rizin sshfs nixfmt victor-mono ]; }; programs.neovim = { @@ -24,6 +23,7 @@ cmake-format clang-tools rustfmt + nixfmt ]; extraConfig = '' " syntax diff --git a/roles/home/zsh.nix b/roles/home/zsh.nix index fd2bca5..fe04fad 100644 --- a/roles/home/zsh.nix +++ b/roles/home/zsh.nix @@ -7,5 +7,8 @@ plugins = [ "git" "sudo" "docker" "docker-compose" "adb" "systemd" ]; theme = "bira"; }; + initExtra = '' + source ~/.profile + ''; }; }