ops/nixos/lib/home-manager: swap isDarwin for 'is external' check

This commit is contained in:
Luke Granger-Brown 2020-11-23 16:47:17 +00:00
parent 486c28ccc0
commit 094f2334f8
3 changed files with 5 additions and 5 deletions

View file

@ -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
);

View file

@ -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;

View file

@ -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}" "$@"