commit e048d4d5c7fc88b125276d1cff5f80b66d3356ca Author: TheCrazyInsanity Date: Sun Dec 7 00:53:22 2025 -0500 first try diff --git a/README.md b/README.md new file mode 100644 index 0000000..92dabd8 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +This config is NOT a template, if you decide to use this DO NOT ASK FOR SUPPORT, I WILL block you. + +Anything else, feel free to ask about! + +Yes I know it's bad ^.^ \ No newline at end of file diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..5ce6604 --- /dev/null +++ b/flake.nix @@ -0,0 +1,43 @@ +{ + description = "MY NixOS configuration BITCH not yours fuck YOU honestly"; + + inputs = { + nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable"; + home-manager = { + url = "github:nix-community/home-manager/master"; + # The `follows` keyword in inputs is used for inheritance. + # Here, `inputs.nixpkgs` of home-manager is kept consistent with + # the `inputs.nixpkgs` of the current flake, + # to avoid problems caused by different versions of nixpkgs. + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { + self, + nixpkgs, + home-manager, + }@inputs: let + inherit (self) outputs; + nix.registry.nixos.flake = inputs.self; + environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath; + nix.nixPath = ["nixpkgs=${nixpkgs.outPath}"]; + in{ + nixosConfigurations = { + homepc = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs;}; + system = "x86_64-linux"; + modules = [ + ./machines/homepc/configuration.nix + { + home-manager.extraSpecialArgs = {inherit inputs outputs;}; + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + + home-manager.users.laythe = import ./machines/homepc/home.nix; + } + ] + } + } + }; +} diff --git a/global/default.nix b/global/default.nix new file mode 100644 index 0000000..f7bef3e --- /dev/null +++ b/global/default.nix @@ -0,0 +1,117 @@ +# This is for global config I DEFINITELY want on all machines, this should only include basic utilities and be relatively small. +# There is no order for where things are in this, it's a little messy. +{pkgs, ...}: +{ + time.timezone = "America/Eastern"; # Is there a better way for this? What if I'm travelling? + + # 🇺🇸 + 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 = "en_US.UTF-8"; + }; + + # TODO: Look and find out if there's a better way to configure printers, my Brother needs to be reconnected every boot :/ + services.printing.enable = true; + + services.avahi = { + enable = true; + nssmdns4 = true; + openFirewall = true; + publish = { + enable = true; + userServices = true; + }; + }; + + services.pulseaudio.enable = false; + security.rtkit.enable = true; + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + + programs.adb.enable = true; # Bit heavy but you never know when you might need it... + + users.users.laythe = { + isNormalUser = true; + description = "laythe"; + extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "jackaudio" "podman" ]; + #To make podman work + subUidRanges = [{ startUid = 100000; count = 65536; }]; + subGidRanges = [{ startGid = 100000; count = 65536; }]; + }; + + programs.appimage = { + enable = true; + binfmt = true; + package = pkgs.appimage-run.override { + extraPkgs = pkgs: [ + + ]; + }; + }; + + services.flatpak.enable = true; + programs.nix-ld.enable = true; + + nixpkgs.config.allowUnfree = true; + + nix.optimise.automatic = true; + nix.gc = { + automatic = true; + dates = "daily"; # Maybe the solution is to buy more storage for my devices :p + options = "--delete-older-than 3d"; + }; + + environment.systemPackages = with pkgs; [ + git + wget + wineWowPackages.stable # Heavy but really annoying to not have when you need it + winetricks + gparted + unrar + electrum + qpwgraph + libimobiledevice + ifuse + neofetch + gimp # Despite the fact it falls under creative an image editor is too important to leave out. + zip + xz + unzip + p7zip + dnsutils + file + which + tree + gnused + gnutar + gawk + zstd + lsof + sysstat + lm_sensors + ethtool + pciutils # lspci + usbutils # lsusb + ffmpeg-full + ]; + + services.usbmuxd = { + enable = true; + package = pkgs.usbmuxd2; + }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; +} \ No newline at end of file diff --git a/home/bash.nix b/home/bash.nix new file mode 100644 index 0000000..28e38cf --- /dev/null +++ b/home/bash.nix @@ -0,0 +1,15 @@ +{}: +{ + programs.bash = { + enable = true; + enableCompletion = true; + + bashrcExtra = '' + export PATH="$PATH:$HOME/bin:$HOME/.local/bin:$HOME/go/bin" + ''; + + shellAliases = { + activate-linux = "echo Done!"; # I am a shitposter at heart + }; + }; +} \ No newline at end of file diff --git a/home/default.nix b/home/default.nix new file mode 100644 index 0000000..62c7d07 --- /dev/null +++ b/home/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./git.nix + ./bash.nix + ]; +} \ No newline at end of file diff --git a/home/git.nix b/home/git.nix new file mode 100644 index 0000000..0a6b727 --- /dev/null +++ b/home/git.nix @@ -0,0 +1,8 @@ +{...}: +{ + programs.git = { + enable = true; + userName = "TheCrazyInsanity"; + userEmail = "notarealemailcheckmysite@thecrazyinsanity.win"; + }; +} \ No newline at end of file diff --git a/machines/homepc/configuration.nix b/machines/homepc/configuration.nix new file mode 100644 index 0000000..0c75151 --- /dev/null +++ b/machines/homepc/configuration.nix @@ -0,0 +1,136 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page, on +# https://search.nixos.org/options and in the NixOS manual (`nixos-help`). + +{ config, lib, pkgs, ... }: +{ + imports = + [ + ./hardware-configuration.nix + ../../modules/communication/default.nix + ../../modules/creative/default.nix + ../../modules/development/default.nix + ../../modules/fabrication/default.nix + ../../modules/gaming/default.nix + ../../modules/kde/default.nix + ../../modules/virtualization/default.nix + ../../modules/vr/default.nix + ]; + + # Use the systemd-boot EFI boot loader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.hostName = "homepc"; # Define your hostname. + + # Configure network connections interactively with nmcli or nmtui. + networking.networkmanager.enable = true; + + # Only computer I own that can actually run ollama, and I don't want to make an ai folder. + services.ollama = { + enable = true; + acceleration = "cuda"; + host = "[::]"; + }; + + # Set your time zone. + # time.timeZone = "Europe/Amsterdam"; + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + + # Select internationalisation properties. + # i18n.defaultLocale = "en_US.UTF-8"; + # console = { + # font = "Lat2-Terminus16"; + # keyMap = "us"; + # useXkbConfig = true; # use xkb.options in tty. + # }; + + services.xserver.enable = true; # On anything else modern this should be false. + + + + + # Configure keymap in X11 + # services.xserver.xkb.layout = "us"; + # services.xserver.xkb.options = "eurosign:e,caps:escape"; + + # Enable CUPS to print documents. + # services.printing.enable = true; + + # Enable sound. + # services.pulseaudio.enable = true; + # OR + # services.pipewire = { + # enable = true; + # pulse.enable = true; + # }; + + # Enable touchpad support (enabled default in most desktopManager). + # services.libinput.enable = true; + + # Define a user account. Don't forget to set a password with ‘passwd’. + # users.users.alice = { + # isNormalUser = true; + # extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user. + # packages = with pkgs; [ + # tree + # ]; + # }; + + # programs.firefox.enable = true; + + # List packages installed in system profile. + # You can use https://search.nixos.org/ to find more packages (and options). + # 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 + # ]; + + # 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; + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # Copy the NixOS configuration file and link it from the resulting system + # (/run/current-system/configuration.nix). This is useful in case you + # accidentally delete configuration.nix. + # system.copySystemConfiguration = true; + + # This option defines the first version of NixOS you have installed on this particular machine, + # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions. + # + # Most users should NEVER change this value after the initial install, for any reason, + # even if you've upgraded your system to a new NixOS release. + # + # This value does NOT affect the Nixpkgs version your packages and OS are pulled from, + # so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how + # to actually do that. + # + # This value being lower than the current NixOS release does NOT mean your system is + # out of date, out of support, or vulnerable. + # + # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration, + # and migrated your data accordingly. + # + # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion . + system.stateVersion = "24.11"; # Did you read the comment? + +} + diff --git a/machines/homepc/hardware-configuration.nix b/machines/homepc/hardware-configuration.nix new file mode 100644 index 0000000..536830c --- /dev/null +++ b/machines/homepc/hardware-configuration.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, modulesPath, ... }: +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + swapDevices = + [ { device = "/dev/disk/by-uuid/7762478c-1123-4a1f-9402-1bba3723e53d"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + networking.networkmanager.enable = true; + + hardware.bluetooth.enable = true; + hardware.bluetooth.powerOnBoot = true; # Fine since it's not a laptop. + + system.stateVersion = "24.11"; # No touchy +} diff --git a/machines/homepc/home.nix b/machines/homepc/home.nix new file mode 100644 index 0000000..5d62b56 --- /dev/null +++ b/machines/homepc/home.nix @@ -0,0 +1,14 @@ +{config, pkgs, lib, inputs, outputs, ...}: +{ + # These both are probably always going to be the same, but I'll keep them local just in case:tm: + home.username = "laythe"; + home.homeDirectory = "/home/laythe"; + + imports = [ + ../../home/default.nix + ]; + + home.stateVersion = "24.11"; + + programs.home-manager.enable = true; +} \ No newline at end of file diff --git a/modules/communication/default.nix b/modules/communication/default.nix new file mode 100644 index 0000000..1696d94 --- /dev/null +++ b/modules/communication/default.nix @@ -0,0 +1,8 @@ +{pkgs, ...}: +{ + environment.systemPackages = with pkgs; [ + discord + jami + element-desktop + ] +} \ No newline at end of file diff --git a/modules/creative/default.nix b/modules/creative/default.nix new file mode 100644 index 0000000..91451ff --- /dev/null +++ b/modules/creative/default.nix @@ -0,0 +1,9 @@ +{pkgs, ...}: { + environment.systemPackages = with pkgs; [ + blender + davinci-resolve + shotcut + glaxnimate + kdePackages.kdenlive + ] +} \ No newline at end of file diff --git a/modules/development/default.nix b/modules/development/default.nix new file mode 100644 index 0000000..6ca6f14 --- /dev/null +++ b/modules/development/default.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: +{ + environment.systemPackages = with pkgs [ + vscode + antigravity # Free Gemini 3 credits was too good of an offer to not take up, even if it requires selling my soul. + ]; +} \ No newline at end of file diff --git a/modules/fabrication/default.nix b/modules/fabrication/default.nix new file mode 100644 index 0000000..742887f --- /dev/null +++ b/modules/fabrication/default.nix @@ -0,0 +1,7 @@ +{pkgs, ...}: +{ + environment.systemPackages = with pkgs; [ + kicad + cura + ]; +} \ No newline at end of file diff --git a/modules/gaming/default.nix b/modules/gaming/default.nix new file mode 100644 index 0000000..45f0aac --- /dev/null +++ b/modules/gaming/default.nix @@ -0,0 +1,16 @@ +{pkgs, environment, ...}: +{ + 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 + }; + + environment.systemPackages = with pkgs; [ + obs-studio + ckan + lutris + prismlauncher + ]; +} \ No newline at end of file diff --git a/modules/kde/default.nix b/modules/kde/default.nix new file mode 100644 index 0000000..9f9f653 --- /dev/null +++ b/modules/kde/default.nix @@ -0,0 +1,12 @@ +{pkgs, ...}: +{ + # Should be determined by machine config + # services.xserver.enable = true; + services.displayManager.sddm.enable = true; + services.desktopManager.plasma6.enable = true; + + environment.systemPackages = with pkgs; [ + firefox # Odd spot, but my choice of browser is determined by environment. + kdePackages.kate + ]; +} \ No newline at end of file diff --git a/modules/virtualization/default.nix b/modules/virtualization/default.nix new file mode 100644 index 0000000..e58fdc1 --- /dev/null +++ b/modules/virtualization/default.nix @@ -0,0 +1,18 @@ +{pkgs, ...}: +{ + environment.systemPackages = with pkgs; [ + qemu + distrobox + ]; + + programs.virt-manager.enable = true; + users.groups.libvirtd.members = ["laythe"]; + virtualisation.libvirtd.enable = true; + virtualisation.spiceUSBRedirection.enable = true; + virtualisation.libvirtd.qemu.swtpm.enable = true; + + virtualisation.podman = { + enable = true; + dockerCompat = true; + }; +} \ No newline at end of file diff --git a/modules/vr/default.nix b/modules/vr/default.nix new file mode 100644 index 0000000..da31c58 --- /dev/null +++ b/modules/vr/default.nix @@ -0,0 +1,6 @@ +{pkgs, ...}: +{ + services.wivrn = { + enable = true; + }; +} \ No newline at end of file