mirror of
https://github.com/kmein/niveum
synced 2026-03-21 12:21:08 +01:00
Compare commits
102 Commits
tahina
...
eb9e7f534d
| Author | SHA1 | Date | |
|---|---|---|---|
| eb9e7f534d | |||
|
|
64357f4b42 | ||
| 6f31509e50 | |||
| db7cb8c74c | |||
| fbc50a3fea | |||
| 2a33a37d11 | |||
| d7ee9b7c1a | |||
| b142dcdcc3 | |||
| adae22772b | |||
| 0387d5c44b | |||
|
|
72048388dc | ||
| 5253b83eb5 | |||
| 4b073323da | |||
| bf35fb1020 | |||
| 3fa820a65a | |||
| 0ae6397878 | |||
| 35ce4b1689 | |||
| 5b38655575 | |||
| 129127f917 | |||
| 28ee96bc22 | |||
| 238f2126b0 | |||
| 8c1350c570 | |||
| 4d8912b020 | |||
| 588c161f7b | |||
| 5fb0028a9e | |||
| 8d88e58726 | |||
| 203eecddcb | |||
| 2d67488b02 | |||
| 44efc4dfa1 | |||
|
|
e6ac020fd2 | ||
| 9a3499ab6c | |||
| 92442db877 | |||
| d2f85ab972 | |||
| b593f45ec2 | |||
| e9b09a3e67 | |||
| 8c9a44d404 | |||
| 45fdbad259 | |||
| 93b8d31a33 | |||
| abb7924fca | |||
| 0c872352e3 | |||
| 31e765da41 | |||
| d655faef3e | |||
| 2f5b177158 | |||
| 4bc176ea42 | |||
| 4b63d1b671 | |||
| dd86c24506 | |||
| 88c73b23a1 | |||
| 3675ab8161 | |||
|
|
aac1053e1d | ||
| 651f6d9319 | |||
| 69332ec98d | |||
| 6c65a48ea8 | |||
| d25cfe6c9b | |||
| 9cd5974870 | |||
| 8c8eceb01a | |||
| 9601fb9456 | |||
| dc9e84599e | |||
| 94bdfda91b | |||
| 84a69f31de | |||
| dcbe8841ba | |||
| bef795e45c | |||
| 9b7c300466 | |||
| f4fca0a971 | |||
|
|
23b341a314 | ||
| 89c852c4ea | |||
|
|
3fa242b957 | ||
| 35c51b3b17 | |||
| f1c049ada3 | |||
| 8118009acb | |||
| 41706bc84b | |||
| eec7be0c3b | |||
| 2aac2609cb | |||
| 2b7db496b0 | |||
| 0feebd18cd | |||
| 892c758303 | |||
| 8cc3541d2d | |||
| 687aa456d1 | |||
|
|
fd60863f77 | ||
| a60cbab742 | |||
| 54383cb1ab | |||
| 9b414d104a | |||
| 67b7d63d9a | |||
| f3116bfc12 | |||
| f31baf9e56 | |||
| 906cc1981e | |||
| d4e82500ae | |||
| 6aa9be6f70 | |||
| 4e362678ca | |||
| a2081dece4 | |||
| 98cf188a17 | |||
| 4932c7c08a | |||
| c8a6991f09 | |||
| 5d3c9a67ab | |||
|
|
659a888c3d | ||
| 26908b03a3 | |||
| feccea5234 | |||
| 8ffb0bd245 | |||
| c1b777b689 | |||
| e85a8f7634 | |||
| 25bc6f573c | |||
| 4b5915354b | |||
| 43ab6b3210 |
12
ci.nix
12
ci.nix
@@ -3,7 +3,7 @@
|
|||||||
system,
|
system,
|
||||||
name,
|
name,
|
||||||
}: let
|
}: let
|
||||||
inherit (inputs) nixpkgs;
|
nixpkgs = inputs.nixos-stable;
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
ensureFiles = paths:
|
ensureFiles = paths:
|
||||||
pkgs.runCommand "directory" {} ''
|
pkgs.runCommand "directory" {} ''
|
||||||
@@ -23,6 +23,13 @@
|
|||||||
"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$//'
|
||||||
@@ -36,6 +43,7 @@
|
|||||||
"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"
|
||||||
@@ -54,6 +62,7 @@
|
|||||||
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"
|
||||||
@@ -73,6 +82,7 @@
|
|||||||
"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,29 +3,15 @@
|
|||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
environment.variables.TERMINAL = "alacritty";
|
alacritty-cfg = theme:
|
||||||
|
(pkgs.formats.yaml {}).generate "alacritty.yml" {
|
||||||
environment.systemPackages = [
|
window.opacity = 0.95;
|
||||||
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";
|
||||||
@@ -43,6 +29,34 @@
|
|||||||
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];
|
environment.systemPackages = [pkgs.tpacpi-bat pkgs.powertop];
|
||||||
|
|
||||||
services.tlp = {
|
services.tlp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
|
"cjpalhdlnbpafiamejdnhcphjbkeiagm" # uBlock Origin
|
||||||
"pjjgklgkfeoeiebjogplpnibpfnffkng" # undistracted
|
"pjjgklgkfeoeiebjogplpnibpfnffkng" # undistracted
|
||||||
"nhdogjmejiglipccpnnnanhbledajbpd" # vuejs devtools
|
"nhdogjmejiglipccpnnnanhbledajbpd" # vuejs devtools
|
||||||
|
"eimadpbcbfnmbkopoojfekhnkhdbieeh" # dark reader
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
<niveum/modules/dropbox.nix>
|
<niveum/modules/dropbox.nix>
|
||||||
];
|
];
|
||||||
@@ -12,17 +14,45 @@
|
|||||||
dropbox.enable = false;
|
dropbox.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.home-symlinks = ''
|
systemd.tmpfiles.rules = map tmpfilesConfig [
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/syncthing/common/mahlzeit ${config.users.users.me.home}/mahlzeit
|
{
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Wiki ${config.users.users.me.home}/notes
|
type = "L+";
|
||||||
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Uni ${config.users.users.me.home}/uni
|
user = config.users.users.me.name;
|
||||||
'';
|
group = "users";
|
||||||
|
mode = "0755";
|
||||||
|
argument = "${config.users.users.me.home}/cloud/Seafile/Wiki";
|
||||||
|
path = "${config.users.users.me.home}/notes";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "L+";
|
||||||
|
user = config.users.users.me.name;
|
||||||
|
group = "users";
|
||||||
|
mode = "0755";
|
||||||
|
argument = "${config.users.users.me.home}/cloud/Seafile/Uni";
|
||||||
|
path = "${config.users.users.me.home}/uni";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "L+";
|
||||||
|
user = config.users.users.me.name;
|
||||||
|
group = "users";
|
||||||
|
mode = "0755";
|
||||||
|
argument = "${config.users.users.me.home}/cloud/syncthing/common/mahlzeit";
|
||||||
|
path = "${config.users.users.me.home}/mahlzeit";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
home-manager.users.me = {
|
home-manager.users.me = {
|
||||||
|
services.gnome-keyring.enable = true;
|
||||||
services.nextcloud-client = {
|
services.nextcloud-client = {
|
||||||
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,7 +79,6 @@ 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 = ''
|
||||||
@@ -144,8 +143,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.youtube-dl}/bin/youtube-dl --add-metadata -ic"; # Download video link
|
yt = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -ic"; # Download video link
|
||||||
yta = "${pkgs.youtube-dl}/bin/youtube-dl --add-metadata -xic"; # Download with audio
|
yta = "${pkgs.yt-dlp}/bin/yt-dlp --add-metadata -xic"; # Download with audio
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{i18n.defaultLocale = "en_DK.UTF-8";}
|
{i18n.defaultLocale = "en_DK.UTF-8";}
|
||||||
@@ -170,13 +169,15 @@ in {
|
|||||||
{
|
{
|
||||||
security.wrappers = {
|
security.wrappers = {
|
||||||
pmount = {
|
pmount = {
|
||||||
|
setuid = true;
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "users";
|
group = "root";
|
||||||
source = "${pkgs.pmount}/bin/pmount";
|
source = "${pkgs.pmount}/bin/pmount";
|
||||||
};
|
};
|
||||||
pumount = {
|
pumount = {
|
||||||
|
setuid = true;
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "users";
|
group = "root";
|
||||||
source = "${pkgs.pmount}/bin/pumount";
|
source = "${pkgs.pmount}/bin/pumount";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -244,7 +245,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
|
||||||
@@ -255,12 +256,13 @@ in {
|
|||||||
./sshd.nix
|
./sshd.nix
|
||||||
./sudo.nix
|
./sudo.nix
|
||||||
./sxiv.nix
|
./sxiv.nix
|
||||||
./theming.nix
|
./themes.nix
|
||||||
./tmux.nix
|
./tmux.nix
|
||||||
./traadfri.nix
|
./traadfri.nix
|
||||||
./unclutter.nix
|
./unclutter.nix
|
||||||
./vscode.nix
|
./vscode.nix
|
||||||
./watson.nix
|
./watson.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
|
./tor.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];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +1,55 @@
|
|||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
nixpkgs.config.joypixels.acceptLicense = true;
|
nixpkgs.config.joypixels.acceptLicense = true;
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultFonts = true;
|
enableDefaultFonts = true;
|
||||||
fontDir.enable = true;
|
fontDir.enable = true;
|
||||||
fonts = with pkgs; [
|
fonts = with pkgs; [
|
||||||
alegreya
|
alegreya
|
||||||
alegreya-sans
|
alegreya-sans
|
||||||
|
amiri
|
||||||
|
annapurna-sil
|
||||||
|
cantarell-fonts
|
||||||
|
charis-sil
|
||||||
corefonts
|
corefonts
|
||||||
|
crimson
|
||||||
eb-garamond
|
eb-garamond
|
||||||
|
etBook
|
||||||
|
ezra-sil
|
||||||
fira
|
fira
|
||||||
font-awesome-ttf
|
font-awesome
|
||||||
|
galatia-sil
|
||||||
|
gentium
|
||||||
|
gfs-fonts
|
||||||
|
gyre-fonts
|
||||||
|
ia-writer-duospace
|
||||||
ibm-plex
|
ibm-plex
|
||||||
inconsolata
|
jetbrains-mono
|
||||||
iosevka
|
joypixels
|
||||||
libertine
|
libertinus
|
||||||
|
libre-bodoni
|
||||||
lmodern
|
lmodern
|
||||||
noto-fonts
|
merriweather
|
||||||
noto-fonts-cjk
|
ocr-a
|
||||||
noto-fonts-emoji
|
|
||||||
roboto
|
roboto
|
||||||
roboto-mono
|
roboto-mono
|
||||||
roboto-slab
|
roboto-slab
|
||||||
|
scheherazade-new
|
||||||
source-code-pro
|
source-code-pro
|
||||||
source-serif-pro
|
|
||||||
source-sans-pro
|
source-sans-pro
|
||||||
ubuntu_font_family
|
source-serif-pro
|
||||||
gfs-fonts
|
theano
|
||||||
jetbrains-mono
|
|
||||||
twemoji-color-font
|
|
||||||
joypixels
|
|
||||||
tocharian-font
|
tocharian-font
|
||||||
];
|
vistafonts
|
||||||
fontconfig.defaultFonts = {
|
vollkorn
|
||||||
monospace = ["JetBrains Mono" "JoyPixels"];
|
zilla-slab
|
||||||
serif = ["Roboto Slab"];
|
]; # google-fonts league-of-moveable-type
|
||||||
sansSerif = ["Roboto" "Noto Sans"];
|
fontconfig.defaultFonts = let
|
||||||
emoji = ["JoyPixels"];
|
emojiFont = "JoyPixels";
|
||||||
|
in {
|
||||||
|
monospace = ["JetBrains Mono" emojiFont];
|
||||||
|
serif = ["Merriweather"];
|
||||||
|
sansSerif = ["Cantarell" emojiFont];
|
||||||
|
emoji = [emojiFont];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,6 +5,17 @@
|
|||||||
}: {
|
}: {
|
||||||
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,6 +34,7 @@
|
|||||||
"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)"
|
||||||
'';
|
'';
|
||||||
@@ -247,8 +248,9 @@ 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 ${pkgs.xorg.xkill}/bin/xkill";
|
"${modifier}+F8" = "exec switch-theme toggle";
|
||||||
"${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,10 +4,20 @@
|
|||||||
...
|
...
|
||||||
}: 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 ["de" "gr"];
|
layout = "de";
|
||||||
xkbVariant = commaSep ["T3" "polytonic"];
|
# T3: https://upload.wikimedia.org/wikipedia/commons/a/a9/German-Keyboard-Layout-T3-Version1-large.png
|
||||||
|
# buckwalter: http://www.qamus.org/transliteration.htm
|
||||||
|
xkbVariant = "T3";
|
||||||
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;
|
||||||
@@ -15,6 +25,25 @@ 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ in {
|
|||||||
programs.mpv = {
|
programs.mpv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
config = {
|
config = {
|
||||||
|
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,6 +47,20 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
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;
|
||||||
@@ -131,6 +145,7 @@ 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;
|
||||||
packages = [
|
plugins = [
|
||||||
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.youtube-dl}/bin/youtube-dl -f ${ytdl-format} --add-metadata";
|
youtube-download = "${pkgs.ts}/bin/ts ${pkgs.yt-dlp}/bin/yt-dlp -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,8 +8,6 @@
|
|||||||
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,
|
||||||
@@ -23,19 +21,19 @@
|
|||||||
cslDirectory = pkgs.linkFarm "citation-styles" [
|
cslDirectory = pkgs.linkFarm "citation-styles" [
|
||||||
(zoteroStyle {
|
(zoteroStyle {
|
||||||
name = "chicago-author-date-de";
|
name = "chicago-author-date-de";
|
||||||
sha256 = "0fz0xn46rkciblr34a7x2v60j0lbq9l3fmzi43iphph27m0czn6s";
|
sha256 = "sha256-ddMYk4A9DJQhx9ldkmF7PhwKuc7wUSr26uHHGAze9Ps=";
|
||||||
})
|
})
|
||||||
(zoteroStyle {
|
(zoteroStyle {
|
||||||
name = "din-1505-2";
|
name = "din-1505-2";
|
||||||
sha256 = "1pvy1b7qm13mnph7z365rrz1j082bl2y8ih73rhzd0zd6dz1jyjq";
|
sha256 = "sha256-bXZbB850fek8J6wMVFL32ndI7F4wiKKr1qUC71ezreE=";
|
||||||
})
|
})
|
||||||
(zoteroStyle {
|
(zoteroStyle {
|
||||||
name = "apa";
|
name = "apa";
|
||||||
sha256 = "1878vxp0y0h05yzaghnd51n981623mxskw3lsdyzmffqhihvv111";
|
sha256 = "sha256-yq4fW6hQknycLjaj5fPbXLrQlGBp5myXiOSHBU90jEc=";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
astrolog = nixpkgs-unstable.astrolog.overrideAttrs (old:
|
astrolog = pkgs.astrolog.overrideAttrs (old:
|
||||||
old
|
old
|
||||||
// {
|
// {
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
@@ -73,7 +71,7 @@ in {
|
|||||||
whois
|
whois
|
||||||
dnsutils
|
dnsutils
|
||||||
# FILE MANAGERS
|
# FILE MANAGERS
|
||||||
ranger
|
lf
|
||||||
pcmanfm
|
pcmanfm
|
||||||
# MEDIA
|
# MEDIA
|
||||||
ffmpeg
|
ffmpeg
|
||||||
@@ -102,10 +100,10 @@ in {
|
|||||||
htmlq
|
htmlq
|
||||||
xsv # csv toolkit
|
xsv # csv toolkit
|
||||||
xmlstarlet # xml toolkit
|
xmlstarlet # xml toolkit
|
||||||
manpages
|
man-pages
|
||||||
posix_man_pages
|
posix_man_pages
|
||||||
tree
|
tree
|
||||||
fuse_exfat # to mount windows drives
|
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
|
||||||
@@ -117,7 +115,7 @@ in {
|
|||||||
arandr # xrandr for noobs
|
arandr # xrandr for noobs
|
||||||
libnotify # for notify-send
|
libnotify # for notify-send
|
||||||
xclip # clipboard CLI
|
xclip # clipboard CLI
|
||||||
dragon-drop # drag and drop
|
xdragon # drag and drop
|
||||||
xorg.xkill # kill by clicking
|
xorg.xkill # kill by clicking
|
||||||
audacity
|
audacity
|
||||||
calibre
|
calibre
|
||||||
@@ -126,8 +124,8 @@ in {
|
|||||||
astrolog
|
astrolog
|
||||||
anki # flashcards
|
anki # flashcards
|
||||||
jbofihe # lojbanic software
|
jbofihe # lojbanic software
|
||||||
nixpkgs-unstable.zoom-us # video conferencing
|
zoom-us # video conferencing
|
||||||
nixpkgs-unstable.alejandra # nix formatter
|
alejandra # nix formatter
|
||||||
pdfgrep # search in pdf
|
pdfgrep # search in pdf
|
||||||
pdftk # pdf toolkit
|
pdftk # pdf toolkit
|
||||||
mupdf
|
mupdf
|
||||||
@@ -136,7 +134,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
|
||||||
youtubeDL
|
yt-dlp
|
||||||
espeak
|
espeak
|
||||||
bc # calculator
|
bc # calculator
|
||||||
pari # gp -- better calculator
|
pari # gp -- better calculator
|
||||||
@@ -161,7 +159,7 @@ in {
|
|||||||
scripts.vimv
|
scripts.vimv
|
||||||
scripts.swallow # window swallowing
|
scripts.swallow # window swallowing
|
||||||
scripts.literature-quote
|
scripts.literature-quote
|
||||||
scripts.nav # json navigation
|
jless # less(1) for json
|
||||||
scripts.notetags
|
scripts.notetags
|
||||||
scripts.booksplit
|
scripts.booksplit
|
||||||
scripts.dmenurandr
|
scripts.dmenurandr
|
||||||
@@ -175,7 +173,6 @@ 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
|
||||||
@@ -233,7 +230,7 @@ in {
|
|||||||
]))
|
]))
|
||||||
python3Packages.poetry
|
python3Packages.poetry
|
||||||
|
|
||||||
htmlTidy
|
html-tidy
|
||||||
nodePackages.csslint
|
nodePackages.csslint
|
||||||
nodePackages.jsonlint
|
nodePackages.jsonlint
|
||||||
nodePackages.prettier
|
nodePackages.prettier
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
...
|
...
|
||||||
}: 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";
|
||||||
|
|
||||||
@@ -25,7 +26,12 @@ in {
|
|||||||
port = sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
makanek = {
|
makanek = {
|
||||||
hostname = "makanek.r";
|
hostname = externalNetwork.makanek;
|
||||||
|
user = "root";
|
||||||
|
port = sshPort;
|
||||||
|
};
|
||||||
|
ful = {
|
||||||
|
hostname = externalNetwork.ful;
|
||||||
user = "root";
|
user = "root";
|
||||||
port = sshPort;
|
port = sshPort;
|
||||||
};
|
};
|
||||||
@@ -39,11 +45,6 @@ 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";
|
||||||
@@ -57,10 +58,6 @@ in {
|
|||||||
hostname = "135.181.85.233";
|
hostname = "135.181.85.233";
|
||||||
user = "root";
|
user = "root";
|
||||||
};
|
};
|
||||||
oracle = {
|
|
||||||
hostname = "130.61.171.199";
|
|
||||||
user = "ubuntu";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
{
|
{
|
||||||
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
nixpkgs-unstable = import <nixpkgs-unstable> {};
|
unstable = import <nixos-unstable> {inherit (config.nixpkgs) config;};
|
||||||
|
|
||||||
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/△/;
|
||||||
@@ -42,7 +44,7 @@
|
|||||||
'';
|
'';
|
||||||
in {
|
in {
|
||||||
niveum.telegramBots.transits = {
|
niveum.telegramBots.transits = {
|
||||||
enable = true;
|
enable = false;
|
||||||
time = "*:0/1";
|
time = "*:0/1";
|
||||||
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
||||||
chatIds = ["-1001796440545"];
|
chatIds = ["-1001796440545"];
|
||||||
@@ -50,8 +52,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')
|
||||||
{
|
{
|
||||||
${nixpkgs-unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -R Uranus Neptune Pluto "North Node"
|
${unstable.astrolog}/bin/astrolog -qd $date -zN Berlin -Yt -Yd -d -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"
|
${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,4 +20,12 @@ 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,12 +26,30 @@ 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";
|
||||||
path = [pkgs.ffmpeg];
|
path = [pkgs.ffmpeg];
|
||||||
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/reverse.token>;
|
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/reverse.token>;
|
||||||
enable = true;
|
enable = false;
|
||||||
script = "${telebots}/bin/telegram-reverse";
|
script = "${telebots}/bin/telegram-reverse";
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always";
|
||||||
serviceConfig.WorkingDirectory = reverseDirectory;
|
serviceConfig.WorkingDirectory = reverseDirectory;
|
||||||
@@ -41,7 +59,7 @@ in {
|
|||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
description = "Telegram beta code bot";
|
description = "Telegram beta code bot";
|
||||||
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/betacode.token>;
|
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/betacode.token>;
|
||||||
enable = true;
|
enable = false;
|
||||||
script = "${telebots}/bin/telegram-betacode";
|
script = "${telebots}/bin/telegram-betacode";
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always";
|
||||||
};
|
};
|
||||||
@@ -50,7 +68,7 @@ in {
|
|||||||
wantedBy = ["multi-user.target"];
|
wantedBy = ["multi-user.target"];
|
||||||
description = "Telegram proverb bot";
|
description = "Telegram proverb bot";
|
||||||
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/proverb.token>;
|
environment.TELEGRAM_BOT_TOKEN = lib.strings.fileContents <system-secrets/telegram/proverb.token>;
|
||||||
enable = true;
|
enable = false;
|
||||||
script = "${telebots}/bin/telegram-proverb";
|
script = "${telebots}/bin/telegram-proverb";
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always";
|
||||||
serviceConfig.WorkingDirectory = proverbDirectory;
|
serviceConfig.WorkingDirectory = proverbDirectory;
|
||||||
|
|||||||
@@ -14,4 +14,11 @@ 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,4 +34,12 @@ in {
|
|||||||
});
|
});
|
||||||
serviceConfig.Restart = "always";
|
serviceConfig.Restart = "always";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
niveum.passport.services = [
|
||||||
|
{
|
||||||
|
title = "Nachtischsatan-Bot";
|
||||||
|
link = "https://t.me/NachtischsatanBot";
|
||||||
|
description = "*flubberflubber*";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,4 +17,12 @@
|
|||||||
'');
|
'');
|
||||||
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";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
82
configs/themes.nix
Normal file
82
configs/themes.nix
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
{
|
||||||
|
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,6 +23,11 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
platformTheme = "gtk";
|
platformTheme = "gtk";
|
||||||
};
|
};
|
||||||
xsession.pointerCursor = theme.cursor // {size = 16;};
|
home.pointerCursor =
|
||||||
|
theme.cursor
|
||||||
|
// {
|
||||||
|
size = 16;
|
||||||
|
x11.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
services.tor.enable = true;
|
services.tor.enable = true;
|
||||||
services.tor.torsocks.enable = true;
|
environment.systemPackages = [pkgs.tor];
|
||||||
}
|
}
|
||||||
|
|||||||
78
flake.lock
generated
78
flake.lock
generated
@@ -2,11 +2,11 @@
|
|||||||
"nodes": {
|
"nodes": {
|
||||||
"flake-utils": {
|
"flake-utils": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648297722,
|
"lastModified": 1653893745,
|
||||||
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -18,20 +18,20 @@
|
|||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixos-unstable"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647175256,
|
"lastModified": 1654113406,
|
||||||
"narHash": "sha256-7H+veXPM7IwdN1DoZqliwb9sghlN56koV5dnCu1kpsc=",
|
"narHash": "sha256-70esZvhal+FsyU89mJRcAb+cDGHKt0sgZ6MlRr9Cplg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a8d00f5c038cf7ec54e7dac9c57b171c1217f008",
|
"rev": "684e85d01d333be91c4875baebb05b93c7d2ffaa",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"ref": "release-21.11",
|
"ref": "master",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
"flake-utils"
|
"flake-utils"
|
||||||
],
|
],
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixos-stable"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -62,11 +62,11 @@
|
|||||||
"menstruation-backend": {
|
"menstruation-backend": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1634573652,
|
"lastModified": 1649545504,
|
||||||
"narHash": "sha256-FIj8oCOJO+Wqxr2o5MMqIShvzMJud4iUq3o8y4NIRvw=",
|
"narHash": "sha256-TVm3246ML7gWPeGm+bdb+Qo8o/7nve7sQ2hBdCZm3z8=",
|
||||||
"owner": "kmein",
|
"owner": "kmein",
|
||||||
"repo": "menstruation.rs",
|
"repo": "menstruation.rs",
|
||||||
"rev": "dd405fe2acf32441e8ac56e488e689bb1c4bea82",
|
"rev": "d9f3c6d53542fd7c7ed191e37cf4e342d4a47bcb",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1554228333,
|
"lastModified": 1554228333,
|
||||||
"narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=",
|
"narHash": "sha256-hG/PlcCvCQhNcU55NpHfATkyH9k6cZmO7uvBoJjasXU=",
|
||||||
"ref": "master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
|
"rev": "c528cf970e292790b414b4c1c8c8e9d7e73b2a71",
|
||||||
"revCount": 32,
|
"revCount": 32,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
@@ -107,34 +107,34 @@
|
|||||||
"url": "https://cgit.krebsco.de/nix-writers"
|
"url": "https://cgit.krebsco.de/nix-writers"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixos-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647992509,
|
"lastModified": 1654275867,
|
||||||
"narHash": "sha256-AG40Nt5OWz0LBs5p457emOuwLKOvTtcv/2fUdnEN3Ws=",
|
"narHash": "sha256-pt14ZE4jVPGvfB2NynGsl34pgXfOqum5YJNpDK4+b9E=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d2caa9377539e3b5ff1272ac3aa2d15f3081069f",
|
"rev": "7a20c208aacf4964c19186dcad51f89165dc7ed0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-21.11",
|
"ref": "nixos-22.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixos-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648337267,
|
"lastModified": 1654230545,
|
||||||
"narHash": "sha256-8DRg8UDvs63iaIaHEbWG7/lnD9ImQlMNsTZMY3PvFLc=",
|
"narHash": "sha256-8Vlwf0x8ow6pPOK2a04bT+pxIeRnM1+O0Xv9/CuDzRs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "6de161729c81dc98e844793cc9c8fda29d5ef62a",
|
"rev": "236cc2971ac72acd90f0ae3a797f9f83098b17ec",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "master",
|
"ref": "nixos-unstable",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -158,11 +158,11 @@
|
|||||||
"retiolum": {
|
"retiolum": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1647444524,
|
"lastModified": 1653896694,
|
||||||
"narHash": "sha256-N4T1UXLkYJMQqk65LkTDpW70ujXXeZ9xe5k+LOpznAI=",
|
"narHash": "sha256-c37fCbsOydJQoiE4l81hltJLF9BkKowrlhEjVc8e3iQ=",
|
||||||
"owner": "krebs",
|
"owner": "krebs",
|
||||||
"repo": "retiolum",
|
"repo": "retiolum",
|
||||||
"rev": "de6d7dc9bd671e65f2ee3004b6807625e7553e84",
|
"rev": "ac9e1d5b02c5667ba12aa6d6ab077cc071ffc2f4",
|
||||||
"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",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixos-stable": "nixos-stable",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixos-unstable": "nixos-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": 1648314795,
|
"lastModified": 1654020832,
|
||||||
"narHash": "sha256-hGIXkAcGiJnVXnl8kigZpI3VFrLmAr2+yr85hi5JwP0=",
|
"narHash": "sha256-05V38z3cr+qYis46nDieIliA8XFBmRp6e2VSCkoFb40=",
|
||||||
"owner": "kmein",
|
"owner": "kmein",
|
||||||
"repo": "scripts",
|
"repo": "scripts",
|
||||||
"rev": "d1d525b92a34e55b1ad886807c284106e58716b2",
|
"rev": "e6b49aefe2470245bf7c4c6aaa83c1a1ce75501a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -210,11 +210,11 @@
|
|||||||
"stockholm": {
|
"stockholm": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1648214990,
|
"lastModified": 1653851789,
|
||||||
"narHash": "sha256-rptATGq+jcpL+P+Cr6d3OajV6zYkbHPWlt3aQNZI2TY=",
|
"narHash": "sha256-KMw9DS40WKHdQti0nwHQguKgIQJ+yexT2wBAfYskCps=",
|
||||||
"ref": "master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "ae9c0b12710b5361d0d45510eb401eebfc1b3fb0",
|
"rev": "4a9f93e8933d87ce8f04965b2772564527f1e2fd",
|
||||||
"revCount": 10497,
|
"revCount": 10604,
|
||||||
"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": 1639820904,
|
"lastModified": 1653080212,
|
||||||
"narHash": "sha256-d4s2PulBGIIQXtX7blZz+Wnmij5dK/IrBcilNGjqZC4=",
|
"narHash": "sha256-BcfppAuVNp0hMcrMG/ZxE4juSrdQbJSUIA0eHS1/Wxo=",
|
||||||
"owner": "kmein",
|
"owner": "kmein",
|
||||||
"repo": "tinc-graph",
|
"repo": "tinc-graph",
|
||||||
"rev": "1b9c69ffdbdab82d30a23e44f739feea63d94163",
|
"rev": "ea0ef2e5542684d1d8e34a626cb9295dec33e70d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
64
flake.nix
64
flake.nix
@@ -2,16 +2,17 @@
|
|||||||
description = "niveum: packages, modules, systems";
|
description = "niveum: packages, modules, systems";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
|
nixos-stable.url = "github:NixOS/nixpkgs/nixos-22.05";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
nixos-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-21.11";
|
url = "github:nix-community/home-manager/master";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixos-unstable";
|
||||||
};
|
};
|
||||||
krops = {
|
krops = {
|
||||||
url = "github:Mic92/krops";
|
url = "github:Mic92/krops";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixos-stable";
|
||||||
inputs.flake-utils.follows = "flake-utils";
|
inputs.flake-utils.follows = "flake-utils";
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -70,8 +71,8 @@
|
|||||||
menstruation-backend,
|
menstruation-backend,
|
||||||
menstruation-telegram,
|
menstruation-telegram,
|
||||||
nix-writers,
|
nix-writers,
|
||||||
nixpkgs,
|
nixos-unstable,
|
||||||
nixpkgs-unstable,
|
nixos-stable,
|
||||||
recht,
|
recht,
|
||||||
retiolum,
|
retiolum,
|
||||||
scripts,
|
scripts,
|
||||||
@@ -82,8 +83,12 @@
|
|||||||
tuna,
|
tuna,
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixos-stable.legacyPackages.${system};
|
||||||
source = name:
|
source = {
|
||||||
|
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";
|
||||||
@@ -95,28 +100,32 @@
|
|||||||
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
|
||||||
|
);
|
||||||
}
|
}
|
||||||
// nixpkgs.lib.mapAttrs' (name: value: {
|
// nixos-stable.lib.mapAttrs' (name: value: {
|
||||||
inherit name;
|
inherit name;
|
||||||
value.file = toString value;
|
value.file = toString value;
|
||||||
}) (nixpkgs.lib.filterAttrs (name: _: !builtins.elem name ["flake-utils" "krops" "self"]) inputs);
|
}) (nixos-stable.lib.filterAttrs (name: _: builtins.elem name sources) inputs);
|
||||||
deployScriptFor = {
|
deployScriptFor = {
|
||||||
name,
|
name,
|
||||||
|
user ? "root",
|
||||||
host,
|
host,
|
||||||
}: let
|
unstable ? false,
|
||||||
inherit (import ./lib/default.nix) sshPort;
|
sshPort ? (import ./lib/default.nix).sshPort,
|
||||||
in
|
sources,
|
||||||
|
}:
|
||||||
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
toString (krops.packages.${system}.writeDeploy "deploy-${name}" {
|
||||||
source = krops.lib.evalSource [(source name)];
|
source = krops.lib.evalSource [(source {inherit sources unstable name;})];
|
||||||
target = "root@${host}:${
|
target = "${user}@${host}:${toString sshPort}";
|
||||||
if host == "130.61.203.118"
|
|
||||||
then "22"
|
|
||||||
else 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 = {
|
||||||
@@ -124,9 +133,20 @@
|
|||||||
program = deployScriptFor {
|
program = deployScriptFor {
|
||||||
inherit name;
|
inherit name;
|
||||||
host =
|
host =
|
||||||
if name == "tahina"
|
if externalNetwork ? name
|
||||||
then "130.61.203.118"
|
then externalNetwork.${name}
|
||||||
else "${name}.r";
|
else "${name}.r";
|
||||||
|
unstable = name == "kabsa" || name == "manakish";
|
||||||
|
sources =
|
||||||
|
["nix-writers" "nixpkgs" "retiolum" "stockholm"]
|
||||||
|
++ {
|
||||||
|
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};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
37
lib/colours/ayu-dark.nix
Normal file
37
lib/colours/ayu-dark.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
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";
|
||||||
|
}
|
||||||
37
lib/colours/ayu-light.nix
Normal file
37
lib/colours/ayu-light.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
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 = "${pkgs.alacritty}/bin/alacritty";
|
terminal = "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 "fahrplan" [
|
pkgs.linkFarm "www" [
|
||||||
{
|
{
|
||||||
name = "index.html";
|
name = "index.html";
|
||||||
path = file;
|
path = file;
|
||||||
@@ -82,6 +82,7 @@ rec {
|
|||||||
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
manakish.id = "AJVBWR2-VFFAGZF-7ZF5JAX-T63GMOG-NZ446WK-MC5E6WK-6X6Q2HE-QQA2JQ3";
|
||||||
toum.id = "CBJQXFF-FMFGWFU-2J6FMPR-SRDTSGX-7NHOYOH-CQCABKF-KQJMRJC-SDE24Q4";
|
toum.id = "CBJQXFF-FMFGWFU-2J6FMPR-SRDTSGX-7NHOYOH-CQCABKF-KQJMRJC-SDE24Q4";
|
||||||
zaatar.id = "CGHO6LK-ZJBAXBD-UWI7AH3-BXYARE6-EUIM7PE-O2FUCOM-VCCRNCM-IG34WQ7";
|
zaatar.id = "CGHO6LK-ZJBAXBD-UWI7AH3-BXYARE6-EUIM7PE-O2FUCOM-VCCRNCM-IG34WQ7";
|
||||||
|
tahina.id = "UKJ2CBO-EQPKQL4-3QLRUSG-SSYR6AB-CCCUTKU-CLPYR7N-RUI5A6Y-JTL5NA4";
|
||||||
};
|
};
|
||||||
|
|
||||||
ignorePaths = [
|
ignorePaths = [
|
||||||
|
|||||||
4
lib/external-network.nix
Normal file
4
lib/external-network.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
ful = "130.61.217.114";
|
||||||
|
makanek = "88.99.83.173";
|
||||||
|
}
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
const newsEndpoint = "http://prism.r:7999";
|
const newsEndpoint = "http://radio-news.r";
|
||||||
|
|
||||||
function isoString(date) {
|
function isoString(date) {
|
||||||
return date.toISOString().slice(0, -5) + "Z";
|
return date.toISOString().slice(0, -5) + "Z";
|
||||||
@@ -103,15 +103,28 @@
|
|||||||
request.open("POST", newsEndpoint, false); // synchronous
|
request.open("POST", newsEndpoint, false); // synchronous
|
||||||
request.send(
|
request.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
from: isoString(new Date(formData.get("from"))),
|
from: formData.get("from") + ":00Z",
|
||||||
to: isoString(new Date(formData.get("to"))),
|
to: formData.get("to") + ":00Z",
|
||||||
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();
|
||||||
};
|
};
|
||||||
@@ -122,10 +135,10 @@
|
|||||||
<section>
|
<section>
|
||||||
<h1>Submit news</h1>
|
<h1>Submit news</h1>
|
||||||
<form onsubmit="sendNews(event)">
|
<form onsubmit="sendNews(event)">
|
||||||
<label>Start date</label>
|
<label>Start date (UTC)</label>
|
||||||
<input type="datetime-local" name="from" required />
|
<input type="datetime-local" id="time-from" name="from" required />
|
||||||
<label>End date</label>
|
<label>End date (UTC)</label>
|
||||||
<input type="datetime-local" name="to" required />
|
<input type="datetime-local" id="time-to" 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,6 +4,11 @@
|
|||||||
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";
|
||||||
|
|||||||
350
lib/streams.nix
350
lib/streams.nix
File diff suppressed because it is too large
Load Diff
135
modules/passport.nix
Normal file
135
modules/passport.nix
Normal file
@@ -0,0 +1,135 @@
|
|||||||
|
{
|
||||||
|
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,5 +39,15 @@ 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
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ stdenv.mkDerivation {
|
|||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = "https://github.com/jgm/pandoc";
|
url = "https://github.com/jgm/pandoc";
|
||||||
rev = pandoc.version;
|
rev = pandoc.version;
|
||||||
sha256 = "0s4mczbql35wh6bhyi542yln24f530rlsw6akcv7lmp083rrlpy4";
|
sha256 = "sha256-AY9GarrU7PBFgoYxqQkE2ghoUy7+0Gu6/Mwa+fdQM2U=";
|
||||||
};
|
};
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
mkdir -p $out/man/man1
|
mkdir -p $out/man/man1
|
||||||
|
|||||||
54
packages/scripts/avesta.sed
Executable file
54
packages/scripts/avesta.sed
Executable file
@@ -0,0 +1,54 @@
|
|||||||
|
#!/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.vorbisTools pkgs.python3Packages.eyeD3 opustags];
|
packages = [pkgs.vorbis-tools pkgs.python3Packages.eyeD3 opustags];
|
||||||
script = "${voidrice}/.local/bin/tag";
|
script = "${voidrice}/.local/bin/tag";
|
||||||
name = "tag";
|
name = "tag";
|
||||||
};
|
};
|
||||||
@@ -307,16 +307,11 @@ in
|
|||||||
packages = [pkgs.xdo];
|
packages = [pkgs.xdo];
|
||||||
};
|
};
|
||||||
|
|
||||||
ipa =
|
ipa = wrapScript {
|
||||||
pkgs.writers.writeHaskellBin "ipa" {
|
script = ./ipa.py;
|
||||||
libraries = with pkgs; [haskellPackages.text haskellPackages.ipa];
|
name = "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'
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
}: let
|
}: let
|
||||||
streams-tsv = pkgs.fetchurl {
|
streams-tsv = pkgs.fetchurl {
|
||||||
url = "https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv.m3u";
|
url = "https://raw.githubusercontent.com/jnk22/kodinerds-iptv/master/iptv/kodi/kodi_tv.m3u";
|
||||||
sha256 = "1cw1gmb16vwh6qfw0z3wjjfgn0zg2qplnddqzva5b0xx2g2appla";
|
sha256 = "sha256-gbHV37Yo+D3TYfDXZyb9IX8aRsguZ3qG2SYlY8NsTL0=";
|
||||||
postFetch = ''
|
postFetch = ''
|
||||||
${pkgs.gnused}/bin/sed '/#EXTM3U/d;/#EXTINF/s/.*,//g' $out | ${pkgs.coreutils}/bin/paste -d'\t' - - > $out.tmp
|
${pkgs.gnused}/bin/sed '/#EXTM3U/d;/#EXTINF/s/.*,//g' $out | ${pkgs.coreutils}/bin/paste -d'\t' - - > $out.tmp
|
||||||
mv $out.tmp $out
|
mv $out.tmp $out
|
||||||
|
|||||||
6
packages/scripts/mushakkil.sh
Executable file
6
packages/scripts/mushakkil.sh
Executable file
@@ -0,0 +1,6 @@
|
|||||||
|
#!/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,6 +39,12 @@
|
|||||||
"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
|
||||||
@@ -50,6 +56,9 @@ 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,8 +75,9 @@
|
|||||||
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 ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | sed "s/ .*//")
|
chosen=$(cat "$history_file" ${kaomoji-file} ${unicode-file} | dmenu -p unicode -i -l 10 | tee --append "$history_file" | sed "s/ .*//")
|
||||||
|
|
||||||
[ "$chosen" != "" ] || exit
|
[ "$chosen" != "" ] || exit
|
||||||
|
|
||||||
|
|||||||
48
systems/ful/configuration.nix
Normal file
48
systems/ful/configuration.nix
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
{
|
||||||
|
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];
|
||||||
|
}
|
||||||
40
systems/ful/hardware-configuration.nix
Normal file
40
systems/ful/hardware-configuration.nix
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
{
|
||||||
|
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 = [
|
||||||
|
"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,6 +31,7 @@ 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 = {
|
||||||
@@ -52,6 +53,30 @@ 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,13 +1,25 @@
|
|||||||
{
|
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 = "https://code.kmein.de";
|
rootUrl = domain;
|
||||||
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,6 +17,7 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
version = 2;
|
version = 2;
|
||||||
devices = ["/dev/sda"];
|
devices = ["/dev/sda"];
|
||||||
|
configurationLimit = 3;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,9 @@
|
|||||||
}: 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;
|
||||||
in {
|
in {
|
||||||
imports = [<stockholm/krebs/3modules/permown.nix>];
|
|
||||||
|
|
||||||
services.nginx.virtualHosts.${domain} = {
|
services.nginx.virtualHosts.${domain} = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
@@ -49,16 +47,28 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
krebs.permown.${backupLocation} = {
|
niveum.passport.services = [
|
||||||
owner = "codimd";
|
{
|
||||||
group = "codimd";
|
title = "Hedgedoc";
|
||||||
umask = "0002";
|
link = "https://${domain}";
|
||||||
};
|
description = "lets you collaborate on Markdown documents.";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
(tmpfilesConfig {
|
||||||
|
user = "codimd";
|
||||||
|
group = "codimd";
|
||||||
|
mode = "0755";
|
||||||
|
type = "d";
|
||||||
|
path = backupLocation;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
systemd.services.hedgedoc-backup = {
|
systemd.services.hedgedoc-backup = {
|
||||||
description = "Hedgedoc backup service";
|
description = "Hedgedoc backup service";
|
||||||
script = ''
|
script = ''
|
||||||
${nixpkgs-unstable.sqlite}/bin/sqlite3 -json ${stateLocation} "select shortid, alias, ownerId, content from Notes" \
|
${pkgs.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 = true;
|
enable = false;
|
||||||
configPath = let
|
configPath = let
|
||||||
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
|
bridgeBotToken = lib.strings.fileContents <system-secrets/telegram/krebs.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.kmein.Token = bridgeBotToken;
|
telegram.krebs.Token = bridgeBotToken;
|
||||||
irc = let
|
irc = let
|
||||||
Nick = "ponte";
|
Nick = "ponte";
|
||||||
in {
|
in {
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
channel = "#krebs";
|
channel = "#krebs";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
account = "telegram.kmein";
|
account = "telegram.krebs";
|
||||||
channel = "-330372458";
|
channel = "-330372458";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,6 +11,14 @@ 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,5 +12,12 @@
|
|||||||
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,6 +22,26 @@ 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 [
|
||||||
@@ -220,7 +240,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"
|
||||||
];
|
];
|
||||||
@@ -238,16 +258,6 @@ in {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
{
|
|
||||||
job_name = "tahina";
|
|
||||||
static_configs = [
|
|
||||||
{
|
|
||||||
targets = [
|
|
||||||
"tahina.r:${toString config.services.prometheus.exporters.node.port}"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.prometheus.exporters.blackbox = {
|
services.prometheus.exporters.blackbox = {
|
||||||
|
|||||||
@@ -12,6 +12,13 @@
|
|||||||
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;
|
||||||
geogen-src = "${<scripts>}/onomastics";
|
onomap-src = "${<scripts>}/onomastics-ng";
|
||||||
geogen = pkgs.callPackage geogen-src {};
|
onomap = pkgs.haskellPackages.callCabal2nix "onomap" onomap-src {};
|
||||||
in {
|
in {
|
||||||
systemd.services.names = {
|
systemd.services.names = {
|
||||||
wants = ["network-online.target"];
|
wants = ["network-online.target"];
|
||||||
@@ -13,12 +13,11 @@ 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";
|
||||||
};
|
};
|
||||||
script = ''
|
environment.PORT = toString port;
|
||||||
cd $(mktemp -d)
|
|
||||||
ln -s "${geogen-src}/wsgi.py" wsgi.py
|
|
||||||
${geogen.dependencyEnv}/bin/gunicorn wsgi:app -b :${toString port}
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
@@ -29,6 +28,14 @@ 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,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
@@ -8,7 +9,7 @@
|
|||||||
in {
|
in {
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud22;
|
package = pkgs.nextcloud24;
|
||||||
|
|
||||||
https = true;
|
https = true;
|
||||||
|
|
||||||
@@ -33,6 +34,14 @@ 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,6 +8,14 @@
|
|||||||
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 = ''
|
||||||
@@ -17,9 +25,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://prism.r:7999/
|
| ${pkgs.curl}/bin/curl -Ssfd @- http://radio-news.r/
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,4 +126,12 @@ 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,6 +44,19 @@ 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;
|
||||||
@@ -57,6 +70,7 @@ 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,6 +48,14 @@ 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,4 +204,11 @@ 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";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ in {
|
|||||||
address = "irc.hackint.org/6697";
|
address = "irc.hackint.org/6697";
|
||||||
ipv6 = true;
|
ipv6 = true;
|
||||||
ssl = true;
|
ssl = true;
|
||||||
autojoin = ["#krebs" "#hsmr" "#nixos" "#the_playlist" "#flipdot-berlin" "#hackint"];
|
autojoin = ["#eloop" "#krebs" "#hsmr" "#nixos" "#the_playlist" "#flipdot-berlin" "#hackint"];
|
||||||
sasl_mechanism = "plain";
|
sasl_mechanism = "plain";
|
||||||
sasl_username = nick;
|
sasl_username = nick;
|
||||||
sasl_password = lib.strings.fileContents <system-secrets/irc/hackint>;
|
sasl_password = lib.strings.fileContents <system-secrets/irc/hackint>;
|
||||||
@@ -143,6 +143,11 @@ in {
|
|||||||
tags = ["nick_gitlab"];
|
tags = ["nick_gitlab"];
|
||||||
regex = "*";
|
regex = "*";
|
||||||
};
|
};
|
||||||
|
people = {
|
||||||
|
buffer = "irc.*.*";
|
||||||
|
tags = map (name: "nick_${name}") ["mod_p[matrix-fli"];
|
||||||
|
regex = "*";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extraCommands = ''/matrix connect nibbana'';
|
extraCommands = ''/matrix connect nibbana'';
|
||||||
@@ -180,4 +185,11 @@ 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,6 +21,7 @@
|
|||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
efiInstallAsRemovable = true;
|
efiInstallAsRemovable = true;
|
||||||
device = "/dev/sda";
|
device = "/dev/sda";
|
||||||
|
configurationLimit = 5;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
lib,
|
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
@@ -8,22 +7,62 @@
|
|||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
<niveum/configs/monitoring.nix>
|
<niveum/configs/battery.nix>
|
||||||
<niveum/configs/nix.nix>
|
|
||||||
<niveum/configs/save-space.nix>
|
|
||||||
<niveum/configs/spacetime.nix>
|
<niveum/configs/spacetime.nix>
|
||||||
<niveum/configs/sshd.nix>
|
|
||||||
<niveum/modules/retiolum.nix>
|
<niveum/modules/retiolum.nix>
|
||||||
|
<niveum/configs/sshd.nix>
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.nixPath = ["/var/src"];
|
nix.nixPath = ["/var/src"];
|
||||||
|
|
||||||
networking = {
|
console.keyMap = "de";
|
||||||
hostName = "tahina";
|
i18n.defaultLocale = "de_DE.UTF-8";
|
||||||
retiolum = retiolumAddresses.tahina;
|
services.xserver = {
|
||||||
|
layout = "de";
|
||||||
|
libinput.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "22.05";
|
users.users.xenos = {
|
||||||
|
name = "xenos";
|
||||||
|
password = "xenos";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = ["networkmanager"];
|
||||||
|
};
|
||||||
|
|
||||||
environment.systemPackages = [pkgs.vim pkgs.git pkgs.tmux pkgs.python3];
|
services.xserver = {
|
||||||
|
enable = true;
|
||||||
|
desktopManager.pantheon.enable = true;
|
||||||
|
displayManager = {
|
||||||
|
lightdm = {
|
||||||
|
enable = true;
|
||||||
|
greeters.pantheon.enable = true;
|
||||||
|
};
|
||||||
|
autoLogin = {
|
||||||
|
enable = true;
|
||||||
|
user = "xenos";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot.plymouth.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = [
|
||||||
|
pkgs.libreoffice
|
||||||
|
pkgs.gimp
|
||||||
|
pkgs.inkscape
|
||||||
|
pkgs.firefox
|
||||||
|
pkgs.audacity
|
||||||
|
pkgs.pidgin
|
||||||
|
];
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
useDHCP = false;
|
||||||
|
interfaces = {
|
||||||
|
enp0s25.useDHCP = true;
|
||||||
|
wlo1.useDHCP = true;
|
||||||
|
};
|
||||||
|
retiolum = retiolumAddresses.tahina;
|
||||||
|
hostName = "tahina";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "21.11";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,27 +6,43 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.enable = true;
|
boot = {
|
||||||
boot.loader.grub.version = 2;
|
loader = {
|
||||||
boot.loader.grub.device = "/dev/sda";
|
systemd-boot = {
|
||||||
|
enable = true;
|
||||||
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod"];
|
consoleMode = "max";
|
||||||
boot.initrd.kernelModules = [];
|
};
|
||||||
boot.kernelModules = ["kvm-amd"];
|
efi.canTouchEfiVariables = true;
|
||||||
boot.extraModulePackages = [];
|
};
|
||||||
|
initrd = {
|
||||||
fileSystems."/" = {
|
availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "firewire_ohci" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci"];
|
||||||
device = "/dev/disk/by-uuid/d36baa44-9359-45d1-af5f-dbac52c6d75e";
|
kernelModules = ["dm-snapshot"];
|
||||||
fsType = "ext4";
|
luks.devices.luksmap.device = "/dev/disk/by-uuid/b7d66981-8cb7-4aad-a595-ee6574b312cf";
|
||||||
|
};
|
||||||
|
kernelModules = ["kvm-intel"];
|
||||||
|
extraModulePackages = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [];
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e9a8bd34-61eb-4317-888d-bd7d6248a906";
|
||||||
|
fsType = "xfs";
|
||||||
|
};
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/9B2F-31E1";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking.useDHCP = lib.mkDefault false;
|
swapDevices = [
|
||||||
networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 2048;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ in {
|
|||||||
./tuna.nix
|
./tuna.nix
|
||||||
./grocy.nix
|
./grocy.nix
|
||||||
./spotifyd.nix
|
./spotifyd.nix
|
||||||
<home-manager/nixos>
|
|
||||||
<niveum/configs/keyboard.nix>
|
<niveum/configs/keyboard.nix>
|
||||||
<niveum/configs/monitoring.nix>
|
<niveum/configs/monitoring.nix>
|
||||||
<niveum/configs/nix.nix>
|
<niveum/configs/nix.nix>
|
||||||
|
|||||||
@@ -69,6 +69,16 @@ 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;
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
{
|
{pkgs, ...}: {
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
||||||
hardware.pulseaudio = {
|
hardware.pulseaudio = {
|
||||||
|
package = pkgs.pulseaudioFull;
|
||||||
enable = true;
|
enable = true;
|
||||||
systemWide = true;
|
systemWide = true;
|
||||||
tcp = {
|
tcp = {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
firewall = (import <niveum/lib>).firewall lib;
|
firewall = (import <niveum/lib>).firewall lib;
|
||||||
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
|
|
||||||
streams = import <niveum/lib/streams.nix> {
|
streams = import <niveum/lib/streams.nix> {
|
||||||
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
|
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
|
||||||
@@ -71,13 +72,31 @@ in {
|
|||||||
extraStopCommands = firewall.removeRules rules;
|
extraStopCommands = firewall.removeRules rules;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.activationScripts.mpd-playlists = let
|
systemd.tmpfiles.rules = let
|
||||||
playlistFile = pkgs.writeText "radio.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||||
in ''
|
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||||
rm -rf /var/lib/mpd/playlists
|
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
||||||
install -d /var/lib/mpd/playlists
|
in
|
||||||
ln -sfn "${toString playlistFile}" "/var/lib/mpd/playlists/radio.m3u"
|
map (tag:
|
||||||
'';
|
tmpfilesConfig {
|
||||||
|
type = "L+";
|
||||||
|
path = "/var/lib/mpd/playlists/${tag}.m3u";
|
||||||
|
mode = "0644";
|
||||||
|
user = "mpd";
|
||||||
|
group = "mpd";
|
||||||
|
argument = makePlaylist tag (tagStreams tag);
|
||||||
|
})
|
||||||
|
tags
|
||||||
|
++ [
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "L+";
|
||||||
|
mode = "0644";
|
||||||
|
user = "mpd";
|
||||||
|
group = "mpd";
|
||||||
|
path = "/var/lib/mpd/playlist/all.m3u";
|
||||||
|
argument = makePlaylist "all" streams;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
services.tuna = {
|
services.tuna = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -87,33 +106,15 @@ in {
|
|||||||
logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300",
|
logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300",
|
||||||
stream,
|
stream,
|
||||||
station,
|
station,
|
||||||
|
...
|
||||||
}: {inherit id desc logo stream station;})
|
}: {inherit id desc logo stream station;})
|
||||||
streams;
|
streams;
|
||||||
webPort = 8080;
|
webPort = 7044;
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.tuna-stations = let
|
services.ympd = {
|
||||||
stations = lib.lists.imap0 (id: {
|
enable = true;
|
||||||
desc ? "",
|
mpd.port = config.services.mpd.network.port;
|
||||||
logo ? "https://picsum.photos/seed/${builtins.hashString "md5" stream}/300",
|
|
||||||
stream,
|
|
||||||
station,
|
|
||||||
}: {inherit id desc logo stream station;})
|
|
||||||
streams;
|
|
||||||
stationsJson = (pkgs.formats.json {}).generate "stations.json" stations;
|
|
||||||
in {
|
|
||||||
enable = false;
|
|
||||||
wantedBy = ["tuna.service"];
|
|
||||||
startAt = "hourly";
|
|
||||||
script = ''
|
|
||||||
mkdir -p /etc/tuna
|
|
||||||
antenne_asb_url=$(
|
|
||||||
${pkgs.curl}/bin/curl -sS 'https://www.caster.fm/widgets/em_player.php?jsinit=true&uid=529295&t=blue&c=' \
|
|
||||||
| grep streamUrl \
|
|
||||||
| sed ${lib.escapeShellArg "s/^.*'\\([^']*\\)'.*/\\1/"}
|
|
||||||
)
|
|
||||||
${pkgs.jq}/bin/jq "map(if .station == \"Antenne ASB\" then .stream |= \"$antenne_asb_url\" else . end)" < ${stationsJson} > /etc/tuna/stations.json
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
@@ -125,7 +126,7 @@ in {
|
|||||||
virtualHosts."radio.kmein.r" = {
|
virtualHosts."radio.kmein.r" = {
|
||||||
basicAuth.dj = password;
|
basicAuth.dj = password;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:${toString config.services.tuna.webPort}";
|
proxyPass = "http://127.0.0.1:${config.services.ympd.webPort}";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user