Format with alejandra

This commit is contained in:
blahai 2024-12-20 15:11:42 +02:00
parent 4771948682
commit e08f66d286
No known key found for this signature in database
31 changed files with 398 additions and 278 deletions

View file

@ -1,15 +1,21 @@
{ pkgs, pkgs-smol, lib, modulesPath, config, ... }: {
imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" ];
{
pkgs,
pkgs-smol,
lib,
modulesPath,
config,
...
}: {
imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"];
boot = {
supportedFilesystems = [ "zfs" ];
supportedFilesystems = ["zfs"];
zfs = {
forceImportRoot = false;
package = pkgs-smol.zfs;
};
kernelPackages = pkgs-smol.linuxPackages_6_12;
kernelParams = lib.mkAfter [ "noquiet" "toram" ];
kernelParams = lib.mkAfter ["noquiet" "toram"];
enableContainers = false;
};
@ -30,7 +36,6 @@
dnf5 # Fedora
debootstrap # Debin and ubuntu
apt # Ubuntu
];
documentation = {
@ -56,7 +61,7 @@
environment = {
stub-ld.enable = lib.mkForce false;
defaultPackages = [ ];
defaultPackages = [];
};
xdg = {
@ -68,10 +73,10 @@
nix = {
package = pkgs.lix;
nixPath = [ "nixpkgs=${config.nix.registry.nixpkgs.to.path}" ];
nixPath = ["nixpkgs=${config.nix.registry.nixpkgs.to.path}"];
channel.enable = false;
settings = {
experimental-features = [ "nix-command" "flakes" "auto-allocate-uids" ];
experimental-features = ["nix-command" "flakes" "auto-allocate-uids"];
max-jobs = "auto";
sandbox = true;
auto-optimise-store = true;
@ -92,10 +97,8 @@
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
"wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0="
];
};
};
hardware.enableRedistributableFirmware = true;
}

View file

@ -1,6 +1,4 @@
{ config, pkgs, pkgs-smol, inputs, system, lib, ... }:
{
{ config, pkgs, pkgs-smol, inputs, lib, ... }: {
imports = [
./hardware-configuration.nix
../../modules/nixos/default.nix
@ -28,8 +26,8 @@
};
kernelPackages = pkgs.linuxPackages_6_12;
kernel = { sysctl = { "vm.max_map_count" = 2147483642; }; };
kernelParams = [
"elevator=none" # for zfs
kernelParams = [
"elevator=none" # for zfs
"zfs.zfs_arc_max=8589934592"
"nvme.noacpi=1"
];
@ -84,7 +82,6 @@
};
gnome.gnome-keyring.enable = true;
};
hardware.pulseaudio.enable = false;
@ -131,7 +128,6 @@
TimeoutStopSec = 10;
};
};
};
programs = {
@ -248,7 +244,8 @@
lua-language-server
nil
nixd
nixfmt-classic
nix-output-monitor
alejandra
zip
nodejs
typescript
@ -274,7 +271,6 @@
imagemagick
wireguard-tools
mission-center
nix-output-monitor
speedcrunch
geogebra
];
@ -298,6 +294,11 @@
enableSSHSupport = true;
};
programs.localsend = {
enable = true;
openFirewall = true;
};
services.openssh = {
enable = true;
settings = {
@ -307,5 +308,4 @@
};
system.stateVersion = "24.05";
}

View file

@ -1,78 +1,95 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "hid_generic" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ "kvm-amd" "amd-pstate" ];
boot.extraModulePackages = [ ];
boot.initrd.availableKernelModules = ["nvme" "ahci" "xhci_pci" "usbhid" "hid_generic" "uas" "sd_mod"];
boot.initrd.kernelModules = ["amdgpu"];
boot.kernelModules = ["kvm-amd" "amd-pstate"];
boot.extraModulePackages = [];
fileSystems."/" = {
device = "zpool/root";
fsType = "zfs";
options = [ "zfsutil" ];
options = ["zfsutil"];
};
fileSystems."/nix" = {
device = "zpool/nix";
fsType = "zfs";
options = [ "zfsutil" ];
options = ["zfsutil"];
};
fileSystems."/var" = {
device = "zpool/var";
fsType = "zfs";
options = [ "zfsutil" ];
options = ["zfsutil"];
};
fileSystems."/home" = {
device = "zpool/home";
fsType = "zfs";
options = [ "zfsutil" ];
options = ["zfsutil"];
};
fileSystems."/var/lib/virt/images" = {
device = "zpool/virt/images";
fsType = "zfs";
options = ["zfsutil"];
};
fileSystems."/var/lib/virt/disks" = {
device = "zpool/virt/disks";
fsType = "zfs";
options = ["zfsutil"];
};
fileSystems."/mnt/zootfs/Storage" = {
device = "zootfs/Storage";
fsType = "zfs";
options = [ "zfsutil" ];
options = ["zfsutil"];
};
fileSystems."/mnt/zootfs/Media" = {
device = "zootfs/Media";
fsType = "zfs";
options = [ "zfsutil" ];
options = ["zfsutil"];
};
# https://github.com/atuinsh/atuin/issues/952#issuecomment-1902164562
fileSystems."/home/pingu/.local/share/atuin" = {
device = "/dev/zvol/zpool/nixos/atuin";
fsType = "ext4";
options = [ "async" "auto" "nofail" ];
options = ["async" "auto" "nofail"];
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = ["fmask=0022" "dmask=0022"];
};
fileSystems."/mnt/ssd" = {
device = "/dev/disk/by-uuid/e4c31e1c-6667-4582-8d6a-d142d6118ce2";
fsType = "btrfs";
options = [ "async" "auto" "noatime" "rw" ];
options = ["async" "auto" "noatime" "rw"];
};
fileSystems."/mnt/ext" = {
device = "/dev/disk/by-uuid/43280a82-cf9a-452e-9bdc-a8cc66ccd7c8";
fsType = "btrfs";
options = [ "async" "auto" "nofail" "noatime" ];
options = ["async" "auto" "nofail" "noatime"];
};
swapDevices = [{ device = "/dev/disk/by-uuid/04281bd7-784a-4287-b4f2-ce406d2ab6ac"; }];
swapDevices = [{device = "/dev/disk/by-uuid/04281bd7-784a-4287-b4f2-ce406d2ab6ac";}];
# networking.useDHCP = lib.mkDefault true;
hardware.enableRedistributableFirmware = true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = true;
}

View file

@ -1,4 +1,9 @@
{ inputs, config, pkgs, ... }: {
{
inputs,
config,
pkgs,
...
}: {
imports = [
../../modules/home-manager/default.nix
inputs.catppuccin.homeManagerModules.catppuccin
@ -23,10 +28,10 @@
autocrlf = "input";
};
url = {
"ssh://git@github.com/" = { insteadOf = "https://github.com/"; };
"ssh://git@github.com/" = {insteadOf = "https://github.com/";};
};
gpg = { format = "ssh"; };
init = { defaultBranch = "main"; };
gpg = {format = "ssh";};
init = {defaultBranch = "main";};
};
};
@ -45,12 +50,15 @@
gtk = {
enable = true;
catppuccin = {
};
catppuccin = {
gtk = {
enable = true;
flavor = "mocha";
accent = "pink";
size = "standard";
tweaks = [ "normal" ];
tweaks = ["normal"];
icon.enable = true;
};
};
@ -64,9 +72,12 @@
home.stateVersion = "24.11";
home.packages = with pkgs; [ obsidian ];
home.packages = with pkgs; [
obsidian
inputs.haivim.packages.${pkgs.system}.default
];
home.sessionVariables = { EDITOR = "nvim"; };
home.sessionVariables = {EDITOR = "nvim";};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;

View file

@ -1,7 +1,13 @@
{ config, modulesPath, lib, pkgs, ... }: {
{
config,
modulesPath,
lib,
pkgs,
...
}: {
system.stateVersion = "24.11";
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
boot = {
initrd.availableKernelModules = [
@ -14,9 +20,9 @@
"sr_mod"
"virtio_blk"
];
initrd.kernelModules = [ ];
initrd.kernelModules = [];
kernelPackages = pkgs.linuxPackages_6_12;
kernelModules = [ "kvm-amd" ];
kernelModules = ["kvm-amd"];
kernel = {
sysctl = {
"vm.max_map_count" = 2147483642;
@ -28,7 +34,7 @@
"net.ipv6.conf.all.forwarding" = 1;
};
};
extraModulePackages = [ ];
extraModulePackages = [];
loader.grub = {
enable = true;
device = "/dev/vda";
@ -38,7 +44,7 @@
nix = {
package = pkgs.lix;
settings = {
experimental-features = [ "nix-command" "flakes" ];
experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true;
sandbox = true;
};
@ -58,13 +64,15 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/FED3-A372";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
options = ["fmask=0022" "dmask=0022"];
};
swapDevices = [{
device = "/var/lib/swapfile";
size = 16 * 1024;
}];
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
networking = {
enableIPv6 = false; # Had to disable for now due to problems with resolving
@ -82,7 +90,7 @@
];
};
hostName = "theia";
nameservers = [ "1.1.1.1" "8.8.8.8" "9.9.9.9" ];
nameservers = ["1.1.1.1" "8.8.8.8" "9.9.9.9"];
domain = "theia.blahai.gay";
useDHCP = lib.mkDefault false;
defaultGateway = {
@ -93,15 +101,19 @@
interfaces = {
ens3 = {
ipv4 = {
addresses = [{
address = "178.63.118.252";
prefixLength = 32;
}];
addresses = [
{
address = "178.63.118.252";
prefixLength = 32;
}
];
routes = [{
address = "178.63.247.183";
prefixLength = 32;
}];
routes = [
{
address = "178.63.247.183";
prefixLength = 32;
}
];
};
};
};
@ -117,7 +129,7 @@
networkd-dispatcher = {
enable = true;
rules."50-tailscale" = {
onState = [ "routable" ];
onState = ["routable"];
script = ''
${
lib.getExe pkgs.ethtool
@ -142,13 +154,12 @@
"n?vim"
];
prefer =
lib.concatStringsSep "|" [ "dotnet" "java.*" "nix" "npm" "node" ];
lib.concatStringsSep "|" ["dotnet" "java.*" "nix" "npm" "node"];
in [
"-g"
"--avoid '(^|/)(${avoid})'" # things that we want to avoid killing
"--prefer '(^|/)(${prefer})'" # things we want to remove fast
];
};
caddy = {
@ -184,7 +195,7 @@
uptime-kuma = {
enable = true;
settings = { PORT = "3001"; };
settings = {PORT = "3001";};
};
forgejo = {
@ -227,10 +238,9 @@
use_default_settings = true;
server = {
port = 8888;
secret_key =
"7360d3df7c08ce681cf6d5122e3e182de2c5205e962766abd3e6dfc8dec1b683";
secret_key = "7360d3df7c08ce681cf6d5122e3e182de2c5205e962766abd3e6dfc8dec1b683";
};
ui = { infinite_scroll = true; };
ui = {infinite_scroll = true;};
general = {
instance_name = "searchai";
@ -247,7 +257,7 @@
openssh = {
enable = true;
openFirewall = true;
settings = { PasswordAuthentication = false; };
settings = {PasswordAuthentication = false;};
};
fail2ban = {
@ -261,26 +271,24 @@
};
};
programs = { nix-ld.enable = true; };
programs = {nix-ld.enable = true;};
users.users.root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPbmiNqoyeKXk/VopFm2cFfEnV4cKCFBhbhyYB69Fuu"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLqPq70t6RbnI8UejEshYcfBP66I4OrLFjvGLLfIEXD"
];
initialHashedPassword =
"$y$j9T$TzqbL4iMGLjli6EEXfRCZ0$AhFJ4iCFxRlstth5owic3M5nq74Sp1qhtctjSBcgAl8";
initialHashedPassword = "$y$j9T$TzqbL4iMGLjli6EEXfRCZ0$AhFJ4iCFxRlstth5owic3M5nq74Sp1qhtctjSBcgAl8";
};
users.users.pingu = {
isNormalUser = true;
extraGroups = [ "wheel" ];
extraGroups = ["wheel"];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPbmiNqoyeKXk/VopFm2cFfEnV4cKCFBhbhyYB69Fuu"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLqPq70t6RbnI8UejEshYcfBP66I4OrLFjvGLLfIEXD"
];
initialHashedPassword =
"$y$j9T$cxwKGmzYyC1eLeIysr8r/.$dsxxxV4NvXY.Wpd9LO.RiuMQuy2lYyy2HGrk52BJX08";
initialHashedPassword = "$y$j9T$cxwKGmzYyC1eLeIysr8r/.$dsxxxV4NvXY.Wpd9LO.RiuMQuy2lYyy2HGrk52BJX08";
};
users.users.minecraft = {
@ -295,10 +303,8 @@
openjdk21
openjdk17
screen
];
initialHashedPassword =
"$y$j9T$KpQYYLB6eWfHAUo9.o/uy1$gnj/UlWLrx5XBZDm2GNdjHs2G5D3XxxqqtrCIf5MX43";
initialHashedPassword = "$y$j9T$KpQYYLB6eWfHAUo9.o/uy1$gnj/UlWLrx5XBZDm2GNdjHs2G5D3XxxqqtrCIf5MX43";
};
environment.systemPackages = with pkgs; [

View file

@ -1,5 +1,4 @@
{ lib, ... }:
{
{lib, ...}: {
disko.devices = {
disk.disk1 = {
device = lib.mkDefault "/dev/vda";