Compare commits

...

5 Commits

5 changed files with 58 additions and 14 deletions

View File

@ -0,0 +1,37 @@
{ config, pkgs, lib, ... }:
let
cmdChownManga = pkgs.writeScriptBin "chownManga" ''
#!${pkgs.stdenv.shell}
chown -R amalieem:komga /tank/media/komga/Amalie
chmod -R 750 /tank/media/komga/Amalie
'';
in {
users.users."amalieem" = {
isNormalUser = true;
home = "/home/amalieem";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID7e+BAoXIFmTeeBYAVImQAcyx6SCoYCErA7h16OGL70 amalieem@wentworth"
];
packages = with pkgs; [
cmdChownManga
mangal
rsync
];
};
security.sudo = {
enable = true;
extraRules = [{
commands = [
{
command = "${lib.getExe cmdChownManga}";
options = [ "NOPASSWD" ];
}
];
users = [ "amalieem" ];
}];
};
}

View File

@ -7,6 +7,7 @@
../../base.nix
../../common/metrics-exporters.nix
./amalieem.nix
./backup.nix
# ./exports.nix
./filesystems.nix
@ -53,7 +54,7 @@
hardware.nvidia = {
modesetting.enable = true;
open = true;
open = false;
};
hardware.graphics.enable = true;

View File

@ -17,16 +17,16 @@
interval = "Wed *-*-8..14 00:00:00";
};
# fileSystems = {
# "/mnt/feal-syn1/backup" = {
# device = "feal-syn1.home.feal.no:/volume2/backup";
# fsType = "nfs";
# options = [
# "defaults"
# "noatime"
# "rw"
# "nfsvers=3"
# ];
# };
# };
fileSystems = {
"/mnt/feal-syn1/backup" = {
device = "feal-syn1.home.feal.no:/volume2/backup";
fsType = "nfs";
options = [
"defaults"
"noatime"
"rw"
"nfsvers=3"
];
};
};
}

View File

@ -12,6 +12,12 @@
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
boot.kernelParams = [
# https://wiki.gentoo.org/wiki/Ryzen#Ryzen_Threadripper
"processor.max_cstate=1"
"rcu_nocbs=0-11"
"idle=nomwait"
];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/ea31d0ea-2949-420a-99ea-7f77c4b7091e";

View File

@ -133,7 +133,7 @@ in {
ProtectProc = "invisible";
ReadWritePaths = [ "/tank/nextcloud" "/run/phpfpm" "/run/systemd" ];
ReadOnlyPaths = [ "/run/secrets" "/nix/store" ];
InaccessbilePaths = [ "/tank/media" "/tank/backup" ];
InaccessiblePaths = [ "/tank/media" "/tank/backup" ];
RemoveIPC = true;
RestrictSUIDSGID = true;
UMask = "0007";