Merge branch 'development' of git.malice.zone:alisceon/nixos_config into development
This commit is contained in:
commit
090f98718d
9 changed files with 332 additions and 59 deletions
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
# Disable greeting
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
ls = "exa";
|
||||
ll = "exa -lah";
|
||||
grep = "rg";
|
||||
cat = "bat";
|
||||
cat = "bat -p";
|
||||
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
|
||||
|
||||
# NixOS commands
|
||||
|
|
@ -38,8 +38,38 @@
|
|||
|
||||
# Tower commands
|
||||
weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot";
|
||||
|
||||
# Misc commands
|
||||
nix-shell = "nix shell";
|
||||
};
|
||||
}; # end fish
|
||||
nushell = {
|
||||
enable = true;
|
||||
configFile.source = ./conf/config.nu;
|
||||
shellAliases = {
|
||||
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
|
||||
|
||||
# NixOS commands
|
||||
nixoss = "sudo nixos-rebuild switch --flake .#${hostName}";
|
||||
nixos-main = "git checkout main ; git pull ; sudo nixos-rebuild switch --flake #${hostName}";
|
||||
nixossr = "sudo nixos-rebuild switch --flake .#${hostName} ; reboot";
|
||||
nixost = "sudo nixos-rebuild build-vm --flake .#${hostName}";
|
||||
|
||||
# Development commands
|
||||
devt = "devenv test";
|
||||
|
||||
devtas = "devenv tasks list";
|
||||
devtar = "devenv tasks run";
|
||||
devs = "devenv shell";
|
||||
devu = "devenv up -d";
|
||||
devi = "nix flake init -t templates#";
|
||||
|
||||
pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/";
|
||||
|
||||
# Tower commands
|
||||
weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 ; reboot";
|
||||
};
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "alisceon";
|
||||
|
|
@ -91,6 +121,9 @@
|
|||
hostname = "alma03.lab.the.malice.zone";
|
||||
user = "root";
|
||||
};
|
||||
"tsla-nixos" = {
|
||||
hostname = "tesla-nixos.lab.the.malice.zone";
|
||||
};
|
||||
};
|
||||
}; # end ssh
|
||||
direnv = {
|
||||
|
|
@ -104,6 +137,9 @@
|
|||
# overide broken config
|
||||
xdg.configFile."obsidian/obsidian.json".source = lib.mkForce ./conf/obsidian.json;
|
||||
|
||||
# nixpkgs config
|
||||
xdg.configFile."nixpkgs/config.nix".source = ./conf/config.nix;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
signal-desktop
|
||||
discord
|
||||
|
|
|
|||
1
home/conf/config.nix
Normal file
1
home/conf/config.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ allowUnfree = true; }
|
||||
34
home/conf/config.nu
Normal file
34
home/conf/config.nu
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
let fish_completer = {|spans|
|
||||
fish --command $"complete '--do-complete=($spans | str replace --all "'" "\\'" | str join ' ')'"
|
||||
| from tsv --flexible --noheaders --no-infer
|
||||
| rename value description
|
||||
| update value {|row|
|
||||
let value = $row.value
|
||||
let need_quote = ['\' ',' '[' ']' '(' ')' ' ' '\t' "'" '"' "`"] | any {$in in $value}
|
||||
if ($need_quote and ($value | path exists)) {
|
||||
let expanded_path = if ($value starts-with ~) {$value | path expand --no-symlink} else {$value}
|
||||
$'"($expanded_path | str replace --all "\"" "\\\"")"'
|
||||
} else {$value}
|
||||
}
|
||||
}
|
||||
$env.config = {
|
||||
show_banner: false,
|
||||
completions: {
|
||||
case_sensitive: false # case-sensitive completions
|
||||
quick: true # set to false to prevent auto-selecting completions
|
||||
partial: true # set to false to prevent partial filling of the prompt
|
||||
algorithm: "fuzzy" # prefix or fuzzy
|
||||
external: {
|
||||
# set to false to prevent nushell looking into $env.PATH to find more suggestions
|
||||
enable: true
|
||||
# set to lower can improve completion performance at the cost of omitting some options
|
||||
max_results: 100
|
||||
completer: $fish_completer
|
||||
}
|
||||
}
|
||||
}
|
||||
$env.PATH = ($env.PATH |
|
||||
split row (char esep) |
|
||||
prepend /home/myuser/.apps |
|
||||
append /usr/bin/env
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue