From 20c5b716efcef2428456480d25edb8b7b2e6882a Mon Sep 17 00:00:00 2001 From: twoneis Date: Sat, 6 Jan 2024 12:23:27 +0100 Subject: [PATCH] cleanup (mostly) --- devices/desktop/hardware-config.nix | 26 ++++++++++++-------------- devices/surface/default.nix | 3 +++ modules/system/default.nix | 3 ++- modules/system/docker.nix | 1 + 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/devices/desktop/hardware-config.nix b/devices/desktop/hardware-config.nix index 87e44a6..19dfeff 100644 --- a/devices/desktop/hardware-config.nix +++ b/devices/desktop/hardware-config.nix @@ -4,28 +4,26 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/95b15244-c97c-42a5-9be1-ed5df6872dcb"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/95b15244-c97c-42a5-9be1-ed5df6872dcb"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/BF87-B3DE"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/BF87-B3DE"; + fsType = "vfat"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/b6445ced-1cc2-461f-a81f-6e8409c10f48"; } - ]; + swapDevices =[ { device = "/dev/disk/by-uuid/b6445ced-1cc2-461f-a81f-6e8409c10f48"; } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/devices/surface/default.nix b/devices/surface/default.nix index 06b9cc1..02bd86e 100644 --- a/devices/surface/default.nix +++ b/devices/surface/default.nix @@ -5,6 +5,9 @@ networking.hostName = "surface"; + # Add user to surface control group for surface linux + users.users.twoneis.extraGroups = [ "surface-control" ]; + # Enable OpenGL hardware.opengl = { enable = true; diff --git a/modules/system/default.nix b/modules/system/default.nix index fc73b23..f7e7e1a 100644 --- a/modules/system/default.nix +++ b/modules/system/default.nix @@ -7,6 +7,7 @@ ./audio.nix ./fonts.nix ./docker.nix + ./virt.nix ../gnome ]; @@ -79,6 +80,6 @@ users.users.twoneis = { isNormalUser = true; description = "twoneis"; - extraGroups = [ "networkmanager" "wheel" "surface-control" "docker" ]; + extraGroups = [ "networkmanager" "wheel" ]; }; } diff --git a/modules/system/docker.nix b/modules/system/docker.nix index 8814f80..c79adca 100644 --- a/modules/system/docker.nix +++ b/modules/system/docker.nix @@ -1,3 +1,4 @@ { ... }: { virtualisation.docker.enable = true; + users.users.twoneis.extraGroups = [ "docker" ]; }