372 lines
9.2 KiB
Nix
372 lines
9.2 KiB
Nix
|
|
{
|
|||
|
|
inputs,
|
|||
|
|
pkgs,
|
|||
|
|
upkgs,
|
|||
|
|
root,
|
|||
|
|
...
|
|||
|
|
}: let
|
|||
|
|
hyprland-git = inputs.hyprland-git.packages.${pkgs.stdenv.hostPlatform.system};
|
|||
|
|
in {
|
|||
|
|
imports = [
|
|||
|
|
./hardware-configuration.nix
|
|||
|
|
|
|||
|
|
./modules/amdgpu-ignore-ctx-privileges.nix
|
|||
|
|
];
|
|||
|
|
|
|||
|
|
# Enable the Flakes feature and the accompaying new nix command-line tool
|
|||
|
|
nix.settings = {
|
|||
|
|
experimental-features = ["nix-command" "flakes"];
|
|||
|
|
download-buffer-size = 524288000;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
nixpkgs.config.allowUnfree = true;
|
|||
|
|
|
|||
|
|
# Use the systemd-boot EFI boot loader.
|
|||
|
|
boot = rec {
|
|||
|
|
initrd.kernelModules = ["amdgpu"];
|
|||
|
|
|
|||
|
|
loader = {
|
|||
|
|
systemd-boot.enable = true;
|
|||
|
|
efi.canTouchEfiVariables = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
# kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest-lto-x86_64-v4;
|
|||
|
|
kernelPackages = pkgs.linuxPackages_latest;
|
|||
|
|
kernelModules = ["v4l2loopback"];
|
|||
|
|
extraModulePackages = with kernelPackages; [v4l2loopback];
|
|||
|
|
|
|||
|
|
# qemu
|
|||
|
|
# boot.binfmt.emulatedSystems = [
|
|||
|
|
# "riscv64-linux"
|
|||
|
|
# ];
|
|||
|
|
# the following line is from:
|
|||
|
|
# https://discourse.nixos.org/t/chroot-into-arm-container-with-systemd-nspawn/34735
|
|||
|
|
# fixed my arch-chroot issue when trying to setup a risc v sd card for
|
|||
|
|
# the mango pi mq pro
|
|||
|
|
binfmt.preferStaticEmulators = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
# bluetooth
|
|||
|
|
services.blueman.enable = true; # gui bluetooth manager
|
|||
|
|
|
|||
|
|
networking = {
|
|||
|
|
hostName = "nixarawrui";
|
|||
|
|
networkmanager.enable = true;
|
|||
|
|
firewall = {
|
|||
|
|
enable = true;
|
|||
|
|
# allows wireguard to route all traffic through default route <3
|
|||
|
|
checkReversePath = "loose";
|
|||
|
|
|
|||
|
|
allowedTCPPorts = [
|
|||
|
|
21110 # slimevr
|
|||
|
|
44949 # rquickshare
|
|||
|
|
];
|
|||
|
|
allowedUDPPorts = [
|
|||
|
|
6969 # slimevr
|
|||
|
|
8266 # slimevr
|
|||
|
|
35903 # slimevr
|
|||
|
|
44949 # rquickshare
|
|||
|
|
];
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
nftables.enable = true;
|
|||
|
|
wireguard.enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
# hardware / driver stuff
|
|||
|
|
hardware = {
|
|||
|
|
keyboard = {
|
|||
|
|
qmk.enable = true;
|
|||
|
|
};
|
|||
|
|
opentabletdriver.enable = true;
|
|||
|
|
wooting.enable = true;
|
|||
|
|
xone.enable = true;
|
|||
|
|
bluetooth.enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
virtualisation = {
|
|||
|
|
podman = {
|
|||
|
|
enable = true;
|
|||
|
|
dockerCompat = true;
|
|||
|
|
};
|
|||
|
|
waydroid.enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
environment.sessionVariables = {
|
|||
|
|
NIXOS_OZONE_WL = "1";
|
|||
|
|
|
|||
|
|
# makes portals work correctly
|
|||
|
|
QT_QPA_PLATFORMTHEME = "xdgdesktopportal";
|
|||
|
|
#QT_QPA_PLATFORMTHEME = "flatpak"; # sometimes might need this
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
xdg.portal = {
|
|||
|
|
enable = true;
|
|||
|
|
|
|||
|
|
wlr = {
|
|||
|
|
enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
extraPortals = with pkgs; [
|
|||
|
|
xdg-desktop-portal-termfilechooser
|
|||
|
|
];
|
|||
|
|
|
|||
|
|
config.common = {
|
|||
|
|
"org.freedesktop.impl.portal.FileChooser" = ["termfilechooser"];
|
|||
|
|
};
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
time.timeZone = "Europe/London";
|
|||
|
|
|
|||
|
|
i18n = {
|
|||
|
|
defaultLocale = "en_US.UTF-8";
|
|||
|
|
supportedLocales = [
|
|||
|
|
"en_US.UTF-8/UTF-8"
|
|||
|
|
"ja_JP.UTF-8/UTF-8"
|
|||
|
|
];
|
|||
|
|
};
|
|||
|
|
console = {
|
|||
|
|
font = "Lat2-Terminus16";
|
|||
|
|
keyMap = "us";
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
hardware.graphics = {
|
|||
|
|
enable = true;
|
|||
|
|
enable32Bit = true;
|
|||
|
|
|
|||
|
|
extraPackages = with pkgs; [
|
|||
|
|
libva-vdpau-driver
|
|||
|
|
libvdpau-va-gl
|
|||
|
|
];
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
services = {
|
|||
|
|
displayManager.sddm.enable = true;
|
|||
|
|
displayManager.sddm.wayland.enable = true;
|
|||
|
|
|
|||
|
|
udisks2.enable = true;
|
|||
|
|
flatpak.enable = true;
|
|||
|
|
|
|||
|
|
gnome.gnome-keyring.enable = true;
|
|||
|
|
|
|||
|
|
# used for piper so u can configure silly little mice :3
|
|||
|
|
ratbagd.enable = true;
|
|||
|
|
|
|||
|
|
# Enable sound.
|
|||
|
|
pipewire = {
|
|||
|
|
enable = true;
|
|||
|
|
audio.enable = true;
|
|||
|
|
wireplumber.enable = true;
|
|||
|
|
|
|||
|
|
alsa.enable = true;
|
|||
|
|
alsa.support32Bit = true;
|
|||
|
|
pulse.enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
udev = {
|
|||
|
|
enable = true;
|
|||
|
|
packages = with pkgs; [
|
|||
|
|
# adds via support for keyboards and stuffs :3 (needs reboot)
|
|||
|
|
via
|
|||
|
|
|
|||
|
|
# slimevr :33333333333 (i'm queer)
|
|||
|
|
slimevr
|
|||
|
|
platformio
|
|||
|
|
];
|
|||
|
|
extraRules = ''
|
|||
|
|
# Wooting One Legacy
|
|||
|
|
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess"
|
|||
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff01", TAG+="uaccess"
|
|||
|
|
|
|||
|
|
# Wooting One update mode
|
|||
|
|
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2402", TAG+="uaccess"
|
|||
|
|
|
|||
|
|
# Wooting Two LegacySUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess"
|
|||
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="ff02", TAG+="uaccess"
|
|||
|
|
|
|||
|
|
# Wooting Two update mode
|
|||
|
|
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2403", TAG+="uaccess"
|
|||
|
|
|
|||
|
|
# Generic Wootings
|
|||
|
|
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="31e3", TAG+="uaccess"
|
|||
|
|
SUBSYSTEM=="usb", ATTRS{idVendor}=="31e3", TAG+="uaccess"
|
|||
|
|
'';
|
|||
|
|
};
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
security = {
|
|||
|
|
rtkit.enable = true;
|
|||
|
|
polkit.enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
# Enable touchpad support (enabled default in most desktopManager).
|
|||
|
|
# services.libinput.enable = true;
|
|||
|
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|||
|
|
users = {
|
|||
|
|
users.aurora = {
|
|||
|
|
isNormalUser = true;
|
|||
|
|
uid = 1000;
|
|||
|
|
extraGroups = ["wheel" "disk" "input" "video" "audio" "networkmanager" "games"];
|
|||
|
|
|
|||
|
|
shell = pkgs.zsh;
|
|||
|
|
|
|||
|
|
packages = with pkgs; [
|
|||
|
|
flatpak
|
|||
|
|
tree
|
|||
|
|
];
|
|||
|
|
};
|
|||
|
|
groups.games = {
|
|||
|
|
gid = 7000;
|
|||
|
|
};
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
home-manager = {
|
|||
|
|
useGlobalPkgs = true;
|
|||
|
|
useUserPackages = true;
|
|||
|
|
|
|||
|
|
users.aurora = import ../../homes/aurora;
|
|||
|
|
extraSpecialArgs = {inherit inputs upkgs root;};
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
programs = {
|
|||
|
|
# nix-ld runs unpatched dynamic binaries on nixos :3
|
|||
|
|
nix-ld.enable = true;
|
|||
|
|
|
|||
|
|
# needed for gpg else no pinentry apparently
|
|||
|
|
gnupg = {
|
|||
|
|
agent.enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
nh = {
|
|||
|
|
enable = true;
|
|||
|
|
clean.enable = true;
|
|||
|
|
clean.extraArgs = "--keep-since 14d --keep 8";
|
|||
|
|
flake = "/etc/nixos"; # default flake
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
# hyprland, river, and sway have to be enabled here
|
|||
|
|
# for there to be systemd entries for login managers
|
|||
|
|
|
|||
|
|
# hyprland has to be enabled here for xdg portals
|
|||
|
|
# to work properly on hyprland
|
|||
|
|
hyprland = {
|
|||
|
|
enable = true;
|
|||
|
|
package = hyprland-git.hyprland;
|
|||
|
|
portalPackage = hyprland-git.xdg-desktop-portal-hyprland;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
river-classic = {
|
|||
|
|
package = upkgs.river-classic; # FIX: using upkgs version as zls is broken rn ;-;
|
|||
|
|
enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
sway = {
|
|||
|
|
enable = true;
|
|||
|
|
wrapperFeatures.gtk = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
# steam has to be enabled here
|
|||
|
|
steam = {
|
|||
|
|
enable = true;
|
|||
|
|
package = pkgs.millennium-steam;
|
|||
|
|
remotePlay.openFirewall = true;
|
|||
|
|
dedicatedServer.openFirewall = true;
|
|||
|
|
localNetworkGameTransfers.openFirewall = true;
|
|||
|
|
gamescopeSession.enable = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
alvr = {
|
|||
|
|
enable = true;
|
|||
|
|
package = upkgs.alvr;
|
|||
|
|
openFirewall = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
envision = {
|
|||
|
|
enable = true;
|
|||
|
|
openFirewall = true;
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
# any shell that you wanna use needs to be enabled globally
|
|||
|
|
# to set the default shell for users
|
|||
|
|
# per-user config is done in home manager
|
|||
|
|
zsh.enable = true;
|
|||
|
|
fish.enable = true;
|
|||
|
|
|
|||
|
|
silentSDDM = {
|
|||
|
|
enable = false;
|
|||
|
|
theme = "rei";
|
|||
|
|
};
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
# List packages installed in system profile. To search, run:
|
|||
|
|
# $ nix search wget
|
|||
|
|
environment.systemPackages = with pkgs; [
|
|||
|
|
# linux packages!!!
|
|||
|
|
linuxPackages.v4l2loopback
|
|||
|
|
|
|||
|
|
# android yay
|
|||
|
|
android-tools
|
|||
|
|
|
|||
|
|
# network manager extra packages
|
|||
|
|
networkmanager-openvpn
|
|||
|
|
|
|||
|
|
# um makes my keyboard worky
|
|||
|
|
via
|
|||
|
|
|
|||
|
|
# wine - needed for lutris :3
|
|||
|
|
wineWowPackages.stable
|
|||
|
|
|
|||
|
|
# utils, apps, important default stuff ig :3
|
|||
|
|
neovim
|
|||
|
|
wget
|
|||
|
|
git
|
|||
|
|
bash
|
|||
|
|
|
|||
|
|
# waydroid needs it apparently for clipboard sharing??
|
|||
|
|
wl-clipboard
|
|||
|
|
(waydroid.override {
|
|||
|
|
python3Packages = pkgs.python312Packages;
|
|||
|
|
})
|
|||
|
|
|
|||
|
|
# game stuff :3
|
|||
|
|
(lutris.override {
|
|||
|
|
extraPkgs = pkgs: [
|
|||
|
|
libadwaita
|
|||
|
|
];
|
|||
|
|
})
|
|||
|
|
(steam.override {
|
|||
|
|
extraPkgs = pkgs: [
|
|||
|
|
nss
|
|||
|
|
xorg.libX11
|
|||
|
|
xorg.libXScrnSaver
|
|||
|
|
];
|
|||
|
|
}).run
|
|||
|
|
|
|||
|
|
inputs.nix-alien.packages.${stdenv.hostPlatform.system}.nix-alien
|
|||
|
|
];
|
|||
|
|
|
|||
|
|
# Copy the NixOS configuration file and link it from the resulting system
|
|||
|
|
# (/run/current-system/configuration.nix). This is useful in case you
|
|||
|
|
# accidentally delete configuration.nix.
|
|||
|
|
# system.copySystemConfiguration = true;
|
|||
|
|
|
|||
|
|
# This option defines the first version of NixOS you have installed on this particular machine,
|
|||
|
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
|||
|
|
#
|
|||
|
|
# Most users should NEVER change this value after the initial install, for any reason,
|
|||
|
|
# even if you've upgraded your system to a new NixOS release.
|
|||
|
|
#
|
|||
|
|
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
|||
|
|
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
|
|||
|
|
# to actually do that.
|
|||
|
|
#
|
|||
|
|
# This value being lower than the current NixOS release does NOT mean your system is
|
|||
|
|
# out of date, out of support, or vulnerable.
|
|||
|
|
#
|
|||
|
|
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
|||
|
|
# and migrated your data accordingly.
|
|||
|
|
#
|
|||
|
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
|||
|
|
system.stateVersion = "24.11"; # Did you read the comment?
|
|||
|
|
}
|