cleanup
This commit is contained in:
parent
4b850af15a
commit
40729a2597
@ -107,6 +107,7 @@
|
|||||||
|
|
||||||
system.activationScripts = {
|
system.activationScripts = {
|
||||||
# extract all my secureboot keys
|
# extract all my secureboot keys
|
||||||
|
# TODO! awful secrets management, it's globally readable in /nix/store
|
||||||
"secureboot-keys".text = ''
|
"secureboot-keys".text = ''
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
rm -fr ${config.boot.lanzaboote.pkiBundle} || true
|
rm -fr ${config.boot.lanzaboote.pkiBundle} || true
|
||||||
@ -216,7 +217,7 @@
|
|||||||
{
|
{
|
||||||
description = "disable rgb";
|
description = "disable rgb";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${lib.getExe no-rgb}";
|
ExecStart = lib.getExe no-rgb;
|
||||||
Type = "oneshot";
|
Type = "oneshot";
|
||||||
};
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
@ -268,7 +269,7 @@
|
|||||||
# };
|
# };
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups.${service_configs.torrent_group} = { };
|
users.groups.${service_configs.media_group} = { };
|
||||||
|
|
||||||
users.users.${username} = {
|
users.users.${username} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
@ -276,10 +277,11 @@
|
|||||||
"wheel"
|
"wheel"
|
||||||
"video"
|
"video"
|
||||||
"render"
|
"render"
|
||||||
service_configs.torrent_group
|
service_configs.media_group
|
||||||
];
|
];
|
||||||
|
|
||||||
hashedPasswordFile = builtins.toString ./secrets/hashedPass;
|
# TODO! use proper secrets management
|
||||||
|
# hashedPasswordFile = builtins.toString ./secrets/hashedPass;
|
||||||
|
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4jL6gYOunUlUtPvGdML0cpbKSsPNqQ1jit4E7U1RyH" # laptop
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO4jL6gYOunUlUtPvGdML0cpbKSsPNqQ1jit4E7U1RyH" # laptop
|
||||||
|
|||||||
@ -70,7 +70,7 @@
|
|||||||
torrents_path = "/torrents";
|
torrents_path = "/torrents";
|
||||||
services_dir = "/${zpool_ssds}/services";
|
services_dir = "/${zpool_ssds}/services";
|
||||||
music_dir = "/${zpool_ssds}/music";
|
music_dir = "/${zpool_ssds}/music";
|
||||||
torrent_group = "media";
|
media_group = "media";
|
||||||
|
|
||||||
ports = {
|
ports = {
|
||||||
https = 443;
|
https = 443;
|
||||||
@ -148,16 +148,15 @@
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
||||||
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
|
nixosConfigurations.${hostname} = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = rec {
|
specialArgs = {
|
||||||
inherit
|
inherit
|
||||||
username
|
username
|
||||||
hostname
|
hostname
|
||||||
eth_interface
|
eth_interface
|
||||||
service_configs
|
service_configs
|
||||||
inputs
|
inputs
|
||||||
lib
|
|
||||||
;
|
;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
|
|||||||
34
home.nix
34
home.nix
@ -1,36 +1,32 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
username,
|
username,
|
||||||
stateVersion,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
home.stateVersion = "24.11";
|
home.stateVersion = "24.11";
|
||||||
programs.fish =
|
programs.fish = {
|
||||||
let
|
enable = true;
|
||||||
eza = "${pkgs.eza}/bin/eza --color=always --group-directories-first";
|
|
||||||
coreutils = "${pkgs.coreutils}/bin";
|
|
||||||
in
|
|
||||||
{
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
#disable greeting
|
# disable greeting
|
||||||
set fish_greeting
|
set fish_greeting
|
||||||
|
|
||||||
#fixes gnupg password entry
|
# pfetch on shell start (disable pkgs because of execution time)
|
||||||
export GPG_TTY=(${coreutils}/tty)
|
PF_INFO="ascii title os host kernel uptime memory editor wm" ${lib.getExe pkgs.pfetch-rs}
|
||||||
|
'';
|
||||||
|
|
||||||
#pfetch on shell start (disable pkgs because of execution time)
|
shellAliases =
|
||||||
PF_INFO="ascii title os host kernel uptime memory editor wm" ${pkgs.pfetch-rs}/bin/pfetch
|
let
|
||||||
'';
|
eza = "${lib.getExe pkgs.eza} --color=always --group-directories-first";
|
||||||
|
in
|
||||||
shellAliases = {
|
{
|
||||||
# from DistroTube's dot files: Changing "ls" to "eza"
|
# from DistroTube's dot files: Changing "ls" to "eza"
|
||||||
ls = "${eza} -al";
|
ls = "${eza} -al";
|
||||||
la = "${eza} -a";
|
la = "${eza} -a";
|
||||||
ll = "${eza} -l";
|
ll = "${eza} -l";
|
||||||
lt = "${eza} -aT";
|
lt = "${eza} -aT";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -20,8 +20,7 @@
|
|||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
package = pkgs.jellyfin.override { jellyfin-ffmpeg = (lib.optimizePackage pkgs.jellyfin-ffmpeg); };
|
package = pkgs.jellyfin.override { jellyfin-ffmpeg = (lib.optimizePackage pkgs.jellyfin-ffmpeg); };
|
||||||
|
|
||||||
dataDir = service_configs.jellyfin.dataDir;
|
inherit (service_configs.jellyfin) dataDir cacheDir;
|
||||||
cacheDir = service_configs.jellyfin.cacheDir;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.caddy.virtualHosts."jellyfin.${service_configs.https.domain}".extraConfig = ''
|
services.caddy.virtualHosts."jellyfin.${service_configs.https.domain}".extraConfig = ''
|
||||||
@ -39,8 +38,7 @@
|
|||||||
users.users.${config.services.jellyfin.user}.extraGroups = [
|
users.users.${config.services.jellyfin.user}.extraGroups = [
|
||||||
"video"
|
"video"
|
||||||
"render"
|
"render"
|
||||||
service_configs.torrent_group
|
service_configs.media_group
|
||||||
"media"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.${username}.extraGroups = [
|
users.users.${username}.extraGroups = [
|
||||||
|
|||||||
@ -215,8 +215,8 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
"d ${config.services.qbittorrent.serverConfig.Preferences.Downloads.SavePath} 0750 ${config.services.qbittorrent.user} ${service_configs.torrent_group}"
|
"d ${config.services.qbittorrent.serverConfig.Preferences.Downloads.SavePath} 0750 ${config.services.qbittorrent.user} ${service_configs.media_group}"
|
||||||
"d ${config.services.qbittorrent.serverConfig.Preferences.Downloads.TempPath} 0750 ${config.services.qbittorrent.user} ${service_configs.torrent_group}"
|
"d ${config.services.qbittorrent.serverConfig.Preferences.Downloads.TempPath} 0750 ${config.services.qbittorrent.user} ${service_configs.media_group}"
|
||||||
];
|
];
|
||||||
|
|
||||||
# make qbittorrent use a vpn
|
# make qbittorrent use a vpn
|
||||||
@ -231,11 +231,6 @@
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
users.users.${config.services.qbittorrent.user}.extraGroups = [
|
users.users.${config.services.qbittorrent.user}.extraGroups = [
|
||||||
service_configs.torrent_group
|
service_configs.media_group
|
||||||
];
|
];
|
||||||
|
|
||||||
users.users.${username}.extraGroups = [
|
|
||||||
config.services.qbittorrent.group
|
|
||||||
];
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user