users: Add system.singleUser
This commit is contained in:
@@ -12,10 +12,14 @@
|
||||
isSystemUser = false;
|
||||
};
|
||||
|
||||
system.singleUser = "alexander";
|
||||
|
||||
# Activate gpg
|
||||
programs.gnupg.agent.enable = true;
|
||||
|
||||
|
||||
# No need to use users."${system.singleUser}" as we already know it
|
||||
home-manager.users.alexander = {
|
||||
# TODO: Move into a generic
|
||||
pam.sessionVariables = {
|
||||
NIXOS_CONFIG = "\${HOME}/Development/Personal/nixos-config/${config.networking.hostName}.nix";
|
||||
};
|
||||
@@ -37,53 +41,6 @@
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
# The packages come in from modules/programs/gnome
|
||||
# Theme
|
||||
"org/gnome/desktop/interface" = {
|
||||
gtk-theme = "Arc-Dark";
|
||||
};
|
||||
|
||||
# Nightlight (TODO: ?)
|
||||
"org/gnome/settings-daemon/plugins/color" = {
|
||||
night-light-enabled = true;
|
||||
};
|
||||
|
||||
# Extensions
|
||||
"org/gnome/shell" = {
|
||||
enabled-extensions = [
|
||||
"caffeine@patapon.info"
|
||||
"notification-timeout@chlumskyvaclav.gmail.com"
|
||||
"gnome-ui-tune@itstime.tech"
|
||||
"volume-mixer@evermiss.net"
|
||||
];
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/caffeine" = {
|
||||
show-notifications = false;
|
||||
inhibit-apps = [ "mpv.desktop" ];
|
||||
};
|
||||
"org/gnome/shell/extensions/notification-timeout" = {
|
||||
timeout = 3000;
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/gnome-ui-tune" = {
|
||||
hide-search = true;
|
||||
};
|
||||
|
||||
# Shortcuts
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
binding = "<Alt>Return";
|
||||
command = "gnome-terminal";
|
||||
name = "Terminal";
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1" = {
|
||||
binding = "<Super>s";
|
||||
command = "systemctl suspend";
|
||||
name = "Suspend";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
11
modules/users/default.nix
Normal file
11
modules/users/default.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
options.system = {
|
||||
singleUser = lib.options.mkOption {
|
||||
example = "PapaTutuWawa";
|
||||
readOnly = true;
|
||||
description = "The username of this single-user system";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,5 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
# TODO
|
||||
config = {
|
||||
users.users.fuck-xi = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "audio" "video" "kvm" "input" ];
|
||||
# -> abc123
|
||||
hashedPassword = "$5$etg0.qVfujgh8JZu$HxGwG.aTZIT1vVo/E2wNdgVLr6dtg.XEPxvAro.iJ29";
|
||||
shell = pkgs.zsh;
|
||||
useDefaultShell = false;
|
||||
uid = 1000;
|
||||
isSystemUser = false;
|
||||
};
|
||||
|
||||
system.singleUser = "fuck-xi";
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user