almost nuked whole sys

This commit is contained in:
danny 2024-12-14 02:27:00 +08:00
parent 43368d1e3a
commit ab917700ee
4 changed files with 24 additions and 27 deletions

View file

@ -897,3 +897,23 @@ $env.config = {
} }
] ]
} }
alias cat = bat
alias rebuild = sudo nixos-rebuild switch --flake /etc/nixos/
alias windows = sudo bootctl set-oneshot auto-windows
def toWindows [] {
sudo bootctl set-oneshot auto-windows
reboot
}
def toBIOS [] {
sudo bootctl set-onshot auto-reboot-to-firmware-setup
reboot
}
def fullClean [] {
nix-collect-garbage --delete-old
sudo nix-collect-garbage -d
sudo /run/current-system/bin/switch-to-configuration boot
}

View file

@ -15,9 +15,5 @@ in {
".config/mako".source = "${configDir}/mako"; ".config/mako".source = "${configDir}/mako";
".config/starship.toml".source = "${configDir}/starship/starship.toml"; ".config/starship.toml".source = "${configDir}/starship/starship.toml";
".config/macchiato.toml".source = "${configDir}/starship/macchiato.toml"; ".config/macchiato.toml".source = "${configDir}/starship/macchiato.toml";
".config/nushell" = {
source = "${configDir}/nushell";
recursive = true;
};
}; };
} }

View file

@ -1,30 +1,11 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
myAliases = { in {
cat = "bat";
fullClean = ''
nix-collect-garbage --delete-old
sudo nix-collect-garbage -d
sudo /run/current-system/bin/switch-to-configuration boot
'';
rebuild = "sudo nixos-rebuild switch --flake /etc/nixos/#dn-nix";
windows = "sudo bootctl set-oneshot auto-windows";
toWindows = "sudo bootctl set-oneshot auto-windows && reboot";
toBIOS = "sudo bootctl set-oneshot auto-reboot-to-firmware-setup && reboot";
};
in {
programs = { programs = {
nushell = { nushell = {
enable = true; enable = true;
shellAliases = myAliases; configFile.source = ../config/nushell/config.nu;
}; envFile.source = ../config/nushell/env.nu;
zsh = {
enable = true;
shellAliases = myAliases;
}; };
carapace.enable = true; carapace.enable = true;

View file

@ -3,7 +3,7 @@
{ {
users.users.danny = { users.users.danny = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.zsh; shell = pkgs.nushell;
extraGroups = [ "wheel" "qemu" "kvm" "libvirtd" "networkmanager" ]; extraGroups = [ "wheel" "qemu" "kvm" "libvirtd" "networkmanager" ];
}; };
} }