host mac
This commit is contained in:
@@ -3,17 +3,25 @@
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
osConfig,
|
||||
osConfig ? null,
|
||||
preferredShell ? "zsh",
|
||||
userEmail ? "danilo.reyes.251@proton.me",
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (pkgs) fd fzf;
|
||||
inherit (inputs.jawz-scripts.packages.x86_64-linux) pokemon-colorscripts;
|
||||
shellType = osConfig.my.shell.type;
|
||||
commonInit = ''
|
||||
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
||||
export command_timeout=60
|
||||
'';
|
||||
pokemon-colorscripts = lib.attrByPath [
|
||||
pkgs.system
|
||||
"pokemon-colorscripts"
|
||||
] null inputs.jawz-scripts.packages;
|
||||
shellType = if osConfig == null then preferredShell else osConfig.my.shell.type;
|
||||
commonInit =
|
||||
lib.optionalString (pokemon-colorscripts != null) ''
|
||||
${pokemon-colorscripts}/bin/pokemon-colorscripts -r --no-title
|
||||
''
|
||||
+ ''
|
||||
export command_timeout=60
|
||||
'';
|
||||
commonAliases = inputs.self.lib.commonAliases // {
|
||||
open-gallery = ''
|
||||
cd /srv/pool/scrapping/JawZ/gallery-dl &&
|
||||
@@ -21,7 +29,7 @@ let
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [ ./jawz-home.nix ];
|
||||
imports = lib.optionals (osConfig != null) [ ./jawz-home.nix ];
|
||||
home.stateVersion = "23.05";
|
||||
programs = {
|
||||
direnv = {
|
||||
@@ -36,7 +44,7 @@ in
|
||||
pull.rebase = true;
|
||||
init.defaultBranch = "main";
|
||||
user = {
|
||||
inherit (osConfig.my) email;
|
||||
email = if osConfig == null then userEmail else osConfig.my.email;
|
||||
name = "Danilo Reyes";
|
||||
};
|
||||
};
|
||||
@@ -60,7 +68,7 @@ in
|
||||
};
|
||||
zsh = lib.mkIf (shellType == "zsh") {
|
||||
enable = true;
|
||||
dotDir = ".config/zsh";
|
||||
dotDir = "${config.xdg.configHome}/zsh";
|
||||
shellAliases = commonAliases;
|
||||
initContent = commonInit;
|
||||
history = {
|
||||
@@ -73,7 +81,7 @@ in
|
||||
};
|
||||
xdg = {
|
||||
enable = true;
|
||||
userDirs = {
|
||||
userDirs = lib.mkIf pkgs.stdenv.isLinux {
|
||||
enable = true;
|
||||
createDirectories = false;
|
||||
desktop = "${config.home.homeDirectory}";
|
||||
|
||||
Reference in New Issue
Block a user