Compare commits

...
4 Commits
Author SHA1 Message Date
Alexander Heldt b3b5afc2dd manatee: Run the lbsync Navidrome plugin 2026-11-08 15:49:02 +01:00
Alexander Heldt 1f84da1eeb Update ndp flake input 2026-11-08 15:49:02 +01:00
Alexander Heldt b2d0da1ede pinwheel: Control ndp with the media keys 2026-11-08 15:23:34 +01:00
Alexander Heldt 40e89a6006 pinwheel: Add ndp, a terminal player for Navidrome
The player's config is generated by its home-manager module; the Navidrome
password stays in an agenix secret that the config reads at startup.
2026-11-08 15:20:00 +01:00
6 changed files with 63 additions and 5 deletions

No files matched your search

Generated
+22
View File
@@ -704,6 +704,27 @@
"type": "gitlab" "type": "gitlab"
} }
}, },
"ndp": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1794149226,
"narHash": "sha256-riBGsYaDWOn/z9cbQTKxeByR3IKTmIwt+fyRbG7TKOY=",
"ref": "main",
"rev": "54563ca9132c0070c2e8873ff45df6409d4e2d17",
"revCount": 2,
"type": "git",
"url": "ssh://gitea@git.ppp.pm:1122/alex/ndp.git"
},
"original": {
"ref": "main",
"type": "git",
"url": "ssh://gitea@git.ppp.pm:1122/alex/ndp.git"
}
},
"nh": { "nh": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
@@ -920,6 +941,7 @@
"komga-comictracker": "komga-comictracker", "komga-comictracker": "komga-comictracker",
"komga-reading-stats": "komga-reading-stats", "komga-reading-stats": "komga-reading-stats",
"naviterm": "naviterm", "naviterm": "naviterm",
"ndp": "ndp",
"nh": "nh", "nh": "nh",
"nix-gc-env": "nix-gc-env", "nix-gc-env": "nix-gc-env",
"nix-jetbrains-plugins": "nix-jetbrains-plugins", "nix-jetbrains-plugins": "nix-jetbrains-plugins",
+6
View File
@@ -52,6 +52,12 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
ndp = {
url = "git+ssh://gitea@git.ppp.pm:1122/alex/ndp.git?ref=main";
# url = "git+file:///home/alex/code/own/ndp?ref=main";
inputs.nixpkgs.follows = "nixpkgs";
};
pppdotpm-site = { pppdotpm-site = {
url = "git+ssh://gitea@git.ppp.pm:1122/alex/ppp.pm-site.git?ref=main"; url = "git+ssh://gitea@git.ppp.pm:1122/alex/ppp.pm-site.git?ref=main";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@@ -1,4 +1,5 @@
{ {
inputs,
lib, lib,
pkgs, pkgs,
config, config,
@@ -8,6 +9,8 @@ let
navidromeEnabled = config.mod.navidrome.enable; navidromeEnabled = config.mod.navidrome.enable;
in in
{ {
imports = [ inputs.ndp.nixosModules.lbsync ];
options = { options = {
mod.navidrome = { mod.navidrome = {
enable = lib.mkEnableOption "Enable navidrome module"; enable = lib.mkEnableOption "Enable navidrome module";
@@ -35,6 +38,8 @@ in
Address = "0.0.0.0"; Address = "0.0.0.0";
MusicFolder = "/mnt/media/public/music"; MusicFolder = "/mnt/media/public/music";
}; };
lbsync.enable = true;
}; };
}; };
+22 -5
View File
@@ -14,8 +14,8 @@ in
settings = { settings = {
bind = bind =
let let
prev = "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify previous"; prev = "${pkgs.playerctl}/bin/playerctl -p ndp,naviterm,spotify previous";
next = "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify next"; next = "${pkgs.playerctl}/bin/playerctl -p ndp,naviterm,spotify next";
mkExec = key: cmd: { mkExec = key: cmd: {
_args = [ _args = [
@@ -27,12 +27,12 @@ in
[ [
(mkExec "XF86AudioPrev" prev) (mkExec "XF86AudioPrev" prev)
(mkExec "XF86AudioNext" next) (mkExec "XF86AudioNext" next)
(mkExec "XF86AudioPlay" "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify play-pause") (mkExec "XF86AudioPlay" "${pkgs.playerctl}/bin/playerctl -p ndp,naviterm,spotify play-pause")
(mkExec "XF86AudioPause" "${pkgs.playerctl}/bin/playerctl -p naviterm,spoitfy play-pause") (mkExec "XF86AudioPause" "${pkgs.playerctl}/bin/playerctl -p ndp,naviterm,spoitfy play-pause")
(mkExec "SUPER + ALT + LEFT" prev) (mkExec "SUPER + ALT + LEFT" prev)
(mkExec "SUPER + ALT + RIGHT" next) (mkExec "SUPER + ALT + RIGHT" next)
(mkExec "SUPER + ALT + DOWN" "${pkgs.playerctl}/bin/playerctl -p naviterm,spotify play-pause") (mkExec "SUPER + ALT + DOWN" "${pkgs.playerctl}/bin/playerctl -p ndp,naviterm,spotify play-pause")
]; ];
}; };
}; };
@@ -42,8 +42,19 @@ in
pkgs.spotify pkgs.spotify
inputs.naviterm.packages.${pkgs.stdenv.hostPlatform.system}.default inputs.naviterm.packages.${pkgs.stdenv.hostPlatform.system}.default
]; ];
programs.ndp = {
enable = true;
settings = {
server = "http://manatee:4533";
user = "navi";
passwordCommand = "cat ${config.age.secrets."navidrome-password".path}";
};
};
}; };
home-manager.sharedModules = [ inputs.ndp.homeManagerModules.default ];
systemd.user.services.playerctld = { systemd.user.services.playerctld = {
unitConfig = { unitConfig = {
Description = "starts playerctld daemon"; Description = "starts playerctld daemon";
@@ -67,4 +78,10 @@ in
owner = "alex"; owner = "alex";
group = "users"; group = "users";
}; };
age.secrets."navidrome-password" = {
file = ../../../../secrets/pinwheel/navidrome-password.age;
owner = "alex";
group = "users";
};
} }
+7
View File
@@ -0,0 +1,7 @@
age-encryption.org/v1
-> ssh-ed25519 vxPbZg ttoakxifzTWW4eb4kIwoYPgM6BxVnWVyMvXPTBCs5mc
unb1JLUqlGEBv+hbg+6el2LnCMEPpEOnKKfkqb3P0M8
-> ssh-ed25519 +oNaHQ 4LyRWLbyqbfQxvOt8ac0DWT/c6adVI5cCvh5j9My+A0
qxtYamHiRi7YBWdOFWMdYQb1gqF7P+eqdk2nBI/CqzI
--- kLLYhfMnWuTjR8Zign8N7G82Qfxtq5BNS9SF+lBxo/w
ñ”m¢³d§»°4qü"{äDùåÉåñòÒn§c¿ó"
+1
View File
@@ -27,6 +27,7 @@ in {
"pinwheel/work-staging-ovpn.age".publicKeys = [ pinwheel alex ]; "pinwheel/work-staging-ovpn.age".publicKeys = [ pinwheel alex ];
"pinwheel/work-production-ovpn.age".publicKeys = [ pinwheel alex ]; "pinwheel/work-production-ovpn.age".publicKeys = [ pinwheel alex ];
"pinwheel/naviterm-config.age".publicKeys = [ pinwheel alex ]; "pinwheel/naviterm-config.age".publicKeys = [ pinwheel alex ];
"pinwheel/navidrome-password.age".publicKeys = [ pinwheel alex ];
"pinwheel/atuin-key.age".publicKeys = [ pinwheel alex ]; "pinwheel/atuin-key.age".publicKeys = [ pinwheel alex ];
"manatee/root.manatee.age".publicKeys = [ manatee alex ]; "manatee/root.manatee.age".publicKeys = [ manatee alex ];