mirror of
https://github.com/kmein/niveum
synced 2026-03-22 12:51:08 +01:00
Compare commits
1 Commits
5253b83eb5
...
mympd
| Author | SHA1 | Date | |
|---|---|---|---|
| d06d0a9de4 |
12
ci.nix
12
ci.nix
@@ -3,7 +3,7 @@
|
|||||||
system,
|
system,
|
||||||
name,
|
name,
|
||||||
}: let
|
}: let
|
||||||
nixpkgs = inputs.nixos-stable;
|
inherit (inputs) nixpkgs;
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
ensureFiles = paths:
|
ensureFiles = paths:
|
||||||
pkgs.runCommand "directory" {} ''
|
pkgs.runCommand "directory" {} ''
|
||||||
@@ -23,13 +23,6 @@
|
|||||||
"nixos-config=${toString ./.}/systems/${name}/configuration.nix"
|
"nixos-config=${toString ./.}/systems/${name}/configuration.nix"
|
||||||
"system-secrets=${systemSecrets}"
|
"system-secrets=${systemSecrets}"
|
||||||
"secrets=${sharedSecrets}"
|
"secrets=${sharedSecrets}"
|
||||||
"nixpkgs=${
|
|
||||||
toString (
|
|
||||||
if name == "kabsa" || name == "manakish"
|
|
||||||
then inputs.nixos-unstable
|
|
||||||
else inputs.nixos-stable
|
|
||||||
)
|
|
||||||
}"
|
|
||||||
]
|
]
|
||||||
++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs);
|
++ nixpkgs.lib.mapAttrsToList (name: value: "${name}=${value}") inputs);
|
||||||
# cd ~/.password-store/shared && find * -type f | sed 's/.gpg$//'
|
# cd ~/.password-store/shared && find * -type f | sed 's/.gpg$//'
|
||||||
@@ -43,7 +36,6 @@
|
|||||||
"mail/gmail/amroplay"
|
"mail/gmail/amroplay"
|
||||||
"mail/gmail/kieran.meinhardt"
|
"mail/gmail/kieran.meinhardt"
|
||||||
"mail/meinhaki"
|
"mail/meinhaki"
|
||||||
"mail/dslalewa"
|
|
||||||
"mail/posteo"
|
"mail/posteo"
|
||||||
"nextcloud-fysi/password"
|
"nextcloud-fysi/password"
|
||||||
"nextcloud/password"
|
"nextcloud/password"
|
||||||
@@ -62,7 +54,6 @@
|
|||||||
kabsa = ensureFiles basic;
|
kabsa = ensureFiles basic;
|
||||||
manakish = ensureFiles basic;
|
manakish = ensureFiles basic;
|
||||||
tahina = ensureFiles basic;
|
tahina = ensureFiles basic;
|
||||||
ful = ensureFiles basic;
|
|
||||||
makanek = ensureFiles ([
|
makanek = ensureFiles ([
|
||||||
"irc/retiolum"
|
"irc/retiolum"
|
||||||
"irc/hackint"
|
"irc/hackint"
|
||||||
@@ -82,7 +73,6 @@
|
|||||||
"telegram/menstruation.token"
|
"telegram/menstruation.token"
|
||||||
"telegram/cool_village.token"
|
"telegram/cool_village.token"
|
||||||
"telegram/kmein.token"
|
"telegram/kmein.token"
|
||||||
"telegram/krebs.token"
|
|
||||||
"telegram/prometheus.token"
|
"telegram/prometheus.token"
|
||||||
"weechat/relay"
|
"weechat/relay"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -3,15 +3,29 @@
|
|||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: {
|
||||||
alacritty-cfg = theme:
|
environment.variables.TERMINAL = "alacritty";
|
||||||
(pkgs.formats.yaml {}).generate "alacritty.yml" {
|
|
||||||
window.opacity = 0.95;
|
environment.systemPackages = [
|
||||||
|
pkgs.alacritty
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.me.xdg.configFile = let
|
||||||
|
inherit (import <niveum/lib>) colours;
|
||||||
|
colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"];
|
||||||
|
colourPairs = lib.getAttrs colourNames colours;
|
||||||
|
in {
|
||||||
|
"alacritty/alacritty.yml".source = (pkgs.formats.yaml {}).generate "alacritty.yml" {
|
||||||
|
background_opacity = 0.9;
|
||||||
|
colors = {
|
||||||
|
primary = {inherit (colours) background foreground;};
|
||||||
|
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
|
||||||
|
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
|
||||||
|
};
|
||||||
font = {
|
font = {
|
||||||
normal.family = "Monospace";
|
normal.family = "Monospace";
|
||||||
size = 6;
|
size = 6;
|
||||||
};
|
};
|
||||||
live_config_reload = true;
|
|
||||||
key_bindings = [
|
key_bindings = [
|
||||||
{
|
{
|
||||||
key = "Plus";
|
key = "Plus";
|
||||||
@@ -29,34 +43,6 @@
|
|||||||
action = "ResetFontSize";
|
action = "ResetFontSize";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
colors = let
|
|
||||||
colourNames = ["black" "red" "green" "yellow" "blue" "magenta" "cyan" "white"];
|
|
||||||
colourPairs = lib.getAttrs colourNames theme;
|
|
||||||
in {
|
|
||||||
primary = {inherit (theme) background foreground;};
|
|
||||||
cursor = {inherit (theme) cursor;};
|
|
||||||
normal = lib.mapAttrs (_: colour: colour.dark) colourPairs;
|
|
||||||
bright = lib.mapAttrs (_: colour: colour.bright) colourPairs;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
alacritty-pkg = pkgs.symlinkJoin {
|
|
||||||
name = "alacritty";
|
|
||||||
paths = [
|
|
||||||
(pkgs.writeDashBin "alacritty" ''
|
|
||||||
${pkgs.alacritty}/bin/alacritty --config-file /var/theme/config/alacritty.yml "$@"
|
|
||||||
'')
|
|
||||||
pkgs.alacritty
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
environment.variables.TERMINAL = "alacritty";
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
alacritty-pkg
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.etc = {
|
|
||||||
"themes/dark/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-dark.nix>);
|
|
||||||
"themes/light/alacritty.yml".source = alacritty-cfg (import <niveum/lib/colours/ayu-light.nix>);
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
acpi_call
|
acpi_call
|
||||||
];
|
];
|
||||||
boot.kernelModules = ["tp_smapi" "acpi_call"];
|
boot.kernelModules = ["tp_smapi" "acpi_call"];
|
||||||
environment.systemPackages = [pkgs.tpacpi-bat pkgs.powertop];
|
environment.systemPackages = [pkgs.tpacpi-bat];
|
||||||
|
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -7,7 +7,6 @@
|
|||||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
|
||||||
"pjjgklgkfeoeiebjogplpnibpfnffkng" # undistracted
|
"pjjgklgkfeoeiebjogplpnibpfnffkng" # undistracted
|
||||||
"nhdogjmejiglipccpnnnanhbledajbpd" # vuejs devtools
|
"nhdogjmejiglipccpnnnanhbledajbpd" # vuejs devtools
|
||||||
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -47,12 +47,6 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
startInBackground = true;
|
startInBackground = true;
|
||||||
};
|
};
|
||||||
systemd.user.services.nextcloud-client = {
|
|
||||||
Unit = {
|
|
||||||
Wants = ["gnome-keyring.service"];
|
|
||||||
After = ["gnome-keyring.service"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ in {
|
|||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.pulseaudioFull;
|
package = pkgs.pulseaudioFull;
|
||||||
|
extraModules = [pkgs.pulseaudio-modules-bt];
|
||||||
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
|
# copy server:/run/pulse/.config/pulse/cookie to client:~/.config/pulse/cookie to authenticate a client machine
|
||||||
zeroconf.discovery.enable = true;
|
zeroconf.discovery.enable = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
@@ -143,8 +144,8 @@ in {
|
|||||||
wcd = "source ${wcd}";
|
wcd = "source ${wcd}";
|
||||||
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
im = "${pkgs.openssh}/bin/ssh weechat@makanek -t tmux attach-session -t IM";
|
||||||
where = "source ${where}";
|
where = "source ${where}";
|
||||||
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
|
yt = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
|
||||||
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
|
yta = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{i18n.defaultLocale = "en_DK.UTF-8";}
|
{i18n.defaultLocale = "en_DK.UTF-8";}
|
||||||
@@ -169,15 +170,13 @@ in {
|
|||||||
{
|
{
|
||||||
security.wrappers = {
|
security.wrappers = {
|
||||||
pmount = {
|
pmount = {
|
||||||
setuid = true;
|
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "root";
|
group = "users";
|
||||||
source = "${pkgs.pmount}/bin/pmount";
|
source = "${pkgs.pmount}/bin/pmount";
|
||||||
};
|
};
|
||||||
pumount = {
|
pumount = {
|
||||||
setuid = true;
|
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "root";
|
group = "users";
|
||||||
source = "${pkgs.pmount}/bin/pumount";
|
source = "${pkgs.pmount}/bin/pumount";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -245,7 +244,7 @@ in {
|
|||||||
./polkit.nix
|
./polkit.nix
|
||||||
./power-action.nix
|
./power-action.nix
|
||||||
./printing.nix
|
./printing.nix
|
||||||
# ./openweathermap.nix
|
./openweathermap.nix
|
||||||
./wallpaper.nix
|
./wallpaper.nix
|
||||||
./redshift.nix
|
./redshift.nix
|
||||||
./retiolum.nix
|
./retiolum.nix
|
||||||
@@ -256,7 +255,7 @@ in {
|
|||||||
./sshd.nix
|
./sshd.nix
|
||||||
./sudo.nix
|
./sudo.nix
|
||||||
./sxiv.nix
|
./sxiv.nix
|
||||||
./themes.nix
|
./theming.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./traadfri.nix
|
./traadfri.nix
|
||||||
./unclutter.nix
|
./unclutter.nix
|
||||||
|
|||||||
@@ -12,5 +12,5 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
users.users.me.extraGroups = ["docker"];
|
users.users.me.extraGroups = ["docker"];
|
||||||
environment.systemPackages = [pkgs.docker pkgs.docker-compose];
|
environment.systemPackages = [pkgs.docker pkgs.docker_compose];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,17 +7,14 @@
|
|||||||
alegreya
|
alegreya
|
||||||
alegreya-sans
|
alegreya-sans
|
||||||
amiri
|
amiri
|
||||||
annapurna-sil
|
|
||||||
cantarell-fonts
|
cantarell-fonts
|
||||||
charis-sil
|
charis-sil
|
||||||
corefonts
|
corefonts
|
||||||
crimson
|
crimson
|
||||||
eb-garamond
|
eb-garamond
|
||||||
etBook
|
etBook
|
||||||
ezra-sil
|
|
||||||
fira
|
fira
|
||||||
font-awesome
|
font-awesome-ttf
|
||||||
galatia-sil
|
|
||||||
gentium
|
gentium
|
||||||
gfs-fonts
|
gfs-fonts
|
||||||
gyre-fonts
|
gyre-fonts
|
||||||
@@ -29,6 +26,7 @@
|
|||||||
libre-bodoni
|
libre-bodoni
|
||||||
lmodern
|
lmodern
|
||||||
merriweather
|
merriweather
|
||||||
|
noto-fonts
|
||||||
ocr-a
|
ocr-a
|
||||||
roboto
|
roboto
|
||||||
roboto-mono
|
roboto-mono
|
||||||
|
|||||||
@@ -50,12 +50,12 @@ in {
|
|||||||
rebase.autoStash = true;
|
rebase.autoStash = true;
|
||||||
merge.autoStash = true;
|
merge.autoStash = true;
|
||||||
|
|
||||||
# # ref https://github.com/dandavison/delta
|
# ref https://github.com/dandavison/delta
|
||||||
# core.pager = "${pkgs.delta}/bin/delta";
|
core.pager = "${pkgs.delta}/bin/delta";
|
||||||
# interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only";
|
||||||
# delta.navigate = true;
|
delta.navigate = true;
|
||||||
# merge.conflictStyle = "diff3";
|
merge.conflictStyle = "diff3";
|
||||||
# diff.colorMoved = "default";
|
diff.colorMoved = "default";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,17 +5,6 @@
|
|||||||
}: {
|
}: {
|
||||||
imports = [<niveum/modules/hledger.nix>];
|
imports = [<niveum/modules/hledger.nix>];
|
||||||
|
|
||||||
environment.systemPackages = let
|
|
||||||
timeLedger = "$HOME/projects/ledger/time.timeclock";
|
|
||||||
in [
|
|
||||||
(pkgs.writers.writeDashBin "hora-edit" ''
|
|
||||||
$EDITOR + "${timeLedger}" && ${pkgs.git}/bin/git -C "$(${pkgs.coreutils}/bin/dirname ${timeLedger})" commit --all --message "$(${pkgs.coreutils}/bin/date -Im)"
|
|
||||||
'')
|
|
||||||
(pkgs.writers.writeDashBin "hora" ''
|
|
||||||
${pkgs.hledger}/bin/hledger -f "${timeLedger}" "$@"
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
|
|
||||||
niveum.hledger = {
|
niveum.hledger = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ledgerFile = "$HOME/projects/ledger/all.journal";
|
ledgerFile = "$HOME/projects/ledger/all.journal";
|
||||||
|
|||||||
@@ -34,7 +34,6 @@
|
|||||||
"devanagari" = pkgs.writers.writeDash "devanagari" ''
|
"devanagari" = pkgs.writers.writeDash "devanagari" ''
|
||||||
${pkgs.scripts.devanagari}/bin/devanagari
|
${pkgs.scripts.devanagari}/bin/devanagari
|
||||||
'';
|
'';
|
||||||
"avesta" = pkgs.writeScript "avesta" (builtins.readFile <niveum/packages/scripts/avesta.sed>);
|
|
||||||
"curl" = pkgs.writers.writeDash "curl" ''
|
"curl" = pkgs.writers.writeDash "curl" ''
|
||||||
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
${pkgs.curl}/bin/curl -fSs "$(${pkgs.coreutils}/bin/cat)"
|
||||||
'';
|
'';
|
||||||
@@ -248,9 +247,8 @@ in {
|
|||||||
"${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5";
|
"${modifier}+p" = "exec --no-startup-id ${pkgs.pass}/bin/passmenu -l 5";
|
||||||
"${modifier}+u" = "exec ${pkgs.scripts.unicodmenu}/bin/unicodmenu";
|
"${modifier}+u" = "exec ${pkgs.scripts.unicodmenu}/bin/unicodmenu";
|
||||||
|
|
||||||
"${modifier}+F6" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
|
||||||
"${modifier}+F7" = "exec ${pkgs.scripts.showkeys-toggle}/bin/showkeys-toggle";
|
"${modifier}+F7" = "exec ${pkgs.scripts.showkeys-toggle}/bin/showkeys-toggle";
|
||||||
"${modifier}+F8" = "exec switch-theme toggle";
|
"${modifier}+F8" = "exec ${pkgs.xorg.xkill}/bin/xkill";
|
||||||
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
"${modifier}+F9" = "exec ${pkgs.redshift}/bin/redshift -O 4000 -b 0.85";
|
||||||
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
"${modifier}+F10" = "exec ${pkgs.redshift}/bin/redshift -x";
|
||||||
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
|
"${modifier}+F11" = "exec ${pkgs.xcalib}/bin/xcalib -invert -alter";
|
||||||
|
|||||||
@@ -4,20 +4,10 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
commaSep = builtins.concatStringsSep ",";
|
commaSep = builtins.concatStringsSep ",";
|
||||||
languages = {
|
|
||||||
de = "T3";
|
|
||||||
gr = "polytonic";
|
|
||||||
ru = "phonetic";
|
|
||||||
ara = "buckwalter";
|
|
||||||
};
|
|
||||||
defaultLanguage = "de";
|
|
||||||
in {
|
in {
|
||||||
# man 7 xkeyboard-config
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
layout = commaSep (builtins.attrNames languages);
|
layout = commaSep ["de" "gr"];
|
||||||
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
|
xkbVariant = commaSep ["T3" "polytonic"];
|
||||||
# buckwalter: http://www.qamus.org/transliteration.htm
|
|
||||||
xkbVariant = commaSep (builtins.attrValues languages);
|
|
||||||
xkbOptions =
|
xkbOptions =
|
||||||
commaSep ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
|
commaSep ["compose:caps" "terminate:ctrl_alt_bksp" "grp:ctrls_toggle"];
|
||||||
libinput.enable = true;
|
libinput.enable = true;
|
||||||
@@ -25,25 +15,6 @@ in {
|
|||||||
|
|
||||||
console.keyMap = "de";
|
console.keyMap = "de";
|
||||||
|
|
||||||
environment.systemPackages =
|
|
||||||
lib.mapAttrsToList
|
|
||||||
(language: variant:
|
|
||||||
pkgs.writers.writeDashBin "kb-${language}" ''
|
|
||||||
${pkgs.xorg.setxkbmap}/bin/setxkbmap ${defaultLanguage},${language} ${languages.${defaultLanguage}},${variant}
|
|
||||||
'')
|
|
||||||
languages;
|
|
||||||
|
|
||||||
# improve held key rate
|
# improve held key rate
|
||||||
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
services.xserver.displayManager.sessionCommands = "${pkgs.xorg.xset}/bin/xset r rate 300 50";
|
||||||
|
|
||||||
systemd.user.services.gxkb = {
|
|
||||||
wantedBy = ["graphical-session.target"];
|
|
||||||
serviceConfig = {
|
|
||||||
SyslogIdentifier = "gxkb";
|
|
||||||
ExecStart = "${pkgs.gxkb}/bin/gxkb";
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = "15s";
|
|
||||||
StartLimitBurst = 0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ in {
|
|||||||
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
|
ytdl-format = "bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best";
|
||||||
ytdl-raw-options = lib.concatStringsSep "," [''sub-lang="de,en"'' "write-sub=" "write-auto-sub="];
|
ytdl-raw-options = lib.concatStringsSep "," [''sub-lang="de,en"'' "write-sub=" "write-auto-sub="];
|
||||||
screenshot-template = "%F-%wH%wM%wS-%#04n";
|
screenshot-template = "%F-%wH%wM%wS-%#04n";
|
||||||
script-opts = "ytdl_hook-ytdl_path=${pkgs.yt-dlp}/bin/yt-dlp";
|
|
||||||
};
|
};
|
||||||
bindings = {
|
bindings = {
|
||||||
"Alt+RIGHT" = "add video-rotate 90";
|
"Alt+RIGHT" = "add video-rotate 90";
|
||||||
|
|||||||
@@ -47,20 +47,6 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
accounts.work-admin = {
|
|
||||||
user = "dslalewa";
|
|
||||||
password = lib.strings.fileContents <secrets/mail/dslalewa>;
|
|
||||||
address = "admin.alew.vglsprwi@hu-berlin.de";
|
|
||||||
imap = "mailbox.cms.hu-berlin.de";
|
|
||||||
smtp = "mailhost.cms.hu-berlin.de";
|
|
||||||
smtpSettings = smtp: "smtp://${smtp}";
|
|
||||||
folders = {
|
|
||||||
drafts = "Drafts";
|
|
||||||
sent = "Sent";
|
|
||||||
trash = "Trash";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
accounts.work-fysi = rec {
|
accounts.work-fysi = rec {
|
||||||
user = "kieran@fysi.tech";
|
user = "kieran@fysi.tech";
|
||||||
address = user;
|
address = user;
|
||||||
@@ -145,7 +131,6 @@ in {
|
|||||||
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
application/pdf; ${pkgs.zathura}/bin/zathura %s ;
|
||||||
application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput;
|
application/pgp-encrypted; ${pkgs.gnupg}/bin/gpg -d '%s'; copiousoutput;
|
||||||
application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput;
|
application/pgp-keys; ${pkgs.gnupg}/bin/gpg --import '%s'; copiousoutput;
|
||||||
application/vnd.openxmlformats*; ${pkgs.libreoffice}/bin/soffice '%s';
|
|
||||||
''
|
''
|
||||||
}:$mailcap_path
|
}:$mailcap_path
|
||||||
|
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ in {
|
|||||||
|
|
||||||
networking.networkmanager = {
|
networking.networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = [
|
packages = [
|
||||||
pkgs.networkmanager-openvpn
|
pkgs.networkmanager-openvpn
|
||||||
pkgs.networkmanager-fortisslvpn
|
pkgs.networkmanager-fortisslvpn
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
}: let
|
}: let
|
||||||
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
|
ytdl-format = "'bestvideo[height<=?720][fps<=?30][vcodec!=?vp9]+bestaudio/best'";
|
||||||
|
|
||||||
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.yt-dlp}/bin/yt-dlp -f ${ytdl-format} --add-metadata";
|
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata";
|
||||||
|
|
||||||
newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
|
newsboat-home = "${config.users.users.me.home}/cloud/Seafile/Documents/newsboat";
|
||||||
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
|
linkhandler-bin = "${pkgs.scripts.linkhandler}/bin/linkhandler";
|
||||||
|
|||||||
@@ -8,6 +8,8 @@
|
|||||||
menstruation = pkgs.callPackage <menstruation-backend> {};
|
menstruation = pkgs.callPackage <menstruation-backend> {};
|
||||||
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
|
pandoc-doc = pkgs.callPackage <niveum/packages/man/pandoc.nix> {};
|
||||||
|
|
||||||
|
nixpkgs-unstable = import <nixpkgs-unstable> {config.allowUnfree = true;};
|
||||||
|
|
||||||
zoteroStyle = {
|
zoteroStyle = {
|
||||||
name,
|
name,
|
||||||
sha256,
|
sha256,
|
||||||
@@ -33,7 +35,7 @@
|
|||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
astrolog = pkgs.astrolog.overrideAttrs (old:
|
astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old:
|
||||||
old
|
old
|
||||||
// {
|
// {
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@@ -100,10 +102,10 @@ in {
|
|||||||
htmlq
|
htmlq
|
||||||
xsv # csv toolkit
|
xsv # csv toolkit
|
||||||
xmlstarlet # xml toolkit
|
xmlstarlet # xml toolkit
|
||||||
man-pages
|
manpages
|
||||||
posix_man_pages
|
posix_man_pages
|
||||||
tree
|
tree
|
||||||
exfat # to mount windows drives
|
fuse_exfat # to mount windows drives
|
||||||
parallel # for parallel, since moreutils shadows task spooler
|
parallel # for parallel, since moreutils shadows task spooler
|
||||||
ripgrep # better grep
|
ripgrep # better grep
|
||||||
rlwrap
|
rlwrap
|
||||||
@@ -115,7 +117,7 @@ in {
|
|||||||
arandr # xrandr for noobs
|
arandr # xrandr for noobs
|
||||||
libnotify # for notify-send
|
libnotify # for notify-send
|
||||||
xclip # clipboard CLI
|
xclip # clipboard CLI
|
||||||
xdragon # drag and drop
|
dragon-drop # drag and drop
|
||||||
xorg.xkill # kill by clicking
|
xorg.xkill # kill by clicking
|
||||||
audacity
|
audacity
|
||||||
calibre
|
calibre
|
||||||
@@ -124,8 +126,8 @@ in {
|
|||||||
astrolog
|
astrolog
|
||||||
anki # flashcards
|
anki # flashcards
|
||||||
jbofihe # lojbanic software
|
jbofihe # lojbanic software
|
||||||
zoom-us # video conferencing
|
nixpkgs-unstable.zoom-us # video conferencing
|
||||||
alejandra # nix formatter
|
nixpkgs-unstable.alejandra # nix formatter
|
||||||
pdfgrep # search in pdf
|
pdfgrep # search in pdf
|
||||||
pdftk # pdf toolkit
|
pdftk # pdf toolkit
|
||||||
mupdf
|
mupdf
|
||||||
@@ -134,7 +136,7 @@ in {
|
|||||||
xournalpp # for annotating pdfs
|
xournalpp # for annotating pdfs
|
||||||
pdfpc # presenter console for pdf slides
|
pdfpc # presenter console for pdf slides
|
||||||
hc # print files as qr codes
|
hc # print files as qr codes
|
||||||
yt-dlp
|
youtubeDL
|
||||||
espeak
|
espeak
|
||||||
bc # calculator
|
bc # calculator
|
||||||
pari # gp -- better calculator
|
pari # gp -- better calculator
|
||||||
@@ -173,6 +175,7 @@ in {
|
|||||||
scripts.fkill
|
scripts.fkill
|
||||||
scripts.wttr
|
scripts.wttr
|
||||||
scripts.unicodmenu
|
scripts.unicodmenu
|
||||||
|
scripts.horoscope
|
||||||
scripts.closest
|
scripts.closest
|
||||||
scripts.trans
|
scripts.trans
|
||||||
scripts.mpv-radio
|
scripts.mpv-radio
|
||||||
@@ -230,7 +233,7 @@ in {
|
|||||||
]))
|
]))
|
||||||
python3Packages.poetry
|
python3Packages.poetry
|
||||||
|
|
||||||
html-tidy
|
htmlTidy
|
||||||
nodePackages.csslint
|
nodePackages.csslint
|
||||||
nodePackages.jsonlint
|
nodePackages.jsonlint
|
||||||
nodePackages.prettier
|
nodePackages.prettier
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (import <niveum/lib>) sshPort kieran;
|
inherit (import <niveum/lib>) sshPort kieran;
|
||||||
externalNetwork = import <niveum/lib/external-network.nix>;
|
|
||||||
in {
|
in {
|
||||||
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
|
services.xserver.displayManager.sessionCommands = "${pkgs.openssh}/bin/ssh-add";
|
||||||
|
|
||||||
@@ -26,12 +25,7 @@ in {
|
|||||||
port = sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
makanek = {
|
makanek = {
|
||||||
hostname = externalNetwork.makanek;
|
hostname = "makanek.r";
|
||||||
user = "root";
|
|
||||||
port = sshPort;
|
|
||||||
};
|
|
||||||
ful = {
|
|
||||||
hostname = externalNetwork.ful;
|
|
||||||
user = "root";
|
user = "root";
|
||||||
port = sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
@@ -45,6 +39,11 @@ in {
|
|||||||
user = "kfm";
|
user = "kfm";
|
||||||
port = sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
|
toum = {
|
||||||
|
hostname = "toum.r";
|
||||||
|
user = "root";
|
||||||
|
port = sshPort;
|
||||||
|
};
|
||||||
kabsa = {
|
kabsa = {
|
||||||
hostname = "kabsa.r";
|
hostname = "kabsa.r";
|
||||||
user = "kfm";
|
user = "kfm";
|
||||||
@@ -58,6 +57,10 @@ in {
|
|||||||
hostname = "135.181.85.233";
|
hostname = "135.181.85.233";
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
|
oracle = {
|
||||||
|
hostname = "130.61.171.199";
|
||||||
|
user = "ubuntu";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,9 @@
|
|||||||
{
|
{
|
||||||
config,
|
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
unstable = import <nixos-unstable> {inherit (config.nixpkgs) config;};
|
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||||
|
|
||||||
toSymbols = pkgs.writers.writeDash "to-symbols" ''
|
toSymbols = pkgs.writers.writeDash "to-symbols" ''
|
||||||
${pkgs.gnused}/bin/sed '
|
${pkgs.gnused}/bin/sed '
|
||||||
s/\bTri\b/△/;
|
s/\bTri\b/△/;
|
||||||
@@ -52,8 +50,8 @@ in {
|
|||||||
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
|
now=$(${pkgs.coreutils}/bin/date +%_H:%M | ${pkgs.gnused}/bin/sed 's/^\s*//')
|
||||||
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
|
date=$(${pkgs.coreutils}/bin/date +'%m %d %Y')
|
||||||
{
|
{
|
||||||
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
|
${nixpkgs-unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
|
||||||
${unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
|
${nixpkgs-unstable.astrolog}/bin/astrolog -Yt -Yd -q 10 22 1999 6:32 -zN Kassel -td $date -R Uranus Neptune Pluto "North Node"
|
||||||
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
|
} | ${toSymbols} | ${pkgs.coreutils}/bin/sort -n | ${pkgs.gnugrep}/bin/grep "^$now" || :
|
||||||
'');
|
'');
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,12 +20,4 @@ in {
|
|||||||
parseMode = "Markdown";
|
parseMode = "Markdown";
|
||||||
command = "${autorenkalender}/bin/autorenkalender";
|
command = "${autorenkalender}/bin/autorenkalender";
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Autorenkalender";
|
|
||||||
description = "sends <a href=\"https://www.projekt-gutenberg.org/\">Projekt Gutenberg</a>'s anniversary information to Telegram.";
|
|
||||||
link = "https://t.me/Autorenkalender";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,24 +26,6 @@ in {
|
|||||||
inherit path;
|
inherit path;
|
||||||
}) [reverseDirectory proverbDirectory];
|
}) [reverseDirectory proverbDirectory];
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Rückwarts-Bot";
|
|
||||||
link = "https://t.me/RueckwaertsBot";
|
|
||||||
description = "reverses things on Telegram.";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
title = "BetaCode-Bot";
|
|
||||||
link = "https://t.me/BetaCodeBot";
|
|
||||||
description = "converts <a href=\"https://en.wikipedia.org/wiki/Beta_Code\">beta code</a> to polytonic Greek on Telegram.";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
title = "Sprichwortgenerator-Bot";
|
|
||||||
link = "https://t.me/SprichwortGeneratorBot";
|
|
||||||
description = "generates useless German proverbs with optional stock photo background on Telegram.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services.telegram-reverse = {
|
systemd.services.telegram-reverse = {
|
||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
description = "Telegram reverse bot";
|
description = "Telegram reverse bot";
|
||||||
|
|||||||
@@ -14,11 +14,4 @@ in {
|
|||||||
command = "${literature-quote}/bin/literature-quote";
|
command = "${literature-quote}/bin/literature-quote";
|
||||||
parseMode = "Markdown";
|
parseMode = "Markdown";
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Literature quote bot";
|
|
||||||
description = "sends me and my friends three <a href=\"https://logotheca.xn--kiern-0qa.de/\">logotheca</a> quotes a day.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,12 +34,4 @@ in {
|
|||||||
});
|
});
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always";
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Nachtischsatan-Bot";
|
|
||||||
link = "https://t.me/NachtischsatanBot";
|
|
||||||
description = "*flubberflubber*";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,12 +17,4 @@
|
|||||||
'');
|
'');
|
||||||
parseMode = "Markdown";
|
parseMode = "Markdown";
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Thesaurus Linguae Graecae Word of the Day";
|
|
||||||
description = "sends <a href=\"https://stephanus.tlg.uci.edu/\">TLG</a>'s word of the day to Telegram.";
|
|
||||||
link = "https://t.me/tlgwotd";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,82 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
switch-theme = pkgs.writers.writeDashBin "switch-theme" ''
|
|
||||||
set -efux
|
|
||||||
if [ "$1" = toggle ]; then
|
|
||||||
if [ "$(${pkgs.coreutils}/bin/cat /var/theme/current_theme)" = dark ]; then
|
|
||||||
${placeholder "out"}/bin/switch-theme light
|
|
||||||
else
|
|
||||||
${placeholder "out"}/bin/switch-theme dark
|
|
||||||
fi
|
|
||||||
elif test -e "/etc/themes/$1"; then
|
|
||||||
mkdir -p /var/theme/config
|
|
||||||
${pkgs.rsync}/bin/rsync --chown=${config.users.users.me.name}:users -a --delete "/etc/themes/$1/" /var/theme/config/
|
|
||||||
echo "$1" > /var/theme/current_theme
|
|
||||||
${pkgs.coreutils}/bin/chown ${config.users.users.me.name}:users /var/theme/current_theme
|
|
||||||
${pkgs.xorg.xrdb}/bin/xrdb -merge /var/theme/config/xresources
|
|
||||||
${pkgs.procps}/bin/pkill -HUP xsettingsd
|
|
||||||
else
|
|
||||||
echo "theme $1 not found"
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
in {
|
|
||||||
systemd.services.xsettingsd = {
|
|
||||||
wantedBy = ["multi-user.target"];
|
|
||||||
after = ["display-manager.service"];
|
|
||||||
environment.DISPLAY = ":0";
|
|
||||||
serviceConfig = {
|
|
||||||
ExecStart = "${pkgs.xsettingsd}/bin/xsettingsd -c /var/theme/config/xsettings.conf";
|
|
||||||
User = config.users.users.me.name;
|
|
||||||
Restart = "always";
|
|
||||||
RestartSec = "15s";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
|
||||||
"d /var/theme/ 755 ${config.users.users.me.name} users"
|
|
||||||
];
|
|
||||||
|
|
||||||
environment.systemPackages = [
|
|
||||||
switch-theme
|
|
||||||
pkgs.capitaine-cursors
|
|
||||||
];
|
|
||||||
|
|
||||||
home-manager.users.me = {
|
|
||||||
home.pointerCursor = {
|
|
||||||
name = "capitaine-cursors-white";
|
|
||||||
package = pkgs.capitaine-cursors;
|
|
||||||
size = 16;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.etc = {
|
|
||||||
"themes/light/xsettings.conf".text = ''
|
|
||||||
Net/ThemeName "Adwaita"
|
|
||||||
'';
|
|
||||||
"themes/light/xresources".text = ''
|
|
||||||
*background: #ffffff
|
|
||||||
*foreground: #000000
|
|
||||||
'';
|
|
||||||
"themes/dark/xsettings.conf".text = ''
|
|
||||||
Net/ThemeName "Adwaita-dark"
|
|
||||||
'';
|
|
||||||
"themes/dark/xresources".text = ''
|
|
||||||
*background: #000000
|
|
||||||
*foreground: #ffffff
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
system.activationScripts.theme.text = ''
|
|
||||||
export DISPLAY=:0
|
|
||||||
if test -e /var/theme/current_theme; then
|
|
||||||
${switch-theme}/bin/switch-theme "$(cat /var/theme/current_theme)" ||
|
|
||||||
${switch-theme}/bin/switch-theme dark
|
|
||||||
else
|
|
||||||
${switch-theme}/bin/switch-theme dark
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
@@ -23,11 +23,6 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
platformTheme = "gtk";
|
platformTheme = "gtk";
|
||||||
};
|
};
|
||||||
home.pointerCursor =
|
xsession.pointerCursor = theme.cursor // {size = 16;};
|
||||||
theme.cursor
|
|
||||||
// {
|
|
||||||
size = 16;
|
|
||||||
x11.enable = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
66
flake.lock
generated
66
flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1652776076,
|
"lastModified": 1648297722,
|
||||||
"narHash": "sha256-gzTw/v1vj4dOVbpBSJX4J0DwUR6LIyXo7/SuuTJp1kM=",
|
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "04c1b180862888302ddfb2e3ad9eaa63afc60cf8",
|
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -18,20 +18,20 @@
|
|||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixos-unstable"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653340164,
|
"lastModified": 1648834319,
|
||||||
"narHash": "sha256-t6BPApyasx6FOv2cEVyFBXvkEDrknyUe7bngMbNSBkA=",
|
"narHash": "sha256-i5Aj4Aw64D/A0X6XW5LxSS4XBnYj7gMz+kN4dpsbdk8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "e66f0ff69a6c0698b35034b842c4b68814440778",
|
"rev": "0bdbdea2e26c984b096f4f7d10e3c88536a980b0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "master",
|
"ref": "release-21.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixos-stable"
|
"nixpkgs"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -107,13 +107,13 @@
|
|||||||
"url": "https://cgit.krebsco.de/nix-writers"
|
"url": "https://cgit.krebsco.de/nix-writers"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-stable": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653087707,
|
"lastModified": 1649490789,
|
||||||
"narHash": "sha256-zfno3snrzZTWQ2B7K53QHrGZwrjnJLTRPalymrSsziU=",
|
"narHash": "sha256-YrhVxwoofZSx/wLZ4GYET//8vS+uqWX572zvdmP/Etg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cbd40c72b2603ab54e7208f99f9b35fc158bc009",
|
"rev": "c86185d20d708013caf97a6adaa8dc6d72313c75",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -123,18 +123,18 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653060744,
|
"lastModified": 1649541735,
|
||||||
"narHash": "sha256-kfRusllRumpt33J1hPV+CeCCylCXEU7e0gn2/cIM7cY=",
|
"narHash": "sha256-JdOywA2jcdGCxNgu0dJA7ZNtaV7sS0HwuZg9YaXd94c=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dfd82985c273aac6eced03625f454b334daae2e8",
|
"rev": "c2b6e029cd1efa0efd37daab89264ef040ae5669",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-unstable",
|
"ref": "master",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -158,11 +158,11 @@
|
|||||||
"retiolum": {
|
"retiolum": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653484169,
|
"lastModified": 1647444524,
|
||||||
"narHash": "sha256-jb4DUq1+cdyLtvUP4T/B6uw9LaN+zFRdA8ViYv/fEic=",
|
"narHash": "sha256-N4T1UXLkYJMQqk65LkTDpW70ujXXeZ9xe5k+LOpznAI=",
|
||||||
"owner": "krebs",
|
"owner": "krebs",
|
||||||
"repo": "retiolum",
|
"repo": "retiolum",
|
||||||
"rev": "40c6e184cecaae4fe0b4973c6cb8027a66cccaae",
|
"rev": "de6d7dc9bd671e65f2ee3004b6807625e7553e84",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -179,8 +179,8 @@
|
|||||||
"menstruation-backend": "menstruation-backend",
|
"menstruation-backend": "menstruation-backend",
|
||||||
"menstruation-telegram": "menstruation-telegram",
|
"menstruation-telegram": "menstruation-telegram",
|
||||||
"nix-writers": "nix-writers",
|
"nix-writers": "nix-writers",
|
||||||
"nixos-stable": "nixos-stable",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixos-unstable": "nixos-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"recht": "recht",
|
"recht": "recht",
|
||||||
"retiolum": "retiolum",
|
"retiolum": "retiolum",
|
||||||
"scripts": "scripts",
|
"scripts": "scripts",
|
||||||
@@ -194,11 +194,11 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1650993582,
|
"lastModified": 1648400983,
|
||||||
"narHash": "sha256-cKcdHzyy6Y4H9+KcnCgk/Tt1Zqd8lhfiXv4LClcETLc=",
|
"narHash": "sha256-I9ADWgUN1orbnXPBW4kulHpv8wkx6C8zsQcg9wphpPg=",
|
||||||
"owner": "kmein",
|
"owner": "kmein",
|
||||||
"repo": "scripts",
|
"repo": "scripts",
|
||||||
"rev": "c1aaeb4339e9c41057d362667554835a0f49850f",
|
"rev": "f5df67a2416d8f05a7dbfea269c44668854c7887",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -210,11 +210,11 @@
|
|||||||
"stockholm": {
|
"stockholm": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1652980569,
|
"lastModified": 1649089964,
|
||||||
"narHash": "sha256-LJcveSM7m3YBzF7F9jpfQtEbkuHX86QdE0DDdPiX0Yg=",
|
"narHash": "sha256-ybuVI8rnpMyBUoyoIXJ1e3QBMBIOoEgKTiFzIPfzy8A=",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"rev": "5befc5a6f260e2283863212b39749d5ed05afb63",
|
"rev": "b3833baee96d7bce2c54295110b40c646468a1ff",
|
||||||
"revCount": 10545,
|
"revCount": 10500,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://cgit.lassul.us/stockholm"
|
"url": "https://cgit.lassul.us/stockholm"
|
||||||
},
|
},
|
||||||
@@ -242,11 +242,11 @@
|
|||||||
"tinc-graph": {
|
"tinc-graph": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1653080212,
|
"lastModified": 1639820904,
|
||||||
"narHash": "sha256-BcfppAuVNp0hMcrMG/ZxE4juSrdQbJSUIA0eHS1/Wxo=",
|
"narHash": "sha256-d4s2PulBGIIQXtX7blZz+Wnmij5dK/IrBcilNGjqZC4=",
|
||||||
"owner": "kmein",
|
"owner": "kmein",
|
||||||
"repo": "tinc-graph",
|
"repo": "tinc-graph",
|
||||||
"rev": "ea0ef2e5542684d1d8e34a626cb9295dec33e70d",
|
"rev": "1b9c69ffdbdab82d30a23e44f739feea63d94163",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
61
flake.nix
61
flake.nix
@@ -2,17 +2,16 @@
|
|||||||
description = "niveum: packages, modules, systems";
|
description = "niveum: packages, modules, systems";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixos-stable.url = "github:NixOS/nixpkgs/nixos-21.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
|
||||||
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
||||||
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/master";
|
url = "github:nix-community/home-manager/release-21.11";
|
||||||
inputs.nixpkgs.follows = "nixos-unstable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
krops = {
|
krops = {
|
||||||
url = "github:Mic92/krops";
|
url = "github:Mic92/krops";
|
||||||
inputs.nixpkgs.follows = "nixos-stable";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -71,8 +70,8 @@
|
|||||||
menstruation-backend,
|
menstruation-backend,
|
||||||
menstruation-telegram,
|
menstruation-telegram,
|
||||||
nix-writers,
|
nix-writers,
|
||||||
nixos-unstable,
|
nixpkgs,
|
||||||
nixos-stable,
|
nixpkgs-unstable,
|
||||||
recht,
|
recht,
|
||||||
retiolum,
|
retiolum,
|
||||||
scripts,
|
scripts,
|
||||||
@@ -83,12 +82,8 @@
|
|||||||
tuna,
|
tuna,
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixos-stable.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
source = {
|
source = name:
|
||||||
sources,
|
|
||||||
unstable,
|
|
||||||
name,
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
niveum.file = toString ./.;
|
niveum.file = toString ./.;
|
||||||
nixos-config.symlink = "niveum/systems/${name}/configuration.nix";
|
nixos-config.symlink = "niveum/systems/${name}/configuration.nix";
|
||||||
@@ -100,53 +95,31 @@
|
|||||||
dir = toString ~/.password-store;
|
dir = toString ~/.password-store;
|
||||||
name = "shared";
|
name = "shared";
|
||||||
};
|
};
|
||||||
nixpkgs.file = toString (
|
|
||||||
if unstable
|
|
||||||
then inputs.nixos-unstable
|
|
||||||
else inputs.nixos-stable
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
// nixos-stable.lib.mapAttrs' (name: value: {
|
// nixpkgs.lib.mapAttrs' (name: value: {
|
||||||
inherit name;
|
inherit name;
|
||||||
value.file = toString value;
|
value.file = toString value;
|
||||||
}) (nixos-stable.lib.filterAttrs (name: _: builtins.elem name sources) inputs);
|
}) (nixpkgs.lib.filterAttrs (name: _: !builtins.elem name ["flake-utils" "krops" "self"]) inputs);
|
||||||
deployScriptFor = {
|
deployScriptFor = {
|
||||||
name,
|
name,
|
||||||
user ? "root",
|
|
||||||
host,
|
host,
|
||||||
unstable ? false,
|
}: let
|
||||||
sshPort ? (import ./lib/default.nix).sshPort,
|
inherit (import ./lib/default.nix) sshPort;
|
||||||
sources,
|
in
|
||||||
}:
|
|
||||||
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
||||||
source = krops.lib.evalSource [(source {inherit sources unstable name;})];
|
source = krops.lib.evalSource [(source name)];
|
||||||
target = "${user}@${host}:${toString sshPort}";
|
target = "root@${host}:${toString sshPort}";
|
||||||
});
|
});
|
||||||
in {
|
in {
|
||||||
apps.${system} = let
|
apps.${system} = let
|
||||||
forSystems = f: builtins.listToAttrs (map f (builtins.attrNames (builtins.readDir ./systems)));
|
forSystems = f: builtins.listToAttrs (map f (builtins.attrNames (builtins.readDir ./systems)));
|
||||||
externalNetwork = import ./lib/external-network.nix;
|
|
||||||
deployScripts = forSystems (name: {
|
deployScripts = forSystems (name: {
|
||||||
name = "deploy-${name}";
|
name = "deploy-${name}";
|
||||||
value = {
|
value = {
|
||||||
type = "app";
|
type = "app";
|
||||||
program = deployScriptFor {
|
program = deployScriptFor {
|
||||||
inherit name;
|
inherit name;
|
||||||
host =
|
host = "${name}.r";
|
||||||
if externalNetwork ? name
|
|
||||||
then externalNetwork.${name}
|
|
||||||
else "${name}.r";
|
|
||||||
unstable = name == "kabsa" || name == "manakish";
|
|
||||||
sources =
|
|
||||||
["nix-writers" "nixpkgs" "retiolum"]
|
|
||||||
++ {
|
|
||||||
zaatar = ["traadfri"];
|
|
||||||
ful = [];
|
|
||||||
kabsa = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
|
|
||||||
manakish = ["traadfri" "nixos-unstable" "home-manager" "menstruation-backend" "recht"];
|
|
||||||
makanek = ["nixos-unstable" "menstruation-telegram" "menstruation-backend" "scripts" "telebots" "tinc-graph"];
|
|
||||||
}
|
|
||||||
.${name};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
black = {
|
|
||||||
dark = "#000000";
|
|
||||||
bright = "#323232";
|
|
||||||
};
|
|
||||||
red = {
|
|
||||||
dark = "#ff3333";
|
|
||||||
bright = "#ff6565";
|
|
||||||
};
|
|
||||||
green = {
|
|
||||||
dark = "#b8cc52";
|
|
||||||
bright = "#e9fe83";
|
|
||||||
};
|
|
||||||
yellow = {
|
|
||||||
dark = "#e6c446";
|
|
||||||
bright = "#fff778";
|
|
||||||
};
|
|
||||||
blue = {
|
|
||||||
dark = "#36a3d9";
|
|
||||||
bright = "#68d4ff";
|
|
||||||
};
|
|
||||||
magenta = {
|
|
||||||
dark = "#f07078";
|
|
||||||
bright = "#ffa3aa";
|
|
||||||
};
|
|
||||||
cyan = {
|
|
||||||
dark = "#95e5cb";
|
|
||||||
bright = "#c7fffc";
|
|
||||||
};
|
|
||||||
white = {
|
|
||||||
dark = "#ffffff";
|
|
||||||
bright = "#ffffff";
|
|
||||||
};
|
|
||||||
background = "#0e1419";
|
|
||||||
foreground = "#e5e1cf";
|
|
||||||
cursor = "#f19618";
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
{
|
|
||||||
black = {
|
|
||||||
dark = "#000000";
|
|
||||||
bright = "#323232";
|
|
||||||
};
|
|
||||||
red = {
|
|
||||||
dark = "#ff3333";
|
|
||||||
bright = "#ff6565";
|
|
||||||
};
|
|
||||||
green = {
|
|
||||||
dark = "#86b200";
|
|
||||||
bright = "#b8e532";
|
|
||||||
};
|
|
||||||
yellow = {
|
|
||||||
dark = "#f19618";
|
|
||||||
bright = "#ffc849";
|
|
||||||
};
|
|
||||||
blue = {
|
|
||||||
dark = "#41a6d9";
|
|
||||||
bright = "#73d7ff";
|
|
||||||
};
|
|
||||||
magenta = {
|
|
||||||
dark = "#f07078";
|
|
||||||
bright = "#ffa3aa";
|
|
||||||
};
|
|
||||||
cyan = {
|
|
||||||
dark = "#4cbe99";
|
|
||||||
bright = "#7ff0cb";
|
|
||||||
};
|
|
||||||
white = {
|
|
||||||
dark = "#ffffff";
|
|
||||||
bright = "#ffffff";
|
|
||||||
};
|
|
||||||
background = "#fafafa";
|
|
||||||
foreground = "#5b6673";
|
|
||||||
cursor = "#ff6900";
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
pkgs: rec {
|
pkgs: rec {
|
||||||
terminal = "alacritty";
|
terminal = "${pkgs.alacritty}/bin/alacritty";
|
||||||
browser = "${pkgs.brave}/bin/brave";
|
browser = "${pkgs.brave}/bin/brave";
|
||||||
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
|
fileManager = "${terminal} -e ${pkgs.ranger}/bin/ranger";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ rec {
|
|||||||
serveHtml = file: pkgs: ''
|
serveHtml = file: pkgs: ''
|
||||||
default_type "text/html";
|
default_type "text/html";
|
||||||
root ${
|
root ${
|
||||||
pkgs.linkFarm "www" [
|
pkgs.linkFarm "fahrplan" [
|
||||||
{
|
{
|
||||||
name = "index.html";
|
name = "index.html";
|
||||||
path = file;
|
path = file;
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
{
|
|
||||||
ful = "130.61.217.114";
|
|
||||||
makanek = "88.99.83.173";
|
|
||||||
}
|
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
const newsEndpoint = "http://radio-news.r";
|
const newsEndpoint = "http://prism.r:7999";
|
||||||
|
|
||||||
function isoString(date) {
|
function isoString(date) {
|
||||||
return date.toISOString().slice(0, -5) + "Z";
|
return date.toISOString().slice(0, -5) + "Z";
|
||||||
@@ -103,28 +103,15 @@
|
|||||||
request.open("POST", newsEndpoint, false); // synchronous
|
request.open("POST", newsEndpoint, false); // synchronous
|
||||||
request.send(
|
request.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
from: formData.get("from") + ":00Z",
|
from: isoString(new Date(formData.get("from"))),
|
||||||
to: formData.get("to") + ":00Z",
|
to: isoString(new Date(formData.get("to"))),
|
||||||
text: formData.get("text"),
|
text: formData.get("text"),
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
location.reload();
|
location.reload();
|
||||||
}
|
}
|
||||||
|
|
||||||
function setDate() {
|
|
||||||
let now = new Date();
|
|
||||||
document.getElementById("time-from").value = now
|
|
||||||
.toISOString()
|
|
||||||
.slice(0, 16);
|
|
||||||
|
|
||||||
now.setHours(now.getHours() + 1);
|
|
||||||
document.getElementById("time-to").value = now
|
|
||||||
.toISOString()
|
|
||||||
.slice(0, 16);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.onload = () => {
|
window.onload = () => {
|
||||||
setDate();
|
|
||||||
setNextNews();
|
setNextNews();
|
||||||
fetchNews();
|
fetchNews();
|
||||||
};
|
};
|
||||||
@@ -135,10 +122,10 @@
|
|||||||
<section>
|
<section>
|
||||||
<h1>Submit news</h1>
|
<h1>Submit news</h1>
|
||||||
<form onsubmit="sendNews(event)">
|
<form onsubmit="sendNews(event)">
|
||||||
<label>Start date (UTC)</label>
|
<label>Start date</label>
|
||||||
<input type="datetime-local" id="time-from" name="from" required />
|
<input type="datetime-local" name="from" required />
|
||||||
<label>End date (UTC)</label>
|
<label>End date</label>
|
||||||
<input type="datetime-local" id="time-to" name="to" required />
|
<input type="datetime-local" name="to" required />
|
||||||
<label>News text</label>
|
<label>News text</label>
|
||||||
<textarea name="text" rows="10" required></textarea>
|
<textarea name="text" rows="10" required></textarea>
|
||||||
<input type="submit" />
|
<input type="submit" />
|
||||||
|
|||||||
@@ -4,11 +4,6 @@
|
|||||||
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
ipv6 = "42:0:3c46:861f:a118:8e9a:82c9:3d";
|
||||||
};
|
};
|
||||||
|
|
||||||
ful = {
|
|
||||||
ipv4 = "10.243.2.107";
|
|
||||||
ipv6 = "42:0:3c46:2c8b:a564:1213:9fb4:1bc4";
|
|
||||||
};
|
|
||||||
|
|
||||||
zaatar = {
|
zaatar = {
|
||||||
ipv4 = "10.243.2.34";
|
ipv4 = "10.243.2.34";
|
||||||
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
ipv6 = "42:0:3c46:156e:10b6:3bd6:6e82:b2cd";
|
||||||
|
|||||||
@@ -1,135 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.niveum.passport;
|
|
||||||
sortOn = a: lib.sort (as1: as2: lib.lessThan (lib.getAttr a as1) (lib.getAttr a as2));
|
|
||||||
css = ''
|
|
||||||
body {
|
|
||||||
margin: 0;
|
|
||||||
font-family: "Fira Sans Condensed", sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
main {
|
|
||||||
margin: 0 auto;
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 1fr 3fr;
|
|
||||||
grid-gap: 2em;
|
|
||||||
}
|
|
||||||
@media only screen and (max-width: 768px) {
|
|
||||||
main {
|
|
||||||
grid-template-columns: 1fr;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
footer, section {
|
|
||||||
padding: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
footer {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
dl {
|
|
||||||
border: 3px double #ccc;
|
|
||||||
padding: 0.5em;
|
|
||||||
}
|
|
||||||
dt {
|
|
||||||
float: left;
|
|
||||||
clear: left;
|
|
||||||
width: 200px;
|
|
||||||
text-align: right;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-right: 1em;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
dd {
|
|
||||||
margin: 0 0 0 110px;
|
|
||||||
padding: 0 0 0.5em 0;
|
|
||||||
margin-bottom: 1em;
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
in
|
|
||||||
with lib; {
|
|
||||||
options.niveum.passport = {
|
|
||||||
enable = mkEnableOption "server passport";
|
|
||||||
|
|
||||||
introductionHTML = mkOption {type = types.str;};
|
|
||||||
|
|
||||||
virtualHost = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
|
|
||||||
services = mkOption {
|
|
||||||
type = types.listOf (types.submodule {
|
|
||||||
options = {
|
|
||||||
title = mkOption {type = types.str;};
|
|
||||||
link = mkOption {
|
|
||||||
type = types.nullOr types.str;
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
description = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
});
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
services.nginx.enable = true;
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."${cfg.virtualHost}".locations."/passport".extraConfig = ''
|
|
||||||
default_type "text/html";
|
|
||||||
root ${
|
|
||||||
pkgs.linkFarm "www" [
|
|
||||||
{
|
|
||||||
name = "passport/index.html";
|
|
||||||
path = pkgs.writeText "index.html" ''
|
|
||||||
<!doctype html>
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
||||||
<title>${config.networking.hostName} passport</title>
|
|
||||||
<style>${css}</style>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<main>
|
|
||||||
<section id="server">
|
|
||||||
<h1>${config.networking.hostName}</h1>
|
|
||||||
${cfg.introductionHTML}
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section id="services">
|
|
||||||
<h2>Services</h2>
|
|
||||||
<dl>
|
|
||||||
${lib.strings.concatMapStringsSep "\n" (service: ''
|
|
||||||
<dt>
|
|
||||||
${lib.optionalString (service.link != null) "<a href=\"${service.link}\">"}
|
|
||||||
${service.title}
|
|
||||||
${lib.optionalString (service.link != null) "</a>"}
|
|
||||||
</dt>
|
|
||||||
<dd>
|
|
||||||
${service.description}
|
|
||||||
</dd>
|
|
||||||
'') (sortOn "title" cfg.services)}
|
|
||||||
</dl>
|
|
||||||
</section>
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer>
|
|
||||||
<tt>${config.networking.hostName}</tt> is part of the <i><a href="https://github.com/kmein/niveum/tree/master/systems/${config.networking.hostName}">niveum</a></i> network.
|
|
||||||
</footer>
|
|
||||||
</body>
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
]
|
|
||||||
};
|
|
||||||
index index.html;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -39,15 +39,5 @@ in
|
|||||||
GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j";
|
GFS_Pyrsos = "0y0dv7y3n01bbhhnczflx1zcc7by56cffmr2xqixj2rd1nvchx0j";
|
||||||
GFS_Solomos = "1mpx9mw566awvfjdfx5sbz3wz5gbnjjw56gz30mk1lw06vxf0dxz";
|
GFS_Solomos = "1mpx9mw566awvfjdfx5sbz3wz5gbnjjw56gz30mk1lw06vxf0dxz";
|
||||||
GFS_Theokritos = "0haasx819x8c8yvna6pqywgi4060av2570jm34cddnz1fgnhv1b8";
|
GFS_Theokritos = "0haasx819x8c8yvna6pqywgi4060av2570jm34cddnz1fgnhv1b8";
|
||||||
# Heraklit
|
|
||||||
# Galatea
|
|
||||||
# Georgiou
|
|
||||||
# Ambrosia
|
|
||||||
# Fleischman
|
|
||||||
# Eustace
|
|
||||||
# Nicefore
|
|
||||||
# Jackson
|
|
||||||
# Garaldus
|
|
||||||
# Ignacio
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,54 +0,0 @@
|
|||||||
#!/usr/bin/env -S sed -f
|
|
||||||
s/ā̊/𐬃/g
|
|
||||||
s/t̰/𐬝/g
|
|
||||||
s/ṣ̌/𐬴/g
|
|
||||||
s/š́/𐬳/g
|
|
||||||
s/ą̄/𐬅/g
|
|
||||||
s/ŋᵛ/𐬤/g
|
|
||||||
s/ə̄/𐬇/g
|
|
||||||
s/ŋ́/𐬣/g
|
|
||||||
s/x́/𐬒/g
|
|
||||||
s/xᵛ/𐬓/g
|
|
||||||
s/a/𐬀/g
|
|
||||||
s/ā/𐬁/g
|
|
||||||
s/å/𐬂/g
|
|
||||||
s/ą/𐬄/g
|
|
||||||
s/ə/𐬆/g
|
|
||||||
s/e/𐬈/g
|
|
||||||
s/ē/𐬉/g
|
|
||||||
s/o/𐬊/g
|
|
||||||
s/ō/𐬋/g
|
|
||||||
s/i/𐬌/g
|
|
||||||
s/ī/𐬍/g
|
|
||||||
s/u/𐬎/g
|
|
||||||
s/ū/𐬏/g
|
|
||||||
s/k/𐬐/g
|
|
||||||
s/x/𐬑/g
|
|
||||||
s/g/𐬔/g
|
|
||||||
s/ġ/𐬕/g
|
|
||||||
s/γ/𐬖/g
|
|
||||||
s/c/𐬗/g
|
|
||||||
s/j/𐬘/g
|
|
||||||
s/t/𐬙/g
|
|
||||||
s/θ/𐬚/g
|
|
||||||
s/d/𐬛/g
|
|
||||||
s/δ/𐬜/g
|
|
||||||
s/p/𐬞/g
|
|
||||||
s/f/𐬟/g
|
|
||||||
s/b/𐬠/g
|
|
||||||
s/β/𐬡/g
|
|
||||||
s/ŋ/𐬢/g
|
|
||||||
s/n/𐬥/g
|
|
||||||
s/ń/𐬦/g
|
|
||||||
s/ṇ/𐬧/g
|
|
||||||
s/m/𐬨/g
|
|
||||||
s/m̨/𐬩/g
|
|
||||||
s/ẏ/𐬪/g
|
|
||||||
s/y/𐬫/g
|
|
||||||
s/v/𐬬/g
|
|
||||||
s/r/𐬭/g
|
|
||||||
s/s/𐬯/g
|
|
||||||
s/z/𐬰/g
|
|
||||||
s/š/𐬱/g
|
|
||||||
s/ž/𐬲/g
|
|
||||||
s/h/𐬵/g
|
|
||||||
@@ -117,7 +117,7 @@ in
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
tag = wrapScript {
|
tag = wrapScript {
|
||||||
packages = [pkgs.vorbis-tools pkgs.python3Packages.eyeD3 opustags];
|
packages = [pkgs.vorbisTools pkgs.python3Packages.eyeD3 opustags];
|
||||||
script = "${voidrice}/.local/bin/tag";
|
script = "${voidrice}/.local/bin/tag";
|
||||||
name = "tag";
|
name = "tag";
|
||||||
};
|
};
|
||||||
@@ -307,11 +307,16 @@ in
|
|||||||
packages = [pkgs.xdo];
|
packages = [pkgs.xdo];
|
||||||
};
|
};
|
||||||
|
|
||||||
ipa = wrapScript {
|
ipa =
|
||||||
script = ./ipa.py;
|
pkgs.writers.writeHaskellBin "ipa" {
|
||||||
name = "ipa";
|
libraries = with pkgs; [haskellPackages.text haskellPackages.ipa];
|
||||||
packages = [pkgs.python3];
|
} ''
|
||||||
};
|
import Data.Maybe (fromJust)
|
||||||
|
import Language.IPA
|
||||||
|
import qualified Data.Text as T
|
||||||
|
import qualified Data.Text.IO as T
|
||||||
|
main = T.interact (T.unwords . map (unIPA . fromJust . (xSampaToIpa =<<) . mkXSampa) . T.words)
|
||||||
|
'';
|
||||||
|
|
||||||
default-gateway = pkgs.writers.writeDashBin "default-gateway" ''
|
default-gateway = pkgs.writers.writeDashBin "default-gateway" ''
|
||||||
${pkgs.iproute}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway'
|
${pkgs.iproute}/bin/ip -json route | ${pkgs.jq}/bin/jq --raw-output '.[0].gateway'
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
curl -sSL 'https://diac.alsharekh.org/Diac/DiacText' \
|
|
||||||
-H "Content-Type: application/json" \
|
|
||||||
--data-raw "$(jq --raw-input '{word: ., type: 1}')" \
|
|
||||||
--compressed \
|
|
||||||
| jq -r .diacWord
|
|
||||||
@@ -39,12 +39,6 @@
|
|||||||
"make it stooop"
|
"make it stooop"
|
||||||
"noooo"
|
"noooo"
|
||||||
];
|
];
|
||||||
|
|
||||||
messages.neutral = [
|
|
||||||
"meh"
|
|
||||||
"i have no opinion about this song"
|
|
||||||
"idk man"
|
|
||||||
];
|
|
||||||
in
|
in
|
||||||
pkgs.writers.writeDashBin "pls" ''
|
pkgs.writers.writeDashBin "pls" ''
|
||||||
case "$1" in
|
case "$1" in
|
||||||
@@ -56,9 +50,6 @@ in
|
|||||||
${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip"
|
${pkgs.curl}/bin/curl -sS -XPOST "${playlistAPI}/skip"
|
||||||
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC}
|
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.bad)} | shuf -n1 | ${sendIRC}
|
||||||
;;
|
;;
|
||||||
0|meh|neutral)
|
|
||||||
echo ${lib.escapeShellArg (lib.concatStringsSep "\n" messages.neutral)} | shuf -n1 | ${sendIRC}
|
|
||||||
;;
|
|
||||||
say|msg)
|
say|msg)
|
||||||
shift
|
shift
|
||||||
echo "$@" | ${sendIRC}
|
echo "$@" | ${sendIRC}
|
||||||
|
|||||||
@@ -75,9 +75,8 @@
|
|||||||
in
|
in
|
||||||
# ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
|
# ref https://github.com/LukeSmithxyz/voidrice/blob/9fe6802122f6e0392c7fe20eefd30437771d7f8e/.local/bin/dmenuunicode
|
||||||
writers.writeDashBin "unicodmenu" ''
|
writers.writeDashBin "unicodmenu" ''
|
||||||
history_file=$HOME/.cache/unicodmenu
|
|
||||||
PATH=${lib.makeBinPath [coreutils dmenu gnused libnotify xclip xdotool]}
|
PATH=${lib.makeBinPath [coreutils dmenu gnused libnotify xclip xdotool]}
|
||||||
chosen=$(cat "$history_file" ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | tee --append "$history_file" | sed "s/ .*//")
|
chosen=$(cat ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | sed "s/ .*//")
|
||||||
|
|
||||||
[ "$chosen" != "" ] || exit
|
[ "$chosen" != "" ] || exit
|
||||||
|
|
||||||
|
|||||||
@@ -1,48 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (import <niveum/lib>) kieran retiolumAddresses;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
# <niveum/configs/monitoring.nix>
|
|
||||||
<niveum/configs/nix.nix>
|
|
||||||
<niveum/configs/save-space.nix>
|
|
||||||
<niveum/configs/spacetime.nix>
|
|
||||||
<niveum/configs/sshd.nix>
|
|
||||||
<niveum/modules/retiolum.nix>
|
|
||||||
];
|
|
||||||
|
|
||||||
nix.nixPath = ["/var/src"];
|
|
||||||
|
|
||||||
networking = {
|
|
||||||
firewall.allowedTCPPorts = [80 443];
|
|
||||||
hostName = "ful";
|
|
||||||
interfaces.enp0s3.useDHCP = true;
|
|
||||||
retiolum = retiolumAddresses.ful;
|
|
||||||
useDHCP = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
system.stateVersion = "21.11";
|
|
||||||
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
recommendedGzipSettings = true;
|
|
||||||
recommendedOptimisation = true;
|
|
||||||
recommendedProxySettings = true;
|
|
||||||
recommendedTlsSettings = true;
|
|
||||||
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
|
|
||||||
};
|
|
||||||
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
email = kieran.email;
|
|
||||||
};
|
|
||||||
|
|
||||||
users.users.root.passwordFile = toString <system-secrets/root.password>;
|
|
||||||
|
|
||||||
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
|
|
||||||
}
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [<nixpkgs/nixos/modules/profiles/qemu-guest.nix>];
|
|
||||||
|
|
||||||
boot = {
|
|
||||||
loader = {
|
|
||||||
systemd-boot = {
|
|
||||||
enable = true;
|
|
||||||
configurationLimit = 1;
|
|
||||||
};
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
initrd = {
|
|
||||||
availableKernelModules = ["virtio_pci" "usbhid"];
|
|
||||||
kernelModules = ["bochs_drm"];
|
|
||||||
};
|
|
||||||
kernelModules = [
|
|
||||||
"console=ttyS0"
|
|
||||||
"console=tty1"
|
|
||||||
"nvme.shutdown_timeout=10"
|
|
||||||
"libiscsi.debug_libiscsi_eh=1"
|
|
||||||
];
|
|
||||||
extraModulePackages = [];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-uuid/9bf751c7-cf32-49fb-9354-17694c7a46e0";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
|
||||||
device = "/dev/disk/by-uuid/7817-285D";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [];
|
|
||||||
}
|
|
||||||
@@ -31,7 +31,6 @@ in {
|
|||||||
<niveum/configs/sshd.nix>
|
<niveum/configs/sshd.nix>
|
||||||
<niveum/configs/telegram-bots>
|
<niveum/configs/telegram-bots>
|
||||||
<niveum/modules/retiolum.nix>
|
<niveum/modules/retiolum.nix>
|
||||||
<niveum/modules/passport.nix>
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.restic.backups.niveum = {
|
services.restic.backups.niveum = {
|
||||||
@@ -53,30 +52,6 @@ in {
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport = {
|
|
||||||
enable = true;
|
|
||||||
introductionHTML = ''
|
|
||||||
<p>
|
|
||||||
The machine <tt>makanek</tt> is named after a Levantine type of <a href="https://en.wikipedia.org/wiki/Makanek">sausage</a> (مقانق <i>maqāniq</i>).
|
|
||||||
</p>
|
|
||||||
<p>
|
|
||||||
It runs on <a href="https://www.hetzner.com/cloud">Hetzner cloud</a>.
|
|
||||||
</p>
|
|
||||||
<figure>
|
|
||||||
<img width="200" src="https://www.albawaba.com/sites/default/files/2019-08/makanek-BeFunky-project.jpg" alt="Makanek sausages"/>
|
|
||||||
<figcaption>Makanek</figcaption>
|
|
||||||
</figure>
|
|
||||||
'';
|
|
||||||
virtualHost = "makanek.r";
|
|
||||||
|
|
||||||
services = [
|
|
||||||
{
|
|
||||||
title = "restic backup";
|
|
||||||
description = "This machine backups its state via restic backup.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
nix.nixPath = ["/var/src"];
|
nix.nixPath = ["/var/src"];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
|||||||
@@ -1,25 +1,13 @@
|
|||||||
let
|
{
|
||||||
inherit (import <niveum/lib>) sshPort;
|
|
||||||
domain = "https://code.kmein.de";
|
|
||||||
in {
|
|
||||||
services.gitea = {
|
services.gitea = {
|
||||||
enable = true;
|
enable = true;
|
||||||
disableRegistration = true;
|
disableRegistration = true;
|
||||||
rootUrl = domain;
|
rootUrl = "https://code.kmein.de";
|
||||||
appName = "code.kmein.de";
|
appName = "code.kmein.de";
|
||||||
ssh.clonePort = sshPort;
|
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."code.kmein.de" = {
|
services.nginx.virtualHosts."code.kmein.de" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/".extraConfig = "proxy_pass http://localhost:3000;";
|
locations."/".extraConfig = "proxy_pass http://localhost:3000;";
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
link = domain;
|
|
||||||
title = "Gitea";
|
|
||||||
description = "hosts a couple of <tt>git</tt> repos. Registration is disabled.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
version = 2;
|
version = 2;
|
||||||
devices = ["/dev/sda"];
|
devices = ["/dev/sda"];
|
||||||
configurationLimit = 3;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
}: let
|
}: let
|
||||||
backupLocation = "/var/lib/codimd-backup";
|
backupLocation = "/var/lib/codimd-backup";
|
||||||
stateLocation = "/var/lib/codimd/state.sqlite";
|
stateLocation = "/var/lib/codimd/state.sqlite";
|
||||||
|
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
||||||
domain = "pad.kmein.de";
|
domain = "pad.kmein.de";
|
||||||
inherit (import <niveum/lib>) tmpfilesConfig;
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
in {
|
in {
|
||||||
@@ -47,14 +48,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Hedgedoc";
|
|
||||||
link = "https://${domain}";
|
|
||||||
description = "lets you collaborate on Markdown documents.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
(tmpfilesConfig {
|
(tmpfilesConfig {
|
||||||
user = "codimd";
|
user = "codimd";
|
||||||
@@ -68,7 +61,7 @@ in {
|
|||||||
systemd.services.hedgedoc-backup = {
|
systemd.services.hedgedoc-backup = {
|
||||||
description = "Hedgedoc backup service";
|
description = "Hedgedoc backup service";
|
||||||
script = ''
|
script = ''
|
||||||
${pkgs.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
|
${nixpkgs-unstable.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
|
||||||
| ${
|
| ${
|
||||||
pkgs.writers.writePython3 "hedgedoc-json-to-fs.py" {} ''
|
pkgs.writers.writePython3 "hedgedoc-json-to-fs.py" {} ''
|
||||||
import json
|
import json
|
||||||
|
|||||||
@@ -4,16 +4,16 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services.matterbridge = {
|
services.matterbridge = {
|
||||||
enable = false;
|
enable = true;
|
||||||
configPath = let
|
configPath = let
|
||||||
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/krebs.token>;
|
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||||
in
|
in
|
||||||
toString ((pkgs.formats.toml {}).generate "config.toml" {
|
toString ((pkgs.formats.toml {}).generate "config.toml" {
|
||||||
general = {
|
general = {
|
||||||
RemoteNickFormat = "[{NICK}] ";
|
RemoteNickFormat = "[{NICK}] ";
|
||||||
Charset = "utf-8";
|
Charset = "utf-8";
|
||||||
};
|
};
|
||||||
telegram.krebs.Token = bridgeBotToken;
|
telegram.kmein.Token = bridgeBotToken;
|
||||||
irc = let
|
irc = let
|
||||||
Nick = "ponte";
|
Nick = "ponte";
|
||||||
in {
|
in {
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
channel = "#krebs";
|
channel = "#krebs";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
account = "telegram.krebs";
|
account = "telegram.kmein";
|
||||||
channel = "-330372458";
|
channel = "-330372458";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,14 +11,6 @@ in {
|
|||||||
|
|
||||||
environment.systemPackages = [pkgs.redis];
|
environment.systemPackages = [pkgs.redis];
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Tischlein, deck dich!";
|
|
||||||
description = "serves you with Berlin canteen menus via Telegram.";
|
|
||||||
link = "https://t.me/TischleinDeckDichBot";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services.menstruation-telegram = {
|
systemd.services.menstruation-telegram = {
|
||||||
wants = [
|
wants = [
|
||||||
"network-online.target"
|
"network-online.target"
|
||||||
|
|||||||
@@ -12,12 +12,5 @@
|
|||||||
serviceConfig.DynamicUser = true;
|
serviceConfig.DynamicUser = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "moinbot";
|
|
||||||
description = "greets #hsmr:hackint.org daily.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.timers.moinbot.timerConfig.RandomizedDelaySec = "14h";
|
systemd.timers.moinbot.timerConfig.RandomizedDelaySec = "14h";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,26 +22,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Prometheus";
|
|
||||||
description = "collects metrics from devices in the <i>niveum</i> network, blackbox monitors some websites.";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
title = "Loki";
|
|
||||||
description = "aggregates logs of the <i>niveum</i> network.";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
title = "Grafana";
|
|
||||||
link = "http://${config.services.grafana.domain}";
|
|
||||||
description = "displays metrics from devices in the <i>niveum</i> network.";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
title = "Alertmanager bot";
|
|
||||||
description = "notifies me when something goes wrong.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.prometheus.rules = let
|
services.prometheus.rules = let
|
||||||
diskFreeThreshold = 10;
|
diskFreeThreshold = 10;
|
||||||
in [
|
in [
|
||||||
@@ -240,7 +220,7 @@ in {
|
|||||||
"tarot.kmein.de"
|
"tarot.kmein.de"
|
||||||
"cloud.xn--kiern-0qa.de"
|
"cloud.xn--kiern-0qa.de"
|
||||||
"grafana.kmein.r"
|
"grafana.kmein.r"
|
||||||
# "names.kmein.r"
|
"names.kmein.r"
|
||||||
"rrm.r"
|
"rrm.r"
|
||||||
"graph.r"
|
"graph.r"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -12,13 +12,6 @@
|
|||||||
in {
|
in {
|
||||||
imports = [<niveum/modules/moodle-dl.nix>];
|
imports = [<niveum/modules/moodle-dl.nix>];
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "MoodleDL";
|
|
||||||
description = "notifies about changes on Moodle.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.moodle-dl = {
|
services.moodle-dl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
startAt = "hourly";
|
startAt = "hourly";
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
port = 5703;
|
port = 5703;
|
||||||
onomap-src = "${<scripts>}/onomastics-ng";
|
geogen-src = "${<scripts>}/onomastics";
|
||||||
onomap = pkgs.haskellPackages.callCabal2nix "onomap" onomap-src {};
|
geogen = pkgs.callPackage geogen-src {};
|
||||||
in {
|
in {
|
||||||
systemd.services.names = {
|
systemd.services.names = {
|
||||||
wants = ["network-online.target"];
|
wants = ["network-online.target"];
|
||||||
@@ -13,11 +13,12 @@ in {
|
|||||||
description = "Better clone of geogen.stoepel.net";
|
description = "Better clone of geogen.stoepel.net";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
ExecStart = "${onomap}/bin/onomap-web";
|
|
||||||
Restart = "on-failure";
|
|
||||||
RestartSec = "15s";
|
|
||||||
};
|
};
|
||||||
environment.PORT = toString port;
|
script = ''
|
||||||
|
cd $(mktemp -d)
|
||||||
|
ln -s "${geogen-src}/wsgi.py" wsgi.py
|
||||||
|
${geogen.dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
@@ -28,14 +29,6 @@ in {
|
|||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
link = "http://names.kmein.r";
|
|
||||||
title = "Onomap";
|
|
||||||
description = "maps surnames within Germany.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."names.kmein.r" = {
|
services.nginx.virtualHosts."names.kmein.r" = {
|
||||||
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
locations."/".proxyPass = "http://127.0.0.1:${toString port}";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
@@ -34,14 +33,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Nextcloud";
|
|
||||||
link = "https://${config.services.nextcloud.hostName}";
|
|
||||||
description = "manages calendars, to-do lists, files, and recipes.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.postgresql = {
|
services.postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ensureDatabases = ["nextcloud"];
|
ensureDatabases = ["nextcloud"];
|
||||||
|
|||||||
@@ -8,14 +8,6 @@
|
|||||||
in {
|
in {
|
||||||
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml <niveum/lib/radio-news.html> pkgs;
|
services.nginx.virtualHosts."redaktion.r".locations."/".extraConfig = serveHtml <niveum/lib/radio-news.html> pkgs;
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Retiolum Radio News";
|
|
||||||
link = "http://redaktion.r";
|
|
||||||
description = "supplies git history news to radio lassulus and lets you enter your own.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
systemd.services.stockholm-history = {
|
systemd.services.stockholm-history = {
|
||||||
startAt = "hourly";
|
startAt = "hourly";
|
||||||
script = ''
|
script = ''
|
||||||
@@ -25,9 +17,9 @@ in {
|
|||||||
rm -rf "$stockholm"
|
rm -rf "$stockholm"
|
||||||
}
|
}
|
||||||
${pkgs.git}/bin/git clone ${remote} "$stockholm"
|
${pkgs.git}/bin/git clone ${remote} "$stockholm"
|
||||||
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar.' --since "$(${pkgs.coreutils}/bin/date -I -d "yesterday")" \
|
${pkgs.git}/bin/git --git-dir "$stockholm"/.git log --pretty='"%s" by %an, %ar' --since "$(${pkgs.coreutils}/bin/date -I -d "yesterday")" \
|
||||||
| ${pkgs.jq}/bin/jq -R '{text: ., from: now | todateiso8601, to: (now + (60 * 60)) | todateiso8601}' \
|
| ${pkgs.jq}/bin/jq -R '{text: ., from: now | todateiso8601, to: (now + (60 * 60)) | todateiso8601}' \
|
||||||
| ${pkgs.curl}/bin/curl -Ssfd @- http://radio-news.r/
|
| ${pkgs.curl}/bin/curl -Ssfd @- http://prism.r:7999/
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,12 +126,4 @@ in {
|
|||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.icecast.listen.port}";
|
locations."/".proxyPass = "http://127.0.0.1:${toString config.services.icecast.listen.port}";
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "Radio";
|
|
||||||
link = "https://radio.kmein.de";
|
|
||||||
description = "broadcasts a few little (and mostly useless) web-radio stations.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,19 +44,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
link = "http://graph.r";
|
|
||||||
title = "Retiolum Realtime Map";
|
|
||||||
description = "displays geographical information about the retiolum network. <a href=\"http://graph.r/graph.html\">Graph</a> info also available.";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
link = "http://c.r/${geo-ip-database}";
|
|
||||||
title = "GeoIP";
|
|
||||||
description = "shares MaxMind's GeoIP database with the krebs world. Updated weekly.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedGzipSettings = true;
|
recommendedGzipSettings = true;
|
||||||
@@ -70,7 +57,6 @@ in {
|
|||||||
|
|
||||||
systemd.services.geoip-share = {
|
systemd.services.geoip-share = {
|
||||||
after = ["geoipupdate.service"];
|
after = ["geoipupdate.service"];
|
||||||
wantedBy = ["geoipupdate.service"];
|
|
||||||
script = let
|
script = let
|
||||||
cyberlocker-tools = pkgs.callPackage <stockholm/krebs/5pkgs/simple/cyberlocker-tools> {};
|
cyberlocker-tools = pkgs.callPackage <stockholm/krebs/5pkgs/simple/cyberlocker-tools> {};
|
||||||
in "${cyberlocker-tools}/bin/cput ${geo-ip-database} < ${geo-ip-database-path}";
|
in "${cyberlocker-tools}/bin/cput ${geo-ip-database} < ${geo-ip-database-path}";
|
||||||
|
|||||||
@@ -48,14 +48,6 @@ in {
|
|||||||
}'';
|
}'';
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
rec {
|
|
||||||
link = "https://tarot.kmein.de";
|
|
||||||
title = "Tarot";
|
|
||||||
description = "draws Tarot cards for you. See <a href=\"${link}/files/key.pdf\">here</a> for information on how to interpret them.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
services.nginx.virtualHosts."tarot.kmein.de" = {
|
services.nginx.virtualHosts."tarot.kmein.de" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|||||||
@@ -204,11 +204,4 @@ in {
|
|||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
description = "keeps me up-to-date on sites that have no RSS feed (shame be upon them!).";
|
|
||||||
title = "urlwatch";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,11 +185,4 @@ in {
|
|||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
packages = [pkgs.tmux];
|
packages = [pkgs.tmux];
|
||||||
};
|
};
|
||||||
|
|
||||||
niveum.passport.services = [
|
|
||||||
{
|
|
||||||
title = "weechat bouncer";
|
|
||||||
description = "keeps me logged in on IRC.";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,6 @@
|
|||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
efiInstallAsRemovable = true;
|
efiInstallAsRemovable = true;
|
||||||
device = "/dev/sda";
|
device = "/dev/sda";
|
||||||
configurationLimit = 5;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ in {
|
|||||||
./pulseaudio.nix
|
./pulseaudio.nix
|
||||||
./home-assistant.nix
|
./home-assistant.nix
|
||||||
./tuna.nix
|
./tuna.nix
|
||||||
|
./mympd.nix
|
||||||
./grocy.nix
|
./grocy.nix
|
||||||
./spotifyd.nix
|
./spotifyd.nix
|
||||||
<home-manager/nixos>
|
<home-manager/nixos>
|
||||||
|
|||||||
@@ -69,16 +69,6 @@ in {
|
|||||||
108283 # Digital Classicist
|
108283 # Digital Classicist
|
||||||
109211 # Altlitauisch
|
109211 # Altlitauisch
|
||||||
109185 # Etymologie
|
109185 # Etymologie
|
||||||
|
|
||||||
# SS 2022
|
|
||||||
112606 # Avestisch
|
|
||||||
111761 # Griechische Wissenschaftsliteratur
|
|
||||||
111515 # H. Furens
|
|
||||||
110914 # Apostelgeschichte
|
|
||||||
112225 # Gr. Paläographie
|
|
||||||
113275 # ALEW
|
|
||||||
112783 # Akzent und Silbenstruktur
|
|
||||||
113493 # Papyrologie
|
|
||||||
];
|
];
|
||||||
download_submissions = true;
|
download_submissions = true;
|
||||||
download_descriptions = true;
|
download_descriptions = true;
|
||||||
|
|||||||
57
systems/zaatar/mympd.nix
Normal file
57
systems/zaatar/mympd.nix
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{pkgs, ...}: let
|
||||||
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
|
in {
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "d";
|
||||||
|
mode = "0755";
|
||||||
|
user = "mympd";
|
||||||
|
group = "mympd";
|
||||||
|
path = "/var/lib/mympd";
|
||||||
|
})
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "d";
|
||||||
|
mode = "0755";
|
||||||
|
user = "mympd";
|
||||||
|
group = "mympd";
|
||||||
|
age = "1d";
|
||||||
|
path = "/var/cache/mympd";
|
||||||
|
})
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "L+";
|
||||||
|
mode = "0644";
|
||||||
|
user = "mympd";
|
||||||
|
group = "mympd";
|
||||||
|
path = "/var/lib/mympd/config/http_port";
|
||||||
|
argument = pkgs.writeText "port" "8764";
|
||||||
|
})
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "L+";
|
||||||
|
mode = "0644";
|
||||||
|
user = "mympd";
|
||||||
|
group = "mympd";
|
||||||
|
path = "/var/lib/mympd/config/ssl";
|
||||||
|
argument = pkgs.writeText "ssl" "false";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.mympd = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "mympd";
|
||||||
|
};
|
||||||
|
users.groups.mympd = {};
|
||||||
|
|
||||||
|
systemd.services.mympd = {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
after = ["mpd.service"];
|
||||||
|
script = "${pkgs.mympd}/bin/mympd";
|
||||||
|
environment = {
|
||||||
|
MYMPD_HTTP_PORT = "8764";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "always";
|
||||||
|
User = "mympd";
|
||||||
|
Group = "mympd";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user