This commit is contained in:
parent
3dfe40e4e2
commit
2c16870d66
53 changed files with 1671 additions and 1559 deletions
|
@ -1,8 +1,5 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
imports = [
|
||||
./users
|
||||
./modules
|
||||
];
|
||||
imports = [ ./users ./modules ];
|
||||
|
||||
# Clean /tmp on boot.
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
|
|
@ -2,7 +2,11 @@ _: {
|
|||
# See also: https://blog.xirion.net/posts/nixos-proxmox-lxc/
|
||||
|
||||
# Supress systemd services that don't work (correctly) on LXC
|
||||
systemd.suppressedSystemUnits = [ "dev-mqueue.mount" "sys-kernel-debug.mount" "sys-fs-fuse-connections.mount" ];
|
||||
systemd.suppressedSystemUnits = [
|
||||
"dev-mqueue.mount"
|
||||
"sys-kernel-debug.mount"
|
||||
"sys-fs-fuse-connections.mount"
|
||||
];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/issues/157449#issuecomment-1459299764
|
||||
boot.specialFileSystems."/run".options = [ "rshared" ];
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
with lib;
|
||||
let cfg = config.themes.v.catppuccin;
|
||||
in {
|
||||
options.themes.v.catppuccin = {
|
||||
enable = mkEnableOption "catppuccin";
|
||||
};
|
||||
options.themes.v.catppuccin = { enable = mkEnableOption "catppuccin"; };
|
||||
config = let
|
||||
theme = "Catppuccin-Pink-Dark";
|
||||
cursorTheme = config.home.pointerCursor.name;
|
||||
|
|
|
@ -1,8 +1 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./catppuccin.nix
|
||||
./nvim.nix
|
||||
./riff.nix
|
||||
./vscode.nix
|
||||
];
|
||||
}
|
||||
{ ... }: { imports = [ ./catppuccin.nix ./nvim.nix ./riff.nix ./vscode.nix ]; }
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
with lib;
|
||||
let cfg = config.programs.v.nvim;
|
||||
in {
|
||||
options.programs.v.nvim = {
|
||||
enable = mkEnableOption "nvim";
|
||||
};
|
||||
options.programs.v.nvim = { enable = mkEnableOption "nvim"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./dns.nix
|
||||
./flood.nix
|
||||
./gnome
|
||||
./unpackerr.nix
|
||||
./vault.nix
|
||||
];
|
||||
imports = [ ./dns.nix ./flood.nix ./gnome ./unpackerr.nix ./vault.nix ];
|
||||
}
|
||||
|
|
|
@ -9,13 +9,13 @@ let
|
|||
ipv6Hosts = filter (hasAttr "ip6") flat_hosts;
|
||||
|
||||
localData = { hostname, realm, ip, ... }: ''"${hostname}.${realm}. A ${ip}"'';
|
||||
local6Data = { hostname, realm, ip6, ... }: ''"${hostname}.${realm}. AAAA ${ip6}"'';
|
||||
local6Data = { hostname, realm, ip6, ... }:
|
||||
''"${hostname}.${realm}. AAAA ${ip6}"'';
|
||||
ptrData = { hostname, realm, ip, ... }: ''"${ip} ${hostname}.${realm}"'';
|
||||
ptr6Data = { hostname, realm, ip6, ... }: ''"${ip6} ${hostname}.${realm}"'';
|
||||
|
||||
cfg = config.services.v.dns;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.v.dns = {
|
||||
enable = mkEnableOption "v.dns";
|
||||
|
||||
|
@ -50,7 +50,8 @@ in
|
|||
use-syslog = "yes";
|
||||
module-config = ''"validator iterator"'';
|
||||
|
||||
local-zone = map (localdomain: ''"${localdomain}}." transparent'') domains;
|
||||
local-zone =
|
||||
map (localdomain: ''"${localdomain}}." transparent'') domains;
|
||||
local-data = (map localData ipv4Host) ++ (map local6Data ipv6Hosts);
|
||||
local-data-ptr = (map ptrData ipv4Host) ++ (map ptr6Data ipv6Hosts);
|
||||
|
||||
|
@ -83,10 +84,7 @@ in
|
|||
})
|
||||
(mkIf (cfg.mode == "laptop") {
|
||||
interface = [ "127.0.0.1" "::1" ];
|
||||
access-control = [
|
||||
"127.0.0.1/32 allow_snoop"
|
||||
"::1 allow_snoop"
|
||||
];
|
||||
access-control = [ "127.0.0.1/32 allow_snoop" "::1 allow_snoop" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
|
|
@ -147,6 +147,7 @@ in {
|
|||
};
|
||||
|
||||
# This is needed to create the dataDir with the correct permissions.
|
||||
systemd.tmpfiles.rules = [ "d '${cfg.dataDir}' 0755 ${cfg.user} ${cfg.group} -" ];
|
||||
systemd.tmpfiles.rules =
|
||||
[ "d '${cfg.dataDir}' 0755 ${cfg.user} ${cfg.group} -" ];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -48,8 +48,6 @@ in {
|
|||
"image/x-icns" = "org.gnome.eog.desktop";
|
||||
};
|
||||
|
||||
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/input-sources" = {
|
||||
sources = [ (mkTuple [ "xkb" "us+altgr-intl" ]) ];
|
||||
|
|
|
@ -57,8 +57,7 @@ let
|
|||
'';
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.unpackerr = {
|
||||
enable = mkEnableOption "unpackerr";
|
||||
|
||||
|
@ -258,62 +257,61 @@ in
|
|||
after = [ "network.target" ];
|
||||
description = "unpackerr system service";
|
||||
# Filter out all unset variables else unpackerr complains
|
||||
environment = filterAttrs (_n: v: stringLength v > 0)
|
||||
{
|
||||
# General options
|
||||
UN_DEBUG = "${toString cfg.debug}";
|
||||
UN_INTERVAL = "${cfg.interval}";
|
||||
UN_START_DELAY = "${cfg.startDelay}";
|
||||
UN_RETRY_DELAY = "${cfg.retryDelay}";
|
||||
UN_MAX_RETRIES = "${toString cfg.maxRetries}";
|
||||
UN_PARALLEL = "${toString cfg.parallel}";
|
||||
UN_FILE_MODE = "${cfg.fileMode}";
|
||||
UN_DIR_MODE = "${cfg.dirMode}";
|
||||
environment = filterAttrs (_n: v: stringLength v > 0) {
|
||||
# General options
|
||||
UN_DEBUG = "${toString cfg.debug}";
|
||||
UN_INTERVAL = "${cfg.interval}";
|
||||
UN_START_DELAY = "${cfg.startDelay}";
|
||||
UN_RETRY_DELAY = "${cfg.retryDelay}";
|
||||
UN_MAX_RETRIES = "${toString cfg.maxRetries}";
|
||||
UN_PARALLEL = "${toString cfg.parallel}";
|
||||
UN_FILE_MODE = "${cfg.fileMode}";
|
||||
UN_DIR_MODE = "${cfg.dirMode}";
|
||||
|
||||
# Sonarr
|
||||
UN_SONARR_0_URL = "${cfg.sonarr.url}";
|
||||
UN_SONARR_0_API_KEY = "${cfg.sonarr.apiKey}";
|
||||
UN_SONARR_0_PATHS_0 = "${cfg.sonarr.paths}";
|
||||
UN_SONARR_0_PROTOCOLS = "${cfg.sonarr.protocols}";
|
||||
UN_SONARR_0_TIMEOUT = "${cfg.sonarr.timeout}";
|
||||
UN_SONARR_0_DELETE_ORIG = "${toString cfg.sonarr.deleteOrginal}";
|
||||
UN_SONARR_0_DELETE_DELAY = "${cfg.sonarr.deleteDelay}";
|
||||
# Sonarr
|
||||
UN_SONARR_0_URL = "${cfg.sonarr.url}";
|
||||
UN_SONARR_0_API_KEY = "${cfg.sonarr.apiKey}";
|
||||
UN_SONARR_0_PATHS_0 = "${cfg.sonarr.paths}";
|
||||
UN_SONARR_0_PROTOCOLS = "${cfg.sonarr.protocols}";
|
||||
UN_SONARR_0_TIMEOUT = "${cfg.sonarr.timeout}";
|
||||
UN_SONARR_0_DELETE_ORIG = "${toString cfg.sonarr.deleteOrginal}";
|
||||
UN_SONARR_0_DELETE_DELAY = "${cfg.sonarr.deleteDelay}";
|
||||
|
||||
# Radarr
|
||||
UN_RADARR_0_URL = "${cfg.radarr.url}";
|
||||
UN_RADARR_0_API_KEY = "${cfg.radarr.apiKey}";
|
||||
UN_RADARR_0_PATHS_0 = "${cfg.radarr.paths}";
|
||||
UN_RADARR_0_PROTOCOLS = "${cfg.radarr.protocols}";
|
||||
UN_RADARR_0_TIMEOUT = "${cfg.radarr.timeout}";
|
||||
UN_RADARR_0_DELETE_ORIG = "${toString cfg.radarr.deleteOrginal}";
|
||||
UN_RADARR_0_DELETE_DELAY = "${cfg.radarr.deleteDelay}";
|
||||
# Radarr
|
||||
UN_RADARR_0_URL = "${cfg.radarr.url}";
|
||||
UN_RADARR_0_API_KEY = "${cfg.radarr.apiKey}";
|
||||
UN_RADARR_0_PATHS_0 = "${cfg.radarr.paths}";
|
||||
UN_RADARR_0_PROTOCOLS = "${cfg.radarr.protocols}";
|
||||
UN_RADARR_0_TIMEOUT = "${cfg.radarr.timeout}";
|
||||
UN_RADARR_0_DELETE_ORIG = "${toString cfg.radarr.deleteOrginal}";
|
||||
UN_RADARR_0_DELETE_DELAY = "${cfg.radarr.deleteDelay}";
|
||||
|
||||
# Lidarr
|
||||
UN_LIDARR_0_URL = "${cfg.lidarr.url}";
|
||||
UN_LIDARR_0_API_KEY = "${cfg.lidarr.apiKey}";
|
||||
UN_LIDARR_0_PATHS_0 = "${cfg.lidarr.paths}";
|
||||
UN_LIDARR_0_PROTOCOLS = "${cfg.lidarr.protocols}";
|
||||
UN_LIDARR_0_TIMEOUT = "${cfg.lidarr.timeout}";
|
||||
UN_LIDARR_0_DELETE_ORIG = "${toString cfg.lidarr.deleteOrginal}";
|
||||
UN_LIDARR_0_DELETE_DELAY = "${cfg.lidarr.deleteDelay}";
|
||||
# Lidarr
|
||||
UN_LIDARR_0_URL = "${cfg.lidarr.url}";
|
||||
UN_LIDARR_0_API_KEY = "${cfg.lidarr.apiKey}";
|
||||
UN_LIDARR_0_PATHS_0 = "${cfg.lidarr.paths}";
|
||||
UN_LIDARR_0_PROTOCOLS = "${cfg.lidarr.protocols}";
|
||||
UN_LIDARR_0_TIMEOUT = "${cfg.lidarr.timeout}";
|
||||
UN_LIDARR_0_DELETE_ORIG = "${toString cfg.lidarr.deleteOrginal}";
|
||||
UN_LIDARR_0_DELETE_DELAY = "${cfg.lidarr.deleteDelay}";
|
||||
|
||||
# Readarr
|
||||
UN_READARR_0_URL = "${cfg.readarr.url}";
|
||||
UN_READARR_0_API_KEY = "${cfg.readarr.apiKey}";
|
||||
UN_READARR_0_PATHS_0 = "${cfg.readarr.paths}";
|
||||
UN_READARR_0_PROTOCOLS = "${cfg.readarr.protocols}";
|
||||
UN_READARR_0_TIMEOUT = "${cfg.readarr.timeout}";
|
||||
UN_READARR_0_DELETE_ORIG = "${toString cfg.readarr.deleteOrginal}";
|
||||
UN_READARR_0_DELETE_DELAY = "${cfg.readarr.deleteDelay}";
|
||||
# Readarr
|
||||
UN_READARR_0_URL = "${cfg.readarr.url}";
|
||||
UN_READARR_0_API_KEY = "${cfg.readarr.apiKey}";
|
||||
UN_READARR_0_PATHS_0 = "${cfg.readarr.paths}";
|
||||
UN_READARR_0_PROTOCOLS = "${cfg.readarr.protocols}";
|
||||
UN_READARR_0_TIMEOUT = "${cfg.readarr.timeout}";
|
||||
UN_READARR_0_DELETE_ORIG = "${toString cfg.readarr.deleteOrginal}";
|
||||
UN_READARR_0_DELETE_DELAY = "${cfg.readarr.deleteDelay}";
|
||||
|
||||
# Folder
|
||||
UN_FOLDER_0_PATH = "${cfg.folder.path}";
|
||||
UN_FOLDER_0_EXTRACT_PATH = "${cfg.folder.extractPath}";
|
||||
UN_FOLDER_0_DELETE_AFTER = "${cfg.folder.deleteAfter}";
|
||||
UN_FOLDER_0_DELETE_ORIGINAL = "${toString cfg.folder.deleteOrginal}";
|
||||
UN_FOLDER_0_DELETE_FILES = "${toString cfg.folder.deleteFiles}";
|
||||
UN_FOLDER_0_MOVE_BACK = "${toString cfg.folder.moveBack}";
|
||||
} // cfg.extraConfig;
|
||||
# Folder
|
||||
UN_FOLDER_0_PATH = "${cfg.folder.path}";
|
||||
UN_FOLDER_0_EXTRACT_PATH = "${cfg.folder.extractPath}";
|
||||
UN_FOLDER_0_DELETE_AFTER = "${cfg.folder.deleteAfter}";
|
||||
UN_FOLDER_0_DELETE_ORIGINAL = "${toString cfg.folder.deleteOrginal}";
|
||||
UN_FOLDER_0_DELETE_FILES = "${toString cfg.folder.deleteFiles}";
|
||||
UN_FOLDER_0_MOVE_BACK = "${toString cfg.folder.moveBack}";
|
||||
} // cfg.extraConfig;
|
||||
serviceConfig = {
|
||||
User = cfg.user;
|
||||
Group = cfg.group;
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./laura.nix
|
||||
./victor.nix
|
||||
];
|
||||
{ config, pkgs, lib, ... }: {
|
||||
imports = [ ./laura.nix ./victor.nix ];
|
||||
|
||||
# Setup ZSH to use grml config
|
||||
programs.zsh = {
|
||||
|
@ -35,7 +31,8 @@
|
|||
# Configure the root account
|
||||
users.extraUsers.root = {
|
||||
# Allow my SSH keys for logging in as root.
|
||||
openssh.authorizedKeys.keys = config.users.extraUsers.victor.openssh.authorizedKeys.keys;
|
||||
openssh.authorizedKeys.keys =
|
||||
config.users.extraUsers.victor.openssh.authorizedKeys.keys;
|
||||
# Also use zsh for root
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, ... }: {
|
||||
# The block that specifies my user account.
|
||||
# The block that specifies my user account.
|
||||
users.extraUsers.victor = {
|
||||
# This account is intended for a non-system user.
|
||||
isNormalUser = true;
|
||||
|
@ -18,6 +18,7 @@
|
|||
];
|
||||
|
||||
# Make me admin
|
||||
extraGroups = [ "systemd-journal" "wheel" "networkmanager" "libvirtd" "dialout" ];
|
||||
extraGroups =
|
||||
[ "systemd-journal" "wheel" "networkmanager" "libvirtd" "dialout" ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue