Introduce colmena config and add shairport-sync host

This commit is contained in:
yuri 2023-09-11 21:40:35 +02:00 committed by julian
parent 10702979f1
commit 096f2ffa91
5 changed files with 68 additions and 2 deletions

View file

@ -0,0 +1,10 @@
{ pkgs, ... }:
{
networking = {
hostName = "audio";
};
sound.enable = true;
system.stateVersion = "23.05";
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./configuration.nix
./shairport-sync.nix
];
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
services.shairport-sync = {
enable = true;
openFirewall = true;
arguments = "-vvv -o alsa -- -d plughw:1,0 -r 48000";
};
}

View file

@ -52,10 +52,27 @@
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1694183432,
"narHash": "sha256-YyPGNapgZNNj51ylQMw9lAgvxtM2ai1HZVUu3GS8Fng=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "db9208ab987cdeeedf78ad9b4cf3c55f5ebd269b",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},

View file

@ -3,6 +3,8 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
# Add nixos-generators as an input.
# See here: https://github.com/nix-community/nixos-generators#using-in-a-flake
nixos-generators = {
@ -11,7 +13,29 @@
};
};
outputs = { nixpkgs, nixos-generators, ... }: {
outputs = { nixpkgs, nixpkgs-unstable, nixos-generators, ... }: {
colmena = {
meta = {
nixpkgs = nixpkgs.legacyPackages."x86_64-linux";
nodeNixpkgs = {
audio = nixpkgs-unstable.legacyPackages."x86_64-linux";
};
};
audio = {
deployment = {
targetHost = "audio.z9.ccchh.net";
targetPort = 22;
targetUser = "chaos";
};
imports = [
./config/common
./config/proxmox-vm
./config/hosts/audio
];
};
};
packages.x86_64-linux = {
proxmox = nixos-generators.nixosGenerate {
system = "x86_64-linux";