mirror of
https://github.com/kmein/niveum
synced 2026-03-24 05:31:08 +01:00
Compare commits
4 Commits
a2081dece4
...
mympd
| Author | SHA1 | Date | |
|---|---|---|---|
| d06d0a9de4 | |||
| d4e82500ae | |||
| 6aa9be6f70 | |||
| 4e362678ca |
@@ -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];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -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"];
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ in {
|
|||||||
./pulseaudio.nix
|
./pulseaudio.nix
|
||||||
./home-assistant.nix
|
./home-assistant.nix
|
||||||
./tuna.nix
|
./tuna.nix
|
||||||
|
./mympd.nix
|
||||||
./grocy.nix
|
./grocy.nix
|
||||||
./spotifyd.nix
|
./spotifyd.nix
|
||||||
<home-manager/nixos>
|
<home-manager/nixos>
|
||||||
|
|||||||
57
systems/zaatar/mympd.nix
Normal file
57
systems/zaatar/mympd.nix
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
{pkgs, ...}: let
|
||||||
|
inherit (import <niveum/lib>) tmpfilesConfig;
|
||||||
|
in {
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "d";
|
||||||
|
mode = "0755";
|
||||||
|
user = "mympd";
|
||||||
|
group = "mympd";
|
||||||
|
path = "/var/lib/mympd";
|
||||||
|
})
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "d";
|
||||||
|
mode = "0755";
|
||||||
|
user = "mympd";
|
||||||
|
group = "mympd";
|
||||||
|
age = "1d";
|
||||||
|
path = "/var/cache/mympd";
|
||||||
|
})
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "L+";
|
||||||
|
mode = "0644";
|
||||||
|
user = "mympd";
|
||||||
|
group = "mympd";
|
||||||
|
path = "/var/lib/mympd/config/http_port";
|
||||||
|
argument = pkgs.writeText "port" "8764";
|
||||||
|
})
|
||||||
|
(tmpfilesConfig {
|
||||||
|
type = "L+";
|
||||||
|
mode = "0644";
|
||||||
|
user = "mympd";
|
||||||
|
group = "mympd";
|
||||||
|
path = "/var/lib/mympd/config/ssl";
|
||||||
|
argument = pkgs.writeText "ssl" "false";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users.mympd = {
|
||||||
|
isSystemUser = true;
|
||||||
|
group = "mympd";
|
||||||
|
};
|
||||||
|
users.groups.mympd = {};
|
||||||
|
|
||||||
|
systemd.services.mympd = {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
after = ["mpd.service"];
|
||||||
|
script = "${pkgs.mympd}/bin/mympd";
|
||||||
|
environment = {
|
||||||
|
MYMPD_HTTP_PORT = "8764";
|
||||||
|
};
|
||||||
|
serviceConfig = {
|
||||||
|
Restart = "always";
|
||||||
|
User = "mympd";
|
||||||
|
Group = "mympd";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -74,8 +74,8 @@ in {
|
|||||||
|
|
||||||
systemd.tmpfiles.rules = let
|
systemd.tmpfiles.rules = let
|
||||||
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
tags = lib.lists.unique (lib.concatMap ({tags ? [], ...}: tags) streams);
|
||||||
tagStreams = tag: map (lib.getAttr "stream") (lib.filter ({tags ? [], ...}: lib.elem tag tags) streams);
|
tagStreams = tag: lib.filter ({tags ? [], ...}: lib.elem tag tags) streams;
|
||||||
makePlaylist = name: urls: pkgs.writeText "${name}.m3u" (lib.concatStringsSep "\n" urls);
|
makePlaylist = name: streams: pkgs.writeText "${name}.m3u" (lib.concatMapStringsSep "\n" (lib.getAttr "stream") streams);
|
||||||
in
|
in
|
||||||
map (tag:
|
map (tag:
|
||||||
tmpfilesConfig {
|
tmpfilesConfig {
|
||||||
@@ -87,7 +87,7 @@ in {
|
|||||||
argument = makePlaylist tag (tagStreams tag);
|
argument = makePlaylist tag (tagStreams tag);
|
||||||
})
|
})
|
||||||
tags
|
tags
|
||||||
+ [
|
++ [
|
||||||
(tmpfilesConfig {
|
(tmpfilesConfig {
|
||||||
type = "L+";
|
type = "L+";
|
||||||
mode = "0644";
|
mode = "0644";
|
||||||
|
|||||||
Reference in New Issue
Block a user