Add NixOS config
This commit is contained in:
commit
954c25c444
6 changed files with 556 additions and 0 deletions
3
.stowrc
Normal file
3
.stowrc
Normal file
|
@ -0,0 +1,3 @@
|
|||
--target=/etc
|
||||
--ignore=.stowrc
|
||||
--ignore=DS_Store
|
3
README.md
Normal file
3
README.md
Normal file
|
@ -0,0 +1,3 @@
|
|||
# My ETC files/NixOS config!
|
||||
|
||||
The Nix config is currently a basic config. I'm too baby to fuck with a system level flake again lmao
|
BIN
nixos/assets/TX-02 2.002.zip
Normal file
BIN
nixos/assets/TX-02 2.002.zip
Normal file
Binary file not shown.
324
nixos/configuration.nix
Normal file
324
nixos/configuration.nix
Normal file
|
@ -0,0 +1,324 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
# let
|
||||
# berkeley-mono-typeface = pkgs.callPackage ./packages/berkeley-mono-typeface.nix;
|
||||
# in
|
||||
|
||||
let
|
||||
unstable = import <nixos-unstable> {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Australia/Melbourne";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_AU.UTF-8";
|
||||
LC_IDENTIFICATION = "en_AU.UTF-8";
|
||||
LC_MEASUREMENT = "en_AU.UTF-8";
|
||||
LC_MONETARY = "en_AU.UTF-8";
|
||||
LC_NAME = "en_AU.UTF-8";
|
||||
LC_NUMERIC = "en_AU.UTF-8";
|
||||
LC_PAPER = "en_AU.UTF-8";
|
||||
LC_TELEPHONE = "en_AU.UTF-8";
|
||||
LC_TIME = "en_AU.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "us";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
security.rtkit.enable = true;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
fonts = {
|
||||
fontDir.enable = true;
|
||||
enableGhostscriptFonts = true;
|
||||
packages = with pkgs; [
|
||||
nerdfonts
|
||||
# berkeley-mono-typeface
|
||||
];
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.buymymojo = {
|
||||
isNormalUser = true;
|
||||
description = "Aria";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"docker"
|
||||
"openrazer"
|
||||
"gamemode"
|
||||
];
|
||||
# packages = with pkgs; [
|
||||
# # discord.override { withMoonlight = true; }
|
||||
# ];
|
||||
|
||||
# packages = [
|
||||
# # (unstable.discord.override { withMoonlight = true; })
|
||||
# ];
|
||||
};
|
||||
|
||||
# Enable automatic login for the user.
|
||||
services.displayManager.autoLogin.enable = true;
|
||||
services.displayManager.autoLogin.user = "buymymojo";
|
||||
programs.java = { enable = true; package = pkgs.zulu23; };
|
||||
|
||||
programs.firefox.enable = true;
|
||||
programs.fish.enable = true;
|
||||
|
||||
programs.corectrl = {
|
||||
enable = true;
|
||||
gpuOverclock = {
|
||||
enable = true;
|
||||
ppfeaturemask = "0xffffffff";
|
||||
};
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
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
|
||||
};
|
||||
programs.steam.gamescopeSession.enable = true;
|
||||
programs.steam.protontricks.enable = true;
|
||||
programs.gamemode.enable = true;
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.noisetorch.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
# wget
|
||||
fzf
|
||||
nixfmt-rfc-style
|
||||
dwarfs
|
||||
|
||||
wineWowPackages.stable
|
||||
winetricks
|
||||
steamtinkerlaunch
|
||||
|
||||
amdgpu_top
|
||||
mangohud
|
||||
|
||||
unstable.svt-av1-psy
|
||||
unstable.ffmpeg-full
|
||||
unstable.ab-av1
|
||||
unstable.whisper-cpp-vulkan
|
||||
|
||||
vscode.fhs # .fhs version will be more compatable even if slightly less nix flavoured
|
||||
|
||||
openrazer-daemon
|
||||
|
||||
comma
|
||||
|
||||
# noisetorch
|
||||
# yad
|
||||
# unzip
|
||||
# wget
|
||||
# xdotool
|
||||
# xxd
|
||||
# xorg.xwininfo
|
||||
];
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
# === Godot ===
|
||||
xorg.libXcursor
|
||||
xorg.libXinerama
|
||||
xorg.libXext
|
||||
xorg.libXrandr
|
||||
xorg.libXrender
|
||||
xorg.libX11
|
||||
xorg.libXi
|
||||
libGL
|
||||
wayland
|
||||
wayland-scanner
|
||||
vulkan-loader
|
||||
fontconfig
|
||||
libxkbcommon
|
||||
dbus
|
||||
libpulseaudio
|
||||
dotnetCorePackages.dotnet_8.sdk
|
||||
dotnetCorePackages.sdk_8_0_3xx
|
||||
alsa-lib
|
||||
# === Godot ===
|
||||
|
||||
# === Ludusavi ===
|
||||
gtk3
|
||||
gtk4
|
||||
glib
|
||||
glibc
|
||||
# === Ludusavi ===
|
||||
];
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
virtualisation.docker.storageDriver = "btrfs";
|
||||
# virtualisation.docker.rootless = {
|
||||
# enable = true;
|
||||
# setSocketVariable = true;
|
||||
# };
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = false;
|
||||
|
||||
# services.blocky = {
|
||||
# enable = true;
|
||||
# settings = {
|
||||
# ports.dns = 53; # Port for incoming DNS Queries.
|
||||
# upstreams.groups.default = [
|
||||
# "https://one.one.one.one/dns-query" # Using Cloudflare's DNS over HTTPS server for resolving queries.
|
||||
# ];
|
||||
# # For initially solving DoH/DoT Requests when no system Resolver is available.
|
||||
# bootstrapDns = {
|
||||
# upstream = "https://one.one.one.one/dns-query";
|
||||
# ips = [ "1.1.1.1" "1.0.0.1" ];
|
||||
# };
|
||||
# #Enable Blocking of certian domains.
|
||||
# blocking = {
|
||||
# blackLists = {
|
||||
# #Adblocking
|
||||
# ads = [
|
||||
# "https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts"
|
||||
# "https://adaway.org/hosts.txt"
|
||||
# "https://v.firebog.net/hosts/AdguardDNS.txt"
|
||||
# ];
|
||||
# #Another filter for blocking adult sites
|
||||
# adult = ["https://blocklistproject.github.io/Lists/porn.txt"];
|
||||
# #You can add additional categories
|
||||
# };
|
||||
# #Configure what block categories are used
|
||||
# clientGroupsBlock = {
|
||||
# default = [ "ads" ];
|
||||
# # kids-ipad = ["ads" "adult"];
|
||||
# };
|
||||
# };
|
||||
# customDNS = {
|
||||
# customTTL = "1h";
|
||||
# mapping = {
|
||||
# "upload.aria.coffee" = "192.168.20.2";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
networking.hosts = {
|
||||
"192.168.20.2" = [
|
||||
"upload.aria.coffee"
|
||||
"aria.local"
|
||||
"dev.aria.coffee"
|
||||
"vtt.buymymojo.net"
|
||||
"home-status.buymymojo.net"
|
||||
"syncthing-home.aria.coffee"
|
||||
"localfile.aria.coffee"
|
||||
"jellyfin.buymymojo.net"
|
||||
];
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
interactiveShellInit = ''
|
||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
then
|
||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "24.11"; # Did you read the comment?
|
||||
|
||||
}
|
202
nixos/hardware-configuration.nix
Normal file
202
nixos/hardware-configuration.nix
Normal file
|
@ -0,0 +1,202 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"uas"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/0f2c323f-446e-4f3b-a188-be7ab574a6b2";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/3466-259A";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/home/buymymojo/Videos" = {
|
||||
device = "/dev/disk/by-uuid/2f5047c5-49ea-455d-ae29-9d8e07a77181";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"users"
|
||||
"nofail"
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=Videos"
|
||||
"exec"
|
||||
"rw"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/KingstonSSD" = {
|
||||
device = "/dev/disk/by-uuid/ad01c809-a2dc-48b2-b1f8-95d8d341b586";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nofail"
|
||||
"users"
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=KingstonSSD"
|
||||
"exec"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/sde1" = {
|
||||
device = "/dev/disk/by-uuid/0630447f-36b0-4355-9734-8aea1c318d56";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nofail"
|
||||
"users"
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=CrucialBX500"
|
||||
"exec"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/sdf2" = {
|
||||
device = "/dev/disk/by-uuid/718f9731-8652-4146-90be-864ccde39e3f";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"compress=zstd:4"
|
||||
"x-gvfs-name=data"
|
||||
"nofail"
|
||||
"users"
|
||||
"x-gvfs-show"
|
||||
"rw"
|
||||
"exec"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/1TB\040HDD" = {
|
||||
device = "/dev/disk/by-uuid/17533a6c-2ac3-4765-b620-21214c752dc5";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"nosuid"
|
||||
"nodev"
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=1TB%20HDD"
|
||||
"exec"
|
||||
"nofail"
|
||||
"users"
|
||||
"compress=zstd:4"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/Gen4-SSD" = {
|
||||
device = "/dev/disk/by-uuid/ce2d927a-be94-476f-aa36-b1daf5d92ace";
|
||||
fsType = "auto";
|
||||
options = [
|
||||
"nosuid"
|
||||
"nodev"
|
||||
"nofail"
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=Gen4-SSD"
|
||||
"exec"
|
||||
"compress=zstd:1"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/SamsungSSD" = {
|
||||
device = "/dev/disk/by-uuid/3bf433b1-a75d-47d0-9d7f-da8efe69387e";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"nofail"
|
||||
"users"
|
||||
"exec"
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=SamsungSSD"
|
||||
"compress=zstd:1"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/2TB-WDHDD" = {
|
||||
device = "/dev/disk/by-uuid/fc8b438e-78ed-41bf-bac2-c821fd647136";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"nosuid"
|
||||
"nodev"
|
||||
"nofail"
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=2TB-WDHDD"
|
||||
"exec"
|
||||
"compress=zstd:1"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/4TB-SSD" = {
|
||||
device = "/dev/disk/by-uuid/9388e9a7-ea7b-4fb4-8062-93255a64b22f";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"nosuid"
|
||||
"nodev"
|
||||
"nofail"
|
||||
"x-gvfs-show"
|
||||
"x-gvfs-name=4TB-SSD"
|
||||
"exec"
|
||||
"compress=zstd:1"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/run/media/buymymojo/ExternalLinuxHDD" = {
|
||||
device = "/dev/disk/by-uuid/75d0408e-9e2c-47d0-aec3-cbc910d3c7d5";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"nosuid"
|
||||
"nodev"
|
||||
"nofail"
|
||||
"x-gvfs-show"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/64f19dfc-26bb-471b-81c5-ffb54e4191a5"; }
|
||||
];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
openrazer.enable = true;
|
||||
|
||||
};
|
||||
}
|
24
nixos/packages/berkeley-mono-typeface.nix
Normal file
24
nixos/packages/berkeley-mono-typeface.nix
Normal file
|
@ -0,0 +1,24 @@
|
|||
# make a derivation for berkeley-mono font installation
|
||||
{ pkgs }:
|
||||
|
||||
pkgs.stdenv.mkDerivation {
|
||||
pname = "berkeley-mono-typeface";
|
||||
version = "2.002";
|
||||
|
||||
src = "../assets/TX-02 2.002.zip";
|
||||
|
||||
unpackPhase = ''
|
||||
runHook preUnpack
|
||||
${pkgs.unzip}/bin/unzip $src
|
||||
|
||||
runHook postUnpack
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm644 "TX-02 2.002/*.ttf" -t $out/share/fonts/truetype
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue