[NixOS] Control what is enabled per machine with module options
This commit is contained in:
@@ -2,10 +2,20 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
../laptop.nix
|
||||
../configuration.nix
|
||||
inputs.nixos-hardware.nixosModules.dell-xps-17-9700-intel
|
||||
];
|
||||
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = true;
|
||||
modules.extra.enable = false;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = false;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = false;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
|
@@ -1,14 +1,21 @@
|
||||
{
|
||||
imports = [
|
||||
../internet-computer.nix
|
||||
../configuration.nix
|
||||
../raspberry-pi.nix
|
||||
../base.nix
|
||||
../syncthing.nix
|
||||
../desktop.nix
|
||||
../code.nix
|
||||
# ../xmonad.nix
|
||||
];
|
||||
|
||||
modules.raspberry-pi.enable = true;
|
||||
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = true;
|
||||
modules.extra.enable = false;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = false;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = false;
|
||||
|
||||
services.plex = {
|
||||
enable = true;
|
||||
};
|
||||
|
@@ -1,13 +1,20 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../full.nix
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
modules.base.enable = true;
|
||||
modules.desktop.enable = true;
|
||||
modules.xmonad.enable = true;
|
||||
modules.extra.enable = false;
|
||||
modules.code.enable = true;
|
||||
modules.games.enable = false;
|
||||
modules.syncthing.enable = true;
|
||||
modules.fonts.enable = true;
|
||||
modules.nixified-ai.enable = false;
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
# disable card with bbswitch by default since we turn it on only on demand!
|
||||
|
@@ -1,12 +1,10 @@
|
||||
{ lib, pkgs, config, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../syncthing.nix
|
||||
../wsl.nix
|
||||
../kat.nix
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "jay-lenovo-wsl";
|
||||
modules.wls.enable = true;tworking.hostName = "jay-lenovo-wsl";
|
||||
|
||||
wsl.defaultUser = "kat";
|
||||
system.stateVersion = "22.05";
|
||||
|
@@ -2,10 +2,11 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
../full.nix
|
||||
../kat.nix
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
features.full.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
linuxPackages_latest.perf
|
||||
zenmonitor
|
||||
|
@@ -1,11 +1,11 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
../full.nix
|
||||
../kat.nix
|
||||
../nixified.ai.nix
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
features.full.enable = true;
|
||||
|
||||
networking.hostName = "nixquick";
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
@@ -2,10 +2,10 @@
|
||||
|
||||
{
|
||||
imports = [
|
||||
../full.nix
|
||||
../configuration.nix
|
||||
];
|
||||
|
||||
modules.nixified-ai.enable = true;
|
||||
features.full.enable = true;
|
||||
|
||||
boot.loader.systemd-boot.configurationLimit = 5;
|
||||
|
||||
|
@@ -1,83 +0,0 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../full.nix
|
||||
../base.nix
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc"
|
||||
];
|
||||
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [ ];
|
||||
|
||||
services.xserver = {
|
||||
videoDrivers = [ "modesetting ""nvidia" ];
|
||||
};
|
||||
|
||||
services.thermald.enable = true;
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
boot.kernelPatches = [{
|
||||
name = "enable-soundwire-drivers";
|
||||
patch = null;
|
||||
extraConfig = ''
|
||||
SND_SOC_INTEL_USER_FRIENDLY_LONG_NAMES y
|
||||
SND_SOC_INTEL_SOUNDWIRE_SOF_MACH m
|
||||
SND_SOC_RT1308 m
|
||||
'';
|
||||
ignoreConfigErrors = true;
|
||||
}];
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
sync.enable = true;
|
||||
|
||||
# Bus ID of the NVIDIA GPU. You can find it using lspci, either under 3D or VGA
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
|
||||
# Bus ID of the Intel GPU. You can find it using lspci, either under 3D or VGA
|
||||
intelBusId = "PCI:0:2:0";
|
||||
};
|
||||
|
||||
services.xserver.screenSection = ''
|
||||
Option "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
|
||||
Option "AllowIndirectGLXProtocol" "off"
|
||||
Option "TripleBuffer" "on"
|
||||
'';
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/7c999009-1ff1-42f7-a64a-3fa91fc777a8";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/97c1eee7-b161-4186-9c14-6b1771d49afb";
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/ESP";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.hostName = "stevie-nixos";
|
||||
|
||||
nix.settings.maxJobs = lib.mkDefault 16;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
|
||||
hardware.video.hidpi.enable = true;
|
||||
services.xserver.dpi = 180;
|
||||
|
||||
system.stateVersion = "21.05";
|
||||
}
|
@@ -1,47 +0,0 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../full.nix
|
||||
../games.nix
|
||||
../extra.nix
|
||||
];
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "sd_mod" ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ pkgs.linuxPackages.rtl8814au ];
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.device = "nodev";
|
||||
boot.loader.grub.enable = true;
|
||||
services.xserver = {
|
||||
libinput.enable = true;
|
||||
};
|
||||
hardware.facetimehd.enable = true;
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/EFI";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/2958f04b-8387-4a0c-abc1-f12036c53581";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/33c38b23-af1a-4bc4-913e-c774f1030817"; }
|
||||
];
|
||||
|
||||
fileSystems."/tmp" =
|
||||
{ device = "tmpfs";
|
||||
fsType = "tmpfs";
|
||||
};
|
||||
|
||||
networking.hostName = "uber-loaner";
|
||||
|
||||
nix.settings.maxJobs = lib.mkDefault 4;
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
users.extraUsers.root.initialHashedPassword = "";
|
||||
}
|
Reference in New Issue
Block a user