fixed tabs in profiles/core/default.nix

This commit is contained in:
Anish L 2022-02-26 03:33:45 +10:00
parent a317a0e85f
commit b1bbae5932

View file

@ -2,208 +2,195 @@
let inherit (lib) fileContents; let inherit (lib) fileContents;
in in
{ {
imports = [ ../cachix ]; imports = [ ../cachix ];
nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; nix.systemFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ];
environment = { environment = {
systemPackages = with pkgs; [
binutils
coreutils
direnv
dnsutils
dosfstools
git
bottom
gptfdisk
iputils
jq
manix
tree
delta
moreutils
nix-index
cached-nix-shell
nmap
ripgrep
skim
tealdeer
usbutils
utillinux
whois
htop
iftop
wget
curl
exa
bat
fd
ag
tcpdump
mtr
file
lsof
atool
inotify-tools
strace
zip
unzip
rsync
tmux
pwgen
glow
gitAndTools.gitFull
pinentry_gnome
pass
less
gdb
xxd
kitty
taskwarrior
gnupg
syncthing
dijo
#kdeconnect
#ssb-patchwork
libreoffice
fontconfig
pandoc
];
systemPackages = with pkgs; [ shellInit = ''
binutils export STARSHIP_CONFIG=${
coreutils pkgs.writeText "starship.toml"
direnv (fileContents ./starship.toml)
dnsutils }
dosfstools '';
git
bottom
gptfdisk
iputils
jq
manix
tree
moreutils
nix-index
cached-nix-shell
nmap
ripgrep
skim
tealdeer
usbutils
utillinux
whois
htop
iftop
wget
curl
exa
bat
fd
ag
tcpdump
mtr
file
lsof
atool
inotify-tools
strace
zip
unzip
rsync
tmux
pwgen
glow
gitAndTools.gitFull
pinentry_gnome
pass
less
gdb
xxd
kitty
taskwarrior
gnupg
syncthing
dijo
#kdeconnect
#ssb-patchwork
libreoffice
fontconfig
pandoc
];
shellInit = '' shellAliases =
export STARSHIP_CONFIG=${ let ifSudo = lib.mkIf config.security.sudo.enable;
pkgs.writeText "starship.toml" in
(fileContents ./starship.toml) {
} # quick cd
''; ".." = "cd ..";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
shellAliases = # modern cli tools
let ifSudo = lib.mkIf config.security.sudo.enable; ls = "exa";
in cat = "bat";
{ unzip = "aunpack";
# quick cd copy = "xclip -selection clipboard";
".." = "cd .."; paste = "xclip -selection clipboard -o";
"..." = "cd ../..";
"...." = "cd ../../..";
"....." = "cd ../../../..";
# modern cli tools # task warrior
ls = "exa"; t = "task";
cat = "bat";
unzip = "aunpack";
copy = "xclip -selection clipboard";
paste = "xclip -selection clipboard -o";
# task warrior # git
t = "task"; g = "git";
# git # grep
g = "git"; grep = "rg";
gi = "grep -i";
# grep # internet ip
grep = "rg"; myip = "dig +short myip.opendns.com @208.67.222.222 2>&1";
gi = "grep -i";
# internet ip # nix
myip = "dig +short myip.opendns.com @208.67.222.222 2>&1"; n = "nix";
np = "n profile";
ni = "np install";
nr = "np remove";
ns = "n search --no-update-lock-file";
nf = "n flake";
nepl = "n repl '<nixpkgs>'";
srch = "ns nixos";
orch = "ns override";
nrb = ifSudo "sudo nixos-rebuild switch --flake '/etc/nixos/#curve'";
nedit = "cd /etc/nixos; vim";
ncd = "cd /etc/nixos";
mn = ''
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
'';
# nix # fix nixos-option
n = "nix"; nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat";
np = "n profile";
ni = "np install";
nr = "np remove";
ns = "n search --no-update-lock-file";
nf = "n flake";
nepl = "n repl '<nixpkgs>'";
srch = "ns nixos";
orch = "ns override";
nrb = ifSudo "sudo nixos-rebuild switch --flake '/etc/nixos/#curve'";
nedit = "cd /etc/nixos; vim";
ncd = "cd /etc/nixos";
mn = ''
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
'';
# fix nixos-option # sudo
nixos-option = "nixos-option -I nixpkgs=${self}/lib/compat"; s = ifSudo "sudo -E ";
pls = ifSudo "s";
si = ifSudo "sudo -i";
se = ifSudo "sudoedit";
# sudo # top
s = ifSudo "sudo -E "; top = "btm";
pls = ifSudo "s";
si = ifSudo "sudo -i";
se = ifSudo "sudoedit";
# top # systemd
top = "btm"; ctl = "systemctl";
stl = ifSudo "s systemctl";
utl = "systemctl --user";
ut = "systemctl --user start";
un = "systemctl --user stop";
up = ifSudo "s systemctl start";
dn = ifSudo "s systemctl stop";
jtl = "journalctl";
# systemd };
ctl = "systemctl"; };
stl = ifSudo "s systemctl";
utl = "systemctl --user";
ut = "systemctl --user start";
un = "systemctl --user stop";
up = ifSudo "s systemctl start";
dn = ifSudo "s systemctl stop";
jtl = "journalctl";
}; fonts = {
}; fonts = with pkgs; [ powerline-fonts dejavu_fonts ];
fontconfig.defaultFonts = {
monospace = [ "DejaVu Sans Mono for Powerline" ];
sansSerif = [ "DejaVu Sans" ];
};
};
fonts = { nix = {
fonts = with pkgs; [ powerline-fonts dejavu_fonts ]; autoOptimiseStore = true;
gc.automatic = true;
optimise.automatic = true;
useSandbox = true;
allowedUsers = [ "@wheel" ];
trustedUsers = [ "root" "@wheel" ];
extraOptions = ''
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
};
fontconfig.defaultFonts = { programs.bash = {
promptInit = ''
eval "$(${pkgs.starship}/bin/starship init bash)"
'';
interactiveShellInit = ''
eval "$(${pkgs.direnv}/bin/direnv hook bash)"
'';
enableCompletion = true;
};
monospace = [ "DejaVu Sans Mono for Powerline" ]; # For rage encryption, all hosts need a ssh key pair
services.openssh = {
enable = true;
openFirewall = lib.mkDefault false;
};
sansSerif = [ "DejaVu Sans" ]; programs.gnupg.agent.enable = true;
#programs.gnupg.agent.pinentryFlavor = "curses";
}; programs.gnupg.agent.pinentryFlavor = "gnome3";
};
nix = {
autoOptimiseStore = true;
gc.automatic = true;
optimise.automatic = true;
useSandbox = true;
allowedUsers = [ "@wheel" ];
trustedUsers = [ "root" "@wheel" ];
extraOptions = ''
min-free = 536870912
keep-outputs = true
keep-derivations = true
fallback = true
'';
};
programs.bash = {
promptInit = ''
eval "$(${pkgs.starship}/bin/starship init bash)"
'';
interactiveShellInit = ''
eval "$(${pkgs.direnv}/bin/direnv hook bash)"
'';
enableCompletion = true;
};
# For rage encryption, all hosts need a ssh key pair
services.openssh = {
enable = true;
openFirewall = lib.mkDefault false;
};
programs.gnupg.agent.enable = true;
#programs.gnupg.agent.pinentryFlavor = "curses";
programs.gnupg.agent.pinentryFlavor = "gnome3";
services.earlyoom.enable = true;
services.earlyoom.enable = true;
} }