diff --git a/flake.lock b/flake.lock index f345f05..58263b8 100644 --- a/flake.lock +++ b/flake.lock @@ -1020,6 +1020,22 @@ "type": "github" } }, + "nixpkgs-sunshine": { + "locked": { + "lastModified": 1711847268, + "narHash": "sha256-SLTEJSykimcVTtye8jETxPWMbDdg2yMNFZTL9H3pBkg=", + "owner": "devusb", + "repo": "nixpkgs", + "rev": "c44ca352868d7c9e8ce5b1b90d7df28a28643be6", + "type": "github" + }, + "original": { + "owner": "devusb", + "ref": "sunshine-module", + "repo": "nixpkgs", + "type": "github" + } + }, "nixpkgs-traxys": { "locked": { "lastModified": 1692884435, @@ -2147,6 +2163,7 @@ "nix-ld": "nix-ld", "nixpkgs": "nixpkgs_12", "nixpkgs-master": "nixpkgs-master", + "nixpkgs-sunshine": "nixpkgs-sunshine", "nixpkgs-traxys": "nixpkgs-traxys", "nixvim": "nixvim", "nur": "nur", diff --git a/flake.nix b/flake.nix index dfc3899..e3f3312 100644 --- a/flake.nix +++ b/flake.nix @@ -5,6 +5,7 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-master.url = "github:nixos/nixpkgs"; nixpkgs-traxys.url = "github:traxys/nixpkgs/inflight"; + nixpkgs-sunshine.url = "github:devusb/nixpkgs?ref=sunshine-module"; nix-gaming = { url = "github:fufexan/nix-gaming"; inputs.nixpkgs.follows = "nixpkgs"; @@ -494,6 +495,9 @@ ZeNixComputa = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; + specialArgs = { + inherit (inputs) nixpkgs-sunshine; + }; modules = [ ./hostconfig/ZeNixComputa/extra_info.nix ./hostconfig/ZeNixComputa/hardware-configuration.nix diff --git a/hostconfig/ZeNixComputa/nixos.nix b/hostconfig/ZeNixComputa/nixos.nix index 6011911..a9f7c48 100644 --- a/hostconfig/ZeNixComputa/nixos.nix +++ b/hostconfig/ZeNixComputa/nixos.nix @@ -1,4 +1,13 @@ { + pkgs, + nixpkgs-sunshine, + lib, + ... +}: { + imports = [ + "${nixpkgs-sunshine}/nixos/modules/services/networking/sunshine.nix" + ]; + boot.initrd = { enable = true; availableKernelModules = ["amdgpu" "r8169"]; @@ -22,6 +31,12 @@ "video=DP-2:1920x1080@75" ]; + services.sunshine = { + enable = true; + openFirewall = true; + capSysAdmin = true; + }; + networking = { hostName = "ZeNixComputa"; interfaces = {