add admin user

This commit is contained in:
Paul Zinselmeyer 2024-08-28 13:52:41 +02:00
parent a50cc0f415
commit a3405b21b0
Signed by: pfzetto
GPG key ID: B471A1AF06C895FD
3 changed files with 17 additions and 8 deletions

View file

@ -16,6 +16,7 @@
fileSystems."/" =
{ device = "none";
fsType = "tmpfs";
options = [ "defaults" "size=2G" "mode=755" ];
};
fileSystems."/nix" =

View file

@ -7,13 +7,17 @@ let
Name=Q Light Controller Plus
GenericName=Lighting control
Keywords=qlc;light;controller;dmx;analog;midi;artnet;e131;osc;
Exec=${pkgs.qlcplus}/bin/qlcplus --kiosk --open /home/stube/.stube.qxw
Exec=${pkgs.qlcplus}/bin/qlcplus --kiosk --open /persist/qlc/stube.qxw
Icon=qlcplus
MimeType=application/x-qlc-workspace;
Categories=Qt;AudioVideo;
X-XFCE-Source=${pkgs.qlcplus}/share/applications/qlcplus.desktop
'';
edit-qlc-workspace = pkgs.writeScriptBin "edit_qlc_workspace.sh" ''
su -c "${pkgs.qlcplus}/bin/qlcplus --open /persist/qlc/stube.qxw" - admin
'';
custom-menu-file = pkgs.writeText "custom.menu" ''
<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
"http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd">
@ -202,9 +206,6 @@ in
{
home.persistence."/persist/home/stube" = {
files = [
".stube.qxw"
];
directories = [
".mixxx"
# xfconf.settings needs an existing installation
@ -322,6 +323,7 @@ in
vlc
mpv
libreoffice-still
edit-qlc-workspace
];
programs.firefox = {

View file

@ -17,9 +17,12 @@
time.timeZone = "Europe/Berlin";
users.mutableUsers = false;
users.users.root = {
hashedPassword = "$y$j9T$0pAghPO9710DDgMEznC/I0$S2cMkfV2NpytDAk58oV75pT0G1Lnq/T3BAiO9gXeuOB";
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDbsWgnT1W25H5fDCekspaXzlIwvKh+rHygTId8xHotU" ];
users.users.admin = {
isNormalUser = true;
hashedPassword = "$y$j9T$sYhrjA6IDTFVsUTVrw6aY/$c4qBwMc6SBMip4BWIpHPwzkyVgnOaHdvYxJDUIyw7q1";
extraGroups = [ "wheel" "networkmanager" ];
createHome = true;
openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDbsWgnT1W25H5fDCekspaXzlIwvKh+rHygTId8xHotU admin" ];
};
users.users.stube = {
isNormalUser = true;
@ -91,7 +94,10 @@
services.openssh = {
enable = true;
openFirewall = true;
settings.PermitRootLogin = "prohibit-password";
settings = {
PasswordAuthentication = false;
AllowUsers = [ "admin" ];
};
};
system.stateVersion = "24.05";