diff options
Diffstat (limited to 'modules/by-name/pi')
| -rw-r--r-- | modules/by-name/pi/pipewire/module.nix | 27 | ||||
| -rw-r--r-- | modules/by-name/pi/printing/module.nix | 45 |
2 files changed, 27 insertions, 45 deletions
diff --git a/modules/by-name/pi/pipewire/module.nix b/modules/by-name/pi/pipewire/module.nix new file mode 100644 index 00000000..5bec816d --- /dev/null +++ b/modules/by-name/pi/pipewire/module.nix @@ -0,0 +1,27 @@ +# nixos-config - My current NixOS configuration +# +# Copyright (C) 2025 Benedikt Peetz <benedikt.peetz@b-peetz.de> +# SPDX-License-Identifier: GPL-3.0-or-later +# +# This file is part of my nixos-config. +# +# You should have received a copy of the License along with this program. +# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>. +{ + config, + lib, + extra_lib, + ... +}: let + cfg = config.soispha.pipewire; +in { + options.soispha.pipewire = { + enable = extra_lib.options.mkDefaultEnabled "pipewire and wireplumber"; + }; + + config = lib.mkIf cfg.enable { + vhack.persist.userDirectories.soispha = [ + ".local/state/wireplumber" + ]; + }; +} diff --git a/modules/by-name/pi/printing/module.nix b/modules/by-name/pi/printing/module.nix deleted file mode 100644 index 85d15b16..00000000 --- a/modules/by-name/pi/printing/module.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - config, - lib, - ... -}: let - cfg = config.soispha.services.printing; -in { - options.soispha.services.printing = { - enable = lib.mkEnableOption "default printing configuration"; - }; - - config = lib.mkIf cfg.enable { - services.avahi = { - enable = true; - nssmdns4 = true; - nssmdns6 = true; - openFirewall = true; - }; - - services.printing = { - enable = true; - startWhenNeeded = true; - webInterface = true; - - # deletes `/var/cache/cups`, `/var/lib/cups` and `/var/spool/cups` on cups startup - stateless = true; - - drivers = []; - }; - - hardware = { - printers = { - ensurePrinters = [ - { - name = "Brother"; - description = "Brother DCP-9022CDW"; - model = "everywhere"; - deviceUri = "dnssd://Brother%20DCP-9022CDW._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-30055c773bcf"; - } - ]; - ensureDefaultPrinter = "Brother"; - }; - }; - }; -} |
