1
0
mirror of https://github.com/kmein/niveum synced 2026-03-29 08:41:07 +02:00

5 Commits

13 changed files with 164 additions and 77 deletions

View File

@@ -0,0 +1,88 @@
{
pkgs,
niveumPackages,
...
}: {
environment.systemPackages = [
pkgs.htop
pkgs.w3m
pkgs.wget
# ARCHIVE TOOLS
pkgs.unzip
pkgs.unrar
pkgs.p7zip
pkgs.zip
# MONITORS
pkgs.iotop # I/O load monitor
pkgs.iftop # interface bandwidth monitor
pkgs.lsof # list open files
pkgs.psmisc # for killall, pstree
# SHELL
pkgs.sqlite
pkgs.fd # better find
pkgs.tree
pkgs.parallel # for parallel, since moreutils shadows task spooler
pkgs.ripgrep # better grep
pkgs.rlwrap
pkgs.progress # display progress bars for pipes
pkgs.file # determine file type
pkgs.gdu # ncurses disk usage (ncdu is broken)
pkgs.rmlint # remove duplicate files
pkgs.jq # json toolkit
pkgs.jless # less(1) for json
pkgs.fq # toolkit for yaml, xml and binaries
pkgs.bc # calculator
pkgs.pari # gp -- better calculator
pkgs.ts
niveumPackages.vimv
niveumPackages.vg
niveumPackages.fkill
niveumPackages.cyberlocker-tools
niveumPackages.untilport
niveumPackages.kpaste
# HARDWARE
pkgs.usbutils # for lsusb
pkgs.pciutils # for lspci
pkgs.lshw # for lshw
];
environment.shellAliases = let
take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1"
'';
cdt = pkgs.writers.writeDash "cdt" ''
cd "$(mktemp -d)"
pwd
'';
wcd = pkgs.writers.writeDash "wcd" ''
cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.."
'';
where = pkgs.writers.writeDash "where" ''
readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname
'';
in {
"ß" = "${pkgs.util-linux}/bin/setsid";
nixi = "nix repl '<nixpkgs>'";
take = "source ${take}";
wcd = "source ${wcd}";
where = "source ${where}";
# temporary files and directories
cdt = "source ${cdt}";
vit = "$EDITOR $(mktemp)";
# file safety
mv = "mv --interactive";
rm = "rm --interactive";
cp = "cp --interactive";
# colours
cat = "${pkgs.bat}/bin/bat --theme=ansi --style=plain";
l = "ls --color=auto --time-style=long-iso --almost-all";
ls = "ls --color=auto --time-style=long-iso";
ll = "ls --color=auto --time-style=long-iso -l";
la = "ls --color=auto --time-style=long-iso --almost-all -l";
ip = "${pkgs.iproute2}/bin/ip -c";
# systemd
s = "${pkgs.systemd}/bin/systemctl";
us = "${pkgs.systemd}/bin/systemctl --user";
};
}

View File

@@ -17,8 +17,9 @@ in {
}
];
services.gnome.gnome-keyring.enable = true;
home-manager.users.me = {
services.gnome-keyring.enable = true;
services.nextcloud-client = {
enable = true;
startInBackground = true;

View File

@@ -98,48 +98,17 @@ in {
{
environment.interactiveShellInit = "export PATH=$PATH:$HOME/projects/niveum";
environment.shellAliases = let
wcd = pkgs.writers.writeDash "wcd" ''
cd "$(readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname)/.."
'';
where = pkgs.writers.writeDash "where" ''
readlink "$(${pkgs.which}/bin/which --skip-alias "$1")" | xargs dirname
'';
take = pkgs.writers.writeDash "take" ''
mkdir "$1" && cd "$1"
'';
cdt = pkgs.writers.writeDash "cdt" ''
cd "$(mktemp -d)"
pwd
'';
swallow = command: "${niveumPackages.swallow}/bin/swallow ${command}";
in {
"ß" = "${pkgs.util-linux}/bin/setsid";
cat = "${pkgs.bat}/bin/bat --theme=ansi --style=plain";
chromium-incognito = "chromium --user-data-dir=$(mktemp -d /tmp/chr.XXXXXX) --no-first-run --incognito";
cp = "cp --interactive";
ip = "${pkgs.iproute2}/bin/ip -c";
l = "ls --color=auto --time-style=long-iso --almost-all";
ls = "ls --color=auto --time-style=long-iso";
ll = "ls --color=auto --time-style=long-iso -l";
la = "ls --color=auto --time-style=long-iso --almost-all -l";
mv = "mv --interactive";
nixi = "nix repl '<nixpkgs>'";
ns = "nix-shell --run zsh";
o = "${pkgs.xdg-utils}/bin/xdg-open";
ns = "nix-shell --run zsh";
pbcopy = "${pkgs.xclip}/bin/xclip -selection clipboard -in";
pbpaste = "${pkgs.xclip}/bin/xclip -selection clipboard -out";
rm = "rm --interactive";
s = "${pkgs.systemd}/bin/systemctl";
take = "source ${take}";
cdt = "source ${cdt}";
vit = "$EDITOR $(mktemp)";
tmux = "${pkgs.tmux}/bin/tmux -2";
sxiv = swallow "${pkgs.nsxiv}/bin/nsxiv";
zathura = swallow "${pkgs.zathura}/bin/zathura";
us = "${pkgs.systemd}/bin/systemctl --user";
wcd = "source ${wcd}";
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
where = "source ${where}";
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
};
@@ -240,6 +209,7 @@ in {
};
}
./android.nix
./admin-essentials.nix
./stylix.nix
./alacritty.nix
./backup.nix

View File

@@ -65,8 +65,6 @@ in {
aria2
firefox
tdesktop
w3m
wget
whois
dnsutils
# FILE MANAGERS
@@ -77,44 +75,19 @@ in {
imagemagick
exiftool
nsxiv
# ARCHIVE TOOLS
unzip
unrar
p7zip
zip
# MONITORS
htop
iotop # I/O load monitor
iftop # interface bandwidth monitor
lsof # list open files
psmisc # for killall, pstree
# SHELL
bat # better cat
fd # better find
file # determine file type
dos2unix
genpass # generate passwords
gdu # ncurses disk usage (ncdu is broken)
rmlint # remove duplicate files
gcc
python3Packages.jsonschema # json validation
jq # json toolkit
pup # html toolkit
htmlq
xsv # csv toolkit
fq # toolkit for yaml, xml and binaries
man-pages
man-pages-posix
tree
exfat # to mount windows drives
parallel # for parallel, since moreutils shadows task spooler
ripgrep # better grep
rlwrap
progress # display progress bars for pipes
# HARDWARE TOOLS
usbutils # for lsusb
pciutils # for lspci
lshw # for lshw
arandr # xrandr for noobs
libnotify # for notify-send
xclip # clipboard CLI
@@ -141,8 +114,6 @@ in {
niveumPackages.hc # print files as qr codes
yt-dlp
espeak
bc # calculator
pari # gp -- better calculator
rink # unit converter
niveumPackages.auc
niveumPackages.cheat-sh
@@ -165,18 +136,13 @@ in {
niveumPackages.meteo
niveumPackages.mahlzeit
niveumPackages.jq-lsp
niveumPackages.vimv
niveumPackages.swallow # window swallowing
niveumPackages.literature-quote
jless # less(1) for json
niveumPackages.booksplit
niveumPackages.dmenu-randr
niveumPackages.dmenu-bluetooth
niveumPackages.manual-sort
niveumPackages.dns-sledgehammer
ts
niveumPackages.vg
niveumPackages.fkill
niveumPackages.wttr
niveumPackages.unicodmenu
niveumPackages.emailmenu
@@ -227,9 +193,6 @@ in {
#krebs
niveumPackages.dic
niveumPackages.cyberlocker-tools
niveumPackages.untilport
niveumPackages.kpaste
config.nur.repos.mic92.ircsink
(haskellPackages.ghcWithHoogle (hs: [

45
flake.lock generated
View File

@@ -732,6 +732,24 @@
"type": "github"
}
},
"nixinate_2": {
"inputs": {
"nixpkgs": "nixpkgs_6"
},
"locked": {
"lastModified": 1688141737,
"narHash": "sha256-qHrNMYWukOKmKVf6wXOGKj1xxUnOGjvTRbt/PLLXuBE=",
"owner": "matthewcroughan",
"repo": "nixinate",
"rev": "7902ae845e6cc5bd450e510cdf5e009a6e4a44d9",
"type": "github"
},
"original": {
"owner": "matthewcroughan",
"repo": "nixinate",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1693636127,
@@ -906,6 +924,22 @@
}
},
"nixpkgs_6": {
"locked": {
"lastModified": 1653060744,
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "dfd82985c273aac6eced03625f454b334daae2e8",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_7": {
"locked": {
"lastModified": 1703467016,
"narHash": "sha256-/5A/dNPhbQx/Oa2d+Get174eNI3LERQ7u6WTWOlR1eQ=",
@@ -921,7 +955,7 @@
"type": "github"
}
},
"nixpkgs_7": {
"nixpkgs_8": {
"locked": {
"lastModified": 1659446231,
"narHash": "sha256-hekabNdTdgR/iLsgce5TGWmfIDZ86qjPhxDg/8TlzhE=",
@@ -937,7 +971,7 @@
"type": "github"
}
},
"nixpkgs_8": {
"nixpkgs_9": {
"locked": {
"lastModified": 1615532953,
"narHash": "sha256-SWpaGjrp/INzorEqMz3HLi6Uuk9I0KAn4YS8B4n3q5g=",
@@ -1167,7 +1201,8 @@
"menstruation-backend": "menstruation-backend_2",
"menstruation-telegram": "menstruation-telegram_2",
"nix-on-droid": "nix-on-droid_2",
"nixpkgs": "nixpkgs_6",
"nixinate": "nixinate_2",
"nixpkgs": "nixpkgs_7",
"nixpkgs-old": "nixpkgs-old_2",
"nixpkgs-unstable": "nixpkgs-unstable_2",
"nur": "nur_2",
@@ -1446,7 +1481,7 @@
"telebots_2": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_7"
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1703313352,
@@ -1581,7 +1616,7 @@
"flake-utils": [
"flake-utils"
],
"nixpkgs": "nixpkgs_8"
"nixpkgs": "nixpkgs_9"
},
"locked": {
"lastModified": 1615819231,

View File

@@ -9,6 +9,7 @@
menstruation-backend.url = "github:kmein/menstruation.rs";
menstruation-telegram.url = "github:kmein/menstruation-telegram";
nix-on-droid.url = "github:t184256/nix-on-droid/release-23.05";
nixinate.url = "github:matthewcroughan/nixinate";
nixpkgs-old.url = "github:NixOS/nixpkgs/50fc86b75d2744e1ab3837ef74b53f103a9b55a0";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
@@ -61,6 +62,7 @@
home-manager,
agenix,
retiolum,
nixinate,
flake-utils,
nix-on-droid,
stylix,
@@ -72,7 +74,8 @@
pkgs = nixpkgs.legacyPackages.x86_64-linux;
lib = nixpkgs.lib;
in
{
nixinate.nixinate.x86_64-linux self
// {
mock-secrets = {
type = "app";
program = toString (pkgs.writers.writeDash "mock-secrets" ''
@@ -96,7 +99,15 @@
program = toString (pkgs.writers.writeDash "deploy-${hostname}" ''
exec ${pkgs.nixos-rebuild}/bin/nixos-rebuild switch --max-jobs 2 --log-format internal-json --flake .?submodules=1#${hostname} --build-host ${targets.${hostname}} --target-host ${targets.${hostname}} 2>&1 | ${pkgs.nix-output-monitor}/bin/nom --json
'');
}) (builtins.attrNames self.nixosConfigurations));
}) (builtins.attrNames self.nixosConfigurations))
// {
deploy-ful = {
type = "app";
program = toString (pkgs.writers.writeDash "deploy-ful" ''
exec ${pkgs.nix}/bin/nix run .?submodules=1#nixinate.ful --log-format internal-json 2>&1 | ${pkgs.nix-output-monitor}/bin/nom --json
'');
};
};
};
nixosModules = {
@@ -155,6 +166,15 @@
inputs.self.nixosModules.panoptikon
retiolum.nixosModules.retiolum
nur.nixosModules.nur
{
_module.args.nixinate = {
host = "ful";
sshUser = "root";
buildOn = "remote";
substituteOnTarget = true;
hermetic = false;
};
}
];
};
zaatar = nixpkgs.lib.nixosSystem rec {

View File

@@ -1975,6 +1975,10 @@ in
station = "SWR3 Ludwigshafen";
tags = [tags.top40 tags.pop];
}
{
stream = "http://mp3.ffh.de/radioffh/hqlivestream.mp3";
station = "Hitradio FFH";
}
]
++ map (name: {
stream = "https://${name}.stream.publicradio.org/${name}.aac";

View File

@@ -18,6 +18,7 @@ in {
../../configs/retiolum.nix
../../configs/sshd.nix
../../configs/nix.nix
../../configs/admin-essentials.nix
];
niveum.passport = {

View File

@@ -29,6 +29,7 @@ in {
../../configs/spacetime.nix
../../configs/sshd.nix
../../configs/telegram-bots
../../configs/admin-essentials.nix
];
services.restic.backups.niveum = {

View File

@@ -12,6 +12,7 @@ in {
../../configs/default.nix
../../configs/battery.nix
../../configs/wpa_supplicant.nix
../../configs/admin-essentials.nix
];
age.secrets = {

View File

@@ -11,6 +11,7 @@ in {
../../configs/retiolum.nix
../../configs/sshd.nix
../../configs/nix.nix
../../configs/admin-essentials.nix
];
age.secrets = {

View File

@@ -11,6 +11,7 @@ in {
../../configs/sshd.nix
../../configs/retiolum.nix
../../configs/nix.nix
../../configs/admin-essentials.nix
];
age.secrets = {

View File

@@ -26,6 +26,7 @@ in {
../../configs/tmux.nix
../../configs/wpa_supplicant.nix
../../configs/nix.nix
../../configs/admin-essentials.nix
];
services.pipewire.systemWide = true;