2023-01-07 12:54:29 -05:00
{
description = "System config" ;
inputs = {
2023-01-07 13:48:09 -05:00
nixpkgs . url = "nixpkgs/nixos-unstable" ;
2026-03-28 17:07:11 -04:00
nur = {
url = "github:nix-community/NUR" ;
inputs . nixpkgs . follows = "nixpkgs" ;
};
2025-01-27 19:19:37 -05:00
stylix = {
2025-02-05 23:34:23 -05:00
url = "github:danth/stylix" ;
2025-01-27 19:19:37 -05:00
inputs . nixpkgs . follows = "nixpkgs" ;
};
2025-12-15 21:35:44 -05:00
awww = {
url = "git+https://codeberg.org/LGFae/awww" ;
inputs . nixpkgs . follows = "nixpkgs" ;
};
2025-01-27 19:19:37 -05:00
2025-01-13 02:11:04 -05:00
niri = {
url = "github:sodiboo/niri-flake" ;
inputs . nixpkgs . follows = "nixpkgs" ;
};
2023-01-07 12:54:29 -05:00
home-manager = {
url = "github:nix-community/home-manager" ;
inputs . nixpkgs . follows = "nixpkgs" ;
};
2026-06-19 12:09:44 -04:00
tachikoma = {
url = "git+https://forge.room409.xyz/miloignis/tachikoma.git" ;
inputs . nixpkgs . follows = "nixpkgs" ;
};
2023-12-18 00:44:23 -05:00
nixos-hardware . url = "github:NixOS/nixos-hardware/master" ;
2023-01-07 12:54:29 -05:00
};
2026-06-19 12:09:44 -04:00
outputs = { self , nixpkgs , nur , stylix , awww , niri , home-manager , tachikoma , nixos-hardware } @ attrs :
2023-01-07 12:54:29 -05:00
let
system = "x86_64-linux" ;
2025-01-18 00:06:35 -05:00
make_besley = pkgs :( lib : ( pkgs . stdenvNoCC . mkDerivation rec {
pname = "besley" ;
version = "4.0" ;
src = pkgs . fetchFromGitHub {
owner = "indestructible-type" ;
repo = "Besley" ;
rev = "99d5b97fcb863c4a667571ac8f86f745c345d3ab" ;
sha256 = "sha256-N6QU3Pd6EnIrdbRtDT3mW5ny683DBWo0odADJBSdA2E=" ;
};
installPhase = ''
install -D -t $out/share/fonts/opentype/ $(find $src -type f -name '*.otf')
install -D -t $out/share/fonts/truetype/ $(find $src -type f -name '*.ttf')
'' ;
meta = with lib ; {
homepage = "https://indestructibletype.com/Besley.html" ;
description = "by indestructable-type" ;
license = licenses . ofl ;
maintainers = [ ];
platforms = platforms . all ;
};
}));
2025-11-11 20:18:06 -05:00
#background = ./GitS_other_alley_zoom.png;
2026-01-01 12:30:15 -05:00
#background = ./GitS_alley_to_water_zoom.png;
2026-03-28 17:07:11 -04:00
#background = ./waneella/Destination_waneella.png;
background = ./waneella/Apr_05-21.png ;
2023-01-07 13:48:09 -05:00
homeManagerSharedModule = {
home-manager . useGlobalPkgs = true ;
2025-10-27 22:18:30 -04:00
home-manager . users . nathan = (( import ./home-manager/home.nix ) { username = "nathan" ; homeDirectory = "/home/nathan" ; backgroundImg = background ; email = "miloignis@gmail.com" ; });
2023-01-07 13:48:09 -05:00
};
2023-01-16 12:36:01 -05:00
commonConfigFunc = ({ config , lib , pkgs , modulesPath , ... }: ( specificPkgs : {
2023-01-07 14:47:38 -05:00
nixpkgs . config . allowUnfree = true ;
2025-10-27 22:15:56 -04:00
nixpkgs . config . permittedInsecurePackages = [
"olm-3.2.16"
];
2023-01-16 11:23:01 -05:00
nix . settings . experimental-features = [ "nix-command" "flakes" ];
2023-01-07 12:54:29 -05:00
networking . networkmanager . enable = true ; # Easiest to use and most distros use this by default.
time . timeZone = "America/New_York" ;
users . extraUsers . nathan = {
name = "nathan" ;
isNormalUser = true ;
group = "users" ;
extraGroups = [ "wheel" "disk" "audio" "video" "networkmanager" "systemd-journal" "networkmanager" "sway" "plugdev" "adbusers" ];
createHome = true ;
home = "/home/nathan" ;
2026-07-08 00:05:10 -04:00
# shell = "/run/current-system/sw/bin/bash";
shell = pkgs . nushell ;
2023-01-07 12:54:29 -05:00
};
2023-03-28 21:34:55 -04:00
#fonts.fonts = with pkgs; [ fira-code jetbrains-mono iosevka ];
2023-01-07 12:54:29 -05:00
services . pipewire = {
enable = true ;
alsa . enable = true ;
pulse . enable = true ;
};
services . dbus . enable = true ;
xdg . portal = {
enable = true ;
wlr . enable = true ;
extraPortals = [ pkgs . xdg-desktop-portal-gtk ];
2025-01-12 17:32:33 -05:00
#gtkUsePortal = true;
2023-01-07 12:54:29 -05:00
};
2023-08-01 13:21:43 -04:00
hardware . bluetooth . enable = true ;
2023-01-07 14:47:38 -05:00
services . blueman . enable = true ;
services . printing . enable = true ;
services . printing . drivers = [ pkgs . brlaser ];
2023-01-07 12:54:29 -05:00
2025-01-14 20:01:38 -05:00
stylix = {
enable = true ;
#image = /home/nathan/Wallpapers/walls/green-tea.jpg;
2025-01-18 00:06:35 -05:00
#image = ./cherry_tree.jpg;
#image = ./skyscraper.jpg;
2025-01-27 19:19:37 -05:00
#image = ./village.jpg;
2025-04-11 23:32:37 -04:00
#image = ./stones-water.jpg;
2025-06-21 16:03:08 -04:00
#image = ./moss.jpeg;
#image = ./ruinedmansion.jpg;
2025-09-27 16:12:21 -04:00
#image = ./130_1zhJtUA.jpeg; #the city street
#image = ./GitS_alley_to_water_zoom.png;
2025-10-27 22:18:30 -04:00
image = background ;
2025-01-18 00:06:35 -05:00
#image = pkgs.fetchurl {
# url = "https://raw.githubusercontent.com/kiedtl/walls/refs/heads/master/green-tea.jpg";
# sha256 = "sha256-+NcZMBnbEWurmkOkzdrxGwBlxzUO3Sitt6Uoq9plc7o=";
#};
2025-01-14 20:01:38 -05:00
polarity = "dark" ;
2025-06-21 16:03:08 -04:00
#polarity = "light";
2025-01-14 20:01:38 -05:00
fonts = {
2025-01-18 00:06:35 -05:00
serif = { package = ( make_besley pkgs lib ); name = "Besley" ; };
#sansSerif = { package = pkgs.recursive; name = "Recursive Sans Linear Static"; };
sansSerif = { package = pkgs . inter ; name = "Inter" ; };
2025-01-14 20:01:38 -05:00
monospace = { package = pkgs . recursive ; name = "Recursive Mono Linear Static" ; };
2025-11-11 20:18:06 -05:00
#monospace = { package = pkgs.maple-mono.truetype; name = "Maple Mono"; };
2025-11-21 23:05:36 -05:00
emoji = { package = pkgs . noto-fonts-color-emoji ; name = "Noto Color Emoji" ; };
2025-01-14 20:01:38 -05:00
};
};
2025-01-13 02:11:04 -05:00
programs . niri = {
enable = true ;
package = pkgs . niri ;
};
2023-01-07 12:54:29 -05:00
programs . sway = {
enable = true ;
wrapperFeatures . gtk = true ;
extraPackages = with pkgs ; [
swaylock # lockscreen
swayidle
2025-10-27 22:15:56 -04:00
#xwayland # for legacy apps
2023-01-07 13:48:09 -05:00
#waybar # status bar
2023-01-07 12:54:29 -05:00
mako # notification daemon
kanshi # autorandr
bemenu # is this right?
i3status
];
};
environment = {
etc = {
"sway/config" . source = ./sway_config ;
};
};
2023-01-16 11:23:01 -05:00
# For steam, and Vulkan in general
2025-11-11 20:18:06 -05:00
hardware . graphics . enable32Bit = true ;
2023-12-28 20:49:04 -05:00
hardware . steam-hardware . enable = true ;
programs . steam . enable = true ;
2023-01-07 12:54:29 -05:00
environment . systemPackages = with pkgs ; [
2025-12-15 21:35:44 -05:00
awww . packages . ${ pkgs . stdenv . hostPlatform . system } . awww
2025-01-12 17:32:33 -05:00
tmux vim wget curl git w3m iftop iotop killall file unzip zip p7zip ripgrep imv killall
btop htop python3
2025-11-21 23:05:36 -05:00
waypipe firefox chromium chawan cmatrix nautilus
2026-07-08 00:05:10 -04:00
vlc mpv wayfarer libreoffice calibre foliate epr lue #transmission-gtk mupdf
2023-01-20 21:41:45 -05:00
gimp
2023-03-28 21:34:55 -04:00
pavucontrol pywal
2025-01-12 17:32:33 -05:00
sway wayland glib dracula-theme adwaita-icon-theme swaylock swayidle wl-clipboard
circumflex
2024-07-02 00:25:02 -04:00
#monado openxr-loader xrgears
2025-01-12 17:32:33 -05:00
#lean4 blas elan vscode
2023-01-07 12:54:29 -05:00
( pkgs . writeTextFile {
name = "dbus-sway-environment" ;
destination = "/bin/dbus-sway-environment" ;
executable = true ;
text = ''
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
systemctl --user stop pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
systemctl --user start pipewire pipewire-media-session xdg-desktop-portal xdg-desktop-portal-wlr
'' ;
})
# currently, there is some friction between sway and gtk:
# https://github.com/swaywm/sway/wiki/GTK-3-settings-on-Wayland
# the suggested way to set gtk settings is with gsettings
# for gsettings to work, we need to tell it where the schemas are
# using the XDG_DATA_DIR environment variable
# run at the end of sway config
( pkgs . writeTextFile {
name = "configure-gtk" ;
destination = "/bin/configure-gtk" ;
executable = true ;
text = let
schema = pkgs . gsettings-desktop-schemas ;
datadir = " ${ schema } /share/gsettings-schemas/ ${ schema . name } " ;
in ''
export XDG_DATA_DIRS= ${ datadir } :$XDG_DATA_DIRS
gnome_schema=org.gnome.desktop.interface
gsettings set $gnome_schema gtk-theme 'Dracula'
'' ;
})
2023-01-16 12:36:01 -05:00
] ++ specificPkgs ;
2023-01-07 12:54:29 -05:00
# kanshi systemd service
systemd . user . services . kanshi = {
description = "kanshi daemon" ;
serviceConfig = {
Type = "simple" ;
ExecStart = " ${ pkgs . kanshi } /bin/kanshi -c kanshi_config_file" ;
};
};
services . syncthing = {
enable = true ;
user = "nathan" ;
dataDir = "/home/nathan/syncthing_stuff" ;
configDir = "/home/nathan/syncthing_stuff/.config/syncthing" ;
};
services . openssh . enable = true ;
2023-02-23 18:45:44 -05:00
services . tailscale . enable = true ;
2023-01-07 12:54:29 -05:00
networking . firewall . enable = false ;
2023-01-16 12:36:01 -05:00
}));
2023-01-07 13:48:09 -05:00
in {
2023-10-18 18:08:08 -04:00
nixosConfigurations . nixos-framework = nixpkgs . lib . nixosSystem {
inherit system ;
specialArgs = attrs ;
modules = [
2023-12-18 00:44:23 -05:00
nixos-hardware . nixosModules . framework-13-7040-amd
2026-03-28 17:07:11 -04:00
nur . modules . nixos . default
2025-01-14 20:01:38 -05:00
stylix . nixosModules . stylix
2025-01-13 02:11:04 -05:00
niri . nixosModules . niri
2023-10-18 18:08:08 -04:00
home-manager . nixosModules . home-manager
homeManagerSharedModule
2026-04-11 11:01:43 -04:00
({ config , lib , pkgs , modulesPath , ... } @ innerArgs : ( lib . recursiveUpdate ( commonConfigFunc innerArgs [ pkgs . gpodder pkgs . evince pkgs . vulkan-tools pkgs . tor-browser ]) {
2023-10-18 18:08:08 -04:00
# HARDWARE
imports = [ ( modulesPath + "/installer/scan/not-detected.nix" ) ];
boot . initrd . availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
2023-11-06 13:03:42 -05:00
boot . initrd . kernelModules = [ "amdgpu" ];
2023-10-18 18:08:08 -04:00
boot . kernelModules = [ "kvm-amd" ];
boot . extraModulePackages = [ ];
fileSystems . "/" =
{ device = "/dev/disk/by-uuid/427e2f6d-d42d-4d49-be35-713bf9526dc9" ;
fsType = "ext4" ;
};
fileSystems . "/boot" =
{ device = "/dev/disk/by-uuid/2A78-5373" ;
fsType = "vfat" ;
};
swapDevices =
[ { device = "/dev/disk/by-uuid/9b0357e8-f721-4a06-aae0-97b6efc19209" ; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking . useDHCP = lib . mkDefault true ;
# networking.interfaces.enp195s0f3u1c2.useDHCP = lib.mkDefault true;
nixpkgs . hostPlatform = lib . mkDefault "x86_64-linux" ;
hardware . cpu . amd . updateMicrocode = lib . mkDefault config . hardware . enableRedistributableFirmware ;
# END HARDWARE
boot . loader . systemd-boot . enable = true ;
boot . loader . efi . canTouchEfiVariables = true ;
boot . kernelPackages = pkgs . linuxPackages_latest ;
2023-11-06 13:03:42 -05:00
#boot.kernelPackages = pkgs.linuxPackages_testing;
#boot.kernelParams = [ "amdgpu.sg_display=0" ];
2023-10-18 18:08:08 -04:00
networking . hostName = "nixos-framework" ; # Define your hostname.
system . stateVersion = "22.11" ; # Did you read the comment?
2023-12-18 00:44:23 -05:00
programs . fuse . userAllowOther = true ;
2025-01-18 00:06:35 -05:00
#services.jellyfin.enable = true;
2023-11-06 13:03:42 -05:00
services . fwupd . enable = true ;
#services.xserver = {
# enable = true;
# displayManager.gdm.enable = true;
# desktopManager.gnome.enable = true;
#};
2025-10-22 20:37:37 -04:00
networking . firewall = {
allowedTCPPorts = [ 8080 8081 ]; #30000 is minetest
allowedUDPPorts = [ 8080 8081 ];
};
2023-10-18 18:08:08 -04:00
}))
];
};
2023-01-07 14:47:38 -05:00
nixosConfigurations . nixos4800H = nixpkgs . lib . nixosSystem {
2023-02-18 12:52:29 -05:00
inherit system ;
2023-01-07 14:47:38 -05:00
specialArgs = attrs ;
modules = [
2026-03-28 17:07:11 -04:00
nur . modules . nixos . default
2025-12-15 21:36:50 -05:00
stylix . nixosModules . stylix
2025-01-13 02:11:04 -05:00
niri . nixosModules . niri
2026-06-19 12:09:44 -04:00
tachikoma . nixosModules . default
2023-01-07 14:47:38 -05:00
home-manager . nixosModules . home-manager
homeManagerSharedModule
2026-04-05 14:23:14 -04:00
({ config , lib , pkgs , modulesPath , ... } @ innerArgs : ( lib . recursiveUpdate ( commonConfigFunc innerArgs [ pkgs . gpodder pkgs . evince ]) {
2023-01-07 14:47:38 -05:00
# HARDWARE
imports = [ ( modulesPath + "/installer/scan/not-detected.nix" ) ];
boot . initrd . availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
2023-11-06 13:03:42 -05:00
boot . initrd . kernelModules = [ "amdgpu" ];
2023-01-07 14:47:38 -05:00
boot . kernelModules = [ "kvm-amd" ];
boot . extraModulePackages = [ ];
fileSystems . "/" = { device = "/dev/disk/by-uuid/ae8e4a92-53dd-49b5-bf3a-aeb9a109c01e" ; fsType = "ext4" ; };
fileSystems . "/boot" = { device = "/dev/disk/by-uuid/28E9-0409" ; fsType = "vfat" ; };
2024-04-02 11:19:17 -04:00
fileSystems . "/nas_disk1" = { device = "/dev/disk/by-uuid/d7907ed2-2aff-4cfc-bb4d-fa46b3f1af57" ; fsType = "ext4" ; };
2025-12-27 23:43:35 -05:00
fileSystems . "/nas_disk2" = { device = "/dev/disk/by-uuid/96f76bf1-4eee-420c-9dbc-222565e64478" ; fsType = "ext4" ; };
2026-01-16 21:00:49 -05:00
fileSystems . "/nas_disk3" = { device = "/dev/disk/by-uuid/00cb888c-44bf-4b1c-8e36-abfc3bf6cb50" ; fsType = "ext4" ; };
2023-01-07 14:47:38 -05:00
swapDevices = [ ];
# END HARDWARE
boot . loader . systemd-boot . enable = true ;
boot . loader . efi . canTouchEfiVariables = true ;
boot . kernelPackages = pkgs . linuxPackages_latest ;
2025-01-12 17:33:27 -05:00
boot . kernel . sysctl . "net.ipv4.ip_forward" = 1 ;
boot . kernel . sysctl . "net.ipv6.conf.all.forwarding" = 1 ;
2023-01-07 14:47:38 -05:00
networking . hostName = "nixos4800H" ; # Define your hostname.
2024-04-02 11:19:17 -04:00
programs . fuse . userAllowOther = true ;
services . jellyfin . enable = true ;
2026-06-19 12:09:44 -04:00
services . tachikoma = {
enable = true ;
user = "nathan" ;
config = ''
database_prefix = "/home/nathan/tachikoma_db"
adam_smasher_your_io_bandwidth = true # multi-threaded, mmap hashing for new movies on startup
reset_interval = 60
id = "batou"
port = 8080
[shares.default]
serve = [ "/movies", "/nas_disk1", "/nas_disk2/tachi", "/nas_disk3/tachi" ]
download_dir = "/nas_disk1/cache"
mount_point = "/fuse_mount" # this is optional, remove if you don't want to FUSE
max_delete = 30
#[shares.podcasts]
#serve = [ "/home/nathan/podcasts" ]
#[shares.audiobooks]
#serve = [ "/home/nathan/audiobooks" ]
[shares.a_darker_shade_of_grey]
serve = [ "/home/nathan/a_darker_shade_of_grey" ]
max_delete = 5
#[shares.chat]
#serve = [ ]
'' ;
};
2024-04-02 11:19:17 -04:00
2023-01-07 14:47:38 -05:00
# THIS SEEMS CONTRADICTORY
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking . useDHCP = false ;
networking . interfaces . eno1 . useDHCP = true ;
networking . interfaces . wlp1s0 . useDHCP = true ;
system . stateVersion = "20.03" ;
2023-12-18 00:45:02 -05:00
users . extraUsers . marcus = {
name = "marcus" ;
isNormalUser = true ;
group = "users" ;
extraGroups = [ "wheel" "disk" "audio" "video" "networkmanager" "systemd-journal" "networkmanager" "sway" "plugdev" "adbusers" ];
createHome = true ;
home = "/home/marcus" ;
shell = "/run/current-system/sw/bin/bash" ;
};
2025-02-21 14:26:00 -05:00
users . extraUsers . pratik = {
name = "pratik" ;
isNormalUser = true ;
group = "users" ;
extraGroups = [ "wheel" "disk" "audio" "video" "networkmanager" "systemd-journal" "networkmanager" "plugdev" ];
createHome = true ;
home = "/home/pratik" ;
shell = "/run/current-system/sw/bin/bash" ;
openssh . authorizedKeys . keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKmLFCW0HGGJzTO42/ZuWFmDY80ZpV8e8qEc3CEBclF8 pratik@elmerus.fedora"
];
};
2023-01-07 14:47:38 -05:00
}))
];
};
2023-01-07 13:48:09 -05:00
nixosConfigurations . nixos-desktop = nixpkgs . lib . nixosSystem {
2023-02-18 12:52:29 -05:00
inherit system ;
2023-01-07 13:48:09 -05:00
specialArgs = attrs ;
modules = [
2026-03-28 17:07:11 -04:00
nur . modules . nixos . default
2025-01-13 02:11:04 -05:00
niri . nixosModules . niri
2023-01-07 13:48:09 -05:00
home-manager . nixosModules . home-manager
homeManagerSharedModule
2023-01-16 12:36:01 -05:00
({ config , lib , pkgs , modulesPath , ... } @ innerArgs : ( lib . recursiveUpdate ( commonConfigFunc innerArgs []) {
2023-01-07 13:48:09 -05:00
# HARDWARE
imports = [ ( modulesPath + "/installer/scan/not-detected.nix" ) ];
boot . initrd . availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
boot . initrd . kernelModules = [ ];
boot . kernelModules = [ "kvm-amd" ];
boot . extraModulePackages = [ ];
2023-01-16 11:23:01 -05:00
boot . supportedFilesystems = [ "ntfs" ];
2023-01-07 13:48:09 -05:00
fileSystems . "/" = { device = "/dev/disk/by-uuid/163c1731-2f66-436b-a74f-20f84ec628dd" ; fsType = "ext4" ; };
fileSystems . "/boot" = { device = "/dev/disk/by-uuid/9C44-5411" ; fsType = "vfat" ; };
2023-09-26 20:11:37 -04:00
fileSystems . "/reborn" = { device = "/dev/disk/by-label/reborn" ; fsType = "ext4" ; };
2023-09-17 17:19:39 -04:00
#fileSystems."/big_disk" = { device = "/dev/disk/by-uuid/B610D69310D65A47"; fsType = "ntfs3"; options = ["rw" "uid=1000"]; };
#fileSystems."/big_disk" = { device = "/dev/sdb1"; fsType = "ntfs3"; options = ["rw" "uid=1000"]; };
2023-01-07 13:48:09 -05:00
swapDevices = [ ];
networking . useDHCP = lib . mkDefault true ;
nixpkgs . hostPlatform = lib . mkDefault "x86_64-linux" ;
hardware . cpu . amd . updateMicrocode = lib . mkDefault config . hardware . enableRedistributableFirmware ;
# END HARDWARE
boot . loader . systemd-boot . enable = true ;
boot . loader . efi . canTouchEfiVariables = true ;
networking . hostName = "nixos-desktop" ; # Define your hostname.
2023-01-07 14:47:38 -05:00
system . stateVersion = "22.11" ;
2023-09-17 17:19:39 -04:00
2025-01-18 00:06:35 -05:00
#services.jellyfin.enable = true;
2023-01-07 13:48:09 -05:00
}))
2023-01-07 12:54:29 -05:00
];
};
2023-02-18 12:52:29 -05:00
nixosConfigurations . condoserver = nixpkgs . lib . nixosSystem {
inherit system ;
specialArgs = attrs ;
modules = [
2026-03-28 17:07:11 -04:00
nur . modules . nixos . default
2025-01-13 02:11:04 -05:00
niri . nixosModules . niri
2023-02-18 12:52:29 -05:00
home-manager . nixosModules . home-manager
homeManagerSharedModule
({ config , lib , pkgs , modulesPath , ... } @ innerArgs : ( lib . recursiveUpdate ( commonConfigFunc innerArgs []) {
2023-02-18 13:09:42 -05:00
imports = [ ( modulesPath + "/installer/scan/not-detected.nix" ) ];
boot . initrd . availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" "sdhci_pci" ];
boot . initrd . kernelModules = [ ];
boot . kernelModules = [ "kvm-intel" ];
boot . extraModulePackages = [ ];
fileSystems . "/" = { device = "/dev/disk/by-uuid/0ef06a3a-080d-4f15-b53e-54c91adb8ec9" ; fsType = "ext4" ; };
fileSystems . "/boot" = { device = "/dev/disk/by-uuid/86F4-9779" ; fsType = "vfat" ; };
swapDevices = [ { device = "/dev/disk/by-uuid/20cc65f9-f35e-419a-b00f-252cd576b2ce" ; } ];
nixpkgs . hostPlatform = lib . mkDefault "x86_64-linux" ;
hardware . cpu . intel . updateMicrocode = lib . mkDefault config . hardware . enableRedistributableFirmware ;
2023-02-18 12:52:29 -05:00
2023-02-18 13:09:42 -05:00
boot . loader . systemd-boot . enable = true ;
boot . loader . efi . canTouchEfiVariables = true ;
2023-02-18 12:52:29 -05:00
2023-02-18 13:09:42 -05:00
# don't suspend on lid close
services . logind . lidSwitch = "ignore" ;
2023-03-02 20:09:04 -05:00
services . glusterfs . enable = true ;
2023-02-23 18:45:44 -05:00
networking . hostName = "condoserver" ; # Define your hostname.
2023-02-18 13:09:42 -05:00
2023-12-18 00:45:02 -05:00
2023-02-18 13:09:42 -05:00
system . stateVersion = "22.11" ; # Did you read the comment?
2023-02-18 12:52:29 -05:00
}))
];
};
2023-02-28 00:08:43 -05:00
nixosConfigurations . vps = nixpkgs . lib . nixosSystem {
2023-02-18 16:16:45 -05:00
inherit system ;
specialArgs = attrs ;
modules = [
({ config , pkgs , lib , ... }: {
# HARDWARE
boot . initrd . availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "sr_mod" "virtio_blk" ];
boot . kernelModules = [ ];
boot . extraModulePackages = [ ];
fileSystems . "/" =
{ device = "/dev/disk/by-uuid/b9470789-6d82-4ad4-9a4a-7e19b8fcc8dc" ;
fsType = "ext4" ;
};
# END HARDWARE
2024-07-02 00:25:02 -04:00
fileSystems . "/var/lib/matrix-synapse/media" = {
device = "nathan@100.64.0.1:/home/nathan/synapse_media/media/" ;
fsType = "sshfs" ;
options = [
# Filesystem Options
"allow_other" # non-root access
"_netdev" # this is a network fs
"x-systemd.automount" # mount on demand
# SSH options
"reconnect" # handle connection drops
"ServerAliveInterval=15" # Keep connections alive
"IdentityFile=/var/lib/private/sshfs-key"
];
};
2023-02-18 16:16:45 -05:00
nix . gc . automatic = true ;
imports = [ ];
nixpkgs . overlays = [ ( self : super : {
mautrix-telegram = super . mautrix-telegram . overrideAttrs ( old : {
#src = pkgs.fetchFromGitHub {
# owner = "tulir";
# repo = old.pname;
# #rev = "v${version}";
# # Literal next commit to fix double-puppeting 2 typing 2 furious
# rev = "eca1032d1660099216e71a7e0b24d35bb4833d74";
# sha256 = "1vpdgi1szhlccni1d87bbcsi2p08ifs1s2iinimkc7d8ldqv1p52";
#};
propagatedBuildInputs = old . propagatedBuildInputs ++ ( with pkgs . python3 . pkgs ; [
#asyncpg
python-olm pycryptodome unpaddedbase64
]);
});
2023-08-01 13:21:43 -04:00
#lemmy-server = super.lemmy-server.overrideAttrs (old: {
# patches = (old.patches or []) ++ [(super.fetchpatch {
# name = "fix-db-migrations.patch";
# url = "https://gist.githubusercontent.com/matejc/9be474fa581c1a29592877ede461f1f2/raw/83886917153fcba127b43d9a94a49b3d90e635b3/fix-db-migrations.patch";
# hash = "sha256-BvoA4K9v84n60lG96j1+91e8/ERn9WlVTGk4Z6Fj4iA=";
# })];
#});
2023-02-18 16:16:45 -05:00
}) ];
# Use the GRUB 2 boot loader.
boot . loader . grub . enable = true ;
boot . loader . grub . device = "/dev/vda" ; # or "nodev" for efi only
swapDevices = [{
device = "/var/swapfile" ;
size = 4096 ;
}];
2023-02-23 18:45:44 -05:00
networking . hostName = "vps" ; # Define your hostname.
2023-02-18 16:16:45 -05:00
networking . nameservers = [ "1.1.1.1" "8.8.8.8" ];
# WireGuard
networking . nat . enable = true ;
networking . nat . externalInterface = "ens3" ;
networking . nat . internalInterfaces = [ "wg0" ];
networking . firewall = {
#allowedTCPPorts = [ 22 80 443 3478 3479 ];
#allowedUDPPorts = [ 22 80 443 5349 5350 51820 ];
2025-06-21 16:03:08 -04:00
allowedTCPPorts = [ 22 80 443 8789 30000 ]; #30000 is minetest
allowedUDPPorts = [ 22 80 443 8789 51820 30000 ];
2023-02-23 18:45:44 -05:00
#extraCommands = ''
# iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
#'';
2023-02-18 16:16:45 -05:00
};
2023-02-23 18:45:44 -05:00
#networking.wireguard.interfaces = {
# wg0 = {
# ips = [ "10.100.0.1/24" ];
# listenPort = 51820;
# privateKeyFile = "/home/nathan/wireguard-keys/private";
# peers = [
# {
# publicKey = "FqJShA/dz8Jj73tSyjzcsyASOEv6uAFs6e/vRol8ygc=";
# allowedIPs = [ "10.100.0.2/32" ];
# }
# {
# publicKey = "aAgay9pn/3Vj1nHC4GFY2vysW12n5VFyuUcB5+0pux8=";
# allowedIPs = [ "10.100.0.3/32" ];
# }
# {
# publicKey = "u55Jkd4dRdBqnhliIP9lwsxIYow2Tr8BhPPhKFtaVAc=";
# allowedIPs = [ "10.100.0.4/32" ];
# }
# {
# publicKey = "J/BWU33DYMkoWOKSZWrtAqWciep03YuicaDMD5MCqWg=";
# allowedIPs = [ "10.100.0.5/32" ];
# }
# {
# publicKey = "y2gAEhg1vwK1+nka2Knu7NyOk8HaaY4w18nD6EMyLSk=";
# allowedIPs = [ "10.100.0.6/32" ];
# }
# {
# publicKey = "SoaYh1mb6DYd6TuOEFl4lRCZUBTPQfOnWHIOmtkgxxM=";
# allowedIPs = [ "10.100.0.7/32" ];
# }
# ];
# };
#};
2023-02-18 16:16:45 -05:00
services . openssh . enable = true ;
2023-09-26 15:16:42 -04:00
services . openssh . settings = {
PasswordAuthentication = false ;
KbdInteractiveAuthentication = false ;
PermitRootLogin = "prohibit-password" ;
};
2023-02-18 16:16:45 -05:00
2023-11-06 13:03:42 -05:00
#services.mastodon = {
# enable = true;
# localDomain = "mastodon.room409.xyz";
# configureNginx = true;
# smtp.fromAddress = "notifications@mastodon.room409.xyz";
#};
2023-02-18 16:16:45 -05:00
services . mautrix-telegram = {
enable = true ;
settings = {
homeserver = {
address = "https://synapse.room409.xyz" ;
domain = "synapse.room409.xyz" ;
};
bridge . permissions = {
"synapse.room409.xyz" = "full" ;
"@miloignis:synapse.room409.xyz" = "admin" ;
};
bridge . encryption = {
allow = true ;
require_verification = false ;
};
};
environmentFile = /var/lib/mautrix-telegram/secrets ;
};
#services.bookbot = {
# enable = true;
# port = 8888;
#};
2025-06-21 16:03:08 -04:00
# for password resets run (with appropriate paths)
# ./k8ngn95hsi9qrdkvr734slj9fx3j3lbb-matrix-synapse-1.128.0/bin/hash_password -c /nix/store/ql794v5ilmxa619ha83ya61pk12066dh-homeserver.yaml
# and then use `psql -d matrix-synapse -U matrix-synapse -h localhost`
# with the password 'synapse'
# and do
# UPDATE users SET password_hash='$2b$12$ED4NT7N6tI4Mbq/IKZES6.oilx0k2iK4DN3a6wPWIEpXSAsIOWe3e' WHERE name='<MATRIX_USERNAME>';
2023-02-18 16:16:45 -05:00
services . matrix-synapse = {
enable = true ;
settings = {
server_name = "synapse.room409.xyz" ;
public_baseurl = "https://synapse.room409.xyz/" ;
enable_registration = false ;
2023-03-14 19:34:21 -04:00
#enable_registration_without_verification = true;
2023-02-18 16:16:45 -05:00
#registration_shared_secret = null;
database . name = "psycopg2" ;
url_preview_enabled = true ;
report_stats = true ;
max_upload_size = "100M" ;
listeners = [
{
port = 8008 ;
tls = false ;
resources = [
{
compress = true ;
names = [ "client" "federation" ];
}
];
}
];
app_service_config_files = [
2025-06-21 16:03:08 -04:00
#"/var/lib/matrix-synapse/telegram-registration.yaml"
2023-02-18 16:16:45 -05:00
"/var/lib/matrix-synapse/facebook-registration.yaml"
];
};
};
services . gitea = {
enable = true ;
2023-09-26 15:16:42 -04:00
settings . service . DISABLE_REGISTRATION = true ;
2023-02-18 16:16:45 -05:00
appName = "Room409.xyz Forge" ;
2023-09-26 15:16:42 -04:00
settings . server = {
DOMAIN = "forge.room409.xyz" ;
ROOT_URL = "https://forge.room409.xyz/" ;
HTTP_PORT = 3001 ;
};
2023-02-18 16:16:45 -05:00
};
2023-08-01 13:21:43 -04:00
#systemd.services.lemmy.environment.RUST_BACKTRACE = "full";
#systemd.services.lemmy.environment.LEMMY_DATABASE_URL = pkgs.lib.mkForce "postgres:///lemmy?host=/run/postgresql&user=lemmy";
#services.lemmy = {
# enable = true;
# database.createLocally = true;
# settings = {
# hostname = "lemmy.room409.xyz";
# };
# nginx.enable = true;
#};
2023-02-18 16:16:45 -05:00
services . postgresql = {
2024-07-02 00:25:02 -04:00
package = pkgs . postgresql_16 ;
2023-02-18 16:16:45 -05:00
enable = true ;
# postgresql user and db name in the service.matrix-synapse.databse_args setting is default
initialScript = pkgs . writeText "synapse-init.sql" ''
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD 'synapse';
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
TEMPLATE template0
LC_COLLATE = "C"
LC_CTYPE = "C";
'' ;
};
2023-02-23 18:45:44 -05:00
services . headscale = {
enable = true ;
address = "0.0.0.0" ;
port = 8789 ;
2023-09-26 15:16:42 -04:00
settings . serverUrl = "https://headscale.room409.xyz" ;
2025-01-12 17:32:33 -05:00
settings . dns . base_domain = "wg.test" ;
2025-08-10 20:23:38 -04:00
settings . dns . nameservers . global = [ "8.8.8.8" ];
2023-02-23 18:45:44 -05:00
settings . logtail . enabled = false ;
};
2023-04-08 15:30:38 -04:00
services . ttyd = {
enable = true ;
port = 9134 ;
2024-07-02 00:25:02 -04:00
writeable = true ;
2023-04-08 15:30:38 -04:00
username = "miloignis" ;
passwordFile = /var/lib/ttyd/secrets ;
2025-12-15 21:36:50 -05:00
#clientOptions.fontFamily="Recursive";
2023-04-08 15:30:38 -04:00
};
2023-09-26 15:16:42 -04:00
security . acme = {
acceptTerms = true ;
defaults . email = "miloignis@gmail.com" ;
};
2023-02-18 16:16:45 -05:00
services . nginx = {
enable = true ;
recommendedGzipSettings = true ;
recommendedOptimisation = true ;
recommendedProxySettings = true ;
recommendedTlsSettings = true ;
2023-02-23 18:45:44 -05:00
virtualHosts . "headscale.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" = {
proxyPass = "http://localhost:8789" ;
proxyWebsockets = true ;
};
};
2023-08-01 13:21:43 -04:00
## the rest is defined by the lemmy service
#virtualHosts."lemmy.room409.xyz" = {
# forceSSL = true;
# enableACME = true;
#};
2023-02-18 16:16:45 -05:00
virtualHosts . "forge.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" . proxyPass = "http://localhost:3001" ;
2025-09-27 23:47:21 -04:00
locations . "/" . extraConfig = ''
client_max_body_size 100M;
'' ;
2023-02-18 16:16:45 -05:00
};
virtualHosts . "synapse.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/.well-known/matrix/server" . extraConfig = ''
add_header Content-Type application/json;
return 200 '{ "m.server": "synapse.room409.xyz:443" }';
'' ;
locations . "/.well-known/matrix/client" . extraConfig = ''
add_header Content-Type application/json;
add_header Access-Control-Allow-Origin *;
2023-10-13 00:11:52 -04:00
return 200 '{ "m.homeserver": {"base_url": "https://synapse.room409.xyz"}, "org.matrix.msc3575.proxy": { "url": "https://syncv3.room409.xyz" }, "m.identity_server": { "base_url": "https://vector.im"} }';
2023-02-18 16:16:45 -05:00
'' ;
locations . "/" . proxyPass = "http://localhost:8008" ;
locations . "/" . extraConfig = ''
client_max_body_size 100M;
proxy_set_header X-Forwarded-For $remote_addr;
'' ;
};
virtualHosts . "element-synapse.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
root = pkgs . element-web . override {
conf = {
default_server_name = "synapse.room409.xyz" ;
default_server_config = "" ;
};
};
};
virtualHosts . "kraken-lang.org" = {
forceSSL = true ;
enableACME = true ;
root = "/var/www/kraken-lang.org" ;
locations . "/k_prime.wasm" . extraConfig = ''
default_type application/wasm;
'' ;
};
virtualHosts . "faint.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
root = "/var/www/faint.room409.xyz" ;
};
2026-05-30 23:36:42 -04:00
virtualHosts . "bobatwater.com" = {
forceSSL = true ;
enableACME = true ;
root = "/var/www/bobatwater.com" ;
};
2023-08-01 13:21:43 -04:00
virtualHosts . "shell.room409.xyz" = {
2023-04-08 15:30:38 -04:00
forceSSL = true ;
enableACME = true ;
locations . "/" = {
proxyPass = "http://localhost:9134" ;
proxyWebsockets = true ;
};
};
2025-01-18 00:06:35 -05:00
#virtualHosts."drop.room409.xyz" = {
#forceSSL = true;
#enableACME = true;
#locations."/" = {
#proxyPass = "http://localhost:9009";
#proxyWebsockets = true;
#extraConfig = ''
#client_max_body_size 500M;
#'';
#};
#};
2023-02-18 16:16:45 -05:00
#virtualHosts."www.kraken-lang.org" = {
# forceSSL = true;
# enableACME = true;
# root = "/var/www/kraken-lang.org";
# locations."/k_prime.wasm".extraConfig = ''
# default_type application/wasm;
# '';
#};
virtualHosts . "room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" = {
root = pkgs . writeTextDir "index.html" ''<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>room409.xyz</title>
<style>
h1, h2 ,h3 { line-height:1.2; }
body {
max-width: 45em;
margin: 1em auto;
padding: 0 .62em;
font: 1.2em/1.62 sans-serif;
}
</style>
</head>
<body>
<header><h1>So Mean and Clean</h1></header>
<i>It's like a hacker wrote it</i>
<br> <br>
<b>Keyboard Cowpeople Team:</b> <a href="https://github.com/Limvot/Serif">Serif, a cross platform Matrix client</a>
<br> <br>
<b>MiloIgnis:</b> <a href="https://kraken-lang.org/">Kraken Programming Language</a>
</body>
</html>
'' ;
};
#locations."/bookclub/".proxyPass = "http://localhost:8888/room/!xSMgeFJYbuYTOGAGga:synapse.room409.xyz/";
};
2023-11-11 16:40:09 -05:00
virtualHosts . "lotusronin.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" = {
root = pkgs . writeTextDir "index.html" ''<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>LotusRonin's Website</title>
<style>
h1, h2 ,h3 { line-height:1.2; }
.bodyStuff {
max-width: 45em;
margin: 1em auto;
padding: 0 .62em;
font: 1.2em/1.62 sans-serif;
}
.floatLeft {
float: left;
max-width: 55em;
margin: 1em auto;
padding: 0 .62em;
font: 1.2em/1.62 sans-serif;
}
</style>
</head>
<body>
<div class="bodyStuff">
<header><h1>Main Page</h1></header>
<br> <br>
Take control of your tools, break from the system. Less is more.
</div>
<div class="floatLeft">
<ol>
<li><a href="">📜 Blog</a></li>
<li><a href="">👨💻 Code</a></li>
<li><a href="">🕹️ Games</a></li>
<li><a href="">(.)(.) MLKRs.shop signup</a></li>
<li><a href="">📄 Resume/About Me</a></li>
</ol>
</div>
</body>
</html>
'' ;
};
};
2023-02-18 16:16:45 -05:00
virtualHosts . "miloignis.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" = {
root = pkgs . writeTextDir "index.html" ''<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>MiloIgnis's Website</title>
<style>
h1, h2 ,h3 { line-height:1.2; }
body {
max-width: 45em;
margin: 1em auto;
padding: 0 .62em;
font: 1.2em/1.62 sans-serif;
}
</style>
</head>
<body>
<header><h1>MiloIgnis's Website</h1></header>
<br> <br>
Hello! I'm MiloIgnis, a part-time PhD student studing programming languages and compilers.
My current project is making a functional language based on Vau-calculus (inspired by John Shutt's work) practial via partial evlauation and some clever compilation techniques.
That project, Kraken, is <a href="https://kraken-lang.org/">here</a>.
<ol>
<li>Matrix - <a href="https://matrix.to/#/@miloignis:synapse.room409.xyz">@miloignis:synapse.room409.xyz</a></li>
<li>Mastodon - <a rel="me" href="https://mastodon.room409.xyz/@miloignis">@miloignis</a></li>
</ol>
<br> <br>
</body>
</html>
'' ;
};
};
virtualHosts . "internet-list.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" = {
root = pkgs . writeTextDir "index.html" ''<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>room409.xyz</title>
<style>
h1, h2 ,h3 { line-height:1.2; }
body {
max-width: 45em;
margin: 1em auto;
padding: 0 .62em;
font: 1.2em/1.62 sans-serif;
}
</style>
</head>
<body>
<header><h1>A list of colors on the internet</h1></header>
<ol>
<li>Blue</li>
<li>Chilladelphia</li>
<li>Kenny</li>
</ol>
</body>
</html>
'' ;
};
};
2025-11-19 22:58:33 -05:00
virtualHosts . "survey-test1.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" = {
root = pkgs . writeTextDir "index.html" ''<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Guest Survey</title>
</head>
<body>
<iframe src="https://gatech.co1.qualtrics.com/jfe/form/SV_9txRmN3ky239cdo" height="800px" width="600px"></iframe>
</body>
</html>
'' ;
};
};
virtualHosts . "survey-test2.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" = {
root = pkgs . writeTextDir "index.html" ''<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Guest Survey</title>
</head>
<body>
<style>
.survey-wrapper { width:100%; max-width:1000px; margin:0 auto; }
.survey-iframe { width:100%; height:80vh; border:0; min-height:600px; }
</style>
<div class="survey-wrapper" role="region" aria-label="Survey">
<div id="survey-container"></div>
</div>
<script>
// 1) Read host-page query params
const params = new URLSearchParams(location.search);
// 2) Get utm_campaign (example: RF777101202)
const utmCampaign = params.get('utm_campaign');
// 3) Decide which Embedded Data field name Qualtrics should receive
// (use 'Referral' if that's your embedded-data field in Qualtrics)
if (utmCampaign) {
params.set('Referral', utmCampaign);
}
// 4) Optionally keep the original UTM values as well
// (uncomment if you want them passed through)
// params.set('utm_source', params.get('utm_source') || 'unknown');
// params.set('utm_medium', params.get('utm_medium') || 'unknown');
// params.set('utm_campaign', utmCampaign || "");
// 5) Build and insert the iframe with the serialized params
const iframe = document.createElement('iframe');
iframe.className = 'survey-iframe';
iframe.title = 'Guest survey';
iframe.allowFullscreen = true;
// Replace the base URL below with your Qualtrics anonymous survey URL
const baseSurveyUrl = 'https://gatech.co1.qualtrics.com/jfe/form/SV_9txRmN3ky239cdo';
iframe.src = baseSurveyUrl + '?' + params.toString();
document.getElementById('survey-container').appendChild(iframe);
</script>
</body>
</html>
'' ;
};
};
virtualHosts . "survey-test3.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" = {
root = pkgs . writeTextDir "index.html" ''<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Guest Survey</title>
<style>
.survey-wrapper { width:100%; max-width:1000px; margin:0 auto; padding:1rem; }
.survey-iframe { width:100%; height:80vh; border:0; min-height:600px; }
</style>
</head>
<body>
<main class="survey-wrapper" role="region" aria-label="Survey">
<div id="survey-container"></div>
</main>
<script>
const params = new URLSearchParams(location.search);
const utmCampaign = params.get('utm_campaign');
if (utmCampaign) {
params.set('Referral', utmCampaign);
}
const iframe = document.createElement('iframe');
iframe.className = 'survey-iframe';
iframe.title = 'Guest survey';
iframe.allowFullscreen = true;
const baseSurveyUrl = 'https://gatech.co1.qualtrics.com/jfe/form/SV_9txRmN3ky239cdo';
iframe.src = baseSurveyUrl + (params.toString() ? '?' + params.toString() : "");
document.getElementById('survey-container').appendChild(iframe);
</script>
</body>
</html>
'' ;
};
};
2023-02-18 16:16:45 -05:00
2025-01-12 17:32:33 -05:00
virtualHosts . "batou.room409.xyz" = {
forceSSL = true ;
enableACME = true ;
locations . "/" . proxyPass = "http://100.64.0.1:8090" ;
};
2023-02-18 16:16:45 -05:00
#virtualHosts."4800H.room409.xyz" = {
# forceSSL = true;
# enableACME = true;
# locations."/".proxyPass = "http://10.100.0.7:80";
#};
2025-01-18 00:21:04 -05:00
virtualHosts . "batou-jf.room409.xyz" = {
2025-01-12 17:32:33 -05:00
forceSSL = true ;
enableACME = true ;
2025-01-18 00:06:35 -05:00
locations . "/" . proxyPass = "http://100.64.0.1:8096" ;
2025-01-12 17:32:33 -05:00
};
2023-02-18 16:16:45 -05:00
};
services . journald . extraConfig = "SystemMaxUse=50M" ;
2023-02-23 18:45:44 -05:00
services . tailscale . enable = true ;
2023-02-18 16:16:45 -05:00
environment . systemPackages = with pkgs ; [
htop tmux git vim wget unzip file
iftop ripgrep
2023-02-23 18:45:44 -05:00
config . services . headscale . package
2023-02-18 16:16:45 -05:00
#wireguard
2023-08-01 13:21:43 -04:00
droopy
2024-07-02 00:25:02 -04:00
sshfs
# (let
# # XXX specify the postgresql package you'd like to upgrade to.
# # Do not forget to list the extensions you need.
# newPostgres = pkgs.postgresql_16.withPackages (pp: [
# # pp.plv8
# ]);
#in pkgs.writeScriptBin "upgrade-pg-cluster" ''
# set -eux
# # XXX it's perhaps advisable to stop all services that depend on postgresql
# systemctl stop postgresql
# export NEWDATA="/var/lib/postgresql/${newPostgres.psqlSchema}"
# export NEWBIN="${newPostgres}/bin"
# export OLDDATA="${config.services.postgresql.dataDir}"
# export OLDBIN="${config.services.postgresql.package}/bin"
# install -d -m 0700 -o postgres -g postgres "$NEWDATA"
# cd "$NEWDATA"
# sudo -u postgres $NEWBIN/initdb -D "$NEWDATA"
# sudo -u postgres $NEWBIN/pg_upgrade \
# --old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
# --old-bindir $OLDBIN --new-bindir $NEWBIN \
# "$@"
#'')
2023-02-18 16:16:45 -05:00
];
users . extraUsers . nathan = {
name = "nathan" ;
isNormalUser = true ;
group = "users" ;
extraGroups = [ "wheel" "disk" "audio" "video" "networkmanager" "systemd-journal" "networkmanager" "plugdev" ];
createHome = true ;
home = "/home/nathan" ;
shell = "/run/current-system/sw/bin/bash" ;
openssh . authorizedKeys . keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDjyWh/SPOgx+yOgrc8g8+7PR0+CWMrWZ4PaWcmgDzfUGAWyj2FHBNG2gLvIKn4+TAwvbEPp+7YXxlmiYltUWNlEXEzryhrhYiqeun9uApT+fgzxF278/VeS+NErX4S2WGwhUdybk6MSs0cpUVp+TNiZFUH+ltTcLai3aLaMaL13Z024DzjpD4jRVG4PErHTe/6dTfdmg6AS7gB0b+LTjFzdYSdeYsHxqcig+d+34vQkNmV2dIvLpNkbpzyfUyE3g1gpYTgRKgY4mZqd6QUKOyIH0SDqPUDrmK6e1LK2yTYe1jP39G2JhAMOrSm8jEFm7RLxHXJ862EqD8gFV2aCQ2HUFlFpx7t02Tgvw80grQRoJKJyYtElO6CAr+oFnhxWnYgUsoYmGLSp5Nv1wV9WHkprWnGyuj/CGM8D3gwFSL672IYQOGTwQElcclRZ/uMlNjtyw6ky4VV22gDZag1hMfZhWf/nmMNql8dCoqY7K36XAAEDXjiS5J9EZe7AexLV68= nathan@nixos_4800H" # laptop
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCtmGhDNdwDXulhJ8MGehlfLQZ8Qzxv2K4vXqyvJWSkMj5XzCRcylKME0qdfiA+G0SeozCY2Qhd2xiPsaL3PaZX7HD1fiesO0jofl9Ph+VIbwwP2LT7kYYSoUXSdj3uPBdZD8BhSZsMHIPVQfzj5JkvE1W9AQik+d5o7RPO8srpo8JHRpH0lgJbuiLWkpLX2sD2hjlI5uMhMekGnI0UA3ie3x9Xnh3J019X0K3Efxm8X31k60j9J0bgGLhxYwu42+kiJKabdpk5tFsqLvDRbzPUGSm+5ZiWMX5ILDbr+/Aczzb2ek5rzsEB2s48BmxBtJnXfjnQtBo6URuJYzVSI9V6vEgUnueGPY/DN1oeRZqTcqujIADh3ZMcdKg1cfdvNYoSk2FcFz0rZXTLjkwOAK2HMRZFXK5ijX7tpnb5GXsiDa0uoWhJVByzrnlqZ65LuHdLFPbe+A/N+T3wzykIkG2hNv8mRJi7/pWjNy2O2iKsSSSabN5xjxI7aFzyUQK+23UF2wzLc1+f4qMcB5HoHhktOV1QRM4RKtvYhdkAG0O/C5Wu0BItrjQbAoqSa29QLlBpHCIlY4Vr8S4kNXf8mm8gRrKATHNZBTUAVNMDYFcd9n4hyK8ERGodaXFDP7m/r+yZaHLcpQQ46sYjq2nbkP1yYaCbmVoEEUpKRtP2UDc91w== miloignis@gmail.com" # desktop
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDSG8Mi192YYB1PSmRUQGT0WxMuG8f3HKmdC6Y/NTKlRZDMeyV81cxmJpMjpKszc0P5e0j6F4Q1y9R0GybRPVFFgA5I5ETReWcJ1pe8Bs/BxZpxcl/fESUl2YOoEWxGzwha7CAIAlgMFTljj9osYTx+b8j+6MFhlsRnUCaxngRle2JeSmkCFYMlkKjynTHME4OjfRb3xR1VmB489s25tMmRjpzGuD6+5o0x+nX3yk8t711vKcuYx0irwi3sn4w9bKXamPOZH/5sCNz1Q7Qgz9BWOPYXMpnYytDcps7ACAqpKu3etzBvMQo+TZzivr+yZhePhUWovE1HpPVTBqEf3D+ekHZ5ZdQ6Y4W3/16WdDYCq9eCdZvsPOAFi9Sl/lf74LuzEqD1pPHg7avh7+fNJN2r0KoyozuvDSIwW8Kwo1uSav0XCHvdsFmSUmEXjwb4M2Bue6XDWCrVa8FiRpS1F/uvLgdWsZIkBJCX6vy6zPkFMJoKG9IdT4KYCn1KW3ifwTs= nathan@nixos" #condoserver
];
};
system . stateVersion = "20.03" ;
})
];
};
2023-01-07 12:54:29 -05:00
};
}