Compare commits
29 Commits
50984e2fd2
..
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c71a64b8e0 | |||
| a1368bd3d1 | |||
| 34af65951f | |||
| fa292da0f0 | |||
| e27621c910 | |||
| df81919851 | |||
| 2460fe2183 | |||
| 8f706b5683 | |||
| 8b6678817e | |||
| 090547a5bd | |||
| 7cb7cee7b2 | |||
| 22ce460a57 | |||
| f4b2650aee | |||
| d8dc1f6ed5 | |||
| bf1053c4a7 | |||
| cded37b1bd | |||
| 6e01ff9341 | |||
| 78cb017442 | |||
| 5f3719e671 | |||
| 6ef243ae64 | |||
| e95e75d7f1 | |||
| 87fe75cfd2 | |||
| 2cc5ee3b97 | |||
| 0a9bc10ba6 | |||
| 9415b4b485 | |||
| 9e4ed6a05a | |||
| c311e89baa | |||
| 4b19c25083 | |||
| d0b8c154d5 |
+10
@@ -0,0 +1,10 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./artemis-hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "artemis";
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
# 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" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/c5614bab-0755-48a2-9cb0-0dc31b98371f";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/1965-42F3";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./configuration.nix
|
||||
./athena-hardware-configuration.nix
|
||||
];
|
||||
|
||||
networking.hostName = "athena";
|
||||
|
||||
services.pipewire.extraConfig.pipewire."10-low-latency" = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 48000;
|
||||
"default.clock.quantum" = 64;
|
||||
"default.clock.min-quantum" = 64;
|
||||
"default.clock.max-quantum" = 64;
|
||||
};
|
||||
};
|
||||
}
|
||||
+70
-14
@@ -5,19 +5,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Use latest kernel.
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
networking.hostName = "artemis"; # Define your hostname.
|
||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||
networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
@@ -25,7 +18,12 @@
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
plugins = with pkgs; [
|
||||
networkmanager-openvpn
|
||||
];
|
||||
};
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "America/Chicago";
|
||||
@@ -77,6 +75,33 @@
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
musnix.enable = true;
|
||||
musnix.kernel.realtime = false; # force non-RT while we tune everything else
|
||||
musnix.rtirq.enable = true; # IRQ thread priority tuning — helps USB audio specifically
|
||||
musnix.rtirq.nameList = "snd usb"; # prioritize sound + USB IRQs
|
||||
|
||||
# realtime audio shenanigans
|
||||
security.pam.loginLimits = [
|
||||
{
|
||||
domain = "@audio";
|
||||
type = "-";
|
||||
item = "rtprio";
|
||||
value = "95";
|
||||
}
|
||||
{
|
||||
domain = "@audio";
|
||||
type = "-";
|
||||
item = "memlock";
|
||||
value = "unlimited";
|
||||
}
|
||||
];
|
||||
|
||||
systemd.user.services.pipewire.serviceConfig.CPUAffinity = "8-15";
|
||||
systemd.user.services.wireplumber.serviceConfig.CPUAffinity = "8-15";
|
||||
systemd.services.rtkit-daemon.serviceConfig.CPUAffinity = "8-15";
|
||||
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
@@ -84,14 +109,14 @@
|
||||
users.users."cybrneko" = {
|
||||
isNormalUser = true;
|
||||
description = "cybrneko";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
extraGroups = [ "networkmanager" "wheel" "audio" ];
|
||||
packages = with pkgs; [
|
||||
# thunderbird
|
||||
];
|
||||
};
|
||||
|
||||
# Install firefox.
|
||||
programs.firefox.enable = true;
|
||||
# programs.firefox.enable = true;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
@@ -102,9 +127,15 @@
|
||||
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
git
|
||||
#gnomeExtensions.dash-to-dock
|
||||
#gnomeExtensions.gsconnect
|
||||
#gnomeExtensions.caffeine
|
||||
wine
|
||||
yabridge
|
||||
yabridgectl
|
||||
qpwgraph
|
||||
hydrapaper
|
||||
nextcloud-client
|
||||
fastfetch
|
||||
epson-escpr2
|
||||
gnome-tweaks
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
@@ -119,10 +150,35 @@
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
services.flatpak.enable = true;
|
||||
|
||||
# Enable Nintendo Switch Cartridge dumping
|
||||
|
||||
services.udev.packages = [
|
||||
(pkgs.writeTextFile{
|
||||
name = "nxdumptool-udev";
|
||||
destination = "/etc/udev/rules.d/71-nxdumptool.rules";
|
||||
text = builtins.readFile ./udev/71-nxdumptool.rules;
|
||||
})
|
||||
];
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1235", ATTR{power/control}="on"
|
||||
'';
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Open ports in the firewall.
|
||||
networking.firewall = {
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 1714; to = 1764; }
|
||||
];
|
||||
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 1714; to = 1764; }
|
||||
];
|
||||
};
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
|
||||
Generated
+52
-1
@@ -21,7 +21,56 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"musnix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1777848538,
|
||||
"narHash": "sha256-Dj51C0NWsglqRrCpdmMr2nFiYacFOid1Tor4H9yG2HY=",
|
||||
"owner": "musnix",
|
||||
"repo": "musnix",
|
||||
"rev": "8548782f0d1d0928daa3fffde8a008f72219a3f3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "musnix",
|
||||
"repo": "musnix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-flatpak": {
|
||||
"locked": {
|
||||
"lastModified": 1780908363,
|
||||
"narHash": "sha256-llGS4y3Qh1eUkli3/Y2VY9FV3GOUKFZR1E2BDftt45Q=",
|
||||
"owner": "gmodena",
|
||||
"repo": "nix-flatpak",
|
||||
"rev": "1df08625f0f8c7d6e300a0e5df7955bbb877d809",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gmodena",
|
||||
"repo": "nix-flatpak",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1777268161,
|
||||
"narHash": "sha256-bxrdOn8SCOv8tN4JbTF/TXq7kjo9ag4M+C8yzzIRYbE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "1c3fe55ad329cbcb28471bb30f05c9827f724c76",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1782847225,
|
||||
"narHash": "sha256-JC9PjqKYG9ve5U8aDOLQipp3+KLANBHUvGdLZlxzdKI=",
|
||||
@@ -40,7 +89,9 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"musnix": "musnix",
|
||||
"nix-flatpak": "nix-flatpak",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak";
|
||||
musnix.url = "github:musnix/musnix";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-26.05";
|
||||
@@ -10,24 +12,46 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, home-manager, ... }:
|
||||
outputs = { self, nixpkgs, home-manager, nix-flatpak, musnix, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
./configuration.nix
|
||||
commonModules = [
|
||||
musnix.nixosModules.musnix
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.cybrneko = import ./home.nix;
|
||||
}
|
||||
|
||||
home-manager.users.cybrneko = { pkgs, ... }: {
|
||||
imports = [
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
./home.nix
|
||||
./users/cybrneko.nix
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
artemis = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
./artemis.nix
|
||||
] ++ commonModules;
|
||||
};
|
||||
|
||||
athena = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
./athena.nix
|
||||
] ++ commonModules;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,81 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, nix-flatpak, ... }:
|
||||
|
||||
{
|
||||
home.stateVersion = "26.05";
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
home-manager
|
||||
gnomeExtensions.dash-to-dock
|
||||
gnomeExtensions.gsconnect
|
||||
gnomeExtensions.caffeine
|
||||
gnomeExtensions.status-tray
|
||||
];
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
button-layout = "close,minimize,maximize:";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
switch-applications = [ ];
|
||||
switch-windows = [ "<Alt>Tab" "<Super>Tab" ];
|
||||
activate-window-menu = [ ];
|
||||
};
|
||||
|
||||
"org/gnome/shell/keybindings" = {
|
||||
activate-window-menu = [ ];
|
||||
toggle-overview = [ "<Alt>space" ];
|
||||
};
|
||||
|
||||
"org/gnome/shell" = {
|
||||
enabled-extensions = [
|
||||
"dash-to-dock@micxgx.gmail.com"
|
||||
"gsconnect@andyholmes.github.io"
|
||||
"caffeine@patapon.info"
|
||||
"status-tray@keithvassallo.com"
|
||||
];
|
||||
|
||||
disabled-extensions = [ ];
|
||||
|
||||
always-show-log-out = true;
|
||||
|
||||
favorite-apps = [
|
||||
"io.gitlab.librewolf-community.desktop"
|
||||
"im.fluffychat.Fluffychat.desktop"
|
||||
"dev.vencord.Vesktop.desktop"
|
||||
"steam.desktop"
|
||||
"org.gnome.Console.desktop"
|
||||
"org.gnome.Nautilus.desktop"
|
||||
"com.renoise.Renoise.desktop"
|
||||
"com.lwks.Lightworks.desktop"
|
||||
"com.bitwig.BitwigStudio.desktop"
|
||||
"org.gimp.GIMP.desktop"
|
||||
"org.libreoffice.LibreOffice.writer.desktop"
|
||||
"org.libreoffice.LibreOffice.calc.desktop"
|
||||
];
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/caffeine" = {
|
||||
show-indicator = "always";
|
||||
};
|
||||
|
||||
"org/gnome/shell/extensions/status-tray" = {
|
||||
icon-mode = "original";
|
||||
};
|
||||
|
||||
"org/gnome/desktop/interface" = {
|
||||
enable-hot-corners = false;
|
||||
};
|
||||
};
|
||||
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
|
||||
packages = [
|
||||
"com.github.tchx84.Flatseal"
|
||||
"io.gitlab.librewolf-community"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# cybrneko's nixOS config
|
||||
This is just a repo to store (And back up) my nixOS configuration
|
||||
Executable
+79
@@ -0,0 +1,79 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
WP_DIR="$HOME/Pictures/Wallpapers"
|
||||
aspect_name() {
|
||||
local w="$1"
|
||||
local h="$2"
|
||||
local a="$w"
|
||||
local b="$h"
|
||||
local t
|
||||
local aspect
|
||||
|
||||
while (( b != 0 )); do
|
||||
t=$b
|
||||
b=$(( a % b ))
|
||||
a=$t
|
||||
done
|
||||
|
||||
aspect="$(( w / a ))x$(( h / a ))"
|
||||
|
||||
case "$aspect" in
|
||||
64x27|43x18)
|
||||
echo "21x9"
|
||||
;;
|
||||
8x5)
|
||||
echo "16x10"
|
||||
;;
|
||||
*)
|
||||
echo "$aspect"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
process_wallpapers() {
|
||||
wallpapers=()
|
||||
while read -r line; do
|
||||
if [[ "$line" == *"+*"* ]]; then
|
||||
role="primary"
|
||||
else
|
||||
role="secondary"
|
||||
fi
|
||||
|
||||
geom="$(awk '{print $3}' <<< "$line")"
|
||||
|
||||
width="${geom%%/*}"
|
||||
rest="${geom#*x}"
|
||||
height="${rest%%/*}"
|
||||
|
||||
aspect="$(aspect_name "$width" "$height")"
|
||||
wallpapers+=("$WP_DIR/$aspect-$role.png")
|
||||
done < <(xrandr --listmonitors | tail -n +2)
|
||||
|
||||
count="${#wallpapers[@]}"
|
||||
|
||||
modes=()
|
||||
for (( i=0; i<${#wallpapers[@]}; i++ )); do
|
||||
modes+=("zoom")
|
||||
done
|
||||
|
||||
echo "${wallpapers[@]}"
|
||||
|
||||
hydrapaper --cli "${wallpapers[@]}" --mode "${modes[@]}"
|
||||
}
|
||||
|
||||
last_applied=""
|
||||
pending=""
|
||||
|
||||
while true; do
|
||||
current="$(xrandr --query 2>/dev/null | grep ' connected' || true)"
|
||||
|
||||
if [[ "$current" != "$pending" ]]; then
|
||||
pending="$current"
|
||||
elif [[ "$current" != "$last_applied" ]]; then
|
||||
last_applied="$current"
|
||||
process_wallpapers
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
done
|
||||
@@ -0,0 +1,2 @@
|
||||
# Nintendo SDK debugger, which nxdumptool presents itself as
|
||||
SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", TAG+="uaccess"
|
||||
@@ -0,0 +1,32 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../utilities/autowallpaper.nix
|
||||
];
|
||||
|
||||
home.activation.createAudioDirectories =
|
||||
lib.hm.dag.entryAfter [ "writeBoundary" ] ''
|
||||
mkdir -p \
|
||||
"$HOME/.local/share/audio/vst" \
|
||||
"$HOME/.local/share/audio/vst3" \
|
||||
"$HOME/.local/share/audio/ladspa" \
|
||||
"$HOME/.local/share/audio/dssi"
|
||||
'';
|
||||
|
||||
home.packages = with pkgs; [
|
||||
steam
|
||||
];
|
||||
|
||||
services.flatpak = {
|
||||
enable = true;
|
||||
|
||||
packages = [
|
||||
"dev.vencord.Vesktop"
|
||||
"im.fluffychat.Fluffychat"
|
||||
"org.videolan.VLC"
|
||||
"org.libreoffice.LibreOffice"
|
||||
"org.gimp.GIMP"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
wallpaperWatch = pkgs.writeShellScriptBin "wallpaper-watch"
|
||||
(builtins.readFile ../scripts/wallpaper-watch.sh);
|
||||
in
|
||||
{
|
||||
home.packages = [
|
||||
wallpaperWatch
|
||||
];
|
||||
|
||||
systemd.user.services.wallpaper-watcher = {
|
||||
Unit = {
|
||||
Description = "Dynamic wallpaper watcher";
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${wallpaperWatch}/bin/wallpaper-watch";
|
||||
Restart = "always";
|
||||
RestartSec = 2;
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user