Seperated all config stuff into common nixos modules

This commit is contained in:
chrisbell committed 2026-10-03 12:39:10 -05:00
1 parent e2d34c6d1e
commit cc15d4aaf9
10 files changed
+163 -288

No files matched your search

+17 -211
View File
@@ -1,233 +1,39 @@
{ config, inputs, pkgs, ... }:
{ pkgs, ... }:
{
imports =
[
imports = [
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
../../modules/nixos/nvidia.nix
../../modules/nixos/common.nix
../../modules/nixos/audio.nix
../../modules/nixos/shell.nix
../../modules/nixos/dev.nix
../../modules/nixos/storage.nix
../../modules/nixos/gaming.nix
../../modules/nixos/apps.nix
../../modules/nixos/portals.nix
../../modules/nixos/bspwm.nix
../../modules/nixos/nvidia.nix
../../modules/nixos/cups.nix
];
# nixpkgs.overlays = [
# (import ./ghidra-m32r-overlay.nix)
# ];
# Extra Nix Settings
nix.settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
};
programs.nix-ld.enable = true;
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos";
networking.networkmanager.enable = true;
time.timeZone = "America/Chicago";
i18n.defaultLocale = "en_US.UTF-8";
home-manager.users.chris = import ./home.nix;
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";
};
users.users.chris.extraGroups = [ "dialout" "storage" ];
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Enable Direnv
programs.direnv.enable = true;
# User Account
users.users.chris = {
isNormalUser = true;
description = "chris";
extraGroups = [ "networkmanager" "wheel" "dialout" "storage" ];
shell = pkgs.zsh;
packages = with pkgs; [
telegram-desktop
discord
ungoogled-chromium
inkscape
obsidian
sourcegit
obs-studio
r2modman
signal-desktop
kdePackages.dolphin
flameshot
vscodium
nautilus
onlyoffice-desktopeditors
vlc
orca-slicer
blender
grayjay
vlc
kdePackages.kdenlive
kicad
# ghidra
environment.systemPackages = with pkgs; [
lazygit file disktui busybox nmap screen
];
};
home-manager = {
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users."chris" = import ./home.nix;
};
programs.zsh.shellAliases.ssh-server = "ssh braincell@192.168.1.3";
# services.freenet = {
# enable = true;
# };
# Garbage Collection
nix.gc = {
automatic = true;
dates = "weekly";
persistent = true;
options = "";
};
# Mount the data drive
fileSystems."/data" = {
device = "/dev/disk/by-uuid/58c7b996-c436-47e8-8018-244417acf067";
fsType = "ext4";
options = [ "nofail" ];
};
# ZSH
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
interactiveShellInit = ''
fastfetch
'';
shellAliases = {
ll = "ls -l";
edit = "hx ~/dotfiles";
update = "sh ~/dotfiles/rebuild.sh";
ssh-server = "ssh braincell@192.168.1.3";
calc = "kalker";
n = "nvim .";
# ssh-pihole = "ssh bell@192.168.1.23";
};
histSize = 10000;
histFile = "$HOME/.zsh_history";
setOptions = [
"HIST_IGNORE_ALL_DUPS"
];
oh-my-zsh = {
enable = true;
theme = "clean";
plugins = ["git" "sudo" "direnv"];
};
};
# Steam
programs.steam.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# System Packages
environment.systemPackages = with pkgs; [
vim
wget
git
file
helix
lazygit
nixd
fastfetch
disktui
busybox
kalker
nmap
screen
btop
udiskie
];
# extra filesystems
boot.supportedFilesystems = {
exfat = true;
ntfs = true;
};
# Enable Virtualization
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
# Enable Flatpacks
services.flatpak.enable = true;
# Xdg portal
xdg.portal = {
enable = true;
extraPortals = [pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome];
# config.common.default = "";
};
# OpenSSH
services.openssh.enable = true;
# UDisks (for auto mounting)
services.udisks2 = {
enable = true;
};
services.gvfs.enable = true;
systemd.user.services.udiskie = {
description = "udiskie automount daemon";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.udiskie}/bin/udiskie --automount --notify --tray";
Restart = "always";
};
};
# Firewall
networking.firewall.allowedTCPPorts = [ 9999 ];
networking.firewall.allowedUDPPorts = [ 9999 ];
system.stateVersion = "25.11"; # Did you read the comment? DONT TOUCH :)
system.stateVersion = "25.11"; # don't change
}
+6 -77
View File
@@ -1,88 +1,17 @@
{ config, pkgs, inputs, ... }:
{ pkgs, ... }:
{
imports =
[
imports = [
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
../../modules/nixos/common.nix
../../modules/nixos/bspwm.nix
../../modules/nixos/quadro-m1000m.nix
];
# Nix options
nix.settings = {
experimental-features = ["nix-command" "flakes"];
};
networking.hostName = "p50";
home-manager.users.chris = import ./home.nix;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.hostName = "p50"; # Define your hostname.
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Chicago";
# 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 = "en_US.UTF-8";
};
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Define a user account. Don't forget to set a password with ‘passwd’.
users.users."chris" = {
isNormalUser = true;
description = "chris";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [];
};
home-manager = {
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users."chris" = import ./home.nix;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
vim
wget
helix
nixd
git
fastfetch
btop
];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
system.stateVersion = "26.05"; # Did you read the comment?
system.stateVersion = "26.05"; # don't change
}
+9
View File
@@ -0,0 +1,9 @@
{ pkgs, ... }:
{
users.users.chris.packages = with pkgs; [
telegram-desktop discord inkscape obsidian obs-studio
r2modman signal-desktop flameshot vscodium
nautilus onlyoffice-desktopeditors vlc orca-slicer blender grayjay
kdePackages.kdenlive kicad
];
}
+11
View File
@@ -0,0 +1,11 @@
{ ... }:
{
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}
+52
View File
@@ -0,0 +1,52 @@
{ pkgs, inputs, ... }:
{
imports = [ inputs.home-manager.nixosModules.default ];
nix.settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
};
nix.gc = {
automatic = true;
dates = "weekly";
persistent = true;
options = "";
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
time.timeZone = "America/Chicago";
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";
};
services.xserver.xkb = { layout = "us"; variant = ""; };
users.users.chris = {
isNormalUser = true;
description = "chris";
extraGroups = [ "networkmanager" "wheel" ];
};
home-manager = {
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
};
nixpkgs.config.allowUnfree = true;
services.openssh.enable = true;
environment.systemPackages = with pkgs; [
vim wget git helix nixd nixfmt btop fastfetch lazygit
];
}
+11
View File
@@ -0,0 +1,11 @@
{ ... }:
{
programs.nix-ld.enable = true;
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
}
+4
View File
@@ -0,0 +1,4 @@
{ ... }:
{
programs.steam.enable = true;
}
+8
View File
@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
services.flatpak.enable = true;
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gnome ];
};
}
+28
View File
@@ -0,0 +1,28 @@
{ pkgs, ... }:
{
programs.direnv.enable = true;
users.users.chris.shell = pkgs.zsh;
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
interactiveShellInit = "fastfetch";
shellAliases = {
ll = "ls -l";
calc = "kalker";
n = "nvim .";
};
histSize = 10000;
histFile = "$HOME/.zsh_history";
setOptions = [ "HIST_IGNORE_ALL_DUPS" ];
oh-my-zsh = {
enable = true;
theme = "clean";
plugins = [ "git" "sudo" "direnv" ];
};
};
environment.systemPackages = [ pkgs.kalker ];
}
+17
View File
@@ -0,0 +1,17 @@
{ pkgs, ... }:
{
boot.supportedFilesystems = { exfat = true; ntfs = true; };
services.udisks2.enable = true;
services.gvfs.enable = true;
environment.systemPackages = [ pkgs.udiskie ];
systemd.user.services.udiskie = {
description = "udiskie automount daemon";
wantedBy = [ "graphical-session.target" ];
partOf = [ "graphical-session.target" ];
serviceConfig = {
ExecStart = "${pkgs.udiskie}/bin/udiskie --automount --notify --tray";
Restart = "always";
};
};
}