add initial user pw and work on other stuff

This commit is contained in:
Kopatz
2024-05-09 19:49:41 +02:00
parent 030162ac44
commit 8aabc73f3e
3 changed files with 30 additions and 20 deletions

View File

@@ -1,5 +1,14 @@
{ config, pkgs, lib, inputs, ... }: { config, pkgs, lib, inputs, ... }:
with lib;
let let
cfg = config.custom.misc.backup;
in
{
options.custom.backup = {
enable = mkEnableOption "Enables backup";
};
config = let
kavita = "/mnt/1tbssd/kavita"; kavita = "/mnt/1tbssd/kavita";
gitolite = "/var/lib/gitolite"; gitolite = "/var/lib/gitolite";
syncthing = [ "/synced/default/" "/synced/work_drive/" ]; syncthing = [ "/synced/default/" "/synced/work_drive/" ];
@@ -27,8 +36,7 @@ let
du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) excludePathsRemote)} ${builtins.concatStringsSep " " backupPathsFull} du -sch ${builtins.concatStringsSep " " (map (x: "--exclude=" + x) excludePathsRemote)} ${builtins.concatStringsSep " " backupPathsFull}
''; '';
}; };
in in mkIf cfg.enable {
{
environment.systemPackages = with pkgs; [ checkStorageSpace ]; environment.systemPackages = with pkgs; [ checkStorageSpace ];
age.secrets.restic-pw = { age.secrets.restic-pw = {
file = ../secrets/restic-pw.age; file = ../secrets/restic-pw.age;
@@ -98,3 +106,4 @@ in
}; };
}; };
} }
}

View File

@@ -13,23 +13,23 @@
mainUser.layout = "de"; mainUser.layout = "de";
mainUser.variant = "us"; mainUser.variant = "us";
age.identityPaths = [ /home/kopatz/.ssh/id_rsa ]; age.identityPaths = [ /home/kopatz/.ssh/id_rsa ];
services.xserver.displayManager.session = [ #services.xserver.displayManager.session = [
{ # {
manage = "desktop"; # manage = "desktop";
name = "hyprland"; # name = "hyprland";
start = '' # start = ''
${lib.getExe pkgs.hyprland} & # ${lib.getExe pkgs.hyprland} &
waitPID=$! # waitPID=$!
''; # '';
} # }
{ # {
manage = "desktop"; # manage = "desktop";
name = "plasma5"; # name = "plasma5";
start = '' # start = ''
env ${pkgs.plasma-workspace}/bin/startplasma-x11 # env ${pkgs.plasma-workspace}/bin/startplasma-x11
''; # '';
} # }
]; #];
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;

View File

@@ -19,6 +19,7 @@
programs.zsh.enable = true; programs.zsh.enable = true;
users.users.${config.mainUser.name} = { users.users.${config.mainUser.name} = {
isNormalUser = true; isNormalUser = true;
initialPassword = "1";
description = config.mainUser.name; description = config.mainUser.name;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "docker" ]; extraGroups = [ "networkmanager" "wheel" "docker" ];