feat(nix): add desktop module and refactor machine options

This commit is contained in:
Mohammad Rafiq 2025-07-07 21:48:12 +08:00
parent 4c82720251
commit 8166894b78
No known key found for this signature in database
3 changed files with 12 additions and 16 deletions

View file

@ -1,15 +1,3 @@
let
testCfg = {
machine = {
bluetooth.enable = true;
usb.automount = true;
virtualisation.podman = {
enable = true;
distrobox.enable = true;
};
};
};
in
{
flake.manifest = {
users.rafiq = {
@ -34,14 +22,13 @@ in
}
];
};
extraCfg = testCfg;
extraCfg.desktop.enable = true;
};
apollo = {
machine = {
platform = "intel";
root.drive = "/dev/disk/by-id/nvme-eui.002538d221b47b01";
};
extraCfg = testCfg;
};
};
};

View file

@ -0,0 +1,7 @@
{ lib, ... }:
let
inherit (lib.options) mkEnableOption;
in
{
flake.modules.nixos.default.options.desktop.enable = mkEnableOption "";
}

View file

@ -11,8 +11,10 @@ in
in
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
options.machine.bluetooth.enable = mkEnableOption "";
options.machine.usb.automount = mkEnableOption "";
options.machine = {
bluetooth.enable = mkEnableOption "";
usb.automount = mkEnableOption "";
};
config = mkMerge [
(mkIf cfg.usb.automount {
services.udisks2.enable = true;