feat(nix): add desktop module and refactor machine options
This commit is contained in:
parent
4c82720251
commit
8166894b78
3 changed files with 12 additions and 16 deletions
|
@ -1,15 +1,3 @@
|
||||||
let
|
|
||||||
testCfg = {
|
|
||||||
machine = {
|
|
||||||
bluetooth.enable = true;
|
|
||||||
usb.automount = true;
|
|
||||||
virtualisation.podman = {
|
|
||||||
enable = true;
|
|
||||||
distrobox.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
flake.manifest = {
|
flake.manifest = {
|
||||||
users.rafiq = {
|
users.rafiq = {
|
||||||
|
@ -34,14 +22,13 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
extraCfg = testCfg;
|
extraCfg.desktop.enable = true;
|
||||||
};
|
};
|
||||||
apollo = {
|
apollo = {
|
||||||
machine = {
|
machine = {
|
||||||
platform = "intel";
|
platform = "intel";
|
||||||
root.drive = "/dev/disk/by-id/nvme-eui.002538d221b47b01";
|
root.drive = "/dev/disk/by-id/nvme-eui.002538d221b47b01";
|
||||||
};
|
};
|
||||||
extraCfg = testCfg;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
7
nix/modules/desktop/default.nix
Normal file
7
nix/modules/desktop/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib.options) mkEnableOption;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.modules.nixos.default.options.desktop.enable = mkEnableOption "";
|
||||||
|
}
|
|
@ -11,8 +11,10 @@ in
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
options.machine.bluetooth.enable = mkEnableOption "";
|
options.machine = {
|
||||||
options.machine.usb.automount = mkEnableOption "";
|
bluetooth.enable = mkEnableOption "";
|
||||||
|
usb.automount = mkEnableOption "";
|
||||||
|
};
|
||||||
config = mkMerge [
|
config = mkMerge [
|
||||||
(mkIf cfg.usb.automount {
|
(mkIf cfg.usb.automount {
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue