1
0
mirror of https://github.com/kmein/niveum synced 2026-03-19 11:31:09 +01: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,
pkgs,
...
}: {
}: let
inherit (import <niveum/lib>) tmpfilesConfig;
in {
imports = [
<niveum/modules/dropbox.nix>
];
@@ -12,11 +14,32 @@
dropbox.enable = false;
};
system.activationScripts.home-symlinks = ''
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
ln -sfn ${config.users.users.me.home}/cloud/Seafile/Uni ${config.users.users.me.home}/uni
'';
systemd.tmpfiles.rules = map tmpfilesConfig [
{
type = "L+";
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 = {
services.gnome-keyring.enable = true;

View File

@@ -1,42 +1,53 @@
{pkgs, ...}: {
nixpkgs.config.joypixels.acceptLicense = true;
fonts = {
enableDefaultFonts = true;
fontDir.enable = true;
fonts = with pkgs; [
alegreya
alegreya-sans
amiri
cantarell-fonts
charis-sil
corefonts
crimson
eb-garamond
etBook
fira
font-awesome-ttf
gentium
gfs-fonts
gyre-fonts
ia-writer-duospace
ibm-plex
inconsolata
iosevka
libertine
jetbrains-mono
joypixels
libertinus
libre-bodoni
lmodern
merriweather
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
ocr-a
roboto
roboto-mono
roboto-slab
scheherazade-new
source-code-pro
source-serif-pro
source-sans-pro
ubuntu_font_family
gfs-fonts
jetbrains-mono
twemoji-color-font
joypixels
source-serif-pro
theano
tocharian-font
];
fontconfig.defaultFonts = {
monospace = ["JetBrains Mono" "JoyPixels"];
serif = ["Roboto Slab"];
sansSerif = ["Roboto" "Noto Sans"];
emoji = ["JoyPixels"];
vistafonts
vollkorn
zilla-slab
]; # google-fonts league-of-moveable-type
fontconfig.defaultFonts = let
emojiFont = "JoyPixels";
in {
monospace = ["JetBrains Mono" emojiFont];
serif = ["Merriweather"];
sansSerif = ["Cantarell" emojiFont];
emoji = [emojiFont];
};
};
}

View File

@@ -18,6 +18,7 @@ in {
programs.mpv = {
enable = true;
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="];
screenshot-template = "%F-%wH%wM%wS-%#04n";
};

View File

@@ -42,7 +42,7 @@
'';
in {
niveum.telegramBots.transits = {
enable = true;
enable = false;
time = "*:0/1";
token = lib.strings.fileContents <system-secrets/telegram/kmein.token>;
chatIds = ["-1001796440545"];

32
flake.lock generated
View File

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

View File

@@ -7,9 +7,8 @@
stateLocation = "/var/lib/codimd/state.sqlite";
nixpkgs-unstable = import <nixpkgs-unstable> {};
domain = "pad.kmein.de";
inherit (import <niveum/lib>) tmpfilesConfig;
in {
imports = [<stockholm/krebs/3modules/permown.nix>];
services.nginx.virtualHosts.${domain} = {
enableACME = true;
forceSSL = true;
@@ -49,11 +48,15 @@ in {
};
};
krebs.permown.${backupLocation} = {
owner = "codimd";
group = "codimd";
umask = "0002";
};
systemd.tmpfiles.rules = [
(tmpfilesConfig {
user = "codimd";
group = "codimd";
mode = "0755";
type = "d";
path = backupLocation;
})
];
systemd.services.hedgedoc-backup = {
description = "Hedgedoc backup service";

View File

@@ -143,6 +143,11 @@ in {
tags = ["nick_gitlab"];
regex = "*";
};
people = {
buffer = "irc.*.*";
tags = map (name: "nick_${name}") ["mod_p[matrix-fli"];
regex = "*";
};
};
};
extraCommands = ''/matrix connect nibbana'';

View File

@@ -5,6 +5,7 @@
...
}: let
firewall = (import <niveum/lib>).firewall lib;
inherit (import <niveum/lib>) tmpfilesConfig;
streams = import <niveum/lib/streams.nix> {
di-fm-key = lib.strings.fileContents <secrets/di.fm/key>;
@@ -71,22 +72,31 @@ in {
extraStopCommands = firewall.removeRules rules;
};
system.activationScripts.mpd-playlists = let
makePlaylist = name: streams: pkgs.writeText "name.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
systemd.tmpfiles.rules = let
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
in ''
rm -rf /var/lib/mpd/playlists
install -d /var/lib/mpd/playlists
ln -sfn "${toString (makePlaylist "all" streams)}" "/var/lib/mpd/playlists/all.m3u"
${lib.concatMapStringsSep "\n" (
tag: let
playlistStreams = lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
in ''
ln -sfn "${toString (makePlaylist tag playlistStreams)}" "/var/lib/mpd/playlists/${tag}.m3u"
''
)
tags}
'';
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
in
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 = {
enable = true;