diff --git a/sys/machines/hopper/default.nix b/sys/machines/hopper/default.nix index 42ed2e1..146e21d 100644 --- a/sys/machines/hopper/default.nix +++ b/sys/machines/hopper/default.nix @@ -1,6 +1,7 @@ { inputs, systemProfiles, + lib, ... }: { imports = with systemProfiles; [ @@ -9,6 +10,7 @@ ./hardware.nix ./lab + ./desktop.nix secrets.default secrets.hopper @@ -19,6 +21,10 @@ core.ssh core.deploy + hardware.graphics + hardware.steam-hardware + hardware.bluetooth + nix.default # TODO slim this down network.tailscale @@ -28,6 +34,17 @@ # services.syncthing # TODO make syncthing not rely on having "xun" user ]; + nixpkgs.config = { + allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "nvidia-x11" + "nvidia-settings" + + "stremio-shell" + "stremio-server" + ]; + }; + networking.hostName = "hopper"; swapDevices = []; diff --git a/sys/machines/hopper/desktop.nix b/sys/machines/hopper/desktop.nix new file mode 100644 index 0000000..b721d11 --- /dev/null +++ b/sys/machines/hopper/desktop.nix @@ -0,0 +1,46 @@ +{ + pkgs, + lib, + config, + inputs, + ... +}: { + users.users.desktop = { + isNormalUser = true; + useDefaultShell = true; + createHome = true; + extraGroups = [ + "input" + "video" + "render" + "audio" + ]; + }; + + environment.systemPackages = with pkgs; [ + firefox + stremio + ]; + + environment.etc."sway/config.d/custom.conf".text = '' + output HDMI-A-1 { + scale 2.0 + } + ''; + + services.greetd = { + enable = true; + settings = { + default_session = { + command = lib.getExe config.programs.sway.package; + user = "desktop"; + }; + }; + }; + + programs.sway = { + enable = true; + wrapperFeatures.gtk = true; + extraOptions = ["--unsupported-gpu"]; + }; +}