feat: Change the remotebuild user to a build only user instead of a
regular user
This commit is contained in:
@@ -23,7 +23,7 @@
|
|||||||
buildMachines = [
|
buildMachines = [
|
||||||
{
|
{
|
||||||
hostName = "sh.darksailor.dev";
|
hostName = "sh.darksailor.dev";
|
||||||
sshUser = "fs0c131y";
|
sshUser = "remotebuilder";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
protocol = "ssh-ng";
|
protocol = "ssh-ng";
|
||||||
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||||
|
|||||||
@@ -36,7 +36,7 @@
|
|||||||
buildMachines = [
|
buildMachines = [
|
||||||
{
|
{
|
||||||
hostName = "sh.darksailor.dev";
|
hostName = "sh.darksailor.dev";
|
||||||
sshUser = "fs0c131y";
|
sshUser = "remotebuilder";
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
protocol = "ssh-ng";
|
protocol = "ssh-ng";
|
||||||
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
extra-experimental-features = "nix-command flakes auto-allocate-uids";
|
extra-experimental-features = "nix-command flakes auto-allocate-uids";
|
||||||
trusted-users = ["root" "servius" "fs0c131y"];
|
trusted-users = ["root" "fs0c131y" "remotebuilder"];
|
||||||
};
|
};
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
build-users-group = nixbld
|
build-users-group = nixbld
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
};
|
};
|
||||||
users.users.remotebuilder = {
|
users.users.remotebuilder = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
openssh.authorizedKeys.keyFiles = [../../secrets/remotebuilder.pub];
|
openssh.authorizedKeys.keyFiles = [../../secrets/id_ed25519.pub];
|
||||||
};
|
};
|
||||||
users.groups.media = {};
|
users.groups.media = {};
|
||||||
|
|
||||||
|
|||||||
@@ -62,15 +62,15 @@
|
|||||||
options = "--delete-older-than +5";
|
options = "--delete-older-than +5";
|
||||||
};
|
};
|
||||||
package = pkgs.nixVersions.latest;
|
package = pkgs.nixVersions.latest;
|
||||||
# buildMachines = [
|
buildMachines = [
|
||||||
# {
|
{
|
||||||
# hostName = "sh.darksailor.dev";
|
hostName = "sh.darksailor.dev";
|
||||||
# sshUser = "nixbuilder";
|
sshUser = "remotebuilder";
|
||||||
# system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
# protocol = "ssh-ng";
|
protocol = "ssh-ng";
|
||||||
# supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
supportedFeatures = ["nixos-test" "benchmark" "big-parallel" "kvm"];
|
||||||
# }
|
}
|
||||||
# ];
|
];
|
||||||
distributedBuilds = true;
|
distributedBuilds = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -86,6 +86,12 @@
|
|||||||
tailscale = {
|
tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
sunshine = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
capSysAdmin = true;
|
||||||
|
# applications = {};
|
||||||
|
};
|
||||||
mullvad-vpn.enable = true;
|
mullvad-vpn.enable = true;
|
||||||
resolved = {
|
resolved = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -16,13 +16,19 @@
|
|||||||
hardware.graphics = {
|
hardware.graphics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enable32Bit = true;
|
enable32Bit = true;
|
||||||
extraPackages = [pkgs.intel-compute-runtime pkgs.nvidia-vaapi-driver];
|
extraPackages = with pkgs; [
|
||||||
|
intel-compute-runtime
|
||||||
|
# intel-media-driver # LIBVA_DRIVER_NAME=iHD
|
||||||
|
# intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
|
||||||
|
# vpl-gpu-rt # for newer GPUs on NixOS >24.05 or unstable
|
||||||
|
# libvdpau-va-gl
|
||||||
|
nvidia-vaapi-driver
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
users.extraUsers.servius.extraGroups = ["libvirtd" "adbusers" "kvm"];
|
users.extraUsers.servius.extraGroups = ["libvirtd" "adbusers" "kvm"];
|
||||||
|
|
||||||
# options nvidia_drm modeset=1 fbdev=1
|
|
||||||
boot.extraModprobeConfig = ''
|
boot.extraModprobeConfig = ''
|
||||||
options kvm_intel nested=1
|
options kvm_intel nested=1
|
||||||
options kvm_intel emulate_invalid_guest_state=0
|
options kvm_intel emulate_invalid_guest_state=0
|
||||||
|
|||||||
Reference in New Issue
Block a user