mirror of
https://github.com/kaesaecracker/nixos-configuration.git
synced 2025-01-18 18:40:14 +01:00
move imports, options
This commit is contained in:
parent
2764393d06
commit
c6eefbb5bc
|
@ -17,6 +17,10 @@ in {
|
||||||
|
|
||||||
options.my.desktop = {
|
options.my.desktop = {
|
||||||
enable = lib.mkEnableOption "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 {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
options.my.desktop.gnome = {
|
|
||||||
enable = lib.mkEnableOption "gnome desktop";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
my.desktop.enable = true;
|
my.desktop.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -18,10 +18,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
options.my.desktop.kde = {
|
|
||||||
enable = lib.mkEnableOption "KDE desktop";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
my.desktop.enable = true;
|
my.desktop.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,6 @@
|
||||||
with lib; let
|
with lib; let
|
||||||
cfg = config.my.desktop.ronja;
|
cfg = config.my.desktop.ronja;
|
||||||
in {
|
in {
|
||||||
options.my.desktop.ronja = {
|
|
||||||
enable = lib.mkEnableOption "user ronja";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# Define user account
|
# Define user account
|
||||||
users.users.ronja = {
|
users.users.ronja = {
|
||||||
|
|
|
@ -6,10 +6,6 @@
|
||||||
}: let
|
}: let
|
||||||
cfg = config.my.desktop.vinzenz;
|
cfg = config.my.desktop.vinzenz;
|
||||||
in {
|
in {
|
||||||
options.my.desktop.vinzenz = {
|
|
||||||
enable = lib.mkEnableOption "user vinzenz";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# Define user account
|
# Define user account
|
||||||
users.users.vinzenz = {
|
users.users.vinzenz = {
|
||||||
|
|
|
@ -1,18 +1,5 @@
|
||||||
{
|
{lib, ...}: {
|
||||||
lib,
|
config = {
|
||||||
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 {
|
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|
|
@ -6,7 +6,6 @@ hostName: {
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
(builtins.toString ./. + "/${hostName}.nix")
|
(builtins.toString ./. + "/${hostName}.nix")
|
||||||
./common-desktop.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
config = {
|
imports = [
|
||||||
my.hardware.common-desktop.enable = true;
|
./common-desktop.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
initrd.availableKernelModules = ["xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
|
||||||
initrd.kernelModules = [];
|
initrd.kernelModules = [];
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
{...}: {
|
{...}: {
|
||||||
config = {
|
imports = [
|
||||||
my.hardware.common-desktop.enable = true;
|
./common-desktop.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
config = {
|
||||||
boot = {
|
boot = {
|
||||||
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
|
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"]; # "usb_storage"
|
||||||
initrd.kernelModules = [];
|
initrd.kernelModules = [];
|
||||||
|
|
Loading…
Reference in a new issue