diff --git a/ops/nixos/lib/common.nix b/ops/nixos/lib/common.nix index 82ee56ca9d..dc02fa6923 100644 --- a/ops/nixos/lib/common.nix +++ b/ops/nixos/lib/common.nix @@ -139,7 +139,9 @@ in home-manager.users.lukegb = { pkgs, ... }: ({ imports = [ ({ - _module.args = args; + _module.args = args // { + configName = null; + }; })] ++ config.my.home-manager.imports ++ ( lib.optional (config.my.home-manager.system != null) config.my.home-manager.system ); diff --git a/ops/nixos/lib/home-manager/client.nix b/ops/nixos/lib/home-manager/client.nix index a6adfa475f..d51dcef2cd 100644 --- a/ops/nixos/lib/home-manager/client.nix +++ b/ops/nixos/lib/home-manager/client.nix @@ -5,7 +5,7 @@ in { imports = [ ./common.nix ]; - home.sessionVariables.GITHUB_TOKEN = depot.ops.secrets.githubToken; + home.sessionVariables.GITHUB_TOKEN = with depot.ops; if builtins.hasAttr "githubToken" secrets then secrets.githubToken else null; programs.git = { enable = true; package = pkgs.gitAndTools.gitFull; diff --git a/ops/nixos/lib/home-manager/common.nix b/ops/nixos/lib/home-manager/common.nix index f48ebcd4da..aea63493c6 100644 --- a/ops/nixos/lib/home-manager/common.nix +++ b/ops/nixos/lib/home-manager/common.nix @@ -3,8 +3,6 @@ let inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux; in { - programs.home-manager.enable = !isDarwin; - home.username = "lukegb"; home.homeDirectory = if isDarwin then "/Users/lukegb" else "/home/lukegb"; home.file = { @@ -75,7 +73,7 @@ in ripgrep whois dnsutils - ] ++ lib.optionals isDarwin [ + ] ++ lib.optionals (configName != null) [ (writeShellScriptBin "home-manager" '' #!/bin/sh exec "${home-manager}/bin/home-manager" -f "${config.home.homeDirectory}/depot/home-manager-ext.nix" -A "${configName}" "$@"