aboutsummaryrefslogtreecommitdiff
path: root/nixos/services
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/services')
-rw-r--r--nixos/services/avahi.service.nix2
-rw-r--r--nixos/services/laptop.preset.nix3
-rw-r--r--nixos/services/logind.service.nix9
-rw-r--r--nixos/services/misc.service.nix2
-rw-r--r--nixos/services/nginx.service.nix11
-rw-r--r--nixos/services/pipewire.service.nix58
-rw-r--r--nixos/services/power_management.service.nix9
-rw-r--r--nixos/services/printing.service.nix4
-rw-r--r--nixos/services/seatd.service.nix9
-rw-r--r--nixos/services/syncthing.service.nix13
-rw-r--r--nixos/services/tailscale.service.nix7
11 files changed, 62 insertions, 65 deletions
diff --git a/nixos/services/avahi.service.nix b/nixos/services/avahi.service.nix
index 4187309..b0bd53f 100644
--- a/nixos/services/avahi.service.nix
+++ b/nixos/services/avahi.service.nix
@@ -1,4 +1,4 @@
-{...}: {
+{ ... }: {
services.avahi = {
enable = true;
nssmdns4 = true;
diff --git a/nixos/services/laptop.preset.nix b/nixos/services/laptop.preset.nix
index 17f72ae..96e097e 100644
--- a/nixos/services/laptop.preset.nix
+++ b/nixos/services/laptop.preset.nix
@@ -1,4 +1,4 @@
-{...}: {
+{ ... }: {
imports = [
./nginx.service.nix
./pipewire.service.nix
@@ -10,5 +10,6 @@
./power_management.service.nix
./seatd.service.nix
./logind.service.nix
+ #./mpd.service.nix
];
}
diff --git a/nixos/services/logind.service.nix b/nixos/services/logind.service.nix
index 6d54e20..7de7ea0 100644
--- a/nixos/services/logind.service.nix
+++ b/nixos/services/logind.service.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
services.logind.extraConfig = ''
# don't shutdown in short press
diff --git a/nixos/services/misc.service.nix b/nixos/services/misc.service.nix
index 72fcd2c..86f490d 100644
--- a/nixos/services/misc.service.nix
+++ b/nixos/services/misc.service.nix
@@ -1,4 +1,4 @@
-{...}: {
+{ ... }: {
specialisation.powersave.configuration = {
services.auto-cpufreq.enable = true;
};
diff --git a/nixos/services/nginx.service.nix b/nixos/services/nginx.service.nix
index bd8b2ef..53025c3 100644
--- a/nixos/services/nginx.service.nix
+++ b/nixos/services/nginx.service.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
services.nginx = {
enable = true;
@@ -15,8 +14,8 @@
'';
};
};
- listenAddresses = ["127.0.0.1" "[::1]"];
+ listenAddresses = [ "127.0.0.1" "[::1]" ];
};
};
- networking.firewall.allowedTCPPorts = [80];
+ networking.firewall.allowedTCPPorts = [ 80 ];
}
diff --git a/nixos/services/pipewire.service.nix b/nixos/services/pipewire.service.nix
index be0cc76..83548a4 100644
--- a/nixos/services/pipewire.service.nix
+++ b/nixos/services/pipewire.service.nix
@@ -1,4 +1,5 @@
-{pkgs, ...}: let
+{ pkgs, ... }:
+let
pw_rnnoise_config = {
"context.modules" = [
{
@@ -13,11 +14,11 @@
"name" = "rnnoise";
"plugin" = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so";
"label" = "noise_suppressor_stereo";
- "control" = {"VAD Threshold (%)" = 50.0;};
+ "control" = { "VAD Threshold (%)" = 50.0; };
}
];
};
- "audio.position" = ["FL" "FR"];
+ "audio.position" = [ "FL" "FR" ];
"capture.props" = {
"node.name" = "effect_input.rnnoise";
"node.passive" = true;
@@ -30,7 +31,8 @@
}
];
};
-in {
+in
+{
services.pipewire = {
enable = true;
alsa = {
@@ -42,33 +44,33 @@ in {
wireplumber.configPackages = [
(pkgs.writeTextDir
"share/wireplumber/wireplumber.conf.d/52-profile-switch.conf" ''
- wireplumber.settings = {
- bluetooth.autoswitch-to-headset-profile = false
- }
+ wireplumber.settings = {
+ bluetooth.autoswitch-to-headset-profile = false
+ }
- monitor.bluez.properties = {
- ## Supported roles: hsp_hs (HSP Headset),
- ## hsp_ag (HSP Audio Gateway),
- ## hfp_hf (HFP Hands-Free),
- ## hfp_ag (HFP Audio Gateway)
- ## a2dp_sink (A2DP Audio Sink)
- ## a2dp_source (A2DP Audio Source)
- ## bap_sink (LE Audio Basic Audio Profile Sink)
- ## bap_source (LE Audio Basic Audio Profile Source)
- ## --
- ## Only enable A2DP here and disable HFP. See note at the top as to why.
- bluez5.roles = [ a2dp_sink a2dp_source ]
- }
- '')
+ monitor.bluez.properties = {
+ ## Supported roles: hsp_hs (HSP Headset),
+ ## hsp_ag (HSP Audio Gateway),
+ ## hfp_hf (HFP Hands-Free),
+ ## hfp_ag (HFP Audio Gateway)
+ ## a2dp_sink (A2DP Audio Sink)
+ ## a2dp_source (A2DP Audio Source)
+ ## bap_sink (LE Audio Basic Audio Profile Sink)
+ ## bap_source (LE Audio Basic Audio Profile Source)
+ ## --
+ ## Only enable A2DP here and disable HFP. See note at the top as to why.
+ bluez5.roles = [ a2dp_sink a2dp_source ]
+ }
+ '')
(pkgs.writeTextDir
"share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" ''
- bluez_monitor.properties = {
- ["bluez5.enable-sbc-xq"] = true,
- ["bluez5.enable-msbc"] = true,
- ["bluez5.enable-hw-volume"] = true,
- ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
- }
- '')
+ bluez_monitor.properties = {
+ ["bluez5.enable-sbc-xq"] = true,
+ ["bluez5.enable-msbc"] = true,
+ ["bluez5.enable-hw-volume"] = true,
+ ["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
+ }
+ '')
];
#extraConfig.pipewire."99-input-denoising" = pw_rnnoise_config;
};
diff --git a/nixos/services/power_management.service.nix b/nixos/services/power_management.service.nix
index 06d638b..e86d18c 100644
--- a/nixos/services/power_management.service.nix
+++ b/nixos/services/power_management.service.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
services.tlp = {
enable = true;
diff --git a/nixos/services/printing.service.nix b/nixos/services/printing.service.nix
index a89c732..88c01b2 100644
--- a/nixos/services/printing.service.nix
+++ b/nixos/services/printing.service.nix
@@ -1,6 +1,6 @@
-{...}: {
+{ ... }: {
services.printing = {
enable = true;
- drivers = [];
+ drivers = [ ];
};
}
diff --git a/nixos/services/seatd.service.nix b/nixos/services/seatd.service.nix
index 8207217..fe75f90 100644
--- a/nixos/services/seatd.service.nix
+++ b/nixos/services/seatd.service.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
services.seatd = {
enable = true;
diff --git a/nixos/services/syncthing.service.nix b/nixos/services/syncthing.service.nix
index 47015e2..bd53243 100644
--- a/nixos/services/syncthing.service.nix
+++ b/nixos/services/syncthing.service.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
services = {
syncthing = {
@@ -12,6 +11,6 @@
configDir = "/home/${config.myUserName}/.config/syncthing";
};
};
- networking.firewall.allowedTCPPorts = [8384 22000];
- networking.firewall.allowedUDPPorts = [22000 21027];
+ networking.firewall.allowedTCPPorts = [ 8384 22000 ];
+ networking.firewall.allowedUDPPorts = [ 22000 21027 ];
}
diff --git a/nixos/services/tailscale.service.nix b/nixos/services/tailscale.service.nix
index d0fbde1..d373aa9 100644
--- a/nixos/services/tailscale.service.nix
+++ b/nixos/services/tailscale.service.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
services.tailscale = {
enable = true;