New machine

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

54
flake.lock generated
View file

@ -133,11 +133,11 @@
"firefox-gnome-theme": {
"flake": false,
"locked": {
"lastModified": 1700665519,
"narHash": "sha256-OBik0+k54JOK9C+6AlP8dchXhAdjgP8V4mQ/ErDKGYU=",
"lastModified": 1701370547,
"narHash": "sha256-pCtPIcRnMMJOwAlNh5qTO00uw/PBThIIzjMCRcCyHYw=",
"owner": "rafaelmardojai",
"repo": "firefox-gnome-theme",
"rev": "1208b24818388416e5376967b8e89a1b13d1bf31",
"rev": "ec9421f82d922b7293ffd45a47f7abdee80038c6",
"type": "github"
},
"original": {
@ -167,11 +167,11 @@
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1698882062,
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
"lastModified": 1701473968,
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
"type": "github"
},
"original": {
@ -203,11 +203,11 @@
]
},
"locked": {
"lastModified": 1701071203,
"narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=",
"lastModified": 1701728041,
"narHash": "sha256-x0pyrI1vC8evVDxCxyO6olOyr4wlFg9+VS3C3p4xFYQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86",
"rev": "ac7216918cd65f3824ba7817dea8f22e61221eaf",
"type": "github"
},
"original": {
@ -243,11 +243,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1700961605,
"narHash": "sha256-nN5m0OhqmD0gxtpXDvXyqCPQux9L/o1Yr1ALKoaOT9o=",
"lastModified": 1701611132,
"narHash": "sha256-roFYOQhIrZ0DUlWbughOwHzx/PoEMrK0inJbFeuOySg=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "076d7864a6c2d02e41325c03ad3200a8a3739763",
"rev": "6a885e460cf8596aa23d6f043aa10219494f1da8",
"type": "github"
},
"original": {
@ -258,11 +258,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1700856099,
"narHash": "sha256-RnEA7iJ36Ay9jI0WwP+/y4zjEhmeN6Cjs9VOFBH7eVQ=",
"lastModified": 1701336116,
"narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0bd59c54ef06bc34eca01e37d689f5e46b3fe2f1",
"rev": "f5c27c6136db4d76c30e533c20517df6864c46ee",
"type": "github"
},
"original": {
@ -275,11 +275,11 @@
"nixpkgs-lib": {
"locked": {
"dir": "lib",
"lastModified": 1698611440,
"narHash": "sha256-jPjHjrerhYDy3q9+s5EAsuhyhuknNfowY6yt6pjn9pc=",
"lastModified": 1701253981,
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0cbe9f69c234a7700596e943bfae7ef27a31b735",
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
"type": "github"
},
"original": {
@ -307,11 +307,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1701068326,
"narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=",
"lastModified": 1701436327,
"narHash": "sha256-tRHbnoNI8SIM5O5xuxOmtSLnswEByzmnQcGGyNRjxsE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c",
"rev": "91050ea1e57e50388fa87a3302ba12d188ef723a",
"type": "github"
},
"original": {
@ -345,11 +345,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1701256966,
"narHash": "sha256-1B5yz4eQwcoHDUE5QwpQm5X+3KdXFKAa1JRjagP8JU4=",
"lastModified": 1701724946,
"narHash": "sha256-U5Q21HDFz3Ba31bqYhB/mfiJKOSD0s2Dc4aeNG6CcXo=",
"owner": "wamserma",
"repo": "flake-programs-sqlite",
"rev": "b2da1b93ad22223fcf63794a47e4ee6130fd52a6",
"rev": "7d5f27049db2261da0b2da5a2fcc168ef9511ed2",
"type": "github"
},
"original": {
@ -384,11 +384,11 @@
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1700923005,
"narHash": "sha256-j1Isg4ln4bfgSGuETvYPzEdEIRc/tBPpLqXa+bfvBf0=",
"lastModified": 1701532764,
"narHash": "sha256-Jrizp/nITbul2HBIraQRDw5lyJnzTsj0K9wZUFYX2gg=",
"owner": "danth",
"repo": "stylix",
"rev": "8b3f61727f3b86c27096c3c014ae602aa40670ba",
"rev": "17a452c5d58bb90057d49c7e3e613b5e6dc1c0f4",
"type": "github"
},
"original": {

View file

@ -50,6 +50,7 @@
in {
nixosConfigurations = {
"quadraticpc" = system "quadraticpc";
"quadtop" = system "quadtop";
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;

View file

@ -1,4 +1,8 @@
{pkgs, lib, ...}: {
{
pkgs,
lib,
...
}: {
programs.vscode = {
enable = true;
package = pkgs.vscodium;

View file

@ -14,31 +14,12 @@
kernelParams = ["sysrq_always_enabled=1"];
};
hardware = {
opengl = {
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 = "quadraticpc";
networkmanager.enable = true;
@ -64,7 +45,6 @@
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
layout = "us";
videoDrivers = ["nvidia"];
};
pipewire = {
@ -97,7 +77,6 @@
VISUAL = "micro";
fish_greeting = "";
NIXOS_OZONE_WL = "1";
GAMEMODERUNEXEC = "nvidia-offload";
};
systemPackages = with pkgs; ([
@ -117,8 +96,8 @@
pciutils
alejandra
grapejuice
impression
libreoffice
mediawriter
virt-manager
wl-clipboard
protontricks

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;
};
};
};
}