diff --git a/flake.nix b/flake.nix index 7fab4d2..98742e9 100644 --- a/flake.nix +++ b/flake.nix @@ -15,6 +15,12 @@ system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; lib = pkgs.lib; + + userOptions = config: { + openssh.authorizedKeys.keyFiles = [ ./personal_keys ]; + extraGroups = [ "wheel" ]; + shell = lib.mkIf config.shell pkgs.zsh; + }; in { homeManagerModules.default = { ... }: { @@ -35,12 +41,10 @@ inputs.home-manager.nixosModules.default ]; + users.users.root = userOptions config; users.users.${config.user} = { isNormalUser = true; - home = lib.mkForce "/home/${config.user}"; - createHome = true; - extraGroups = [ "wheel" ]; - }; + } // userOptions config; home-manager = { useGlobalPkgs = true; diff --git a/homeManagerModules/shell.nix b/homeManagerModules/shell.nix index 4eb9f8b..b611abf 100644 --- a/homeManagerModules/shell.nix +++ b/homeManagerModules/shell.nix @@ -23,8 +23,8 @@ ] ++ lib.optional config._1password "1password"; }; shellAliases.ls = "${pkgs.eza}/bin/eza -lgos type --no-time"; - # initContent = lib.mkIf config._1password '' - # source ${config.home.homeDirectory}/.config/op/plugins.sh - # ''; + initContent = lib.mkIf config._1password '' + source ${config.home.homeDirectory}/.config/op/plugins.sh + ''; }; }