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
97
machines/grey-area/configuration.nix
Normal file
97
machines/grey-area/configuration.nix
Normal file
|
@ -0,0 +1,97 @@
|
|||
{ 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.
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue