From 27564cad42cfd075c5ddc28129e09c14c9e3f6a6 Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Sat, 11 Nov 2023 17:56:56 +0000 Subject: [PATCH] modules: system: printing: move from 'profiles' This isn't really a cross-cutting module, it should be a module rather than a profile. --- hosts/nixos/aramis/default.nix | 1 + hosts/nixos/aramis/profiles.nix | 2 -- hosts/nixos/aramis/system.nix | 10 ++++++++++ modules/system/default.nix | 1 + {profiles => modules/system}/printing/default.nix | 6 +++--- profiles/default.nix | 1 - 6 files changed, 15 insertions(+), 6 deletions(-) create mode 100644 hosts/nixos/aramis/system.nix rename {profiles => modules/system}/printing/default.nix (90%) diff --git a/hosts/nixos/aramis/default.nix b/hosts/nixos/aramis/default.nix index c72fb11..6e0304f 100644 --- a/hosts/nixos/aramis/default.nix +++ b/hosts/nixos/aramis/default.nix @@ -15,6 +15,7 @@ ./secrets ./services.nix ./sound.nix + ./system.nix ]; # Set your time zone. diff --git a/hosts/nixos/aramis/profiles.nix b/hosts/nixos/aramis/profiles.nix index d86da5a..4d2ac7d 100644 --- a/hosts/nixos/aramis/profiles.nix +++ b/hosts/nixos/aramis/profiles.nix @@ -9,8 +9,6 @@ gtk.enable = true; # Laptop specific configuration laptop.enable = true; - # Printers are hell, but so is the unability to print - printing.enable = true; # i3 configuration wm.windowManager = "i3"; # X configuration diff --git a/hosts/nixos/aramis/system.nix b/hosts/nixos/aramis/system.nix new file mode 100644 index 0000000..5e69222 --- /dev/null +++ b/hosts/nixos/aramis/system.nix @@ -0,0 +1,10 @@ +# Core system configuration +{ ... }: +{ + my.system = { + # Printers are hell, but so is the unability to print + printing = { + enable = true; + }; + }; +} diff --git a/modules/system/default.nix b/modules/system/default.nix index 9fe3b57..e7a4dd3 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -10,6 +10,7 @@ ./nix ./packages ./podman + ./printing ./users ]; } diff --git a/profiles/printing/default.nix b/modules/system/printing/default.nix similarity index 90% rename from profiles/printing/default.nix rename to modules/system/printing/default.nix index 9965797..a4547ef 100644 --- a/profiles/printing/default.nix +++ b/modules/system/printing/default.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.my.profiles.printing; + cfg = config.my.system.printing; in { - options.my.profiles.printing = with lib; { - enable = mkEnableOption "printing profile"; + options.my.system.printing = with lib; { + enable = mkEnableOption "printing configuration"; papersize = mkOption { type = with types; either str (enum [ diff --git a/profiles/default.nix b/profiles/default.nix index f7914a1..43d5a84 100644 --- a/profiles/default.nix +++ b/profiles/default.nix @@ -6,7 +6,6 @@ ./devices ./gtk ./laptop - ./printing ./wm ./x ];