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

7 Commits

Author SHA1 Message Date
f31baf9e56 chore(update)
• Updated input 'flake-utils':
    'github:numtide/flake-utils/0f8662f1319ad6abf89b3380dd2722369fc51ade' (2022-03-26)
  → 'github:numtide/flake-utils/a4b154ebbdc88c8498a5c7b01589addc9e9cb678' (2022-04-11)
• Updated input 'home-manager':
    'github:nix-community/home-manager/0bdbdea2e26c984b096f4f7d10e3c88536a980b0' (2022-04-01)
  → 'github:nix-community/home-manager/7244c6715cb8f741f3b3e1220a9279e97b2ed8f5' (2022-04-13)
• Updated input 'nixpkgs':
    'github:NixOS/nixpkgs/c86185d20d708013caf97a6adaa8dc6d72313c75' (2022-04-09)
  → 'github:NixOS/nixpkgs/2f06b87f64bc06229e05045853e0876666e1b023' (2022-04-14)
• Updated input 'nixpkgs-unstable':
    'github:NixOS/nixpkgs/c2b6e029cd1efa0efd37daab89264ef040ae5669' (2022-04-09)
  → 'github:NixOS/nixpkgs/6140c314d5850406dddc78e55dcc8716ea111ee4' (2022-04-17)
• Updated input 'stockholm':
    'git+https://cgit.lassul.us/stockholm?ref=master&rev=b3833baee96d7bce2c54295110b40c646468a1ff' (2022-04-04)
  → 'git+https://cgit.lassul.us/stockholm?ref=master&rev=92d5eacd6d9e530c4d1ea0dec2652417b0fde78a' (2022-04-15)
2022-04-17 07:02:08 +02:00
906cc1981e fix(tuna): nix types 2022-04-15 01:17:38 +02:00
d4e82500ae feat(mpv): limit resolution 2022-04-14 13:40:11 +02:00
6aa9be6f70 feat: more fonts 2022-04-13 09:01:23 +02:00
4e362678ca feat(astrology): pause bot 2022-04-13 09:01:23 +02:00
a2081dece4 feat(weechat): block people 2022-04-11 23:02:02 +02:00
98cf188a17 feat: use more tmpfiles.d 2022-04-10 19:38:47 +02:00
8 changed files with 116 additions and 63 deletions

View File

@@ -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,11 +14,32 @@
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.gnome-keyring.enable = true;

View File

@@ -1,42 +1,53 @@
{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
cantarell-fonts
charis-sil
corefonts corefonts
crimson
eb-garamond eb-garamond
etBook
fira fira
font-awesome-ttf font-awesome-ttf
gentium
gfs-fonts
gyre-fonts
ia-writer-duospace
ibm-plex ibm-plex
inconsolata jetbrains-mono
iosevka joypixels
libertine libertinus
libre-bodoni
lmodern lmodern
merriweather
noto-fonts noto-fonts
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];
}; };
}; };
} }

View File

@@ -18,6 +18,7 @@ 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";
}; };

View File

@@ -42,7 +42,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"];

32
flake.lock generated
View File

@@ -2,11 +2,11 @@
"nodes": { "nodes": {
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1648297722, "lastModified": 1649676176,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=", "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade", "rev": "a4b154ebbdc88c8498a5c7b01589addc9e9cb678",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -22,11 +22,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1648834319, "lastModified": 1649887911,
"narHash": "sha256-i5Aj4Aw64D/A0X6XW5LxSS4XBnYj7gMz+kN4dpsbdk8=", "narHash": "sha256-Af0Ppb1RZ7HWuxUvF0/O7h3cy8tqU2eKFyVwyA1ZD+w=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "0bdbdea2e26c984b096f4f7d10e3c88536a980b0", "rev": "7244c6715cb8f741f3b3e1220a9279e97b2ed8f5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -109,11 +109,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1649490789, "lastModified": 1649944829,
"narHash": "sha256-YrhVxwoofZSx/wLZ4GYET//8vS+uqWX572zvdmP/Etg=", "narHash": "sha256-wjOgLfjCdyoRamMOrVJceeDJk4LvJsQOxBoT3k16/7Q=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c86185d20d708013caf97a6adaa8dc6d72313c75", "rev": "2f06b87f64bc06229e05045853e0876666e1b023",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -125,11 +125,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1649541735, "lastModified": 1650167080,
"narHash": "sha256-JdOywA2jcdGCxNgu0dJA7ZNtaV7sS0HwuZg9YaXd94c=", "narHash": "sha256-sSFOXf1YtX6EIHG5HAh64y6EqJ1/5epcCSq1c8wxCi4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "c2b6e029cd1efa0efd37daab89264ef040ae5669", "rev": "6140c314d5850406dddc78e55dcc8716ea111ee4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -210,11 +210,11 @@
"stockholm": { "stockholm": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1649089964, "lastModified": 1650040948,
"narHash": "sha256-ybuVI8rnpMyBUoyoIXJ1e3QBMBIOoEgKTiFzIPfzy8A=", "narHash": "sha256-/4Q2vnl53BQVYQFSZqF512CF6tzIyPHaDy4Yheof8G4=",
"ref": "master", "ref": "master",
"rev": "b3833baee96d7bce2c54295110b40c646468a1ff", "rev": "92d5eacd6d9e530c4d1ea0dec2652417b0fde78a",
"revCount": 10500, "revCount": 10516,
"type": "git", "type": "git",
"url": "https://cgit.lassul.us/stockholm" "url": "https://cgit.lassul.us/stockholm"
}, },

View File

@@ -7,9 +7,8 @@
stateLocation = "/var/lib/codimd/state.sqlite"; stateLocation = "/var/lib/codimd/state.sqlite";
nixpkgs-unstable = import <nixpkgs-unstable> {}; 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,11 +48,15 @@ in {
}; };
}; };
krebs.permown.${backupLocation} = { systemd.tmpfiles.rules = [
owner = "codimd"; (tmpfilesConfig {
group = "codimd"; user = "codimd";
umask = "0002"; group = "codimd";
}; mode = "0755";
type = "d";
path = backupLocation;
})
];
systemd.services.hedgedoc-backup = { systemd.services.hedgedoc-backup = {
description = "Hedgedoc backup service"; description = "Hedgedoc backup service";

View File

@@ -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'';

View File

@@ -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,22 +72,31 @@ in {
extraStopCommands = firewall.removeRules rules; extraStopCommands = firewall.removeRules rules;
}; };
system.activationScripts.mpd-playlists = let systemd.tmpfiles.rules = let
makePlaylist = name: streams: pkgs.writeText "name.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) 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 (makePlaylist "all" streams)}" "/var/lib/mpd/playlists/all.m3u" map (tag:
${lib.concatMapStringsSep "\n" ( tmpfilesConfig {
tag: let type = "L+";
playlistStreams = lib.filter ({tags ? [], ...}: lib.elem tag tags) streams; path = "/var/lib/mpd/playlists/${tag}.m3u";
in '' mode = "0644";
ln -sfn "${toString (makePlaylist tag playlistStreams)}" "/var/lib/mpd/playlists/${tag}.m3u" user = "mpd";
'' group = "mpd";
) argument = makePlaylist tag (tagStreams tag);
tags} })
''; 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;