forked from CCCHH/nix-infra
Introduce colmena config and add shairport-sync host
This commit is contained in:
parent
10702979f1
commit
096f2ffa91
10
config/hosts/audio/configuration.nix
Normal file
10
config/hosts/audio/configuration.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
networking = {
|
||||
hostName = "audio";
|
||||
};
|
||||
|
||||
sound.enable = true;
|
||||
|
||||
system.stateVersion = "23.05";
|
||||
}
|
7
config/hosts/audio/default.nix
Normal file
7
config/hosts/audio/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./shairport-sync.nix
|
||||
];
|
||||
}
|
8
config/hosts/audio/shairport-sync.nix
Normal file
8
config/hosts/audio/shairport-sync.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.shairport-sync = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
arguments = "-vvv -o alsa -- -d plughw:1,0 -r 48000";
|
||||
};
|
||||
}
|
19
flake.lock
19
flake.lock
|
@ -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"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
26
flake.nix
26
flake.nix
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue