Skip to content

Commit

Permalink
Add gamer to available home-manager users
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Dec 15, 2023
1 parent 34c2553 commit 7b6426d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 13 deletions.
2 changes: 1 addition & 1 deletion nixos/base/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let

cfg = config.custom.base;

availableUsers = [ "christian" "demo" ];
availableUsers = [ "christian" "demo" "gamer" ];
importUserModule = u:
let
isEnabled = any (x: x == u) cfg.users;
Expand Down
18 changes: 18 additions & 0 deletions nixos/base/users/gamer.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:

with lib;

let

username = "gamer";

in

{
users.users."${username}" = {
name = username;
isNormalUser = true;
uid = 1001;
password = "";
};
}
18 changes: 6 additions & 12 deletions nixos/roles/steambox/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,12 @@ in
};

config = mkIf cfg.enable {
custom.roles = {
gaming.enable = true;
sound.enable = true;
custom = {
base.users = [ "gamer" ];
roles = {
gaming.enable = true;
sound.enable = true;
};
};

environment.systemPackages = with pkgs; [
Expand Down Expand Up @@ -55,14 +58,5 @@ in
};
};
};

users = {
users = {
gamer = {
password = "";
isNormalUser = true;
};
};
};
};
}

0 comments on commit 7b6426d

Please sign in to comment.