diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index 420750c..9bd2083 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -5,11 +5,14 @@ config, pkgs, inputs, - nixos-hardware, ... }: { imports = [./hardware-configuration.nix]; hardware.steam-hardware.enable = true; + nixpkgs.config.allowUnfree = true; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; networking = { hostName = "desktop"; @@ -37,6 +40,7 @@ wivrn = { enable = true; defaultRuntime = true; + autoStart = true; }; xserver.enable = true; displayManager.sddm.enable = true; @@ -47,7 +51,7 @@ enable = true; autoEnable = true; polarity = "dark"; - image = ./wallpaper.png; + image = ../laptop/wallpaper.png; base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml"; opacity = { terminal = 0.85; @@ -98,11 +102,24 @@ programs = { zsh.enable = true; - wivrn.enable = true; - opencomposite.enable = true; steam.enable = true; gamescope.enable = true; - } + envision.enable = true; + corectrl.enable = true; + }; + + users.users.k = { + isNormalUser = true; + description = "k"; + extraGroups = ["networkmanager" "wheel"]; + packages = with pkgs; [zsh]; + shell = pkgs.zsh; + }; + + home-manager = { + backupFileExtension = "bk"; + users = {"k" = import ./home.nix;}; + }; # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix index 0d0787f..aa24003 100644 --- a/hosts/desktop/hardware-configuration.nix +++ b/hosts/desktop/hardware-configuration.nix @@ -1 +1,38 @@ -##TODO +# 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" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/aace1ae9-2a8f-4a90-9e0b-cb21779636d2"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/8D75-F095"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + # 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp8s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index a15c042..82a1bd8 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -5,5 +5,43 @@ ... }: { imports = [../home/home_common.nix]; - home = {packages = with pkgs; [steam wivrn opencomposite neovim];}; + nixpkgs.config.allowUnfree = true; + home = { + packages = with pkgs; [ + steam + neovim + firefox + wivrn + opencomposite + wlx-overlay-s + glslang + gst_all_1.gstreamer + libdrm + openxr-loader + khronos-ocl-icd-loader + ]; + }; + +# For WiVRn: +xdg.configFile."openxr/1/active_runtime.json".source = "${pkgs.wivrn}/share/openxr/1/openxr_wivrn.json"; + +xdg.configFile."openvr/openvrpaths.vrpath".text = '' + { + "config" : + [ + "${config.xdg.dataHome}/Steam/config" + ], + "external_drivers" : null, + "jsonid" : "vrpathreg", + "log" : + [ + "${config.xdg.dataHome}/Steam/logs" + ], + "runtime" : + [ + "${pkgs.opencomposite}/lib/opencomposite" + ], + "version" : 1 + } +''; }