move imports, options

This commit is contained in:
Vinzenz Schroeter 2023-09-11 21:49:40 +02:00
parent 2764393d06
commit c6eefbb5bc
9 changed files with 14 additions and 36 deletions

View file

@ -17,6 +17,10 @@ in {
options.my.desktop = {
enable = lib.mkEnableOption "desktop";
gnome .enable = lib.mkEnableOption "gnome desktop";
kde.enable = lib.mkEnableOption "KDE desktop";
ronja.enable = lib.mkEnableOption "user ronja";
vinzenz.enable = lib.mkEnableOption "user vinzenz";
};
config = lib.mkIf cfg.enable {

View file

@ -19,10 +19,6 @@
};
};
in {
options.my.desktop.gnome = {
enable = lib.mkEnableOption "gnome desktop";
};
config = lib.mkIf cfg.enable {
my.desktop.enable = true;

View file

@ -18,10 +18,6 @@
};
};
in {
options.my.desktop.kde = {
enable = lib.mkEnableOption "KDE desktop";
};
config = lib.mkIf cfg.enable {
my.desktop.enable = true;

View file

@ -7,10 +7,6 @@
with lib; let
cfg = config.my.desktop.ronja;
in {
options.my.desktop.ronja = {
enable = lib.mkEnableOption "user ronja";
};
config = lib.mkIf cfg.enable {
# Define user account
users.users.ronja = {

View file

@ -6,10 +6,6 @@
}: let
cfg = config.my.desktop.vinzenz;
in {
options.my.desktop.vinzenz = {
enable = lib.mkEnableOption "user vinzenz";
};
config = lib.mkIf cfg.enable {
# Define user account
users.users.vinzenz = {

View file

@ -1,18 +1,5 @@
{
lib,
config,
...
}: let
isEnabled = config.my.hardware.common-desktop.enable;
in {
imports = [
];
options.my.hardware.common-desktop = {
enable = lib.mkEnableOption "common desktop hardware settings";
};
config = lib.mkIf isEnabled {
{lib, ...}: {
config = {
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;

View file

@ -6,7 +6,6 @@ hostName: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(builtins.toString ./. + "/${hostName}.nix")
./common-desktop.nix
];
config = {

View file

@ -1,7 +1,9 @@
{...}: {
config = {
my.hardware.common-desktop.enable = true;
imports = [
./common-desktop.nix
];
config = {
boot = {
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
initrd.kernelModules = [];

View file

@ -1,7 +1,9 @@
{...}: {
config = {
my.hardware.common-desktop.enable = true;
imports = [
./common-desktop.nix
];
config = {
boot = {
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
initrd.kernelModules = [];