Compare commits

...

6 commits

9 changed files with 131 additions and 34 deletions

View file

@ -19,7 +19,7 @@
}; };
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
kernelPackages = pkgs.linuxPackages_cachyos; kernelPackages = pkgs.linuxPackages_zen;
kernel = { kernel = {
sysctl ={ sysctl ={
"vm.max_map_count" = 2147483642; "vm.max_map_count" = 2147483642;
@ -27,13 +27,6 @@
}; };
}; };
virtualisation = {
docker = {
enable = true;
storageDriver = "btrfs";
};
};
zramSwap = { zramSwap = {
enable = true; enable = true;
algorithm = "zstd"; algorithm = "zstd";
@ -82,20 +75,9 @@
}; };
}; };
cloudflared = {
enable = true;
};
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
}; };
};
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
@ -103,7 +85,7 @@
users.users.pingu = { users.users.pingu = {
isNormalUser = true; isNormalUser = true;
description = "Elissa"; description = "Elissa";
extraGroups = [ "networkmanager" "wheel" "docker" ]; extraGroups = [ "networkmanager" "wheel" "input" "render" ];
shell = pkgs.fish; shell = pkgs.fish;
packages = with pkgs; [ packages = with pkgs; [
floorp floorp
@ -192,12 +174,16 @@
}; };
}; };
qt.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
age age
ssh-to-age ssh-to-age
sops sops
cloudflared cloudflared
inputs.zen-browser.packages."${pkgs.system}".specific inputs.zen-browser.packages."${pkgs.system}".specific
cava
socat
btrfs-progs btrfs-progs
btop btop
hyprcursor hyprcursor
@ -243,6 +229,8 @@
material-design-icons material-design-icons
material-symbols material-symbols
imagemagick imagemagick
wireguard-tools
mission-center
]; ];
fonts.packages = with pkgs; [ fonts.packages = with pkgs; [

View file

@ -9,8 +9,8 @@
]; ];
boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "hid_generic" "uas" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "hid_generic" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" "amd-pstate" "amdgpu" ]; boot.kernelModules = [ "kvm-amd" "amd-pstate" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =

View file

@ -43,11 +43,16 @@
networking = { networking = {
enableIPv6 = false; # Had to disable for now due to problems with resolving enableIPv6 = false; # Had to disable for now due to problems with resolving
firewall = { allowedTCPPorts = [ firewall = {
80 # HTTP allowedTCPPorts = [
443 # HTTPS 80 # HTTP
222 # git over ssh 443 # HTTPS
]; }; 222 # git over ssh
];
allowedUDPPorts = [
25565 # minecraft
];
};
hostName = "theia"; 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"; domain = "theia.blahai.gay";
@ -76,6 +81,31 @@
services = { services = {
earlyoom = {
enable = true;
extraArgs = let
avoid = lib.concatStringsSep "|" [
"cryptsetup"
"dbus-.*"
"gpg-agent"
"ssh-agent"
"sshd"
"systemd"
"systemd-.*"
"bash"
"fish"
"n?vim"
];
prefer =
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 = { caddy = {
enable = true; enable = true;
virtualHosts = { virtualHosts = {
@ -109,9 +139,7 @@
uptime-kuma = { uptime-kuma = {
enable = true; enable = true;
settings = { settings = { PORT = "3001"; };
PORT = "3001";
};
}; };
forgejo = { forgejo = {
@ -139,18 +167,22 @@
searx = { searx = {
enable = true; enable = true;
redisCreateLocally = true;
settings = { settings = {
use_default_settings = true; use_default_settings = true;
server = { server = {
port = 8888; port = 8888;
secret_key = "7360d3df7c08ce681cf6d5122e3e182de2c5205e962766abd3e6dfc8dec1b683"; secret_key =
"7360d3df7c08ce681cf6d5122e3e182de2c5205e962766abd3e6dfc8dec1b683";
}; };
ui = { infinite_scroll = true; };
general = { general = {
instance_name = "searchai"; instance_name = "searchai";
debug = false; debug = false;
}; };
search = { search = {
safe_search = 1; safe_search = 0;
autocomplete = "google"; autocomplete = "google";
default_lang = "en"; default_lang = "en";
}; };
@ -174,6 +206,8 @@
}; };
}; };
programs = { nix-ld.enable = true; };
users.users.root = { users.users.root = {
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPbmiNqoyeKXk/VopFm2cFfEnV4cKCFBhbhyYB69Fuu" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPbmiNqoyeKXk/VopFm2cFfEnV4cKCFBhbhyYB69Fuu"
@ -194,6 +228,24 @@
"$y$j9T$cxwKGmzYyC1eLeIysr8r/.$dsxxxV4NvXY.Wpd9LO.RiuMQuy2lYyy2HGrk52BJX08"; "$y$j9T$cxwKGmzYyC1eLeIysr8r/.$dsxxxV4NvXY.Wpd9LO.RiuMQuy2lYyy2HGrk52BJX08";
}; };
users.users.minecraft = {
isNormalUser = true;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPbmiNqoyeKXk/VopFm2cFfEnV4cKCFBhbhyYB69Fuu" # nyx
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLqPq70t6RbnI8UejEshYcfBP66I4OrLFjvGLLfIEXD" # laptop
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDbAlKwToOiUT6zA6qdgETTuJVRFeSjkBJWLzUWLLAtQZnPJ4gWZMxcHbkoPryY6L5DnibmqliLnAw2cjaREJw3BJ8Di0W1UdSZqZZejipjkfBBDLadckkv6WTskShyCtN/Mum8hkBMbGFrWXSM+8MPEj6pS8WgRnrHjDR27tIyUkP+f6n2B7g8z34o26jmKkIC+cLV5D3IhRhVpi49oPqrI59aWWw6ikOSITdLfdIuNxmlgD9cVhWnVohPp2hfoYF5VwIpWYUwL1zkQdiBvCXKT35DqQLy/jKcHegVHk5ZLeaZlaZ7dyiu5xnQUuTgg6m9r1VW+E3XHuRNp33SMhkGs/LVJWtx0fAEzlQDfQQl9SE2k6XXffZYSeOgFO8hYatGrfZ2Dx4yeacFnckitJglyq8SjIn5lUB4UN/48iD6v1thf0LyOy279LKsbmL90nNrRHP7ByFOTwAb1IsGMARAGeMLZfyvaOOSSfRfm0NqCpi1CV9vX5qwG3w34ifirDs=" # slogo laptop
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDAu9nk21JNaOTGBeUw3AOF0uA0ErcMf/2hvjUASXuPcBf9gI7huy0RXPvWO7JiOUorYdqMo9zB792tso4+o0RMYoAKC1A+AP0L1w8uKs4KdhbWsduEZhT3Nmp4OSFhi+Ycv2ZK6MQ52k9OVAbjT2xzyE7GSZHTPFVszr03bpeFkgDE/9K7px6r/KPKrXOn7DMRbgXkyjkOOhB8cCGW8VbJDVwz1/M3p1gfIQDZIcGvt5b6CjcuOyfYPORlcVUdRNVLxdHio4YLjKu6w2M74tVaEvRBb5fl+OTztDyENyEiGo2Pr5xYew5oIuVG4+pZZUpjxOPB+uWr8tPct/kuq/hxqJ5byrsv+bW4CNWlRxKiHC0SLtIlkEXKbCIs0IvEjbFv3tS+wSCU9qdb39yZUXknc09GUmd8ZNfsmPNAg4+1irTfSy7R24Wi76B/dEMyb6TUKm1zUfRRnTCTngr7WZAn/UcPDvwUduJu64h99TRWOtU9T2ih33xkfk3zCJpME5s=" # slogo desktop
];
packages = with pkgs; [
openjdk21
openjdk17
screen
];
initialHashedPassword =
"$y$j9T$KpQYYLB6eWfHAUo9.o/uy1$gnj/UlWLrx5XBZDm2GNdjHs2G5D3XxxqqtrCIf5MX43";
};
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
curl curl
@ -203,5 +255,6 @@
zip zip
jq jq
busybox busybox
fish
]; ];
} }

View file

@ -1,7 +1,7 @@
{ {
imports = [ imports = [
./starship.nix ./starship.nix
./fastfetch.nix ./fastfetch/fastfetch.nix
./fish/default.nix ./fish/default.nix
./alacritty/default.nix ./alacritty/default.nix
./foot/default.nix ./foot/default.nix

View file

@ -1,4 +1,5 @@
{ pkgs, lib, config, ... }: { { pkgs, lib, config, ... }: {
home.file."Pictures/gay.png".source = ./gay.png;
programs.fastfetch = { programs.fastfetch = {
enable = true; enable = true;
settings = { settings = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 KiB

View file

@ -3,5 +3,6 @@
./catppuccin.nix ./catppuccin.nix
./games/default.nix ./games/default.nix
./services/default.nix ./services/default.nix
./virtualisation.nix
]; ];
} }

View file

@ -1,7 +1,8 @@
{ ... }: { ... }:
{ {
imports = [ imports = [
./cloudflared.nix # ./cloudflared.nix
./vpn.nix ./vpn.nix
./pipewire.nix
]; ];
} }

View file

@ -0,0 +1,53 @@
{ pkgs, lib, config, ... }:
{
boot = {
initrd.kernelModules = lib.mkBefore [
"kvm-amd"
"vfio_pci"
"vfio_iommu_type1"
"vfio"
"amdgpu"
];
kernelParams = [
"amd_iommu=on"
"amd_iommu=pt"
"kvm.ignore_msrs=1"
"vfio-pci.ids=1002:67df,1002:aaf0"
];
extraModprobeConfig = ''
softdep drm pre: vfio-pci
'';
};
virtualisation = {
libvirtd = {
enable = true;
onBoot = "ignore";
onShutdown = "shutdown";
qemu = {
package = pkgs.qemu_kvm;
ovmf.enable = true;
};
};
docker = {
enable = true;
};
};
programs = {
virt-manager = {
enable = true;
};
};
users.users.pingu.extraGroups = [ "qemu-libvirtd" "libvirtd" "disk" "kvm" "docker" ];
environment.systemPackages = with pkgs; [
virt-manager
];
}