All
This commit is contained in:
1 parent
d055a2972d
commit
b18b4a4453
12 files changed
+147
-97
No files matched your search
@@ -33,17 +33,19 @@
|
||||
};
|
||||
zellij = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
enableBashIntegration = true;
|
||||
settings = {
|
||||
theme = "nord";
|
||||
session_serialization = false;
|
||||
};
|
||||
};
|
||||
tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
mouse = true;
|
||||
plugins = with pkgs.tmuxPlugins; [ nord cpu battery sidebar ];
|
||||
plugins = with pkgs.tmuxPlugins; [ nord cpu sidebar ];
|
||||
extraConfig = ''
|
||||
set -g status-right '#{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M '
|
||||
'';
|
||||
};
|
||||
alacritty = {
|
||||
enable = true;
|
||||
@@ -62,11 +64,6 @@
|
||||
};
|
||||
terminal.shell = {
|
||||
program = "/home/${user.name}/.nix-profile/bin/zsh";
|
||||
args = [
|
||||
"-l"
|
||||
"-c"
|
||||
"zellij"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -22,27 +22,10 @@
|
||||
skyg.core.hostName = hostName;
|
||||
skyg.home-manager.version = homeManagerVersion;
|
||||
skyg.core.substituters = localNixCaches;
|
||||
skyg.networkDrives.enable = enableNetworkDrives;
|
||||
skyg.nixos.common.containers = (if os.enable then os.containers else { });
|
||||
skyg.nixos.server.k8s = {
|
||||
masterIP = "10.0.10.6";
|
||||
masterHostName = "minipc1.lab.internal";
|
||||
};
|
||||
system.stateVersion = systemStateVersion;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
optimise.automatic = true;
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
# System Packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
# nix utils
|
||||
nix-index
|
||||
nil
|
||||
cachix
|
||||
nixpkgs-fmt
|
||||
nvd
|
||||
# shell tools
|
||||
wget
|
||||
];
|
||||
}
|
||||
@@ -2,40 +2,43 @@
|
||||
, config
|
||||
, ...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.skyg.networkDrives;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
skyg.networkDrives = {
|
||||
enable = mkEnableOption
|
||||
enable = lib.mkEnableOption
|
||||
"Network Drives";
|
||||
options = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
config = lib.mkIf cfg.enable {
|
||||
fileSystems."/torrents" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/DownloadedTorrents";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
options = cfg.options;
|
||||
};
|
||||
|
||||
fileSystems."/mnt/EightTerra/k3s-cluster" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/k3s-cluster";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
options = cfg.options;
|
||||
};
|
||||
|
||||
fileSystems."/mnt/EightTerra/NVR" = {
|
||||
device = "tnas1.lab.internal:/mnt/EightTerra/NVR";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
options = cfg.options;
|
||||
};
|
||||
|
||||
fileSystems."/mnt/terra1/Data/apps" = {
|
||||
device = "terra1.lab.internal:/mnt/Data/apps";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" "noauto" ];
|
||||
options = cfg.options;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -4,6 +4,11 @@
|
||||
services.hydra.useSubstitutes = true;
|
||||
programs.dconf.enable = true;
|
||||
programs.nix-ld.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix = {
|
||||
optimise.automatic = true;
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
# nix utils
|
||||
appimage-run
|
||||
@@ -26,6 +31,14 @@
|
||||
# printer
|
||||
system-config-printer
|
||||
|
||||
# nix utils
|
||||
nix-index
|
||||
nil
|
||||
cachix
|
||||
nixpkgs-fmt
|
||||
nvd
|
||||
# shell tools
|
||||
wget
|
||||
];
|
||||
services.xserver.excludePackages = with pkgs; [
|
||||
xterm
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
{ config, lib, ... }:
|
||||
let cfg = config.skyg.server.timers;
|
||||
in {
|
||||
options = {
|
||||
skyg.server.timers = lib.mkOption {
|
||||
type = lib.types.attrsOf (lib.types.submodule {
|
||||
script = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
};
|
||||
timerConfig = lib.mkOption {
|
||||
type = lib.types.submodule;
|
||||
};
|
||||
});
|
||||
default = { };
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.timers."backup-jellyfin" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
OnCalendar = "daily";
|
||||
Persistent = true;
|
||||
Unit = "backup-jellyfin.service";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services."backup-jellyfin" = {
|
||||
script = ''
|
||||
set -eu
|
||||
${pkgs.rsync}/bin/rsync -avpzP --delete /opt/jellyfin /mnt/terra1/Data/apps/
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user