Compare commits

...

11 commits

17 changed files with 105 additions and 46 deletions

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -0,0 +1,16 @@
{ ... }:
{
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 = {
# Environment variables for cloudflare dns challenge
# Environment variables for porkbun dns challenge
rekeyFile = ./environment.age;
owner = "traefik";
group = "traefik";
@ -73,24 +73,6 @@
# Hypertext Transfer Protocol Secure
websecure = {
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
http.tls = {
certResolver = "lets-encrypt";
@ -121,7 +103,7 @@
caServer = "https://acme-v02.api.letsencrypt.org/directory";
# Use a DNS-01 ACME challenge
dnsChallenge = {
provider = "cloudflare";
provider = "porkbun";
resolvers = [
"1.1.1.1:53"
"8.8.8.8:53"

View file

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

View file

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