From 0dae391f43406c3bf8b48a3194523ff720351747 Mon Sep 17 00:00:00 2001 From: Tyler Starr Date: Mon, 21 Aug 2023 21:41:39 -0700 Subject: [PATCH 1/2] add hardware --- provision/nixos/hosts/bulwark/hardware.nix | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 provision/nixos/hosts/bulwark/hardware.nix diff --git a/provision/nixos/hosts/bulwark/hardware.nix b/provision/nixos/hosts/bulwark/hardware.nix new file mode 100644 index 00000000..2fe63f61 --- /dev/null +++ b/provision/nixos/hosts/bulwark/hardware.nix @@ -0,0 +1,38 @@ +# 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 + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/1fddaaed-6ad9-4e7f-b613-3059e2cb019b"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/AA59-9D24"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/a7cd6a07-c564-4056-a1b5-69a71effd237"; } + ]; + + # 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.enp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; +} From 1d26018a1ca99c9689a20ed6a596cb4762ff4205 Mon Sep 17 00:00:00 2001 From: starr-dusT Date: Mon, 21 Aug 2023 22:44:19 -0700 Subject: [PATCH 2/2] steamui doesn't work in virtmanager :( --- provision/nixos/flake.nix | 2 +- .../nixos/hosts/bulwark/configuration.nix | 10 ++++---- provision/nixos/modules/gaming/default.nix | 2 +- provision/nixos/modules/gaming/steam-deck.nix | 23 +++++++++++-------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/provision/nixos/flake.nix b/provision/nixos/flake.nix index 4ef66127..ba824760 100644 --- a/provision/nixos/flake.nix +++ b/provision/nixos/flake.nix @@ -65,7 +65,7 @@ bulwark = lib.nixosSystem { inherit system; - specialArgs = { inherit user; inherit pkgs-unstable; }; + specialArgs = { inherit user; inherit pkgs-unstable; inherit jovian-nixos; inherit home-manager; }; modules = [ ./hosts/bulwark/configuration.nix ./hosts/bulwark/hardware.nix diff --git a/provision/nixos/hosts/bulwark/configuration.nix b/provision/nixos/hosts/bulwark/configuration.nix index 4943e593..81b294dc 100644 --- a/provision/nixos/hosts/bulwark/configuration.nix +++ b/provision/nixos/hosts/bulwark/configuration.nix @@ -41,9 +41,9 @@ i18n.defaultLocale = "en_US.UTF-8"; # Enable sound. - sound.enable = true; - hardware.pulseaudio.enable = true; - hardware.pulseaudio.support32Bit = true; + #sound.enable = true; + #hardware.pulseaudio.enable = true; + #hardware.pulseaudio.support32Bit = true; # Add fonts fonts.fonts = with pkgs; [ @@ -51,8 +51,8 @@ ]; # Enable virtualisation - virtualisation.docker.enable = true; - virtualisation.docker.storageDriver = "btrfs"; + #virtualisation.docker.enable = true; + #virtualisation.docker.storageDriver = "btrfs"; # Enable zsh programs.zsh.enable = true; diff --git a/provision/nixos/modules/gaming/default.nix b/provision/nixos/modules/gaming/default.nix index 11482080..cb30367e 100644 --- a/provision/nixos/modules/gaming/default.nix +++ b/provision/nixos/modules/gaming/default.nix @@ -1,4 +1,4 @@ { ... }: { - imports = [ ./steam.nix ]; + imports = [ ./steam.nix ./steam-deck.nix ]; } diff --git a/provision/nixos/modules/gaming/steam-deck.nix b/provision/nixos/modules/gaming/steam-deck.nix index be69a0c6..6efef465 100644 --- a/provision/nixos/modules/gaming/steam-deck.nix +++ b/provision/nixos/modules/gaming/steam-deck.nix @@ -1,29 +1,34 @@ -{ config, lib, pkgs, pkgs-unstable, user, jovian-nixos, ... }: +{ config, lib, pkgs, pkgs-unstable, user, jovian-nixos, home-manager, ... }: let cfg = config.modules.gaming.steam-deck; in { + imports = [ + (jovian-nixos + "/modules") + home-manager.nixosModule + ]; options.modules.gaming.steam-deck.enable = lib.mkEnableOption "steam-deck"; config = lib.mkIf cfg.enable { - imports = [ - (jovian-nixos + "/modules") - home-manager.nixosModule - ]; + jovian = { steam.enable = true; + steam.autoStart = true; + steam.user = "${user}"; devices.steamdeck = { - enable = true; + enable = false; }; }; services.xserver.displayManager.gdm.wayland = lib.mkForce true; # lib.mkForce is only required on my setup because I'm using some other NixOS configs that conflict with this value services.xserver.displayManager.defaultSession = "steam-wayland"; services.xserver.displayManager.autoLogin.enable = true; - services.xserver.displayManager.autoLogin.user = ${user}; + services.xserver.displayManager.autoLogin.user = "${user}"; # Enable GNOME sound.enable = true; + hardware.pulseaudio.enable = lib.mkForce false; + services.xserver.desktopManager.gnome = { enable = true; }; @@ -89,9 +94,8 @@ in { steamdeck-firmware ]; - # GNOME settings through home-manager + # GNOME settings through home home-manager.users.${user} = { - home.stateVersion = "22.11"; dconf.settings = { # Enable on-screen keyboard "org/gnome/desktop/a11y/applications" = { @@ -123,4 +127,5 @@ in { }; }; }; + }; }