From 7944605e6b79a50e336c37916615b310b37a8450 Mon Sep 17 00:00:00 2001 From: MoritzBoehme Date: Wed, 29 Sep 2021 16:27:02 +0200 Subject: [PATCH] added nixos-desktop --- flake.nix | 1 + .../nixos-desktop/hardware-configuration.nix | 58 +++++++++++++++++++ modules/desktop/bspwm/default.nix | 5 ++ 3 files changed, 64 insertions(+) create mode 100644 hosts/nixos-desktop/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index d3af44d..c41a7f2 100644 --- a/flake.nix +++ b/flake.nix @@ -68,5 +68,6 @@ ]; hosts.nixos-laptop.modules = [ ./hosts/nixos-laptop ]; + hosts.nixos-desktop.modules = [ ./hosts/nixos-desktop ]; }; } diff --git a/hosts/nixos-desktop/hardware-configuration.nix b/hosts/nixos-desktop/hardware-configuration.nix new file mode 100644 index 0000000..d5f4fa3 --- /dev/null +++ b/hosts/nixos-desktop/hardware-configuration.nix @@ -0,0 +1,58 @@ +# 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, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; + fsType = "btrfs"; + options = [ "subvol=root" ]; + }; + + boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/30025a9f-44cf-4074-8ae2-d4925efd67dd"; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; + fsType = "btrfs"; + options = [ "subvol=home" ]; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; + fsType = "btrfs"; + options = [ "subvol=nix" ]; + }; + + fileSystems."/persist" = + { device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; + fsType = "btrfs"; + options = [ "subvol=persist" ]; + }; + + fileSystems."/var/log" = + { device = "/dev/disk/by-uuid/668a49b3-d169-461f-861d-0c3e6a1642d1"; + fsType = "btrfs"; + options = [ "subvol=log" ]; + neededForBoot = true; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/297B-C04C"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/00ad6f74-f23e-4ac0-abfb-89bdfe5ab8ae"; } + ]; + +} diff --git a/modules/desktop/bspwm/default.nix b/modules/desktop/bspwm/default.nix index 69ce5a7..917f244 100644 --- a/modules/desktop/bspwm/default.nix +++ b/modules/desktop/bspwm/default.nix @@ -6,6 +6,8 @@ enable = true; layout = "de"; + videoDrivers = [ "nvidia" ]; + displayManager = { defaultSession = "none+bspwm"; @@ -20,6 +22,9 @@ windowManager.bspwm.enable = true; }; }; + + console.keyMap = "de"; + home-manager.users.moritz = { xsession.windowManager.bspwm.enable = true;