Refactor: Simplify module structure and reorganize services
- Removed system/ directory, merged applications into users/geir.nix - Simplified fonts.nix to bare minimum (users can add more) - Moved transmission.nix to sleeper-service/services/ (machine-specific) - Organized grey-area services into services/ directory - Updated import paths and tested all configurations - Added research documentation for deploy-rs and GNU Stow
This commit is contained in:
parent
e976b14d19
commit
9837d82199
24 changed files with 832 additions and 959 deletions
|
@ -1,11 +0,0 @@
|
|||
{ configs, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
pkgs.audiobookshelf
|
||||
];
|
||||
services.audiobookshelf.group = "users";
|
||||
services.audiobookshelf.enable = true;
|
||||
services.audiobookshelf.host = "0.0.0.0" ;
|
||||
services.audiobookshelf.port = 8000;
|
||||
services.audiobookshelf.openFirewall = true;
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.calibre-web = {
|
||||
enable = true;
|
||||
group = "users";
|
||||
listen = {
|
||||
ip = "0.0.0.0";
|
||||
port = 8083;
|
||||
};
|
||||
options = {
|
||||
calibreLibrary = "/mnt/remote/media/books/calibre/";
|
||||
enableBookUploading = true;
|
||||
};
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 8083 ];
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./starship.nix
|
||||
./aliases.nix
|
||||
./podman.nix
|
||||
./libvirt.nix
|
||||
./incus.nix
|
||||
./jellyfin.nix
|
||||
./tailscale.nix
|
||||
./calibre-web.nix
|
||||
./audiobook.nix
|
||||
#./ollama.nix
|
||||
./forgejo.nix
|
||||
];
|
||||
|
||||
# Swap zram
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
# Use the GRUB 2 boot loader.
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.efiSupport = true;
|
||||
boot.loader.grub.efiInstallAsRemovable = true;
|
||||
boot.loader.efi.efiSysMountPoint = "/boot/";
|
||||
boot.loader.grub.device = "nodev";
|
||||
|
||||
# Disks and Updates
|
||||
services.fstrim.enable = true;
|
||||
|
||||
# Mount remote filesystem
|
||||
fileSystems."/mnt/remote/media" = {
|
||||
device = "sleeper-service:/mnt/storage";
|
||||
fsType = "nfs";
|
||||
options = [ "x-systemd.automount" ];
|
||||
};
|
||||
|
||||
# Enable all unfree hardware support.
|
||||
hardware.firmware = with pkgs; [ firmwareLinuxNonfree ];
|
||||
hardware.enableAllFirmware = true;
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
services.fwupd.enable = true;
|
||||
|
||||
# Networking
|
||||
networking.hostName = "grey-area";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Oslo";
|
||||
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
console = {
|
||||
font = "Lat2-Terminus16";
|
||||
keyMap = "no";
|
||||
};
|
||||
|
||||
users.users.geir = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel"
|
||||
"networkmanager"
|
||||
"libvirt"
|
||||
"podman"
|
||||
"incus-admin"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
bottom fastfetch nerdfetch
|
||||
];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim emacs nano curl htop glances kitty
|
||||
wget git inxi nethogs fastfetch
|
||||
];
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.openssh.settings.PermitRootLogin = "no";
|
||||
services.openssh.settings.PasswordAuthentication = true;
|
||||
|
||||
|
||||
# Enable Netdata
|
||||
services.netdata.enable = true;
|
||||
|
||||
# Firewall
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowedTCPPorts = [ 22 19999 23231];
|
||||
networking.firewall.allowedUDPPorts = [ 22 23231 ];
|
||||
networking.nftables.enable = true;
|
||||
system.stateVersion = "23.05"; # Do not change this, it maintains data compatibility.
|
||||
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.forgejo = {
|
||||
enable = true;
|
||||
#user = "git";
|
||||
};
|
||||
|
||||
services.forgejo.settings = {
|
||||
DEFAULT = {
|
||||
RUN_MODE = "prod";
|
||||
};
|
||||
service = {
|
||||
DISABLE_REGISTRATION = true;
|
||||
};
|
||||
server = {
|
||||
ROOT_URL = "http://apps:3000";
|
||||
SSH_DOMAIN = "git.geokkjer.eu";
|
||||
};
|
||||
repository = {
|
||||
ENABLE_PUSH_CREATE_USER = true;
|
||||
};
|
||||
other = {
|
||||
SHOW_FOOTER_VERSION = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/b101efbd-a6b3-494d-9c21-21187540dc8d";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/E251-F60A";
|
||||
fsType = "vfat";
|
||||
};
|
||||
fileSystems."/mnt/remote/media" =
|
||||
{ device = "sleeper-service:/mnt/storage";
|
||||
fsType = "nfs";
|
||||
};
|
||||
swapDevices = [ ];
|
||||
# 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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp8s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
services.jellyfin = {
|
||||
enable = true;
|
||||
group = "users";
|
||||
};
|
||||
networking.firewall.allowedTCPPorts = [ 8096 8920 ];
|
||||
networking.firewall.allowedUDPPorts = [ 1900 7359 ];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue