initial commit

This commit is contained in:
2026-07-21 13:13:31 -04:00
commit 2ac6ab0dd5
23 changed files with 2614 additions and 0 deletions
@@ -0,0 +1,27 @@
{
pkgs,
inputs,
...
}:
let
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
imports = [
../shared/darwin.nix
];
environment.systemPackages = with pkgs; [
bash-language-server
nil
devenv
];
homebrew.casks = [
"zed"
"firefox"
];
# Don't touch this unless needed.
system.primaryUser = "frank";
}
+104
View File
@@ -0,0 +1,104 @@
{
pkgs,
inputs,
...
}:
let
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
imports = [
../shared/nixos.nix
../../features/kde.nix
../../features/flatpak.nix
];
boot = {
kernelParams = [
"vfio-pci.ids=10de:2782,10de:22bc"
"video=HDMI-A-1:896x672@100"
];
};
networking.hostName = "nero";
services = {
flatpak = {
packages = [
{
appId = "com.discordapp.Discord";
origin = "flathub";
}
{
appId = "com.github.Matoking.protontricks";
origin = "flathub";
}
{
appId = "com.steamgriddb.SGDBoop";
origin = "flathub";
}
{
appId = "com.vysp3r.ProtonPlus";
origin = "flathub";
}
{
appId = "io.mpv.Mpv";
origin = "flathub";
}
{
appId = "org.ghidra_sre.Ghidra";
origin = "flathub";
}
{
appId = "io.github.ryubing.Ryujinx";
origin = "flathub";
}
{
appId = "org.gtk.Gtk3theme.Breeze";
origin = "flathub";
}
rec {
appId = "io.github.Amethyst.ModManager";
sha256 = "sha256-fpbIpuD6qwVDYJATNjpxLeVxZEBKS6MfK1UV3eS7eAQ=";
bundle = "${pkgs.fetchurl {
url = "https://github.com/ChrisDKN/Amethyst-Mod-Manager/releases/download/v2.0.2/AmethystModManager.flatpak";
inherit sha256;
}}";
}
];
};
wivrn = {
enable = true;
openFirewall = true;
autoStart = true;
};
};
programs = {
gamemode.enable = true;
steam = {
enable = true;
remotePlay.openFirewall = true;
extraPackages = [ pkgs.hidapi ];
};
};
environment = {
systemPackages = with pkgs; [
qimgv
zathura
mangohud
gamescope
gamescope-wsi
inputs.scopebuddy.packages.${pkgs.stdenv.hostPlatform.system}.default
(callPackage ../../packages/xivlauncher/package.nix { })
(callPackage ../../packages/aseprite/package.nix { })
(callPackage ../../packages/aseprite-thumbnailer-kde/package.nix { inherit unstable; })
];
};
}
+66
View File
@@ -0,0 +1,66 @@
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd.availableKernelModules = [
"nvme"
"ahci"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/7559f03a-28da-482d-934a-5d4f88ab085f";
fsType = "btrfs";
};
"/home" = {
device = "/dev/disk/by-uuid/7559f03a-28da-482d-934a-5d4f88ab085f";
fsType = "btrfs";
options = [ "subvol=home" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/7559f03a-28da-482d-934a-5d4f88ab085f";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/12B3-D345";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/431e8332-e3d5-400b-93e7-27b9c8dc1dfe"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = {
bluetooth.enable = true;
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
};
}
+112
View File
@@ -0,0 +1,112 @@
{
pkgs,
inputs,
...
}:
let
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
imports = [
../shared/nixos.nix
../../features/kde.nix
../../features/flatpak.nix
];
boot = {
extraModulePackages = [
pkgs.i915-sriov
];
kernelParams = [
"intel_iommu=on"
"i915-enable_guc=3"
"i915.max_vfs=1"
"module_blacklist=xe"
];
};
systemd.tmpfiles.rules = [
"w /sys/devices/pci0000:00/0000:00:02.0/sriov_numvfs - - - - 1"
];
networking.hostName = "pdw-frankiel";
services = {
udev.packages = [
(pkgs.writeTextFile {
name = "i915-sriov";
text = ''
ACTION=="add", SUBSYSTEM=="pci", KERNEL=="0000:00:02.[1-7]", ATTR{vendor}=="0x8086", ATTR{device}=="0xa7a0", DRIVER!="vfio-pci", RUN+="/bin/sh -c 'echo \$kernel > /sys/bus/pci/devices/\$kernel/driver/unbind; echo vfio-pci > /sys/bus/pci/devices/\$kernel/driver_override; modprobe vfio-pci; echo \$kernel > /sys/bus/pci/drivers/vfio-pci/bind'"
'';
destination = "/etc/udev/rules.d/80-i915-sriov.rules";
})
];
printing.enable = true;
keyd = {
enable = true;
keyboards = {
default = {
ids = [ "*" ];
settings = {
main = {
capslock = "oneshot(control)";
insert = "S-insert";
};
};
};
};
};
flatpak = {
packages = [
{
appId = "com.dropbox.Client";
origin = "flathub";
}
{
appId = "io.mpv.Mpv";
origin = "flathub";
}
{
appId = "org.gnome.gitlab.YaLTeR.VideoTrimmer";
origin = "flathub";
}
{
appId = "org.kde.kdenlive";
origin = "flathub";
}
{
appId = "org.remmina.Remmina";
origin = "flathub";
}
{
appId = "io.github.ungoogled_software.ungoogled_chromium";
origin = "flathub";
}
{
appId = "org.gtk.Gtk3theme.Breeze";
origin = "flathub";
}
];
};
};
environment = {
systemPackages = with pkgs; [
qimgv
zathura
hunspell
hunspellDicts.en_US
hyphenDicts.en_US
unstable.libreoffice-qt
];
};
}
+69
View File
@@ -0,0 +1,69 @@
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot = {
initrd.availableKernelModules = [
"xhci_pci"
"thunderbolt"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
initrd.kernelModules = [ ];
kernelModules = [ "kvm-intel" ];
extraModulePackages = [ ];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/2b88fa45-f012-4df6-b59c-5b45ee0fc6e8";
fsType = "btrfs";
};
"/home" = {
device = "/dev/disk/by-uuid/2b88fa45-f012-4df6-b59c-5b45ee0fc6e8";
fsType = "btrfs";
options = [ "subvol=home" ];
};
"/nix" = {
device = "/dev/disk/by-uuid/2b88fa45-f012-4df6-b59c-5b45ee0fc6e8";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
"/boot" = {
device = "/dev/disk/by-uuid/679B-3FC0";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
};
swapDevices = [
{ device = "/dev/disk/by-uuid/2ef72da1-8c5b-449d-8460-0f5833bd856d"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = {
bluetooth.enable = true;
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
};
}
+63
View File
@@ -0,0 +1,63 @@
{ self, pkgs, ... }:
{
# Only use homebrew for casks.
homebrew.enable = true;
nix = {
gc = {
automatic = true;
interval = {
Hour = 3;
Minute = 15;
Weekday = 7;
};
options = "--delete-older-than 30d";
};
optimise = {
automatic = true;
interval = {
Hour = 3;
Minute = 15;
Weekday = 7;
};
};
settings.experimental-features = "nix-command flakes";
};
# Enables Touch ID for sudo prompts.
security.pam.services.sudo_local.touchIdAuth = true;
environment = {
variables = rec {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
};
shellAliases = {
l = "ls -alh";
ll = "ls -l";
ls = "ls --color=tty";
ff = "clear;fastfetch";
nb = "nix-build";
nix-rebuild = "sudo darwin-rebuild switch";
};
systemPackages = with pkgs; [
wget
fastfetch
btop
];
};
# Don't touch this unless needed.
system = {
configurationRevision = self.rev or self.dirtyRev or null;
stateVersion = 6;
};
nixpkgs.hostPlatform = "aarch64-darwin";
}
+319
View File
@@ -0,0 +1,319 @@
{
config,
pkgs,
lib,
inputs,
...
}:
let
unstable = inputs.nixpkgs-unstable.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
systemd-boot.configurationLimit = 10;
timeout = 0;
};
consoleLogLevel = 3;
extraModulePackages = [ config.boot.kernelPackages.kvmfr ];
kernelParams = [
"quiet"
"rd.udev.log_level=3"
"rd.systemd.show_status=auto"
"kvmfr.static_size_mb=128"
];
initrd = {
verbose = false;
kernelModules = [
"vfio"
"vfio_pci"
"vfio_iommu_type1"
"kvmfr"
];
};
kernelModules = [
"ntsync"
];
plymouth = {
enable = true;
theme = "bgrt";
};
};
services = {
# Allow kvmfr module to be used by QEMU/KVM.
udev.packages = [
(pkgs.writeTextFile {
name = "kvmfr";
text = ''
SUBSYSTEM=="kvmfr", GROUP="kvm", MODE="0660", TAG+="uaccess"
'';
destination = "/etc/udev/rules.d/70-kvmfr.rules";
})
];
# Configures snapshots for home subvolume.
# Requires /home/.snapshots subvolume to function.
snapper = {
snapshotInterval = "hourly";
cleanupInterval = "1d";
configs = {
home = {
SUBVOLUME = "/home";
TIMELINE_CREATE = true;
TIMELINE_CLEANUP = true;
TIMELINE_LIMIT_HOURLY = "10";
TIMELINE_LIMIT_DAILY = "7";
TIMELINE_LIMIT_WEEKLY = "2";
TIMELINE_LIMIT_MONTHLY = "0";
TIMELINE_LIMIT_YEARLY = "0";
BACKGROUND_COMPARISON = "yes";
NUMBER_CLEANUP = "no";
NUMBER_MIN_AGE = "1800";
NUMBER_LIMIT = "50";
NUMBER_LIMIT_IMPORTANT = "10";
EMPTY_PRE_POST_CLEANUP = "yes";
EMPTY_PRE_POST_MIN_AGE = "1800";
};
};
};
# Completely disable xserver support (RIP X11).
xserver.enable = false;
# Configure pipewire. Disables 32Bit ALSA since it causes build errors
# and is largely vestigial.
pipewire = {
enable = true;
pulse.enable = true;
alsa.enable = true;
alsa.support32Bit = lib.mkForce false;
};
openssh.enable = true;
# Enables m(ulticast)DNS (a.k.a. Bonjour) support.
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
};
networking = {
wireless.enable = true;
networkmanager.enable = true;
networkmanager.plugins = with pkgs; [ networkmanager-openvpn ];
firewall = {
trustedInterfaces = [ "virbr0" ];
allowedTCPPorts = [ 22 ];
};
};
time.timeZone = "America/New_York";
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocales = [
"ja_JP.UTF-8/UTF-8"
];
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
security.rtkit.enable = true;
programs = {
bash = {
enable = true;
interactiveShellInit = ''
eval "$(jump shell)"
bind -x '"\eOQ": clear;fastfetch'
'';
};
starship = {
enable = true;
settings = {
character = {
success_symbol = "[λ](bold green)";
error_symbol = "[λ](bold red)";
};
};
};
virt-manager.enable = true;
ssh.startAgent = true;
firefox.enable = true;
appimage = {
enable = true;
binfmt = true;
};
neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
configure = {
customRC = ''
set nocompatible
set backspace=indent,eol,start
set tabstop=2
set shiftwidth=2
set expandtab
'';
packages.myPlugins = with pkgs.vimPlugins; {
start = [
vim-lastplace
vim-nix
];
opt = [ ];
};
};
};
};
virtualisation = {
spiceUSBRedirection.enable = true;
libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
verbatimConfig = ''
namespaces = []
cgroup_device_acl = [
"/dev/null", "/dev/full", "/dev/zero",
"/dev/random", "/dev/urandom",
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
"/dev/rtc","/dev/hpet", "/dev/vfio/vfio",
"/dev/kvmfr0"
]
'';
};
};
};
users.users.frank = {
isNormalUser = true;
description = "Frank LoTurco";
extraGroups = [
"networkmanager"
"wheel"
"libvirtd"
"input"
"video"
];
};
nixpkgs.config.allowUnfree = true;
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 30d";
};
optimise = {
automatic = true;
dates = "weekly";
};
settings = {
experimental-features = [
"nix-command"
"flakes"
];
use-xdg-base-directories = true;
};
};
environment = {
systemPackages = with pkgs; [
wget
vorta
dnsmasq
guestfs-tools
unrar
btrfs-assistant
looking-glass-client
nil
bash-language-server
devenv
nerd-fonts.hack
jump
unstable.winetricks
unstable.fastfetch
inputs.nix-gaming.packages.${pkgs.stdenv.hostPlatform.system}.wine-tkg
inputs.appimage-manager.packages.${pkgs.stdenv.hostPlatform.system}.default
(callPackage ../../packages/virtiofsd-looking-glass/package.nix { })
(callPackage ../../packages/heidisql/package.nix { })
];
shellAliases = {
l = "ls -alh";
ll = "ls -l";
ls = "ls --color=tty";
ff = "clear;fastfetch --logo nixos2";
wget = "wget --hsts-file=$XDG_DATA_HOME/wget-hsts";
nb = "nix-build";
nix-rebuild = "sudo nixos-rebuild switch";
};
sessionVariables = rec {
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
HISTFILE = "$XDG_STATE_HOME/bash/history";
DOTNET_CLI_HOME = "$XDG_DATA_HOME/dotnet";
GTK2_RC_FILES = "$XDG_CONFIG_HOME/gtk-2.0/gtkrc";
WINE_BIN = "${inputs.nix-gaming.packages.${pkgs.stdenv.hostPlatform.system}.wine-tkg}/bin/.wine";
WINEPREFIX = "$XDG_DATA_HOME/wine";
};
};
system.stateVersion = "26.05";
}