From a05421b0e4d18c29c9358cd89bea9a61d77d2147 Mon Sep 17 00:00:00 2001 From: Jon Santmyer Date: Sat, 31 Jan 2026 15:09:18 -0500 Subject: laptop updates 2026-01-31 --- modules/desktop/apps/editors/neovim.nix | 2 +- modules/device.nix | 1 + modules/hardware/printer.nix | 21 +++++++++++++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 modules/hardware/printer.nix (limited to 'modules') diff --git a/modules/desktop/apps/editors/neovim.nix b/modules/desktop/apps/editors/neovim.nix index f0040e0..304aca7 100644 --- a/modules/desktop/apps/editors/neovim.nix +++ b/modules/desktop/apps/editors/neovim.nix @@ -65,8 +65,8 @@ in { nvim-treesitter nvim-treesitter.withAllGrammars coc-clangd + coc-rust-analyzer coc-lua - coc-spell-checker ]; }; }; diff --git a/modules/device.nix b/modules/device.nix index acf9eb5..fbf4d95 100644 --- a/modules/device.nix +++ b/modules/device.nix @@ -11,6 +11,7 @@ drive = lib.mkOption {type = lib.types.enum ["ssd" "nvme"];}; hasBluetooth = lib.mkOption {type = lib.types.bool;}; + hasPrinter = lib.mkOption { type = lib.types.bool; }; displayProtocol = lib.mkOption {type = lib.types.enum ["xserver" "wayland"];}; }; } diff --git a/modules/hardware/printer.nix b/modules/hardware/printer.nix new file mode 100644 index 0000000..f4efd99 --- /dev/null +++ b/modules/hardware/printer.nix @@ -0,0 +1,21 @@ +{ + config, + options, + lib, + pkgs, + ... +}: let + device = config.modules.device; +in { + + config = lib.mkIf (device.hasPrinter) (lib.mkMerge [ + { + services.printing.enable = true; + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + }; + } + ]); +} -- cgit v1.2.3