diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-05-15 18:30:28 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-15 18:30:28 +0000 |
commit | f1b78f86182a4372a4dd1b79301f01eebcd3b49d (patch) | |
tree | 5b17705058677bdf5eb2ca8fd5d6a8e62d58fb02 /nixos | |
parent | 665732d8779f7edbbc05f7e2428da4f40abcc3a8 (diff) | |
parent | 059c4b584e1c90636a56ff8f7b5e771de30154d7 (diff) | |
download | nixpkgs-f1b78f86182a4372a4dd1b79301f01eebcd3b49d.tar nixpkgs-f1b78f86182a4372a4dd1b79301f01eebcd3b49d.tar.gz nixpkgs-f1b78f86182a4372a4dd1b79301f01eebcd3b49d.tar.bz2 nixpkgs-f1b78f86182a4372a4dd1b79301f01eebcd3b49d.tar.lz nixpkgs-f1b78f86182a4372a4dd1b79301f01eebcd3b49d.tar.xz nixpkgs-f1b78f86182a4372a4dd1b79301f01eebcd3b49d.tar.zst nixpkgs-f1b78f86182a4372a4dd1b79301f01eebcd3b49d.zip |
Merge master into staging-next
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/programs/sway.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/games/factorio.nix | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix index 2b69851b340..ca79177f827 100644 --- a/nixos/modules/programs/sway.nix +++ b/nixos/modules/programs/sway.nix @@ -124,7 +124,7 @@ in { "sway/config.d/nixos.conf".source = pkgs.writeText "nixos.conf" '' # Import the most important environment variables into the D-Bus and systemd # user environments (e.g. required for screen sharing and Pinentry prompts): - exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK + exec dbus-update-activation-environment --systemd DISPLAY WAYLAND_DISPLAY SWAYSOCK XDG_CURRENT_DESKTOP ''; }; }; @@ -135,6 +135,8 @@ in { # To make a Sway session available if a display manager like SDDM is enabled: services.xserver.displayManager.sessionPackages = [ swayPackage ]; programs.xwayland.enable = mkDefault true; + # For screen sharing (this option only has an effect with xdg.portal.enable): + xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ]; }; meta.maintainers = with lib.maintainers; [ gnidorah primeos colemickens ]; diff --git a/nixos/modules/services/games/factorio.nix b/nixos/modules/services/games/factorio.nix index a1aa5739d06..3cb14275792 100644 --- a/nixos/modules/services/games/factorio.nix +++ b/nixos/modules/services/games/factorio.nix @@ -35,10 +35,10 @@ let auto_pause = true; only_admins_can_pause_the_game = true; autosave_only_on_server = true; - admins = []; non_blocking_saving = cfg.nonBlockingSaving; } // cfg.extraSettings; serverSettingsFile = pkgs.writeText "server-settings.json" (builtins.toJSON (filterAttrsRecursive (n: v: v != null) serverSettings)); + serverAdminsFile = pkgs.writeText "server-adminlist.json" (builtins.toJSON cfg.admins); modDir = pkgs.factorio-utils.mkModDirDrv cfg.mods; in { @@ -52,6 +52,16 @@ in The port to which the service should bind. ''; }; + + admins = mkOption { + type = types.listOf types.str; + default = []; + example = [ "username" ]; + description = '' + List of player names which will be admin. + ''; + }; + openFirewall = mkOption { type = types.bool; default = false; @@ -234,6 +244,7 @@ in "--start-server=${mkSavePath cfg.saveName}" "--server-settings=${serverSettingsFile}" (optionalString (cfg.mods != []) "--mod-directory=${modDir}") + (optionalString (cfg.admins != []) "--server-adminlist=${serverAdminsFile}") ]; # Sandboxing |