stockholm/lass/2configs/games.nix

60 lines
1.4 KiB
Nix
Raw Normal View History

2015-07-16 13:51:01 +00:00
{ config, pkgs, ... }:
let
mainUser = config.users.extraUsers.mainUser;
2016-12-07 09:14:27 +00:00
vdoom = pkgs.writeDash "vdoom" ''
${pkgs.zandronum-bin}/bin/zandronum \
2016-12-07 09:14:27 +00:00
-fov 120 \
"$@"
'';
2016-12-01 16:10:31 +00:00
doom = pkgs.writeDash "doom" ''
DOOM_DIR=''${DOOM_DIR:-~/doom/}
2016-12-07 09:14:27 +00:00
${vdoom} \
2016-12-01 16:10:31 +00:00
-file $DOOM_DIR/lib/brutalv20.pk3 \
-file $DOOM_DIR/lib/RebotStarcraftMarines.pk3 \
"$@"
'';
doom1 = pkgs.writeDashBin "doom1" ''
DOOM_DIR=''${DOOM_DIR:-~/doom/}
${doom} -iwad $DOOM_DIR/wads/stock/doom.wad "$@"
'';
doom2 = pkgs.writeDashBin "doom2" ''
DOOM_DIR=''${DOOM_DIR:-~/doom/}
${doom} -iwad $DOOM_DIR/wads/stock/doom2.wad "$@"
'';
2016-12-07 09:14:27 +00:00
vdoom1 = pkgs.writeDashBin "vdoom1" ''
DOOM_DIR=''${DOOM_DIR:-~/doom/}
${vdoom} -iwad $DOOM_DIR/wads/stock/doom.wad "$@"
'';
vdoom2 = pkgs.writeDashBin "vdoom2" ''
DOOM_DIR=''${DOOM_DIR:-~/doom/}
${vdoom} -iwad $DOOM_DIR/wads/stock/doom2.wad "$@"
'';
2015-07-16 13:51:01 +00:00
in {
environment.systemPackages = with pkgs; [
dwarf_fortress
2016-12-01 16:10:31 +00:00
doom1
doom2
2016-12-07 09:14:27 +00:00
vdoom1
vdoom2
2015-07-16 13:51:01 +00:00
];
users.extraUsers = {
games = {
name = "games";
description = "user playing games";
home = "/home/games";
2016-04-09 12:16:47 +00:00
extraGroups = [ "audio" "video" "input" "loot" ];
2015-07-16 13:51:01 +00:00
createHome = true;
useDefaultShell = true;
};
};
hardware.pulseaudio.support32Bit = true;
2015-07-16 13:51:01 +00:00
security.sudo.extraConfig = ''
${mainUser.name} ALL=(games) NOPASSWD: ALL
'';
}