diff --git a/hosts/default.nix b/hosts/default.nix index 5220987..d2b91dc 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -1,7 +1,7 @@ { inputs, ... }: { "desktop" = inputs.nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs; hostname = "desktop"; }; modules = [ ./desktop ../modules @@ -9,7 +9,7 @@ ]; }; "laptop" = inputs.nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs; hostname = "laptop"; }; modules = [ ./laptop ../modules @@ -17,7 +17,7 @@ ]; }; "rpi" = inputs.nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; + specialArgs = { inherit inputs; hostname = "rpi"; }; modules = [ ./rpi ../modules diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 883eef4..a2a9de3 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -86,6 +86,7 @@ theme.enable = true; printing.enable = true; mpd.enable = true; + fish.enable = true; autorandr = { enable = true; @@ -110,13 +111,6 @@ }; }; - fish = { - enable = true; - extraAliases = { - "rebuild" = "sudo nixos-rebuild switch --flake ~/nix#desktop -v"; - }; - }; - i3 = { enable = true; workspaceOutput = { diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 2ae2551..a45cdb5 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -64,6 +64,7 @@ theme.enable = true; printing.enable = true; mpd.enable = true; + fish.enable = true; xserver = { enable = true; @@ -82,12 +83,6 @@ ]; }; - fish = { - enable = true; - extraAliases = { - "rebuild" = "sudo nixos-rebuild switch --flake ~/nix#laptop -v"; - }; - }; ssh = { enable = true; diff --git a/hosts/rpi/default.nix b/hosts/rpi/default.nix index 9cc0a01..377fac8 100644 --- a/hosts/rpi/default.nix +++ b/hosts/rpi/default.nix @@ -83,18 +83,13 @@ stuff = { git.enable = true; vim.enable = true; + fish.enable = true; ssh = { enable = true; authKeys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDXxtwm+YoSIXfT9OJtU3O/EHf1Lg4IwoLe0CO2/Oapl7efTNZO5qVCh7aG0T5Hy4RD5CmVpxZVei44NM1dpNf3c+5976eH1BKgMmklA4EwAVc3o259YfJoOowBvyzBqO4CZWJmuUUjZwaQ152gPh1iCVe8bcR25S7cCTRN/6qU+rGn2zsbkV/GKdtJmhS5OLic5iXMdL56B7+hqFdL5NxPcWpnaSilIPus2xhI4u29I/FrM8RcR3Uzkqyx385js5MqhkVP3SVc7V8hSKEO8LRzmBYuBKkBPW9gmCUHKyxhSxZOvcretUFB87W/P/HDw3I4tk4naQPiPnASj6NvqTRMuhErIvXd1w+3MEEsfnXLeyq7CIhO01+d3/JEl7br5HOLZO+64IjSWYY7N0a0zhMjf147yEJ+JBOwXzN6px7y2rLI9CLY6jMs+Ye63nl7ALqN9dLJiaqxOMqTxrSNdRqWEj+FnFTd6sTb5eOZH7yabF/EApwdV3TGRGEaaZGS/GE= krizej@krizej-pc" ]; }; - fish = { - enable = true; - extraAliases = { - "rebuild" = "sudo nixos-rebuild switch --flake ~/nix#rpi -v"; - }; - }; }; }; }; diff --git a/modules/stuff/fish.nix b/modules/stuff/fish.nix index 9bf387c..645c119 100644 --- a/modules/stuff/fish.nix +++ b/modules/stuff/fish.nix @@ -1,4 +1,4 @@ -{ lib, pkgs, config, ... }: let +{ lib, pkgs, config, hostname, ... }: let inherit (lib) mkIf mkEnableOption mkOption types mergeAttrs; cfg = config.chuj.stuff.fish; user = config.chuj.system.user; @@ -33,6 +33,10 @@ in { "myip" = "curl ifconfig.me"; "0x0" = ''curl -F"file=@$argv" https://0x0.st''; "wget" = "${pkgs.wget}/bin/wget --hsts-file='${XDG_DATA_HOME}/wget-hsts'"; + + # ulimit -n 4096 fixes the "too many open files" error i get sometimes when + # updating the entire flake + "rebuild" = "ulimit -n 4096 && sudo nixos-rebuild switch --flake ~/nix#${hostname} -v"; } cfg.extraAliases; shellAbbrs = { # mkif xclip in pkgs @@ -110,4 +114,4 @@ in { }; }; }; -} \ No newline at end of file +}