ops/nixos/lib/home-manager: swap isDarwin for 'is external' check
This commit is contained in:
parent
486c28ccc0
commit
094f2334f8
3 changed files with 5 additions and 5 deletions
|
@ -139,7 +139,9 @@ in
|
||||||
|
|
||||||
home-manager.users.lukegb = { pkgs, ... }: ({
|
home-manager.users.lukegb = { pkgs, ... }: ({
|
||||||
imports = [ ({
|
imports = [ ({
|
||||||
_module.args = args;
|
_module.args = args // {
|
||||||
|
configName = null;
|
||||||
|
};
|
||||||
})] ++ config.my.home-manager.imports ++ (
|
})] ++ config.my.home-manager.imports ++ (
|
||||||
lib.optional (config.my.home-manager.system != null) config.my.home-manager.system
|
lib.optional (config.my.home-manager.system != null) config.my.home-manager.system
|
||||||
);
|
);
|
||||||
|
|
|
@ -5,7 +5,7 @@ in
|
||||||
{
|
{
|
||||||
imports = [ ./common.nix ];
|
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 = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitAndTools.gitFull;
|
package = pkgs.gitAndTools.gitFull;
|
||||||
|
|
|
@ -3,8 +3,6 @@ let
|
||||||
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
inherit (pkgs.stdenv.hostPlatform) isDarwin isLinux;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.home-manager.enable = !isDarwin;
|
|
||||||
|
|
||||||
home.username = "lukegb";
|
home.username = "lukegb";
|
||||||
home.homeDirectory = if isDarwin then "/Users/lukegb" else "/home/lukegb";
|
home.homeDirectory = if isDarwin then "/Users/lukegb" else "/home/lukegb";
|
||||||
home.file = {
|
home.file = {
|
||||||
|
@ -75,7 +73,7 @@ in
|
||||||
ripgrep
|
ripgrep
|
||||||
whois
|
whois
|
||||||
dnsutils
|
dnsutils
|
||||||
] ++ lib.optionals isDarwin [
|
] ++ lib.optionals (configName != null) [
|
||||||
(writeShellScriptBin "home-manager" ''
|
(writeShellScriptBin "home-manager" ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec "${home-manager}/bin/home-manager" -f "${config.home.homeDirectory}/depot/home-manager-ext.nix" -A "${configName}" "$@"
|
exec "${home-manager}/bin/home-manager" -f "${config.home.homeDirectory}/depot/home-manager-ext.nix" -A "${configName}" "$@"
|
||||||
|
|
Loading…
Reference in a new issue