From 6aaa5993e4c1cfb205ed555d958702f9bba1770d Mon Sep 17 00:00:00 2001 From: adikro Date: Wed, 24 Dec 2025 16:21:00 +0100 Subject: a bunch of changes, renames sys to os and refactored some of the logic --- os/core/core.nix | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 os/core/core.nix (limited to 'os/core/core.nix') diff --git a/os/core/core.nix b/os/core/core.nix new file mode 100644 index 0000000..428d7ea --- /dev/null +++ b/os/core/core.nix @@ -0,0 +1,46 @@ +{ config, lib, pkgs, ... }: +let + cfg = config.sys.core; +in +{ + imports = [ + ./audio.nix + ./bootloader.nix + ./drivers.nix + ./fonts.nix + ./greet.nix + ./home-manager.nix + ./localization.nix + ./memory.nix + ./networking.nix + ./power.nix + ./security.nix + ./storage.nix + ./users.nix + ]; + + options.sys.core = { + allowUnfree.enable = lib.mkEnableOption "unfree software"; + + flatpak.enable = lib.mkEnableOption "Flatpak support"; + + hardwareTools = { + enable = lib.mkEnableOption "peripheral and thermal tools"; + }; + }; + + config = lib.mkMerge [ + (lib.mkIf cfg.allowUnfree.enable { + nixpkgs.config.allowUnfree = true; + }) + + (lib.mkIf cfg.flatpak.enable { + services.flatpak.enable = true; + }) + + (lib.mkIf cfg.hardwareTools.enable { + programs.coolercontrol.enable = true; + environment.systemPackages = [ pkgs.rivalcfg ]; + }) + ]; +} -- cgit v1.3