mirror of
https://github.com/youwen5/nixos.git
synced 2025-01-18 05:02:10 -08:00
refactor: condense some small modules into misc
This commit is contained in:
parent
c9c3e3f6cb
commit
ce89f8149e
3 changed files with 37 additions and 39 deletions
|
@ -10,11 +10,10 @@
|
|||
./fonts
|
||||
./gaming
|
||||
./greeter
|
||||
./hamachi
|
||||
./networking
|
||||
./spotifyd
|
||||
./stylix
|
||||
./wine
|
||||
./wsl
|
||||
./misc
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.system.fonts;
|
||||
in
|
||||
{
|
||||
options.liminalOS.system.fonts = {
|
||||
enable = lib.mkEnableOption "fonts";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages =
|
||||
with pkgs;
|
||||
[
|
||||
noto-fonts-cjk-sans
|
||||
(google-fonts.override { fonts = [ "Lora" ]; })
|
||||
]
|
||||
++ (lib.optionals (!config.liminalOS.theming.enable) [
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
nerd-fonts.caskaydia-cove
|
||||
]);
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,25 +1,55 @@
|
|||
{ config, lib, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.liminalOS.system.printing;
|
||||
inherit (lib) mkIf;
|
||||
in
|
||||
{
|
||||
options.liminalOS.system.printing = {
|
||||
enable = lib.mkOption {
|
||||
options.liminalOS.system = {
|
||||
printing.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = config.liminalOS.enable;
|
||||
description = ''
|
||||
Whether to set up default options for printing and printer discover on UNIX.
|
||||
'';
|
||||
};
|
||||
fonts.enable = lib.mkEnableOption "fonts";
|
||||
distrobox.enable = lib.mkEnableOption "distrobox and podman";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.printing.enable = true;
|
||||
config = {
|
||||
services.printing.enable = mkIf cfg.printing.enable true;
|
||||
|
||||
services.avahi = {
|
||||
services.avahi = mkIf cfg.printing.enable {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
fonts = mkIf cfg.fonts.enable {
|
||||
enableDefaultPackages = true;
|
||||
packages =
|
||||
with pkgs;
|
||||
[
|
||||
noto-fonts-cjk-sans
|
||||
(google-fonts.override { fonts = [ "Lora" ]; })
|
||||
]
|
||||
++ (lib.optionals (!config.liminalOS.theming.enable) [
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
nerd-fonts.caskaydia-cove
|
||||
]);
|
||||
};
|
||||
|
||||
virtualisation.podman = cfg.distrobox.enable {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = cfg.distrobox.enable [ pkgs.distrobox ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue