From bb9bb499409eb6a93bf0a33ab8cf145526e5ad1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Sun, 3 Mar 2024 13:06:22 +0100 Subject: [PATCH] Add separate steam user --- hosts/gunter/default.nix | 1 + hosts/gunter/steamuser.nix | 18 ++++++++++++++++++ system/users.nix | 13 +++++++++++++ 3 files changed, 32 insertions(+) create mode 100644 hosts/gunter/steamuser.nix diff --git a/hosts/gunter/default.nix b/hosts/gunter/default.nix index f39e696..10b0e2a 100644 --- a/hosts/gunter/default.nix +++ b/hosts/gunter/default.nix @@ -2,6 +2,7 @@ imports = [ ./configuration.nix ./hardware-configuration.nix + ./steamuser.nix ../../system ../../home ]; diff --git a/hosts/gunter/steamuser.nix b/hosts/gunter/steamuser.nix new file mode 100644 index 0000000..e834fae --- /dev/null +++ b/hosts/gunter/steamuser.nix @@ -0,0 +1,18 @@ +{ pkgs, ... }: { + environment.shells = with pkgs; [ zsh ]; + + services.xserver.desktopManager.xfce.enable = true; + + users.users.steam = { + isNormalUser = true; + initialPassword = "steam"; + home = "/home/steam"; + description = "Steam user"; + shell = pkgs.zsh; + # Install some user packages + packages = with pkgs; [ + steam + steamcmd + ]; + }; +} diff --git a/system/users.nix b/system/users.nix index c0abf56..575f630 100644 --- a/system/users.nix +++ b/system/users.nix @@ -16,4 +16,17 @@ packages = with pkgs; [ ]; }; + users.users.steam = { + isNormalUser = true; + initialPassword = "steam"; + home = "/home/steam"; + description = "Steam user"; + shell = pkgs.zsh; + extraGroups = [ "networkmanager" ]; + # Install some user packages + packages = with pkgs; [ + steam + steamcmd + ]; + }; }