New machine

This commit is contained in:
Henry Hiles 2023-12-04 18:07:03 -05:00
commit 2fc4f2dd4a
9 changed files with 320 additions and 54 deletions

BIN
quadtop/background.jpg Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 KiB

166
quadtop/configuration.nix Executable file
View file

@ -0,0 +1,166 @@
{
pkgs,
inputs,
nixpkgs,
...
}: {
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
plymouth.enable = true;
kernelPackages = pkgs.linuxPackages_zen;
kernelParams = ["sysrq_always_enabled=1"];
};
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
nvidia = {
prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
intelBusId = "PCI:00:02:0";
nvidiaBusId = "PCI:01:00:0";
};
open = false;
nvidiaSettings = false;
modesetting.enable = true;
nvidiaPersistenced = true;
dynamicBoost.enable = true;
};
};
networking = {
hostName = "quadtop";
networkmanager.enable = true;
};
nix.settings = {
substituters = ["https://nix-gaming.cachix.org"];
trusted-public-keys = ["nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="];
};
nixpkgs.config.permittedInsecurePackages = [
"electron-24.8.6"
];
services = {
earlyoom = {
enable = true;
enableNotifications = true;
};
xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
layout = "us";
videoDrivers = ["nvidia"];
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
lowLatency.enable = true;
};
avahi = {
enable = true;
nssmdns = true;
openFirewall = true;
};
gpm.enable = true;
printing.enable = true;
auto-cpufreq.enable = true;
};
environment = {
shellAliases = {
neofetch = "neowofetch";
};
sessionVariables = {
MANGOHUD = "1";
EDITOR = "micro";
VISUAL = "micro";
fish_greeting = "";
NIXOS_OZONE_WL = "1";
GAMEMODERUNEXEC = "nvidia-offload";
};
systemPackages = with pkgs; ([
fd
tldr
tuba
gimp
heroic
aspell
nodejs
ntfs3g
killall
ripgrep
hyfetch
inkscape
r2modman
pciutils
alejandra
grapejuice
impression
libreoffice
virt-manager
wl-clipboard
protontricks
android-studio
nodePackages.pnpm
hunspellDicts.en_CA-large
inputs.nix-gaming.packages.${system}.wine-ge
inputs.nixpkgs-local.legacyPackages.${system}.monophony
]
++ (with gnomeExtensions; [
caffeine
pop-shell
appindicator
search-light
blur-my-shell
just-perfection
burn-my-windows
fullscreen-avoider
compiz-windows-effect
]));
};
programs = {
steam = {
enable = true;
package = pkgs.steam.override {
extraProfile = "export STEAM_EXTRA_COMPAT_TOOLS_PATHS='${inputs.nix-gaming.packages.${pkgs.system}.proton-ge}'";
};
};
gamemode.enable = true;
noisetorch.enable = true;
fish.interactiveShellInit = "neofetch";
};
zramSwap = {
enable = true;
memoryPercent = 100;
};
system.stateVersion = "23.05";
sound.enable = true;
hardware.pulseaudio.enable = false;
virtualisation.libvirtd.enable = true;
}

View file

@ -0,0 +1,47 @@
# 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 = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod"];
kernelModules = [];
};
kernelModules = ["kvm-intel"];
extraModulePackages = [];
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/f4b1301b-c329-4c3c-9f3a-5584bc22d0c1";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3B50-5881";
fsType = "vfat";
};
swapDevices = [];
# 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.enp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

28
quadtop/home-manager.nix Executable file
View file

@ -0,0 +1,28 @@
{inputs, ...}: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.users.quadradical = {
home = {
username = "quadradical";
homeDirectory = "/home/quadradical";
};
};
home-manager.sharedModules = [
{
programs.home-manager.enable = true;
home.stateVersion = "23.11";
}
../home-manager/gtk.nix
../home-manager/bat.nix
../home-manager/eza.nix
../home-manager/git.nix
../home-manager/btop.nix
../home-manager/vscode.nix
../home-manager/direnv.nix
../home-manager/firefox.nix
../home-manager/neofetch.nix
../home-manager/mangohud.nix
../home-manager/sway.nix
];
}

41
quadtop/stylix.nix Executable file
View file

@ -0,0 +1,41 @@
{pkgs, ...}: {
stylix = {
polarity = "dark";
image = ./background.jpg;
base16Scheme = "${pkgs.base16-schemes}/share/themes/nord.yaml";
targets.plymouth.blackBackground = false;
cursor = {
name = "GoogleDot-Blue";
package = pkgs.google-cursor;
size = 24;
};
fonts = {
serif = {
name = "Cantarell";
package = pkgs.cantarell-fonts;
};
sansSerif = {
name = "Cantarell";
package = pkgs.cantarell-fonts;
};
monospace = {
name = "FiraCode Nerd Font";
package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
};
emoji = {
name = "Twitter Color Emoji";
package = pkgs.twitter-color-emoji;
};
sizes = {
applications = 11;
desktop = 11;
};
};
};
}