first try
This commit is contained in:
5
README.md
Normal file
5
README.md
Normal file
@@ -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 ^.^
|
||||
43
flake.nix
Normal file
43
flake.nix
Normal file
@@ -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;
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
117
global/default.nix
Normal file
117
global/default.nix
Normal file
@@ -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" ];
|
||||
}
|
||||
15
home/bash.nix
Normal file
15
home/bash.nix
Normal file
@@ -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
|
||||
};
|
||||
};
|
||||
}
|
||||
6
home/default.nix
Normal file
6
home/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
imports = [
|
||||
./git.nix
|
||||
./bash.nix
|
||||
];
|
||||
}
|
||||
8
home/git.nix
Normal file
8
home/git.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{...}:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "TheCrazyInsanity";
|
||||
userEmail = "notarealemailcheckmysite@thecrazyinsanity.win";
|
||||
};
|
||||
}
|
||||
136
machines/homepc/configuration.nix
Normal file
136
machines/homepc/configuration.nix
Normal file
@@ -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?
|
||||
|
||||
}
|
||||
|
||||
28
machines/homepc/hardware-configuration.nix
Normal file
28
machines/homepc/hardware-configuration.nix
Normal file
@@ -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
|
||||
}
|
||||
14
machines/homepc/home.nix
Normal file
14
machines/homepc/home.nix
Normal file
@@ -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;
|
||||
}
|
||||
8
modules/communication/default.nix
Normal file
8
modules/communication/default.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
discord
|
||||
jami
|
||||
element-desktop
|
||||
]
|
||||
}
|
||||
9
modules/creative/default.nix
Normal file
9
modules/creative/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
blender
|
||||
davinci-resolve
|
||||
shotcut
|
||||
glaxnimate
|
||||
kdePackages.kdenlive
|
||||
]
|
||||
}
|
||||
7
modules/development/default.nix
Normal file
7
modules/development/default.nix
Normal file
@@ -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.
|
||||
];
|
||||
}
|
||||
7
modules/fabrication/default.nix
Normal file
7
modules/fabrication/default.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
kicad
|
||||
cura
|
||||
];
|
||||
}
|
||||
16
modules/gaming/default.nix
Normal file
16
modules/gaming/default.nix
Normal file
@@ -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
|
||||
];
|
||||
}
|
||||
12
modules/kde/default.nix
Normal file
12
modules/kde/default.nix
Normal file
@@ -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
|
||||
];
|
||||
}
|
||||
18
modules/virtualization/default.nix
Normal file
18
modules/virtualization/default.nix
Normal file
@@ -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;
|
||||
};
|
||||
}
|
||||
6
modules/vr/default.nix
Normal file
6
modules/vr/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{pkgs, ...}:
|
||||
{
|
||||
services.wivrn = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user