2020-09-18 13:54:09 +00:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
2020-09-24 05:45:48 +00:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
pwgen
|
|
|
|
pv
|
|
|
|
tree
|
|
|
|
tmux
|
|
|
|
psmisc
|
|
|
|
ncdu
|
|
|
|
git
|
|
|
|
file
|
|
|
|
sqlite
|
|
|
|
usbutils
|
|
|
|
entr
|
|
|
|
ffmpeg
|
|
|
|
gcc
|
|
|
|
python3
|
|
|
|
hugo
|
|
|
|
openssl
|
|
|
|
wget
|
|
|
|
lm_sensors
|
|
|
|
htop
|
|
|
|
zip
|
|
|
|
unzip
|
|
|
|
dnsutils
|
|
|
|
tcpdump
|
|
|
|
rsync
|
2020-09-24 05:48:44 +00:00
|
|
|
nixpkgs-fmt
|
2020-09-18 13:54:09 +00:00
|
|
|
|
2020-09-24 05:45:48 +00:00
|
|
|
(writeScriptBin "nix-roots" "nix-store --gc --print-roots | grep -v ^/proc/")
|
2020-09-18 13:54:09 +00:00
|
|
|
|
2020-09-24 05:45:48 +00:00
|
|
|
(vim_configurable.customize {
|
|
|
|
name = "vim";
|
|
|
|
vimrcConfig.customRC = ''
|
|
|
|
syntax enable
|
|
|
|
filetype plugin indent on
|
|
|
|
set nowrap ruler scrolloff=9 backspace=start,indent
|
|
|
|
'';
|
|
|
|
})
|
2020-09-18 13:54:09 +00:00
|
|
|
|
2020-09-24 05:45:48 +00:00
|
|
|
(writeScriptBin "zfsram" ''
|
|
|
|
#!${pkgs.python3}/bin/python
|
|
|
|
for ln in open('/proc/spl/kstat/zfs/arcstats').readlines():
|
|
|
|
if ln.startswith('size '):
|
|
|
|
print(str(int(ln.split(' ')[-1])/(1024*1024*1024))[:5],'GB')
|
|
|
|
'')
|
2020-10-01 15:40:28 +00:00
|
|
|
|
|
|
|
(writeScriptBin "channel" ''
|
|
|
|
#!/bin/sh
|
|
|
|
echo "$(curl --silent -L https://channels.nixos.org/nixos-20.09/git-revision)" nixos-20.09
|
|
|
|
echo "$(cat /nix/var/nix/profiles/per-user/root/channels/nixos/.git-revision)" nixos local
|
|
|
|
echo "$(curl --silent -L https://channels.nixos.org/nixos-unstable/git-revision)" nixos-unstable
|
|
|
|
'')
|
2020-09-24 05:45:48 +00:00
|
|
|
];
|
2020-09-18 13:54:09 +00:00
|
|
|
|
2020-09-28 19:25:43 +00:00
|
|
|
virtualisation.podman.enable = true;
|
|
|
|
|
2020-09-25 23:30:24 +00:00
|
|
|
environment.variables.PLGO_HOSTNAMEFG = "0";
|
|
|
|
environment.variables.PLGO_HOSTNAMEBG = "114";
|
|
|
|
|
2020-09-24 05:45:48 +00:00
|
|
|
programs.bash.interactiveShellInit = ''
|
|
|
|
stty -ixon
|
|
|
|
alias p=python3
|
|
|
|
alias buildsys='nix build -f "<nixpkgs/nixos>" --no-link system'
|
2020-09-18 13:54:09 +00:00
|
|
|
|
2020-09-24 05:45:48 +00:00
|
|
|
function _update_ps1() {
|
2020-09-25 23:30:24 +00:00
|
|
|
PS1="\n$(${pkgs.callPackage ../pkgs/powerline-go-updated { }}/bin/powerline-go \
|
2020-09-24 05:45:48 +00:00
|
|
|
-mode=flat \
|
|
|
|
-colorize-hostname \
|
|
|
|
-cwd-mode=dironly \
|
|
|
|
-modules=user,host,cwd,nix-shell,git,jobs \
|
2020-09-25 23:30:24 +00:00
|
|
|
-git-assume-unchanged-size 0 \
|
2020-09-24 05:45:48 +00:00
|
|
|
)$ "
|
|
|
|
}
|
|
|
|
PROMPT_COMMAND="_update_ps1; $PROMPT_COMMAND"
|
|
|
|
'';
|
2020-09-18 13:54:09 +00:00
|
|
|
}
|