mirror of
https://codeberg.org/privacy1st/nix-git
synced 2025-04-02 16:55:59 +02:00
define primary Linux username in base-user.nix
This commit is contained in:
parent
f6e6e3e36f
commit
7fa6af56b3
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
@ -45,9 +48,9 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with 'passwd'.
|
# Define a user account. Don't forget to set a password with 'passwd'.
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Yoda";
|
description = "${user}";
|
||||||
extraGroups = [ "wheel" ]; # Enable 'sudo' for the user.
|
extraGroups = [ "wheel" ]; # Enable 'sudo' for the user.
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
{ config, pkgs, ...}:
|
{ config, pkgs, ...}:
|
||||||
let
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
|
||||||
name = "notify-change";
|
name = "notify-change";
|
||||||
subdir = "readonly-git/notify-change";
|
subdir = "readonly-git/notify-change";
|
||||||
fulldir = "/home/yoda/${subdir}";
|
fulldir = "/home/${user}/${subdir}";
|
||||||
|
|
||||||
jdk = pkgs.jdk23;
|
jdk = pkgs.jdk23;
|
||||||
gradle = pkgs.gradle.override {
|
gradle = pkgs.gradle.override {
|
||||||
@ -16,7 +18,7 @@ in
|
|||||||
# comma-separated list of email addresses
|
# comma-separated list of email addresses
|
||||||
keyFile = ../../secrets/${name}-email-recipients;
|
keyFile = ../../secrets/${name}-email-recipients;
|
||||||
destDir = "/secrets";
|
destDir = "/secrets";
|
||||||
user = "yoda";
|
user = "${user}";
|
||||||
#group = "smtpd"; # Default: root
|
#group = "smtpd"; # Default: root
|
||||||
permissions = "0400";
|
permissions = "0400";
|
||||||
uploadAt = "pre-activation";
|
uploadAt = "pre-activation";
|
||||||
@ -25,7 +27,7 @@ in
|
|||||||
deployment.keys."${name}-EMAIL_USER" = {
|
deployment.keys."${name}-EMAIL_USER" = {
|
||||||
keyFile = ../../secrets/user.web.de;
|
keyFile = ../../secrets/user.web.de;
|
||||||
destDir = "/secrets";
|
destDir = "/secrets";
|
||||||
user = "yoda";
|
user = "${user}";
|
||||||
#group = "smtpd"; # Default: root
|
#group = "smtpd"; # Default: root
|
||||||
permissions = "0400";
|
permissions = "0400";
|
||||||
uploadAt = "pre-activation";
|
uploadAt = "pre-activation";
|
||||||
@ -34,7 +36,7 @@ in
|
|||||||
deployment.keys."${name}-EMAIL_PASSWORD" = {
|
deployment.keys."${name}-EMAIL_PASSWORD" = {
|
||||||
keyFile = ../../secrets/pwd.web.de;
|
keyFile = ../../secrets/pwd.web.de;
|
||||||
destDir = "/secrets";
|
destDir = "/secrets";
|
||||||
user = "yoda";
|
user = "${user}";
|
||||||
#group = "smtpd"; # Default: root
|
#group = "smtpd"; # Default: root
|
||||||
permissions = "0400";
|
permissions = "0400";
|
||||||
uploadAt = "pre-activation";
|
uploadAt = "pre-activation";
|
||||||
@ -43,7 +45,7 @@ in
|
|||||||
deployment.keys."${name}-ILIAS_USER" = {
|
deployment.keys."${name}-ILIAS_USER" = {
|
||||||
keyFile = ../../secrets/user.ilias.uni-marburg.de;
|
keyFile = ../../secrets/user.ilias.uni-marburg.de;
|
||||||
destDir = "/secrets";
|
destDir = "/secrets";
|
||||||
user = "yoda";
|
user = "${user}";
|
||||||
#group = "smtpd"; # Default: root
|
#group = "smtpd"; # Default: root
|
||||||
permissions = "0400";
|
permissions = "0400";
|
||||||
uploadAt = "pre-activation";
|
uploadAt = "pre-activation";
|
||||||
@ -52,14 +54,14 @@ in
|
|||||||
deployment.keys."${name}-ILIAS_PASSWORD" = {
|
deployment.keys."${name}-ILIAS_PASSWORD" = {
|
||||||
keyFile = ../../secrets/pwd.ilias.uni-marburg.de;
|
keyFile = ../../secrets/pwd.ilias.uni-marburg.de;
|
||||||
destDir = "/secrets";
|
destDir = "/secrets";
|
||||||
user = "yoda";
|
user = "${user}";
|
||||||
#group = "smtpd"; # Default: root
|
#group = "smtpd"; # Default: root
|
||||||
permissions = "0400";
|
permissions = "0400";
|
||||||
uploadAt = "pre-activation";
|
uploadAt = "pre-activation";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Download notify-change Git repository.
|
# Download notify-change Git repository.
|
||||||
# home-manager.users.yoda = { osConfig, config, pkgs, ... }: {
|
# home-manager.users."${user}" = { osConfig, config, pkgs, ... }: {
|
||||||
# home.file."${subdir}".source = (builtins.fetchGit {
|
# home.file."${subdir}".source = (builtins.fetchGit {
|
||||||
# url = "https://codeberg.org/privacy1st/selenium-webdriver-ide-demo";
|
# url = "https://codeberg.org/privacy1st/selenium-webdriver-ide-demo";
|
||||||
# ref = "changedetection";
|
# ref = "changedetection";
|
||||||
@ -87,7 +89,7 @@ in
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
PrivateTmp = true;
|
PrivateTmp = true;
|
||||||
User = "yoda";
|
User = "${user}";
|
||||||
};
|
};
|
||||||
path = [
|
path = [
|
||||||
pkgs.bash # todo
|
pkgs.bash # todo
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/headless.nix
|
../../modules/headless.nix
|
||||||
@ -13,7 +16,7 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
# Download BikeTripPlanner Git repository.
|
# Download BikeTripPlanner Git repository.
|
||||||
home-manager.users."yoda" = { osConfig, config, pkgs, ... }: {
|
home-manager.users."${user}" = { osConfig, config, pkgs, ... }: {
|
||||||
home.file."readonly-git/BikeTripPlanner".source = (builtins.fetchGit {
|
home.file."readonly-git/BikeTripPlanner".source = (builtins.fetchGit {
|
||||||
url = "https://github.com/langbein-daniel/BikeTripPlanner";
|
url = "https://github.com/langbein-daniel/BikeTripPlanner";
|
||||||
#rev = "6d4daf18235189825b0c314901b1617ece6d8641";
|
#rev = "6d4daf18235189825b0c314901b1617ece6d8641";
|
||||||
@ -31,7 +34,7 @@
|
|||||||
docker
|
docker
|
||||||
];
|
];
|
||||||
script = ''
|
script = ''
|
||||||
docker compose -f /home/yoda/readonly-git/BikeTripPlanner/deployment/btp-only.yml up -d --wait
|
docker compose -f /home/${user}/readonly-git/BikeTripPlanner/deployment/btp-only.yml up -d --wait
|
||||||
'';
|
'';
|
||||||
# Start after login.
|
# Start after login.
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# adb and fastboot
|
# adb and fastboot
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/Android#adb_setup
|
# https://nixos.wiki/wiki/Android#adb_setup
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
users.users."yoda".extraGroups = [ "adbusers" "plugdev" ];
|
users.users."${user}".extraGroups = [ "adbusers" "plugdev" ];
|
||||||
|
|
||||||
# plugdev group: https://developer.android.com/studio/run/device
|
# plugdev group: https://developer.android.com/studio/run/device
|
||||||
# How to add user to new group: https://superuser.com/a/1352988
|
# How to add user to new group: https://superuser.com/a/1352988
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./base-user.nix
|
||||||
|
|
||||||
# Filesystem settings.
|
# Filesystem settings.
|
||||||
./btrfsFileSystems.nix
|
./btrfsFileSystems.nix
|
||||||
./btrfsMounts.nix
|
./btrfsMounts.nix
|
||||||
@ -51,9 +56,9 @@
|
|||||||
|
|
||||||
# Define a user account.
|
# Define a user account.
|
||||||
# Don't forget to set a password with `passwd`.
|
# Don't forget to set a password with `passwd`.
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Yoda";
|
description = "${user}";
|
||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -74,7 +79,7 @@
|
|||||||
# Options only for build.system.vm - they won’t get applied when building build.system.toplevel aka the normal system config.
|
# Options only for build.system.vm - they won’t get applied when building build.system.toplevel aka the normal system config.
|
||||||
# https://discourse.nixos.org/t/wayland-compositors-an-build-vm-not-working/46486/2
|
# https://discourse.nixos.org/t/wayland-compositors-an-build-vm-not-working/46486/2
|
||||||
virtualisation.vmVariant = {
|
virtualisation.vmVariant = {
|
||||||
users.users."yoda".initialPassword = "asdf";
|
users.users."${user}".initialPassword = "asdf";
|
||||||
virtualisation.qemu.options = [
|
virtualisation.qemu.options = [
|
||||||
"-device virtio-vga-gl"
|
"-device virtio-vga-gl"
|
||||||
"-display sdl,gl=on,show-cursor=off"
|
"-display sdl,gl=on,show-cursor=off"
|
||||||
|
16
modules/base-user.nix
Normal file
16
modules/base-user.nix
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
defaultUsername = "yoda";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.yoda.user = lib.mkOption {
|
||||||
|
# You can find the exhaustive list of types here: https://nlewo.github.io/nixos-manual-sphinx/development/option-types.xml.html
|
||||||
|
type = lib.types.str;
|
||||||
|
default = defaultUsername;
|
||||||
|
description = "Username of the primary Linux user account. Must not include regex special characters.";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
yoda.user = defaultUsername;
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./base-minimal.nix
|
./base-minimal.nix
|
||||||
@ -14,7 +17,7 @@
|
|||||||
|
|
||||||
# Shell settings.
|
# Shell settings.
|
||||||
./bash.nix # bash settings.
|
./bash.nix # bash settings.
|
||||||
./zsh.nix # zsh as default shell for yoda and root.
|
./zsh.nix # zsh as default shell for $user and root.
|
||||||
./fzf.nix # Fuzzy command history and file search.
|
./fzf.nix # Fuzzy command history and file search.
|
||||||
|
|
||||||
# nixpkgs config
|
# nixpkgs config
|
||||||
@ -32,7 +35,7 @@
|
|||||||
# Enable networking.
|
# Enable networking.
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
#
|
#
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
extraGroups = [ "networkmanager" ];
|
extraGroups = [ "networkmanager" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
dosbox-x # Virtual machines with DOS-based Windows such as Windows 3.x and Windows 9x
|
dosbox-x # Virtual machines with DOS-based Windows such as Windows 3.x and Windows 9x
|
||||||
];
|
];
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{ lib, config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
file-roller # Archive manager: Compress and decompress
|
file-roller # Archive manager: Compress and decompress
|
||||||
lz4 # Add support to extract lz4 archives
|
lz4 # Add support to extract lz4 archives
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# NixOS general:
|
# NixOS general:
|
||||||
# https://github.com/NixOS/nixpkgs/tree/nixos-23.11/pkgs/games/
|
# https://github.com/NixOS/nixpkgs/tree/nixos-23.11/pkgs/games/
|
||||||
@ -42,7 +45,7 @@
|
|||||||
"dotnet-sdk-6.0.428"
|
"dotnet-sdk-6.0.428"
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
#
|
#
|
||||||
# Sandbox
|
# Sandbox
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
#gnome.gnome-terminal # Terminal emulator
|
#gnome.gnome-terminal # Terminal emulator
|
||||||
nautilus-open-any-terminal # For Nautilus (GNOME files) integration
|
nautilus-open-any-terminal # For Nautilus (GNOME files) integration
|
||||||
@ -10,7 +13,7 @@
|
|||||||
# For Nautilus (GNOME files) integration
|
# For Nautilus (GNOME files) integration
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
|
|
||||||
home-manager.users."yoda" = { osConfig, config, pkgs, ... }: {
|
home-manager.users."${user}" = { osConfig, config, pkgs, ... }: {
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
# For Nautilus (GNOME files) integration
|
# For Nautilus (GNOME files) integration
|
||||||
"com/github/stunkymonkey/nautilus-open-any-terminal" = {
|
"com/github/stunkymonkey/nautilus-open-any-terminal" = {
|
||||||
@ -21,7 +24,7 @@
|
|||||||
programs.gnome-terminal.enable = true;
|
programs.gnome-terminal.enable = true;
|
||||||
programs.gnome-terminal.profile."74b90a31-5123-4a64-91a3-3cb31eb5cdb6" = {
|
programs.gnome-terminal.profile."74b90a31-5123-4a64-91a3-3cb31eb5cdb6" = {
|
||||||
default = true;
|
default = true;
|
||||||
visibleName = "Yoda's Terminal";
|
visibleName = "${user}'s terminal";
|
||||||
font = "DejaVu Sans Mono 11";
|
font = "DejaVu Sans Mono 11";
|
||||||
audibleBell = false;
|
audibleBell = false;
|
||||||
|
|
||||||
|
@ -40,12 +40,14 @@
|
|||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
|
||||||
stopped-service-consumption-summary = ''
|
stopped-service-consumption-summary = ''
|
||||||
\S+\.(service|scope|slice|swap|mount): Consumed ([0-9]+d )?([0-9]+h )?([0-9]+min )?[0-9\.]+(s|ms) CPU time(, .+)?\.'';
|
\S+\.(service|scope|slice|swap|mount): Consumed ([0-9]+d )?([0-9]+h )?([0-9]+min )?[0-9\.]+(s|ms) CPU time(, .+)?\.'';
|
||||||
sshd-log = ''
|
sshd-log = ''
|
||||||
Accepted publickey for (root|yoda) from \S+ port \S+ ssh2: ED25519 SHA256:\S+
|
Accepted publickey for (root|${user}) from \S+ port \S+ ssh2: ED25519 SHA256:\S+
|
||||||
# TODO: Change RSA key of yodaHedgehog to ED25519
|
# TODO: Change RSA key of yodaHedgehog to ED25519
|
||||||
Accepted publickey for (root|yoda) from \S+ port \S+ ssh2: RSA SHA256:\S+
|
Accepted publickey for (root|${user}) from \S+ port \S+ ssh2: RSA SHA256:\S+
|
||||||
pam_unix\(sshd:session\): session opened for user \S+ by \S+
|
pam_unix\(sshd:session\): session opened for user \S+ by \S+
|
||||||
Received disconnect from \S+ port \S+:11: disconnected by user
|
Received disconnect from \S+ port \S+:11: disconnected by user
|
||||||
Disconnected from user \S+ \S+ port \S+
|
Disconnected from user \S+ \S+ port \S+
|
||||||
@ -61,16 +63,16 @@ let
|
|||||||
Invalid user \S+ from \S+ port \S+
|
Invalid user \S+ from \S+ port \S+
|
||||||
Disconnected from \S+ port \S+ \[preauth\]
|
Disconnected from \S+ port \S+ \[preauth\]
|
||||||
Disconnected from invalid user \S+ \S+ port \S+ \[preauth\]
|
Disconnected from invalid user \S+ \S+ port \S+ \[preauth\]
|
||||||
Disconnected from authenticating user (root|yoda) \S+ port \S+ \[preauth\]
|
Disconnected from authenticating user (root|${user}) \S+ port \S+ \[preauth\]
|
||||||
Received disconnect from \S+ port \S+:11: Client disconnecting normally \[preauth\]
|
Received disconnect from \S+ port \S+:11: Client disconnecting normally \[preauth\]
|
||||||
Received disconnect from \S+ port \S+:11: Bye Bye \[preauth\]
|
Received disconnect from \S+ port \S+:11: Bye Bye \[preauth\]
|
||||||
Connection reset by invalid user \S+ \S+ port \S+ \[preauth\]
|
Connection reset by invalid user \S+ \S+ port \S+ \[preauth\]
|
||||||
Connection reset by authenticating user (root|yoda) \S+ port \S+ \[preauth\]
|
Connection reset by authenticating user (root|${user}) \S+ port \S+ \[preauth\]
|
||||||
Connection reset by \S+ port \S+ \[preauth\]
|
Connection reset by \S+ port \S+ \[preauth\]
|
||||||
Connection reset by \S+ port \S+
|
Connection reset by \S+ port \S+
|
||||||
Connection closed by \S+ port \S+
|
Connection closed by \S+ port \S+
|
||||||
Connection closed by \S+ port \S+ \[preauth\]
|
Connection closed by \S+ port \S+ \[preauth\]
|
||||||
Connection closed by authenticating user (root|yoda) \S+ port \S+ \[preauth\]
|
Connection closed by authenticating user (root|${user}) \S+ port \S+ \[preauth\]
|
||||||
Connection closed by invalid user \S+ \S+ port \S+ \[preauth\]
|
Connection closed by invalid user \S+ \S+ port \S+ \[preauth\]
|
||||||
error: kex_exchange_identification: banner line contains invalid characters
|
error: kex_exchange_identification: banner line contains invalid characters
|
||||||
error: kex_exchange_identification: client sent invalid protocol identifier "[^"]*"
|
error: kex_exchange_identification: client sent invalid protocol identifier "[^"]*"
|
||||||
@ -743,7 +745,7 @@ in
|
|||||||
Created slice User Application Slice\.
|
Created slice User Application Slice\.
|
||||||
Queued start job for default target Main User Target\.
|
Queued start job for default target Main User Target\.
|
||||||
pam_unix\(systemd-user:session\): session opened for user root\(uid=0\) by \(uid=0\)
|
pam_unix\(systemd-user:session\): session opened for user root\(uid=0\) by \(uid=0\)
|
||||||
pam_unix\(systemd-user:session\): session closed for user (root|yoda)
|
pam_unix\(systemd-user:session\): session closed for user (root|${user})
|
||||||
Reload requested from client PID [0-9]+ \('systemctl'\)\.\.\.
|
Reload requested from client PID [0-9]+ \('systemctl'\)\.\.\.
|
||||||
Reexecution requested from client PID [0-9]+ \('switch-to-confi'\)\.\.\.
|
Reexecution requested from client PID [0-9]+ \('switch-to-confi'\)\.\.\.
|
||||||
Reexecuting\.
|
Reexecuting\.
|
||||||
@ -772,7 +774,7 @@ in
|
|||||||
Finished loading, compiling and executing [0-9]+ rules
|
Finished loading, compiling and executing [0-9]+ rules
|
||||||
#
|
#
|
||||||
Registered Authentication Agent for unix-process:[0-9]+:[0-9]+ \(system bus name :[0-9\.]+ \[/run/current-system/sw/bin/pkttyagent --notify-fd 5 --fallback\], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8\)
|
Registered Authentication Agent for unix-process:[0-9]+:[0-9]+ \(system bus name :[0-9\.]+ \[/run/current-system/sw/bin/pkttyagent --notify-fd 5 --fallback\], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8\)
|
||||||
Operator of unix-process:[0-9]+:[0-9]+ successfully authenticated as unix-user:yoda to gain ONE-SHOT authorization for action org\.freedesktop\.systemd1\.manage-units for system-bus-name::[0-9\.]+ \[systemctl start journalwatch\.service\] \(owned by unix-user:yoda\)
|
Operator of unix-process:[0-9]+:[0-9]+ successfully authenticated as unix-user:${user} to gain ONE-SHOT authorization for action org\.freedesktop\.systemd1\.manage-units for system-bus-name::[0-9\.]+ \[systemctl start journalwatch\.service\] \(owned by unix-user:${user}\)
|
||||||
Unregistered Authentication Agent for unix-process:[0-9]+:[0-9]+ \(system bus name :[0-9\.]+, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8\) \(disconnected from bus\)
|
Unregistered Authentication Agent for unix-process:[0-9]+:[0-9]+ \(system bus name :[0-9\.]+, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8\) \(disconnected from bus\)
|
||||||
Unregistered Authentication Agent for unix-process:unknown \(system bus name :[0-9\.]+, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8\) \(disconnected from bus\)
|
Unregistered Authentication Agent for unix-process:unknown \(system bus name :[0-9\.]+, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8\) \(disconnected from bus\)
|
||||||
'';
|
'';
|
||||||
@ -843,10 +845,10 @@ in
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
filters = ''
|
filters = ''
|
||||||
pam_unix\(sudo:session\): session opened for user root\(uid=0\) by (yoda)?\(uid=[0-9]+\)
|
pam_unix\(sudo:session\): session opened for user root\(uid=0\) by (${user})?\(uid=[0-9]+\)
|
||||||
pam_unix\(sudo:session\): session closed for user root
|
pam_unix\(sudo:session\): session closed for user root
|
||||||
# yodaTux. If the user `yoda` runs a command with `sudo`.
|
# yodaTux. If the user `${user}` runs a command with `sudo`.
|
||||||
\s+yoda : TTY=pts/[0-9] ; PWD=/\S+ ; USER=root ; COMMAND=/.+
|
\s+${user} : TTY=pts/[0-9] ; PWD=/\S+ ; USER=root ; COMMAND=/.+
|
||||||
# yodaNas. If the btrbk service is run.
|
# yodaNas. If the btrbk service is run.
|
||||||
\s+btrbk : PWD=/ ; USER=root ; COMMAND=/.+
|
\s+btrbk : PWD=/ ; USER=root ; COMMAND=/.+
|
||||||
\s+root : PWD=(/|/root) ; USER=root ; COMMAND=(/run/current-system/sw|/nix/store/[a-z0-9]+-btrfs-progs-[0-9\.]+)/bin/btrfs (subvolume list|subvolume show|subvolume delete|send|receive) .+
|
\s+root : PWD=(/|/root) ; USER=root ; COMMAND=(/run/current-system/sw|/nix/store/[a-z0-9]+-btrfs-progs-[0-9\.]+)/bin/btrfs (subvolume list|subvolume show|subvolume delete|send|receive) .+
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Garbage collection: Delete generations older than 5 days and then delete unreachable store objects.
|
# Garbage collection: Delete generations older than 5 days and then delete unreachable store objects.
|
||||||
|
|
||||||
@ -12,7 +15,7 @@
|
|||||||
|
|
||||||
# We need to explicitly run garbage collection for user profiles,
|
# We need to explicitly run garbage collection for user profiles,
|
||||||
# this is not done by the global `nix.gc` option.
|
# this is not done by the global `nix.gc` option.
|
||||||
home-manager.users."yoda" = { osConfig, config, pkgs, ... }: {
|
home-manager.users."${user}" = { osConfig, config, pkgs, ... }: {
|
||||||
nix.gc = {
|
nix.gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
frequency = "weekly";
|
frequency = "weekly";
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./vlc-dvd-blu-ray.nix
|
./vlc-dvd-blu-ray.nix
|
||||||
@ -6,7 +9,7 @@
|
|||||||
./signal-desktop.nix
|
./signal-desktop.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
#zenith # Terminal resource monitor / task manager
|
#zenith # Terminal resource monitor / task manager
|
||||||
btop # Terminal resource monitor / task manager
|
btop # Terminal resource monitor / task manager
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./file-roller.nix # Archive manager: Compress and decompress
|
./file-roller.nix # Archive manager: Compress and decompress
|
||||||
@ -7,7 +10,7 @@
|
|||||||
#./blackbox.nix # Terminal emulator.
|
#./blackbox.nix # Terminal emulator.
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
gnome-tweaks
|
gnome-tweaks
|
||||||
dconf-editor
|
dconf-editor
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./thunderbird.nix # email
|
./thunderbird.nix # email
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
#
|
#
|
||||||
# CLI apps
|
# CLI apps
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
unstable.rnote # Handwritten notes
|
unstable.rnote # Handwritten notes
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
home-manager.users."yoda" = { osConfig, config, pkgs, lib, ... }: {
|
home-manager.users."${user}" = { osConfig, config, pkgs, lib, ... }: {
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/gnome/shell" = {
|
"org/gnome/shell" = {
|
||||||
favorite-apps = lib.mkIf (osConfig.networking.hostName == "yodaTab") ["com.github.flxzt.rnote.desktop"];
|
favorite-apps = lib.mkIf (osConfig.networking.hostName == "yodaTab") ["com.github.flxzt.rnote.desktop"];
|
||||||
|
@ -1,4 +1,7 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Sync files between devices
|
# Sync files between devices
|
||||||
#
|
#
|
||||||
@ -9,12 +12,12 @@
|
|||||||
# services = {
|
# services = {
|
||||||
# syncthing = {
|
# syncthing = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# user = "yoda";
|
# user = "${user}";
|
||||||
# };
|
# };
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# We run Syncthing as user service.
|
# We run Syncthing as user service.
|
||||||
home-manager.users."yoda" = { osConfig, config, pkgs, ... }: {
|
home-manager.users."${user}" = { osConfig, config, pkgs, ... }: {
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
|
||||||
# TODO: trim whitespaces from string
|
# TODO: trim whitespaces from string
|
||||||
email-uni-marburg = (builtins.readFile ../secrets/email-uni-marburg);
|
email-uni-marburg = (builtins.readFile ../secrets/email-uni-marburg);
|
||||||
in
|
in
|
||||||
@ -8,7 +10,7 @@ in
|
|||||||
# https://github.com/dr460nf1r3/dr460nixed/blob/main/home-manager/email.nix
|
# https://github.com/dr460nf1r3/dr460nixed/blob/main/home-manager/email.nix
|
||||||
# https://github.com/yurrriq/dotfiles/blob/main/machines/nixps/home.nix
|
# https://github.com/yurrriq/dotfiles/blob/main/machines/nixps/home.nix
|
||||||
|
|
||||||
home-manager.users."yoda" = { osConfig, config, pkgs, ... }: {
|
home-manager.users."${user}" = { osConfig, config, pkgs, ... }: {
|
||||||
accounts.email.accounts = {
|
accounts.email.accounts = {
|
||||||
"personal" = {
|
"personal" = {
|
||||||
address = "daniel@systemli.org";
|
address = "daniel@systemli.org";
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
users.users."yoda" = {
|
users.users."${user}" = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
tor-browser-bundle-bin # Tor web browser.
|
tor-browser-bundle-bin # Tor web browser.
|
||||||
];
|
];
|
||||||
|
@ -1,11 +1,14 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
let
|
||||||
|
user = config.yoda.user;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# See also: boxes.nix
|
# See also: boxes.nix
|
||||||
|
|
||||||
# libvirt is a dependency of Virt-manager
|
# libvirt is a dependency of Virt-manager
|
||||||
# https://nixos.wiki/wiki/Libvirt
|
# https://nixos.wiki/wiki/Libvirt
|
||||||
virtualisation.libvirtd.enable = true;
|
virtualisation.libvirtd.enable = true;
|
||||||
users.users."yoda".extraGroups = [ "libvirtd" ];
|
users.users."${user}".extraGroups = [ "libvirtd" ];
|
||||||
|
|
||||||
# Required for USB redirection to work with GNOME boxes. Maybe this is also required for virt-Manager?
|
# Required for USB redirection to work with GNOME boxes. Maybe this is also required for virt-Manager?
|
||||||
# See
|
# See
|
||||||
@ -18,7 +21,7 @@
|
|||||||
# TODO: nixpkgs virtio-win
|
# TODO: nixpkgs virtio-win
|
||||||
programs.virt-manager.enable = true;
|
programs.virt-manager.enable = true;
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
home-manager.users."yoda" = { osConfig, config, pkgs, ... }: {
|
home-manager.users."${user}" = { osConfig, config, pkgs, ... }: {
|
||||||
dconf.settings = {
|
dconf.settings = {
|
||||||
"org/virt-manager/virt-manager/connections" = {
|
"org/virt-manager/virt-manager/connections" = {
|
||||||
autoconnect = ["qemu:///system"];
|
autoconnect = ["qemu:///system"];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user