users/guest: init and add steam
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m22s
All checks were successful
Check flake / build-amd64-linux (push) Successful in 1m22s
This commit is contained in:
8
flake.lock
generated
8
flake.lock
generated
@@ -1143,11 +1143,11 @@
|
|||||||
"secrets": {
|
"secrets": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1753994653,
|
"lastModified": 1755887038,
|
||||||
"narHash": "sha256-kVd17w6oo9dbZfgZXMMPEssspp8vAr32G5U8VnfuIFc=",
|
"narHash": "sha256-HoEMwFfR3rwNxwJjFCbj3rfW8k6EabHuMJAZOwsT95c=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "e0cb8c5b8de3f61fbef13c80219715f2e3e5ffb5",
|
"rev": "9e47b557087ebde3a30c9f97189d110c29d144fd",
|
||||||
"revCount": 39,
|
"revCount": 40,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
"url": "ssh://git@git.vimium.com/jordan/nix-secrets.git"
|
||||||
},
|
},
|
||||||
|
@@ -18,6 +18,7 @@ in
|
|||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./disko-config.nix
|
./disko-config.nix
|
||||||
../desktop.nix
|
../desktop.nix
|
||||||
|
../../users/guest
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
@@ -72,6 +73,8 @@ in
|
|||||||
capSysAdmin = true;
|
capSysAdmin = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.steam.enable = true;
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages = [ pkgs.wine ];
|
systemPackages = [ pkgs.wine ];
|
||||||
sessionVariables.WINE_BIN = getExe pkgs.wine;
|
sessionVariables.WINE_BIN = getExe pkgs.wine;
|
||||||
|
30
users/guest/common/optional/graphical/steam.nix
Normal file
30
users/guest/common/optional/graphical/steam.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gamescope
|
||||||
|
steam
|
||||||
|
];
|
||||||
|
|
||||||
|
systemd.user.services.steam-big-picture = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Steam Big Picture in Gamescope";
|
||||||
|
After = [
|
||||||
|
"graphical.target"
|
||||||
|
"default.target"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
ExecStart = ''
|
||||||
|
${pkgs.gamescope}/bin/gamescope --rt --backend drm --steam -- \
|
||||||
|
${pkgs.steam}/bin/steam -pipewire-dmabuf -tenfoot
|
||||||
|
'';
|
||||||
|
Restart = "always";
|
||||||
|
};
|
||||||
|
Install = {
|
||||||
|
WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
66
users/guest/default.nix
Normal file
66
users/guest/default.nix
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib)
|
||||||
|
optional
|
||||||
|
;
|
||||||
|
name = "guest";
|
||||||
|
hostFile = ./. + "/${config.networking.hostName}.nix";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
users.users.${name} = {
|
||||||
|
description = "Guest";
|
||||||
|
extraGroups = [
|
||||||
|
"audio"
|
||||||
|
"input"
|
||||||
|
"render"
|
||||||
|
"video"
|
||||||
|
];
|
||||||
|
group = "users";
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
home-manager.users.${name} = {
|
||||||
|
imports = [
|
||||||
|
./common/optional/graphical/steam.nix
|
||||||
|
{
|
||||||
|
home.persistence."/state" = {
|
||||||
|
directories = [
|
||||||
|
".local/state/wireplumber"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home.persistence."/persist" = {
|
||||||
|
directories = [
|
||||||
|
".config/gamescope"
|
||||||
|
".local/share/icons"
|
||||||
|
".local/share/Steam"
|
||||||
|
".local/share/vulkan"
|
||||||
|
".steam"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++ optional (builtins.pathExists hostFile) hostFile;
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = name;
|
||||||
|
};
|
||||||
|
|
||||||
|
xdg.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.getty = {
|
||||||
|
autologinOnce = true;
|
||||||
|
autologinUser = "guest";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Workaround: https://github.com/nix-community/home-manager/issues/7166
|
||||||
|
systemd.services."home-manager-${name}".serviceConfig = {
|
||||||
|
RemainAfterExit = "yes";
|
||||||
|
};
|
||||||
|
}
|
Reference in New Issue
Block a user