diff --git a/modules/common/shell/0_nushell.nix b/modules/common/shell/0_nushell.nix index f96211a..95b3822 100644 --- a/modules/common/shell/0_nushell.nix +++ b/modules/common/shell/0_nushell.nix @@ -15,9 +15,11 @@ in { programs.nushell = enabled { inherit package; - inherit (config.environment) shellAliases; inherit environmentVariables; + shellAliases = config.environment.shellAliases + |> filterAttrs (_: value: value != null); + configFile.text = readFile ./0_nushell.nu; }; })]; diff --git a/modules/linux/shell/default.nix b/modules/linux/shell/default.nix index 56eed90..7c29478 100644 --- a/modules/linux/shell/default.nix +++ b/modules/linux/shell/default.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: let - inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList unique; + inherit (lib) concatStringsSep const flatten getAttr mapAttrsToList mkForce unique; in { users.defaultUserShell = pkgs.crash; @@ -12,4 +12,9 @@ in { |> map (drv: "${drv}${drv.shellPath}") |> unique |> concatStringsSep ":"; + + environment.shellAliases = { + ls = mkForce null; + l = mkForce null; + }; } diff --git a/rebuild.nu b/rebuild.nu index deda31e..3ac8e08 100755 --- a/rebuild.nu +++ b/rebuild.nu @@ -17,7 +17,7 @@ def --wrapped sync [...arguments] { # Rebuild a NixOS / Darwin config. def main --wrapped [ host: string = "" # The host to build. - --remote (-r) # Whether if this is a remote host. The config will be built on this host if it is. + --remote # Whether if this is a remote host. The config will be built on this host if it is. ...arguments # The arguments to pass to `nh {os,darwin} switch` and `nix` (separated by --). ]: nothing -> nothing { let host = if ($host | is-not-empty) { @@ -34,6 +34,10 @@ def main --wrapped [ } if $remote { + ssh -tt ("root@" + $host) " + rm --recursive --force ncc + " + git ls-files | sync --files-from - ./ $"root@($host):ncc"