commit 1eb403d282a13b13c360d1fce20e61016725cfe6 Author: Leo Coogan Date: Fri Oct 24 20:47:58 2025 -0400 initial commit diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..5727cb4 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,621 @@ +# 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, ... }: +/* +# unstable. channel option +let + unstable = import + (builtins.fetchTarball https://github.com/NixOS/nixpkgs-channels/archive/nixos-unstable.tar.gz) + # reuse the current configuration + { config = config.nixpkgs.config; }; +in +*/ + +let + unstable = import { }; +in + + + + +{ +#Speed up builds with remote builds + nix.buildMachines = [{ + hostName = "server"; + system = "x86_64-linux"; + protocol = "ssh"; + + #maxJobs = 1; + #speedFactor = 2; + #supportedFeatures = [ "nixos-test" "benchmark" "big-parallel" "kvm" ]; + #mandatoryFeatures = [ ]; + }]; + nix.distributedBuilds = true; + # optional, useful when the builder has a faster internet connection than yours + nix.extraOptions = '' + builders-use-substitutes = true + ''; + + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + + + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + + ]; + +# Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.initrd.luks.devices."luks-38732dd0-b562-475f-83db-9a2f8a0b0775".device = "/dev/disk/by-uuid/38732dd0-b562-475f-83db-9a2f8a0b0775"; + + + + networking.hostName = "razer"; # 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; + + networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; + + services.resolved = { + enable = true; + dnssec = "true"; + domains = [ "~." ]; + fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; + extraConfig = '' + DNSOverTLS=yes + ''; + }; + + +# Set your time zone. + time.timeZone = "America/New_York"; + +# Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "C.UTF-8"; + }; + +# Enable the X11 windowing system. + services.xserver.enable = true; + +# Enable the GNOME Desktop Environment. + services.xserver.displayManager.gdm.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + +environment.pathsToLink = [ "/libexec" ]; + +#services.xserver = { +#desktopManager.xterm.enable = false; +#displayManager.defaultSession = "none+i3"; + +/* +windowManager.i3 = { + enable = true; + extraPackages = with pkgs; [ + dmenu + i3status + i3lock + i3blocks + ]; +}; +};o +*/ +#}; + + +# Remove unwanted gnome packages + environment.gnome.excludePackages = [ pkgs.gnome-connections pkgs.cheese pkgs.gnome-photos pkgs.gnome-music pkgs.gedit pkgs.totem pkgs.gnome-tour pkgs.xterm pkgs.epiphany]; + +# Configure keymap in X11 + services.xserver.xkb = { + layout = "us"; + variant = "dvorak-alt-intl"; + }; + +# Configure console keymap + console.keyMap = "dvorak"; + +# Enable CUPS to print documents. + services.printing.enable = true; + +# Enable sound with pipewire. + services.pulseaudio.enable = false; + security.rtkit.enable = true; + security.sudo.wheelNeedsPassword = false; + 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; + +wireplumber.enable = true; + }; + +# Set proper audio plugin paths +musnix.enable = true; + +# Enable touchpad support (enabled default in most desktopManager). +# services.xserver.libinput.enable = true; + + +# Define a user account. Don't forget to set a password with ‘passwd’. + users.users.test = { + isNormalUser = true; + packages = with pkgs; [ + terminator + neovim + ]; + }; + + users.users.lcoogan = { + isNormalUser = true; + description = "Leo Coogan"; + extraGroups = [ "networkmanager" "wheel" "audio" "scanner" "lp" ]; + packages = with pkgs; [ + zrythm + #shadered #broked + + #helio-workstation + sequoia-chameleon-gnupg + sequoia-sq + ghc + haskellPackages.hsc3 + ossia-score + + gajim + minicom + #godot + fractal + #orca-c + transmission_4-gtk + nix-index + glslviewer + progress + rofi + tk + #zoom-us + tcl + blender + puredata + #steam + xorg.xkill + #bottles + vulkan-tools + #yabridge + #yabridgectl +#reaper +#bitwig-studio +#renoise + + #gnome.gnome-boxes + easytag + qjackctl + carla + #distrho-ports + stochas + + # standalone synths + helm + surge + zynaddsubfx + vital + dexed + + glxinfo + graphviz + #aegisub + #kdenlive + xclip +usbmuxd +ifuse +libimobiledevice + + show-midi + ungoogled-chromium + nixpkgs-review + instaloader + gallery-dl + pb_cli + steam-run + nicotine-plus + anki + kdePackages.parley + + duf + hydra-check + tldr + nix-tree + terminator + jpegoptim + opusTools + telegram-desktop + eog + + #instaloader + #gallery-dl + +#chromium +#easyeffects +img2pdf +pipreqs +tenacity +zip + + + + + virtualenv + + # Sound + lmms + #polyphone + + + gnome-tweaks + appimage-run + #gnome.gnome-boxes + #tenacity + tmux + nchat + whatsapp-for-linux + + man-pages + man-pages-posix + + killall + asciinema + unstable.novelwriter + paperkey + vlc + ardour + #librewolf + #what's a minimal pdf engine for pandoc? https://pandoc.org/MANUAL.html#option--pdf-engine + pandoc + tea + dos2unix + clang + groff + pipx + figlet + kid3 + fdupes + tor-browser-bundle-bin + wineWowPackages.staging + #winetricks + poppler_utils + #gst-plugins-good + go + hugo + mullvad + zathura + + gmic + #gimp + #gmic-qt + gimp3-with-plugins + + #chuck + unstable.hledger + hledger-web + unstable.hledger-iadd + firefox + librewolf + vdhcoapp + thunderbird +#neomutt + pass +passExtensions.pass-update +passExtensions.pass-otp +passExtensions.pass-genphrase +passExtensions.pass-file +passExtensions.pass-audit + + #qbittorrent # has a CVE + btop + lf + alacritty + libreoffice + syncthing + wl-clipboard + hamster + supercollider-with-sc3-plugins + tilix + yt-dlp + mpv + + # RE + cutter + cutterPlugins.rz-ghidra + hexedit + gdb + rizin + #ghidra + + hunspell + hunspellDicts.en_US + + sshfs-fuse + imv + speedtest-cli + sourceHighlight + imagemagick + file + neofetch + pinentry-gnome3 + wget + aria2 + + #ffmpeg-full + #x265 + ffmpeg + mediainfo + + trash-cli + gcc + git + lazygit + #vimPlugins.lazygit-nvim + #yt-dlp + pastebinit + #python3.pkgs.miasm #doesn't work + python3 + plocate + cmake + gnumake + unzip + #wine64 + unrar-wrapper + pavucontrol + quodlibet-full + + ]; + }; + +# Enable automatic login for the user. + services.displayManager.autoLogin.enable = true; + services.displayManager.autoLogin.user = "lcoogan"; + + +# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229 + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@tty1".enable = false; + +# For dumb terminal + #systemd.services."serial-getty@ttyUSB0".enable = true; #for some reason breaks graphical input. + +# Allow unfree + nixpkgs.config.allowUnfree = true; + nixpkgs.config.cudaSupport = true; + +# List packages installed in system profile. To search, run: +# $ nix search wget + + + environment.systemPackages = with pkgs; [ + #helvum + #easyeffects + ]; + + + programs.neovim = { + enable = true; + defaultEditor = true; + + viAlias = true; + vimAlias = true; + + /* extraPackages = with pkgs.vimPlugins; [ + scnvim + ]; */ + }; + + + programs.zsh.enable = true; + users.defaultUserShell = pkgs.zsh; + environment.binsh = "${pkgs.dash}/bin/dash"; + + # manpages + documentation.dev.enable = true; + documentation.man.generateCaches = true; #automatically rebuild the mandb cache + +# 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; + #pinentryFlavor = "gnome3"; + }; + services.pcscd.enable = true; + +# List services that you want to enable: +#services.resilio.enable = true; + +#services.flatpak.enable = true; + +# systemd.services.flatpak-repo = { +# wantedBy = [ "multi-user.target" ]; +# path = [ pkgs.flatpak ]; +# script = '' +# flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo +# ''; +# }; + + +# Enable the OpenSSH daemon. + services.openssh.enable = true; + + services.locate.enable = true; + + services.mullvad-vpn.enable = false; + +# Open ports in the firewall. +# networking.firewall.allowedTCPPorts = [ ... ]; +# networking.firewall.allowedUDPPorts = [ ... ]; +# Or disable the firewall altogether. +# networking.firewall.enable = false; + +# 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 = "23.05"; # Did you read the comment? + + + + + + nixpkgs.overlays = [ + (self: super: { + lmms = super.lmms.overrideAttrs { + version = "1.3.0-alpha.1"; + src = pkgs.fetchFromGitHub { + owner = "LMMS"; + repo = "lmms"; + rev = "bda042e1eb59e4c7508faa072051c50c2e12894d"; + sha256 = "sha256-EGJcTzPUkIqURHKjX6dTRkeRTqwHM8eG74lYVILgSAs"; + fetchSubmodules = true; + }; + patches = []; + }; + }) + ]; + + + +# Static Web Server +#services.static-web-server = { +# enable = true; +# root = "/home/lcoogan/Public"; +#}; + + +nix.gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; +}; + + + + + + +# NVIDIA drivers +# Note: because NVIDIA is evil, this will break graphical output on the builtin monitor + +# Enable OpenGL + hardware.opengl = { + enable = true; + #driSupport = true; + driSupport32Bit = true; + extraPackages = with pkgs; [ + vulkan-loader + vulkan-validation-layers + nvidia-vaapi-driver + libvdpau + ]; + extraPackages32 = with pkgs.pkgsi686Linux; [ + vulkan-loader + ]; + }; +/* +evaluation warning: The option `hardware.opengl.extraPackages32' defined in `/etc/nixos/configuration.nix' has been renamed to `hardware.graphics.extraPackages32'. +evaluation warning: The option `hardware.opengl.extraPackages' defined in `/etc/nixos/configuration.nix' has been renamed to `hardware.graphics.extraPackages'. +evaluation warning: The option `hardware.opengl.driSupport32Bit' defined in `/etc/nixos/configuration.nix' has been renamed to `hardware.graphics.enable32Bit'. +evaluation warning: The option `hardware.opengl.enable' defined in `/etc/nixos/configuration.nix' has been renamed to `hardware.graphics.enable'. +*/ + + + + +# Load nvidia driver for Xorg and Wayland + services.xserver.videoDrivers = ["nvidia"]; # or "nvidiaLegacy470 etc. + +systemd.services.nvidia-control-devices = { + wantedBy = [ "multi-user.target" ]; + serviceConfig.ExecStart = "${pkgs.linuxPackages.nvidia_x11.bin}/bin/nvidia-smi"; +}; + +hardware.graphics.enable = true; + + hardware.nvidia = { + +# Modesetting is required. + modesetting.enable = true; + +# Nvidia power management. Experimental, and can cause sleep/suspend to fail. +# Enable this if you have graphical corruption issues or application crashes after waking +# up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead +# of just the bare essentials. + powerManagement.enable = false; + +# Fine-grained power management. Turns off GPU when not in use. +# Experimental and only works on modern Nvidia GPUs (Turing or newer). + powerManagement.finegrained = false; + +# Use the NVidia open source kernel module (not to be confused with the +# independent third-party "nouveau" open source driver). +# Support is limited to the Turing and later architectures. Full list of +# supported GPUs is at: +# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus +# Only available from driver 515.43.04+ +# Currently alpha-quality/buggy, so false is currently the recommended setting. + open = false; + +# Enable the Nvidia settings menu, +# accessible via `nvidia-settings`. + nvidiaSettings = true; + +# Optionally, you may need to select the appropriate driver version for your specific GPU. +package = config.boot.kernelPackages.nvidiaPackages.stable; + + }; + + + + + hardware.sane.enable = true; + + + +#programs.virt-manager.enable = true; +users.groups.libvirtd.members = ["lcoogan"]; +virtualisation.libvirtd.enable = true; +virtualisation.spiceUSBRedirection.enable = true; + + +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..058dabb --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,42 @@ +# 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" "usb_storage" "usbhid" "sd_mod" "sr_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/48f4c46d-1f1f-4f4b-a458-fc597f3609e7"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-cc35047c-935c-4259-b00b-12c9dbbfb0a7".device = "/dev/disk/by-uuid/cc35047c-935c-4259-b00b-12c9dbbfb0a7"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/0134-B668"; + fsType = "vfat"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/aa6c6a1a-7725-44f2-932c-474afb6da713"; } + ]; + + # 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}