config/systems/x86_64-linux/earth/default.nix

310 lines
8.2 KiB
Nix
Raw Normal View History

2024-05-23 20:26:30 +00:00
{
pkgs,
lib,
system,
inputs,
config,
...
}: {
2025-01-09 13:33:20 -05:00
imports = [./hardware-configuration.nix];
2024-05-23 20:26:30 +00:00
2024-05-29 22:14:43 -04:00
nix.settings = {
trusted-users = ["zoey"];
2024-05-29 22:14:43 -04:00
};
2024-08-07 10:44:50 -04:00
nix.optimise = {
automatic = true;
dates = ["03:45"];
};
2024-11-23 18:12:57 -05:00
nix.package = inputs.lix-module.packages.${pkgs.system}.default;
2024-08-07 10:44:50 -04:00
nix.gc = {
automatic = true;
2024-12-19 21:47:51 -05:00
dates = "daily";
options = "--delete-older-than 1d";
2024-08-07 10:44:50 -04:00
};
2024-05-23 20:26:30 +00:00
hardware.audio.enable = true;
hardware.nvidia.enable = true;
2024-10-17 02:05:02 -04:00
hardware.keyboard.qmk.enable = true;
2024-10-08 00:27:07 -04:00
programs.nix-ld.enable = true;
2024-10-06 21:37:22 -04:00
2025-03-22 16:03:07 -04:00
hardware.march = {
arch = "znver3";
enableNativeOptimizations = true;
cpu.vcores = 32;
memory.total = 32;
};
specialisation = {
plasma6 = {
configuration = {
services.xserver.desktopManager.plasma6.enable = true;
programs.seahorse.enable = lib.mkForce false;
};
};
};
programs.steam = {
enable = true;
extraPackages = with pkgs; [
qt5.qtwayland
];
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
2024-05-23 20:26:30 +00:00
programs.steam.gamescopeSession.enable = true;
programs.gamemode.enable = true;
ui.fonts.enable = true;
protocols.wayland.enable = true;
2024-12-19 21:47:51 -05:00
programs.openvpn3.enable = true;
services.udev.extraRules = ''
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0664", GROUP="plugdev"
'';
2024-05-23 20:26:30 +00:00
services.fstrim.enable = true;
services.vpn.enable = true;
services.xserver.enable = true;
2025-01-12 13:37:57 -05:00
services.vpn.mullvad = true;
2024-10-16 15:40:35 -04:00
services.lorri.enable = true;
2024-09-23 19:22:17 -04:00
services.udisks2.enable = true;
2024-05-23 20:26:30 +00:00
services.transmission = {
2025-03-22 16:03:07 -04:00
enable = false;
2024-05-23 20:26:30 +00:00
package = pkgs.transmission_4;
settings = {
2025-01-19 15:04:19 -05:00
download-dir = "/home/zoey/Downloads";
incomplete-dir = "/home/zoey/Downloads/.incomplete";
incomplete-dir-enabled = true;
2024-05-23 20:26:30 +00:00
};
2025-01-19 15:04:19 -05:00
user = "zoey";
group = "users";
2024-05-23 20:26:30 +00:00
};
2024-05-23 21:24:09 +00:00
services.gnome.gnome-keyring.enable = true;
2025-03-22 16:03:07 -04:00
# services.solaar = {
# enable = true;
# };
2024-07-30 12:08:53 -04:00
services._1password = {
enable = true;
polkitPolicyOwnerUsername = "zoey";
};
2024-05-23 20:26:30 +00:00
# Bootloader.
2025-01-09 13:33:20 -05:00
boot.loader.systemd-boot.enable = true;
2024-05-23 20:26:30 +00:00
boot.lanzaboote = {
2025-01-09 13:33:20 -05:00
enable = false;
2024-05-23 20:26:30 +00:00
pkiBundle = "/etc/secureboot";
};
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "earth"; # Define your hostname.
networking.extraHosts = "127.0.0.1 local-cald.io";
2024-05-23 20:26:30 +00:00
networking.networkmanager = {
enable = true;
unmanaged = ["enp6s0"];
# insertNameservers = ["1.1.1.1" "1.0.0.1"];
};
2024-12-19 21:47:51 -05:00
boot.kernelPackages = pkgs.linuxPackages_zen;
2025-03-22 16:03:07 -04:00
boot.kernelPatches = [
{
name = "bsb-patches";
patch = pkgs.fetchpatch {
url = "https://gist.githubusercontent.com/galister/08cddf10ac18929647d5fb6308df3e4b/raw/0f6417b6cb069f19d6c28b730499c07de06ec413/combined-bsb-6-10.patch";
hash = "sha256-u8O4foBHhU+T3yYkguBZ14EyCKujPzHh1TwFRg6GMsA=";
};
}
];
2024-05-23 20:26:30 +00:00
boot.supportedFilesystems = ["ntfs"];
2024-10-16 15:40:35 -04:00
services.dlna.enable = false;
2024-05-23 20:26:30 +00:00
# services.openssh = {
# enable = true;
# PasswordAuthentication = true;
# };
time.timeZone = "America/Detroit";
2025-01-19 15:04:19 -05:00
services.gvfs.enable = true;
services.gnome.sushi.enable = true;
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
2025-03-22 16:03:07 -04:00
services.wg.enable = true;
# home-manager.useGlobalPkgs = false;
2025-01-19 15:04:19 -05:00
2024-05-23 20:26:30 +00:00
environment.systemPackages = [
pkgs.sbctl
2025-03-22 16:03:07 -04:00
lib.custom.nixos-stable.vesktop
2024-05-23 20:26:30 +00:00
pkgs.mangohud
2025-01-09 13:33:20 -05:00
pkgs.lutris
2025-01-19 15:04:19 -05:00
pkgs.bottles
pkgs.file-roller
2025-01-09 13:33:20 -05:00
pkgs.podman-tui
pkgs.dive
pkgs.docker-compose
pkgs.podman-compose
2024-05-23 20:26:30 +00:00
pkgs.transmission_4
2025-01-19 15:04:19 -05:00
pkgs.protonup-qt
2025-01-13 20:45:19 -05:00
pkgs.restic
2025-03-22 16:03:07 -04:00
pkgs.qt5.qtwayland
2025-01-19 15:04:19 -05:00
(inputs.umu.packages.${system}.umu.override {
version = inputs.umu.shortRev;
truststore = true;
cbor2 = true;
})
2024-05-23 20:26:30 +00:00
inputs.agenix.packages.${system}.agenix
2025-01-19 15:04:19 -05:00
inputs.awsvpnclient.packages.${system}.awsvpnclient
2025-01-12 13:37:57 -05:00
pkgs.nautilus-python
(pkgs.writeTextFile {
name = "nautilus-open-kitty-here";
destination = "/share/nautilus-python/extensions/open-kitty-here.py";
text = ''
import os
import gi
gi.require_version('Nautilus', '3.0')
from gi.repository import Nautilus, GObject
class OpenKittyTerminalExtension(GObject.GObject, Nautilus.MenuProvider):
def __init__(self):
pass
def menu_activate_cb(self, menu, file):
if file.is_directory():
path = file.get_location().get_path()
else:
path = file.get_parent_location().get_path()
os.system(f'kitty --directory "{path}" &')
def get_file_items(self, window, files):
if len(files) != 1:
return
file = files[0]
item = Nautilus.MenuItem(
name='OpenKittyTerminalExtension::OpenKitty',
label='Open in Kitty',
tip='Opens Kitty terminal in this location'
)
item.connect('activate', self.menu_activate_cb, file)
return [item]
def get_background_items(self, window, file):
item = Nautilus.MenuItem(
name='OpenKittyTerminalExtension::OpenKitty',
label='Open in Kitty',
tip='Opens Kitty terminal in this location'
)
item.connect('activate', self.menu_activate_cb, file)
return [item]
'';
})
2024-05-23 20:26:30 +00:00
];
2025-03-23 16:50:28 -04:00
# Create a custom monitors.xml for GDM
environment.etc."gdm/monitors.xml" = {
mode = "0644";
text = ''
<monitors version="2">
<configuration>
<logicalmonitor>
<x>0</x>
<y>0</y>
<primary>yes</primary>
<scale>1</scale>
<monitor>
<monitorspec>
<connector>DP-3</connector> <!-- Change to your actual connector -->
<vendor>YOUR_VENDOR</vendor> <!-- Optional, can be left as is -->
<product>YOUR_PRODUCT</product> <!-- Optional, can be left as is -->
<serial>YOUR_SERIAL</serial> <!-- Optional, can be left as is -->
</monitorspec>
<mode>
<width>2560</width>
<height>1440</height>
<rate>240</rate> <!-- 240Hz refresh rate -->
</mode>
</monitor>
</logicalmonitor>
</configuration>
</monitors>
'';
};
2025-01-09 13:33:20 -05:00
programs.zsh.enable = true;
2025-01-07 18:42:17 +00:00
programs.fuse.userAllowOther = true;
users.users.zoey = {
isNormalUser = true;
description = "zoey";
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"];
2025-01-09 13:33:20 -05:00
shell = pkgs.zsh;
initialHashedPassword = "$6$rounds=2000000$rFBJH7LwdEHvv.0i$HdHorWqp8REPdWPk5fEgZXX1TujRJkMxumGK0f0elFN0KRPlBjJMW2.35A.ID/o3eC/hGTwbSJAcJcwVN2zyV/";
};
2025-01-12 13:37:57 -05:00
services.gnome.core-utilities.enable = true; # Enable core GNOME utilities
users.groups.plugdev = {};
2025-01-19 15:04:19 -05:00
home-manager.backupFileExtension = "bk";
snowfallorg.users.zoey = {
2024-05-23 20:26:30 +00:00
create = true;
2025-01-12 15:55:22 -05:00
admin = true;
2024-05-23 20:26:30 +00:00
home = {
enable = true;
};
};
2025-01-19 15:04:19 -05:00
services.openssh = {
enable = true;
ports = [22];
};
networking.firewall.allowedTCPPorts = [22];
services.samba = {
enable = true;
openFirewall = true;
shares = {
"SteamLibrary" = {
path = "/mnt/bk"; # Update this path to your drive's mount point
browseable = true;
writable = true;
guestOk = true; # Allow access without authentication
public = true;
createMask = "0775"; # File permissions
directoryMask = "0775"; # Directory permissions
};
};
};
2024-05-23 20:26:30 +00:00
catppuccin.enable = true;
programs.virt-manager.enable = true;
2024-09-21 18:49:15 -04:00
sites.jellyfin.enable = true;
2025-03-22 16:03:07 -04:00
sites.mealie.enable = false;
2024-09-21 18:49:15 -04:00
2025-01-09 13:33:20 -05:00
virtualisation.containers.enable = true;
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
2025-03-22 16:03:07 -04:00
virtualisation.waydroid.enable = true;
2025-01-13 17:07:11 -05:00
hardware.gpu-passthru.enable = true;
2024-09-12 19:29:12 -04:00
system.stateVersion = "24.05";
2024-05-23 20:26:30 +00:00
}