Compare commits

..

No commits in common. "ddf8269e702dd96b9b922ddb8292ec90c7f521de" and "958f1e704240e07d200a01221834e2d428962640" have entirely different histories.

17 changed files with 47 additions and 106 deletions

View file

@ -9,13 +9,11 @@
enable = true; enable = true;
# Enable extra features # Enable extra features
autosuggestion = { enableAutosuggestions = true;
enable = true; enableCompletion = true;
};
syntaxHighlighting = { syntaxHighlighting = {
enable = true; enable = true;
}; };
enableCompletion = true;
dotDir = ".config/zsh"; dotDir = ".config/zsh";
# Commands that should be added to to top of '.zshrc' # Commands that should be added to to top of '.zshrc'
@ -25,8 +23,6 @@
# Aliases # Aliases
shellAliases = { shellAliases = {
c = "clear"; c = "clear";
r = "cd ~/.repositories";
p = "cd ~/.print";
la = "ls -a"; la = "ls -a";
ll = "ls -l"; ll = "ls -l";
tt = "wezterm cli set-tab-title "; tt = "wezterm cli set-tab-title ";

View file

@ -6,7 +6,7 @@
package = pkgs.mangohud; package = pkgs.mangohud;
settings = { settings = {
# Performance # Performance
fps_limit = 144; fps_limit = 60;
# GPU # GPU
gpu_temp = true; gpu_temp = true;
gpu_junction_temp = true; gpu_junction_temp = true;

View file

@ -37,9 +37,6 @@
persistence."/persist/home/sajenim" = { persistence."/persist/home/sajenim" = {
directories = [ directories = [
".mozilla" ".mozilla"
# Hidden user data
".repositories"
".print"
# Mutable configurations # Mutable configurations
".config/Yubico" ".config/Yubico"
# Application specific data # Application specific data
@ -51,6 +48,7 @@
"Games" "Games"
"Music" "Music"
"Pictures" "Pictures"
"Printer"
"Videos" "Videos"
]; ];
}; };

View file

@ -28,6 +28,8 @@
persistence."/persist/home/sajenim" = { persistence."/persist/home/sajenim" = {
directories = [ directories = [
".backup"
".github"
".gnupg" ".gnupg"
".ssh" ".ssh"

View file

@ -14,7 +14,7 @@
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
# Fix: invalid time when using keytocard # Fix: invalid time when using keytocard
pinentryPackage = pkgs.pinentry-curses; pinentryFlavor = "gtk2";
}; };
# Use our yubikey as a user login or for sudo access # Use our yubikey as a user login or for sudo access

View file

@ -20,6 +20,5 @@
users = { users = {
sajenim = import "${inputs.self}/home-manager/sajenim/${config.networking.hostName}.nix"; sajenim = import "${inputs.self}/home-manager/sajenim/${config.networking.hostName}.nix";
}; };
backupFileExtension = "bak";
}; };
} }

View file

@ -3,11 +3,9 @@
{ {
imports = [ imports = [
../common/global ../common/global
../common/users/sajenim ../common/users/sajenim
../common/users/sajenim/samba ../common/users/sajenim/samba
../common/users/sajenim/steam ../common/users/sajenim/steam
../common/optional/key.nix ../common/optional/key.nix
./services ./services
@ -67,26 +65,26 @@
# Setup our display server. # Setup our display server.
xserver = { xserver = {
enable = true; enable = true;
xkb.layout = "au"; layout = "au";
videoDrivers = [ "amdgpu" ]; videoDrivers = [ "amdgpu" ];
libinput = {
enable = true;
mouse = {
accelProfile = "flat";
};
};
displayManager.startx.enable = true; displayManager.startx.enable = true;
}; };
libinput = {
enable = true;
mouse = { accelProfile = "flat"; };
};
# Get up and running with large language models locally. # Get up and running with large language models locally.
# ollama = { ollama = {
# enable = true; enable = true;
# package = pkgs.unstable.ollama; package = pkgs.unstable.ollama;
# acceleration = "rocm"; acceleration = "rocm";
# # environmentVariables = { # environmentVariables = {
# # HSA_OVERRIDE_GFX_VERSION = "10.3.0"; # HSA_OVERRIDE_GFX_VERSION = "10.3.0";
# # }; # };
# }; };
# Enable a few other services. # Enable a few other services.
ratbagd.enable = true; ratbagd.enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: { outputs, pkgs, ... }:
{ {
imports = [ imports = [

View file

@ -1,7 +1,5 @@
{ config, lib, ... }: { config, lib, ... }:
let
hostname = config.networking.hostName;
in
{ {
imports = [ imports = [
../common/optional/ephemeral-btrfs.nix ../common/optional/ephemeral-btrfs.nix
@ -32,17 +30,11 @@ in
}; };
fileSystems."/srv/containers" = { fileSystems."/srv/containers" = {
device = "/dev/disk/by-label/${hostname}"; device = "/dev/disk/by-label/data";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=containers" "compress=zstd" ]; options = [ "subvol=containers" "compress=zstd" ];
}; };
fileSystems."/srv/services" = {
device = "/dev/disk/by-label/${hostname}";
fsType = "btrfs";
options = [ "subvol=services" "compress=zstd" ];
};
fileSystems."/srv/shares" = { fileSystems."/srv/shares" = {
device = "/dev/disk/by-label/data"; device = "/dev/disk/by-label/data";
fsType = "btrfs"; fsType = "btrfs";

View file

@ -7,21 +7,7 @@
"/srv/containers" "/srv/containers"
]; ];
encryption.mode = "none"; encryption.mode = "none";
repo = "/srv/backup/containers"; repo = "/srv/backup/borg/containers";
compression = "auto,zstd";
startAt = "daily";
};
services = {
paths = [
"/srv/services"
];
encryption.mode = "none";
repo = "/srv/backup/services";
compression = "auto,zstd";
startAt = "daily";
};
shares = { shares = {
paths = [ paths = [
"/srv/shares" "/srv/shares"

View file

@ -6,7 +6,6 @@
./minecraft ./minecraft
./borgbackup.nix ./borgbackup.nix
./forgejo.nix ./forgejo.nix
./httpd.nix
./mpd.nix ./mpd.nix
./samba.nix ./samba.nix
]; ];

View file

@ -1,16 +0,0 @@
{ ... }:
{
services.httpd = {
enable = true;
virtualHosts."sajenim.dev" = {
documentRoot = "/srv/services/httpd/sajenim.dev";
listen = [{
ip = "192.168.1.102";
port = 5624;
}];
adminAddr = "its.jassy@pm.me";
};
};
}

View file

@ -11,7 +11,7 @@
]; ];
age.secrets.traefik = { age.secrets.traefik = {
# Environment variables for porkbun dns challenge # Environment variables for cloudflare dns challenge
rekeyFile = ./environment.age; rekeyFile = ./environment.age;
owner = "traefik"; owner = "traefik";
group = "traefik"; group = "traefik";
@ -73,6 +73,24 @@
# Hypertext Transfer Protocol Secure # Hypertext Transfer Protocol Secure
websecure = { websecure = {
address = ":443"; address = ":443";
# Trust cloudflares forwarded header information
forwardedHeaders.trustedIPs = [
"173.245.48.0/20"
"103.21.244.0/22"
"103.22.200.0/22"
"103.31.4.0/22"
"141.101.64.0/18"
"108.162.192.0/18"
"190.93.240.0/20"
"188.114.96.0/20"
"197.234.240.0/22"
"198.41.128.0/17"
"162.158.0.0/15"
"172.64.0.0/13"
"131.0.72.0/22"
"104.16.0.0/13"
"104.24.0.0/14"
];
# Requests wildcard SSL certs for our services # Requests wildcard SSL certs for our services
http.tls = { http.tls = {
certResolver = "lets-encrypt"; certResolver = "lets-encrypt";
@ -103,7 +121,7 @@
caServer = "https://acme-v02.api.letsencrypt.org/directory"; caServer = "https://acme-v02.api.letsencrypt.org/directory";
# Use a DNS-01 ACME challenge # Use a DNS-01 ACME challenge
dnsChallenge = { dnsChallenge = {
provider = "porkbun"; provider = "cloudflare";
resolvers = [ resolvers = [
"1.1.1.1:53" "1.1.1.1:53"
"8.8.8.8:53" "8.8.8.8:53"

View file

@ -2,17 +2,6 @@
{ {
services.traefik.dynamicConfigOptions.http.routers = { services.traefik.dynamicConfigOptions.http.routers = {
httpd = {
rule = "Host(`sajenim.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"geoblock"
];
service = "httpd";
};
forgejo = { forgejo = {
rule = "Host(`git.sajenim.dev`)"; rule = "Host(`git.sajenim.dev`)";
entryPoints = [ entryPoints = [
@ -124,7 +113,7 @@
}; };
qbittorrent = { qbittorrent = {
rule = "Host(`torrent.kanto.dev`)"; rule = "Host(`qbittorrent.kanto.dev`)";
entryPoints = [ entryPoints = [
"websecure" "websecure"
]; ];
@ -155,17 +144,6 @@
]; ];
service = "microbin"; service = "microbin";
}; };
ender1 = {
rule = "Host(`e1.kanto.dev`)";
entryPoints = [
"websecure"
];
middlewares = [
"admin"
];
service = "ender1";
};
}; };
} }

View file

@ -2,15 +2,9 @@
{ {
services.traefik.dynamicConfigOptions.http.services = { services.traefik.dynamicConfigOptions.http.services = {
# sajenim.dev
httpd.loadBalancer.servers = [
{ url = "http://192.168.1.102:5624"; }
];
forgejo.loadBalancer.servers = [ forgejo.loadBalancer.servers = [
{ url = "http://192.168.1.102:3131"; } { url = "http://192.168.1.102:3131"; }
]; ];
# kanto.dev
homarr.loadBalancer.servers = [ homarr.loadBalancer.servers = [
{ url = "http://192.168.1.102:7575"; } { url = "http://192.168.1.102:7575"; }
]; ];
@ -44,9 +38,6 @@
microbin.loadBalancer.servers = [ microbin.loadBalancer.servers = [
{ url = "http://192.168.1.102:8181"; } { url = "http://192.168.1.102:8181"; }
]; ];
ender1.loadBalancer.servers = [
{ url = "http://192.168.1.103:80"; }
];
}; };
} }