Compare commits
4 commits
25573d9dc8
...
3c273b0ed1
Author | SHA1 | Date | |
---|---|---|---|
christian | 3c273b0ed1 | ||
christian | 01da148fa1 | ||
jopejoe1 | 4fc8e31df0 | ||
9d9b8ede02 |
|
@ -65,11 +65,11 @@ This is exactly what we're doing to set the default deployment user to `colmena-
|
||||||
|
|
||||||
## Build NixOS Proxmox VE Template
|
## Build NixOS Proxmox VE Template
|
||||||
|
|
||||||
Build a new NixOS Proxmox VE Template for the thinkcccore's.
|
Build a new NixOS Proxmox VE Template for the thinkcccore's:
|
||||||
```shell
|
```shell
|
||||||
nix build .#proxmox-nixos-template
|
nix build .#proxmox-nixos-template
|
||||||
```
|
```
|
||||||
Build a new NixOS Proxmox VE Template for the chaosknoten.
|
Build a new NixOS Proxmox VE Template for the chaosknoten:
|
||||||
```shell
|
```shell
|
||||||
nix build .#proxmox-chaosknoten-nixos-template
|
nix build .#proxmox-chaosknoten-nixos-template
|
||||||
```
|
```
|
||||||
|
|
36
flake.lock
36
flake.lock
|
@ -2,11 +2,11 @@
|
||||||
"nodes": {
|
"nodes": {
|
||||||
"nixlib": {
|
"nixlib": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726966855,
|
"lastModified": 1729386149,
|
||||||
"narHash": "sha256-25ByioeOBFcnitO5lM/Mufnv/u7YtHEHEM8QFuiS40k=",
|
"narHash": "sha256-hUP9oxmnOmNnKcDOf5Y55HQ+NnoT0+bLWHLQWLLw9Ks=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs.lib",
|
"repo": "nixpkgs.lib",
|
||||||
"rev": "575704ff85d3a41dc5bfef7b55380cbc7b87f3c2",
|
"rev": "cce4521b6df014e79a7b7afc58c703ed683c916e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -23,11 +23,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727053438,
|
"lastModified": 1729472750,
|
||||||
"narHash": "sha256-t/+z1Tf7hSaStU1pBYkY7i0/GkG+YIPSmfeRrK8eYUw=",
|
"narHash": "sha256-s93LPHi5BN7I2xSGNAFWiYb8WRsPvT1LE9ZjZBrpFlg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixos-generators",
|
"repo": "nixos-generators",
|
||||||
"rev": "e8c1cd886cc17e31e424f915efd32e84d8af0ce9",
|
"rev": "7c60ba4bc8d6aa2ba3e5b0f6ceb9fc07bc261565",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -38,11 +38,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727076372,
|
"lastModified": 1730428893,
|
||||||
"narHash": "sha256-gXIWudYhY/4LjQPvrGn9lN4fbHjw/mf1mb9KKJK//4I=",
|
"narHash": "sha256-fLLUd2dO/Vnf96UDr8YPzerYi+n99l3S5yIUDnmcPBE=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7ca0f93c530406c1610defff0b9bf643333cf992",
|
"rev": "38edd08881ce4dc24056eec173b43587a93c990f",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -54,11 +54,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725762081,
|
"lastModified": 1729973466,
|
||||||
"narHash": "sha256-vNv+aJUW5/YurRy1ocfvs4q/48yVESwlC/yHzjkZSP8=",
|
"narHash": "sha256-knnVBGfTCZlQgxY1SgH0vn2OyehH9ykfF8geZgS95bk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dc454045f5b5d814e5862a6d057e7bb5c29edc05",
|
"rev": "cd3e8833d70618c4eea8df06f95b364b016d4950",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -70,11 +70,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1727104955,
|
"lastModified": 1730449684,
|
||||||
"narHash": "sha256-m6kgjR4zAwyMe1Pn4RGXLCzArtoBp1qzhb2AUlPeVh4=",
|
"narHash": "sha256-Hlv3rTPxnO+DpKRXw9yjzERLdk05h7+fEbZxWM2taCw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d266adc5a77ec8c10ed941c7251b2673004dbd62",
|
"rev": "ab464abbeb3a2833288c6e907488c49c2e599f88",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -100,11 +100,11 @@
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
"nixpkgs-stable": "nixpkgs-stable"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1726524647,
|
"lastModified": 1729999681,
|
||||||
"narHash": "sha256-qis6BtOOBBEAfUl7FMHqqTwRLB61OL5OFzIsOmRz2J4=",
|
"narHash": "sha256-qm0uCtM9bg97LeJTKQ8dqV/FvqRN+ompyW4GIJruLuw=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "e2d404a7ea599a013189aa42947f66cede0645c8",
|
"rev": "1666d16426abe79af5c47b7c0efa82fd31bf4c56",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
36
flake.nix
36
flake.nix
|
@ -26,50 +26,18 @@
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-generators, sops-nix, ... }:
|
outputs = { self, nixpkgs, nixpkgs-unstable, nixos-generators, sops-nix, ... }:
|
||||||
let
|
let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
# Shairport Sync 4.3.1 (with nqptp 1.2.4) with metadata, MQTT and AirPlay 2 support.
|
|
||||||
shairportSync431ExtendedNixpkgsUnstableOverlay = final: prev: {
|
shairportSync431ExtendedNixpkgsUnstableOverlay = final: prev: {
|
||||||
shairport-sync = (prev.shairport-sync.override { enableMetadata = true; enableAirplay2 = true; }).overrideAttrs (finalAttr: previousAttr: {
|
shairport-sync = (prev.shairport-sync.override { enableMetadata = true; enableAirplay2 = true; }).overrideAttrs (finalAttr: previousAttr: {
|
||||||
# See: https://github.com/mikebrady/shairport-sync/blob/e78a88b64adfe7b5f88fd6faedf55c57445bb240/CONFIGURATION%20FLAGS.md
|
# See: https://github.com/mikebrady/shairport-sync/blob/e78a88b64adfe7b5f88fd6faedf55c57445bb240/CONFIGURATION%20FLAGS.md
|
||||||
configureFlags = previousAttr.configureFlags ++ [ "--with-mqtt-client" ];
|
configureFlags = previousAttr.configureFlags ++ [ "--with-mqtt-client" ];
|
||||||
buildInputs = previousAttr.buildInputs ++ [ final.mosquitto ];
|
buildInputs = previousAttr.buildInputs ++ [ final.mosquitto ];
|
||||||
# Use specific Shairport Sync and nqptp versions, since with those the
|
|
||||||
# following error doesn't happen:
|
|
||||||
# fatal error: The nqptp service on this system, which is required for
|
|
||||||
# Shairport Sync to operate, does not seem to be initialised.
|
|
||||||
#
|
|
||||||
# Also use a more recent dev version to fix Pipewire stuttering issue.
|
|
||||||
# See:
|
|
||||||
# https://github.com/mikebrady/shairport-sync/issues/1736
|
|
||||||
# https://github.com/mikebrady/shairport-sync/blob/a65ec2d7f1f380bbae196d7f8f1cd6a88ef5777b/RELEASENOTES-DEVELOPMENT.md#version-432-dev-51-g98679bbb
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "mikebrady";
|
|
||||||
repo = finalAttr.pname;
|
|
||||||
rev = "98679bbb54f5aaeda859e34aa28425647b8d179e";
|
|
||||||
hash = "sha256-k0kcgtWk2xlG34lP0ryEaqdskYMNM68YnIRLwFR3jaY=";
|
|
||||||
};
|
|
||||||
});
|
|
||||||
nqptp = prev.nqptp.overrideAttrs (finalAttr: previousAttr: {
|
|
||||||
# See Shairport Sync version note.
|
|
||||||
src = final.fetchFromGitHub {
|
|
||||||
owner = "mikebrady";
|
|
||||||
repo = finalAttr.pname;
|
|
||||||
rev = "1.2.4";
|
|
||||||
hash = "sha256-roTNcr3v2kzE6vQ5plAVtlw1+2yJplltOYsGGibtoZo=";
|
|
||||||
};
|
|
||||||
# Custom install phase to avoid setcap.
|
|
||||||
# See:
|
|
||||||
# https://github.com/mikebrady/nqptp/blob/1.2.4/Makefile.am#L23
|
|
||||||
installPhase = ''
|
|
||||||
mkdir -p $out/bin
|
|
||||||
cp nqptp $out/bin/
|
|
||||||
'';
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
pkgs-unstable = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
pkgs-unstable = nixpkgs-unstable.legacyPackages."x86_64-linux";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
audio-hauptraum-kueche = nixpkgs-unstable.lib.nixosSystem {
|
audio-hauptraum-kueche = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
./config/common
|
./config/common
|
||||||
|
@ -79,7 +47,7 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
audio-hauptraum-tafel = nixpkgs-unstable.lib.nixosSystem {
|
audio-hauptraum-tafel = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
./config/common
|
./config/common
|
||||||
|
|
|
@ -12,7 +12,6 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
./librespot.nix
|
./librespot.nix
|
||||||
./mpd.nix
|
./mpd.nix
|
||||||
./networking.nix
|
|
||||||
./pipewire.nix
|
./pipewire.nix
|
||||||
./shairport-sync.nix
|
./shairport-sync.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -23,7 +23,7 @@ in
|
||||||
After = [ "network-online.target" "pipewire.service" ];
|
After = [ "network-online.target" "pipewire.service" ];
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.librespot}/bin/librespot --name '${config.ccchh.services.audio.name}' --device-type speaker --bitrate 320 --enable-volume-normalisation --disable-audio-cache --disable-credential-cache --quiet";
|
ExecStart = "${pkgs.librespot}/bin/librespot --name '${config.ccchh.services.audio.name}' --device-type speaker --bitrate 320 --enable-volume-normalisation --disable-audio-cache --disable-credential-cache";
|
||||||
User = "librespot";
|
User = "librespot";
|
||||||
Group = "librespot";
|
Group = "librespot";
|
||||||
};
|
};
|
||||||
|
@ -34,7 +34,7 @@ in
|
||||||
users.librespot = {
|
users.librespot = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
group = "librespot";
|
group = "librespot";
|
||||||
extraGroups = [ "pipewire" ];
|
extraGroups = [ "pipewire" "audio" ];
|
||||||
};
|
};
|
||||||
groups.librespot = { };
|
groups.librespot = { };
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
{ config, pkgs, lib, ... }:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
|
|
||||||
cfg = config.ccchh.services.audio;
|
|
||||||
|
|
||||||
in
|
|
||||||
|
|
||||||
{
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
# Disable IPv6, since Shairport-Sync doesn't work with IPv6. Unclear why.
|
|
||||||
networking.enableIPv6 = false;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -20,7 +20,7 @@ in
|
||||||
arguments = "-o pw -v";
|
arguments = "-o pw -v";
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.shairport.extraGroups = [ "pipewire" ];
|
users.users.shairport.extraGroups = [ "pipewire" "audio" ];
|
||||||
|
|
||||||
environment.etc.shairport-sync-config = {
|
environment.etc.shairport-sync-config = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
Loading…
Reference in a new issue