Compare commits
4 commits
279d309c73
...
de179d7332
Author | SHA1 | Date | |
---|---|---|---|
de179d7332 | |||
3213902bb6 | |||
de70c6a16b | |||
6d78f64de1 |
7 changed files with 44 additions and 4 deletions
|
@ -29,10 +29,11 @@
|
||||||
|
|
||||||
../common/optional/systemd-boot.nix
|
../common/optional/systemd-boot.nix
|
||||||
../common/optional/wireshark.nix
|
../common/optional/wireshark.nix
|
||||||
../common/optional/gamemode.nix
|
|
||||||
../common/optional/kde-connect.nix
|
../common/optional/kde-connect.nix
|
||||||
../common/optional/gnome-keyring.nix
|
../common/optional/gnome-keyring.nix
|
||||||
../common/optional/adb.nix
|
../common/optional/adb.nix
|
||||||
|
../common/optional/gaming/gamemode.nix
|
||||||
|
../common/optional/gaming/vr.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
}: let
|
}: let
|
||||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||||
in {
|
in {
|
||||||
imports = builtins.attrValues outputs.nixosModules; #propagates imports downwards
|
|
||||||
users.users.${vars.user} = {
|
users.users.${vars.user} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
|
|
6
hosts/common/optional/gaming/vr.nix
Normal file
6
hosts/common/optional/gaming/vr.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
programs.alvr = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
34
modules/nixos/alvr.nix
Normal file
34
modules/nixos/alvr.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.programs.alvr;
|
||||||
|
in {
|
||||||
|
options = {
|
||||||
|
programs.alvr = {
|
||||||
|
enable = mkEnableOption (lib.mdDoc "ALVR");
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "alvr" {};
|
||||||
|
|
||||||
|
openFirewall = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Open the default ports in the firewall for the ALVR server.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
environment.systemPackages = [cfg.package];
|
||||||
|
|
||||||
|
networking.firewall = mkIf cfg.openFirewall {
|
||||||
|
allowedTCPPorts = [9943 9944];
|
||||||
|
allowedUDPPorts = [9943 9944];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -2,5 +2,5 @@
|
||||||
# These should be stuff you would like to share with others, not your personal configurations.
|
# These should be stuff you would like to share with others, not your personal configurations.
|
||||||
{
|
{
|
||||||
# List your module files here
|
# List your module files here
|
||||||
# my-module = import ./my-module.nix;
|
alvr = import ./alvr.nix;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||||
# You can build them using 'nix build .#example'
|
# You can build them using 'nix build .#example'
|
||||||
pkgs: {
|
{pkgs, ...}: {
|
||||||
# example = pkgs.callPackage ./example { };
|
# example = pkgs.callPackage ./example { };
|
||||||
alvr = pkgs.callPackage ./alvr {};
|
alvr = pkgs.callPackage ./alvr {};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue