From 3649c233b73d03370779a8f58c6613a412979e8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 8 Aug 2022 10:13:19 +0200 Subject: Improve devices and few more machines --- nixos/machine/adm-mpd.nix | 30 ++++++++++++++++++++++++++++++ nixos/machine/adm-omnia.nix | 4 ++++ nixos/machine/default.nix | 2 +- nixos/machine/spt-mox.nix | 10 ++++++++++ nixos/machine/spt-omnia.nix | 17 +++++++++++++++++ 5 files changed, 62 insertions(+), 1 deletion(-) (limited to 'nixos/machine') diff --git a/nixos/machine/adm-mpd.nix b/nixos/machine/adm-mpd.nix index 3e103e1..aa85445 100644 --- a/nixos/machine/adm-mpd.nix +++ b/nixos/machine/adm-mpd.nix @@ -5,6 +5,7 @@ with lib; { config = { + fileSystems = { "/" = { device = "/dev/mmcblk0p2"; @@ -18,6 +19,35 @@ with lib; device = "/dev/mmcblk0p1"; }; }; + + networking.wireless = { + enable = true; + networks = filterAttrs (n: v: n == "Nela") config.secrets.wifiNetworks; + environmentFile = "/run/secrets/wifi.env"; + userControlled.enable = true; + }; + + services.pipewire = { + enable = true; + alsa.enable = true; + pulse.enable = true; + }; + + services.spotifyd = { + enable = true; + settings.global = { + device_name = "Adámkovi"; + device = "sysdefault"; + mixer = "Master"; + bitrate = 320; + cache_path = "/var/cahe/spotify"; + no_audio_cache = true; + volume_normalisation = true; + normalisation_pregain = -10; + initial_volume = 60; + }; + }; + }; } diff --git a/nixos/machine/adm-omnia.nix b/nixos/machine/adm-omnia.nix index 21bfeb6..f5ca827 100644 --- a/nixos/machine/adm-omnia.nix +++ b/nixos/machine/adm-omnia.nix @@ -5,6 +5,10 @@ with lib; { config = { + cynerd = { + openvpn.oldpersonal = true; + }; + }; } diff --git a/nixos/machine/default.nix b/nixos/machine/default.nix index 87c9d15..32ad5ab 100644 --- a/nixos/machine/default.nix +++ b/nixos/machine/default.nix @@ -14,5 +14,5 @@ machine-adm-omnia = import ./adm-omnia.nix; machine-adm-omnia2 = import ./adm-omnia2.nix; - machine-adm-mpd = import ./spt-mpd.nix; + machine-adm-mpd = import ./adm-mpd.nix; } diff --git a/nixos/machine/spt-mox.nix b/nixos/machine/spt-mox.nix index eb304b2..bb0ac5e 100644 --- a/nixos/machine/spt-mox.nix +++ b/nixos/machine/spt-mox.nix @@ -24,6 +24,16 @@ with lib; ]; }; }; + interfaces.brlan = { + ipv4 = { + addresses = [{ + address = config.cynerd.hosts.spt.mox; + prefixLength = 24; + }]; + }; + }; + defaultGateway = config.cynerd.hosts.spt.omnia; + nameservers = [ config.cynerd.hosts.spt.omnia "1.1.1.1" "8.8.8.8" ]; dhcpcd.allowInterfaces = [ "brlan" ]; }; }; diff --git a/nixos/machine/spt-omnia.nix b/nixos/machine/spt-omnia.nix index 21bfeb6..4cb80c4 100644 --- a/nixos/machine/spt-omnia.nix +++ b/nixos/machine/spt-omnia.nix @@ -5,6 +5,23 @@ with lib; { config = { + cynerd = { + openvpn.oldpersonal = true; + }; + + services.syncthing = { + enable = true; + #user = mkDefault "cynerd"; + #group = mkDefault "cynerd"; + openDefaultPorts = true; + + overrideDevices = false; + overrideFolders = false; + + dataDir = "/data"; + configDir = "/srv/syncthing"; + }; + }; } -- cgit v1.2.3