mirror of
https://github.com/RGBCube/ncc
synced 2025-07-27 10:07:44 +00:00
shell: fix aliases
This commit is contained in:
parent
f673d73cd2
commit
3e466fcaf0
3 changed files with 14 additions and 3 deletions
|
@ -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;
|
||||
};
|
||||
})];
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue