stockholm/lass/2configs/games.nix

44 lines
1018 B
Nix
Raw Normal View History

2015-07-16 13:51:01 +00:00
{ config, pkgs, ... }:
let
mainUser = config.users.extraUsers.mainUser;
2016-12-01 16:10:31 +00:00
doom = pkgs.writeDash "doom" ''
DOOM_DIR=''${DOOM_DIR:-~/doom/}
${pkgs.zandronum}/bin/zandronum \
-file $DOOM_DIR/lib/brutalv20.pk3 \
-file $DOOM_DIR/lib/RebotStarcraftMarines.pk3 \
-fov 120 \
"$@"
'';
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 "$@"
'';
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
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;
};
};
security.sudo.extraConfig = ''
${mainUser.name} ALL=(games) NOPASSWD: ALL
'';
}