Configuration Cleanup

- Removed inaccurate comments
- Refactored browsers to independent nixes
- Small code changes for clarity
This commit is contained in:
Chris Toph 2025-05-29 15:25:49 -04:00
parent aaa3a0af4a
commit 3523b82392
57 changed files with 70 additions and 273 deletions

View file

@ -1,6 +0,0 @@
{
imports = [
# ./chromium.nix
./zen.nix
];
}

View file

@ -4,7 +4,7 @@
...
}:
let
# FIXME(xdg): That should use config options and just reference whatever is configured as the default
# FIXME: Should use config options and just reference whatever is configured as the default
files = [ "org.gnome.Nautilus.desktop" ];
browser = [ "zen.desktop" ];
editor = [ "code.desktop" ];

View file

@ -1,22 +1,3 @@
{
lib,
pkgs,
...
}:
{
# imports = lib.flatten [
# ## Common Imports ##
# (map lib.custom.relativeToRoot [
# "home/global/common/development"
# ])
# ## Cloud Specific ##
# ./config
# ];
## Packages with no needed configs ##
# home.packages = builtins.attrValues {
# inherit (pkgs)
# ;
# };
# No Special Home
}

View file

@ -8,14 +8,14 @@
imports = lib.flatten [
## Common Imports ##
(map lib.custom.relativeToRoot [
"home/global/common/browsers"
"home/global/common/gaming"
"home/global/common/gnome"
"home/global/common/vscode"
"home/global/common/xdg.nix"
"home/global/common/zen.nix"
])
## VM Specific ##
## Gojo Specific ##
./config
];

View file

@ -7,14 +7,14 @@
imports = lib.flatten [
## Common Imports ##
(map lib.custom.relativeToRoot [
"home/global/common/browsers"
"home/global/common/gaming"
"home/global/common/gnome"
"home/global/common/vscode"
"home/global/common/xdg.nix"
"home/global/common/zen.nix"
])
## VM Specific ##
## Haze Specific ##
./config
];

View file

@ -1,21 +1,9 @@
{
lib,
pkgs,
config,
...
}:
{
# imports = lib.flatten [
# ## Common Imports ##
# (map lib.custom.relativeToRoot [
# "home/global/common/development"
# ])
# ## Komodo Specific ##
# ./config
# ];
home.file = {
Pool.source = config.lib.file.mkOutOfStoreSymlink "/pool";
DockerStorage.source = config.lib.file.mkOutOfStoreSymlink "/mnt/DockerStorage";

View file

@ -1,22 +1,3 @@
{
lib,
pkgs,
...
}:
{
# imports = lib.flatten [
# ## Common Imports ##
# (map lib.custom.relativeToRoot [
# "home/global/common/development"
# ])
# ## Proxy Specific ##
# ./config
# ];
## Packages with no needed configs ##
# home.packages = builtins.attrValues {
# inherit (pkgs)
# ;
# };
# No Special Home
}

View file

@ -1,22 +1,3 @@
{
lib,
pkgs,
...
}:
{
# imports = lib.flatten [
# ## Common Imports ##
# (map lib.custom.relativeToRoot [
# "home/global/common/development"
# ])
# ## Proxy Specific ##
# ./config
# ];
## Packages with no needed configs ##
# home.packages = builtins.attrValues {
# inherit (pkgs)
# ;
# };
# No Special Home
}

View file

@ -9,11 +9,11 @@
imports = lib.flatten [
## Common Imports ##
(map lib.custom.relativeToRoot [
"home/global/common/browsers"
"home/global/common/gaming"
"home/global/common/gnome"
"home/global/common/vscode"
"home/global/common/xdg.nix"
"home/global/common/zen.nix"
])
## Rune Specific ##

View file

@ -1,41 +0,0 @@
# Generated via dconf2nix: https://github.com/gvolpe/dconf2nix
{ lib, ... }:
with lib.hm.gvariant;
{
dconf.settings = {
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = [
"user-theme@gnome-shell-extensions.gcampax.github.com"
"dash-in-panel@fthx"
"AlphabeticalAppGrid@stuarthayhurst"
"color-picker@tuberry"
"monitor-brightness-volume@ailin.nemui"
"quicksettings-audio-devices-renamer@marcinjahn.com"
"Vitals@CoreCoding.com"
"appindicatorsupport@rgcjonas.gmail.com"
"paperwm@paperwm.github.com"
"just-perfection-desktop@just-perfection"
"pano@elhan.io"
"blur-my-shell@aunetx"
"quicksettings-audio-devices-hider@marcinjahn.com"
"undecorate@sun.wxg@gmail.com"
];
favorite-apps = [
"com.mitchellh.ghostty.desktop"
"org.gnome.Nautilus.desktop"
"win11.desktop"
"zen.desktop"
"code.desktop"
"spotify.desktop"
"discord.desktop"
"org.telegram.desktop.desktop"
"steam.desktop"
"Ryujinx.desktop"
"Marvel Rivals.desktop"
];
last-selected-power-profile = "performance";
};
}

View file

@ -1,11 +0,0 @@
{ lib, ... }:
{
imports = lib.custom.scanPaths ./.;
# home.file.".config/monitors_source" = {
# source = ./monitors.xml;
# onChange = ''
# cp $HOME/.config/monitors_source $HOME/.config/monitors.xml
# '';
# };
}

View file

@ -1,2 +0,0 @@
<monitors version="2">
</monitors>

View file

@ -7,22 +7,16 @@
imports = lib.flatten [
## Common Imports ##
(map lib.custom.relativeToRoot [
"home/global/common/browsers"
"home/global/common/gnome"
"home/global/common/vscode"
"home/global/common/xdg.nix"
"home/global/common/zen.nix"
])
## VM Specific ##
./config
];
## Packages with no needed configs ##
home.packages = builtins.attrValues {
inherit (pkgs)
## Media ##
cider # Apple Music
## Tools ##
inspector
;

View file

@ -81,7 +81,7 @@ in
# name = "Qogir";
package = (
pkgs.papirus-icon-theme.override {
color = "violet";
color = "carmine";
}
);
name = "Papirus";

View file

@ -14,10 +14,10 @@ palette:
base07: "FAF7E6"
base08: "EE2E00" # Red
base09: "F7A94E" # Orange
base0A: "2B57B6" # Yellow
base0A: "FCEEA1" # Yellow
base0B: "8DE364" # Green
base0C: "59A3C0" # Cyan
base0D: "FCEEA1" # Blue
base0D: "2B57B6" # Blue
base0E: "AC92BF" # Purple
base0F: "EA5E79" # Magenta

View file

@ -4,7 +4,6 @@
...
}:
let
# Create a VERY simple environment file with absolutely minimal formatting
cloudflareEnvFile = pkgs.writeText "cloudflare.env" ''
CLOUDFLARE_DNS_API_TOKEN=${config.secretsSpec.api.cloudflare}
'';

View file

@ -1,5 +1,6 @@
{ pkgs, config, ... }:
{
## Android Debug Bridge ##
programs.adb.enable = true;
users.users.${config.hostSpec.username}.extraGroups = [ "adbusers" ];
}

View file

@ -7,11 +7,11 @@
hardware.pulseaudio = {
package = pkgs.pulseaudioFull;
};
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;

View file

@ -11,10 +11,11 @@
ConnectionLatency = 10;
ConnectionSupervisionTimeout = 100;
};
Policy = {
AutoEnable = "true";
};
# make Xbox Series X controller work
General = {
Enable = "Source,Sink,Media,Socket";
FastConnectable = true;

View file

@ -6,7 +6,6 @@
;
};
# Configurations for ddcutil
hardware.i2c.enable = true;
services.udev = {
enable = true;

View file

@ -9,6 +9,6 @@
};
environment.systemPackages = with pkgs; [
lazydocker
lazydocker # Simple TUI
];
}

View file

@ -18,6 +18,7 @@
package = pkgs.protontricks;
};
# PKGs needed for gamescope to work within steam
package = pkgs.steam.override {
extraPkgs =
pkgs:
@ -70,5 +71,3 @@
};
};
}
# gamescope --adaptive-sync --backend sdl --expose-wayland --force-grab-cursor --framerate-limit 120 --immediate-flips --output-height 2160 --output-width 3840 --prefer-output DP-1 --rt -- gamemoderun %command%

View file

@ -19,7 +19,6 @@ in
qemu = {
package = pkgs.stable.qemu_kvm;
runAsRoot = true;
# HW TPM Emulation (need to check what systems I have already have hw TPM that could be used)
swtpm.enable = true;
ovmf = {
enable = true;
@ -80,7 +79,6 @@ in
};
};
# Need to add [File (in the menu bar) -> Add connection] when start for the first time
programs.virt-manager.enable = true;
environment.systemPackages = with pkgs.stable; [

View file

@ -9,6 +9,7 @@
enable = true;
theme = lib.mkForce "motion";
themePackages = [
# TODO: Make customizable by user
(pkgs.adi1090x-plymouth-themes.override { selected_themes = [ "motion" ]; })
];
};

View file

@ -42,7 +42,7 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
# Supress systemd units that don't work because of LXC.
# Suppress systemd units that don't work because of LXC.
# https://blog.xirion.net/posts/nixos-proxmox-lxc/#configurationnix-tweak
systemd.suppressedSystemUnits = [
"dev-mqueue.mount"

View file

@ -19,7 +19,11 @@ in
requires = [ "pool.mount" ];
wantedBy = [ "multi-user.target" ];
script = ''
ln -sf /pool/git ${homeDir}/git
if [ -e ${homeDir}/git ]; then
echo "Ignoring: ${homeDir}/git already exists"
else
ln -sf /pool/git ${homeDir}/git
fi
'';
serviceConfig = {
Type = "oneshot";
@ -28,7 +32,7 @@ in
};
};
# File system configuration
# Mount the NFS share at /pool
fileSystems = {
"/pool" = {
device = "cloud:/";
@ -49,7 +53,6 @@ in
boot.supportedFilesystems = [ "nfs" ];
# services.rpcbind.enable = true;
# Optional: Configure ID mapping if needed
services.nfs.idmapd.settings = {
General = {
Domain = "local"; # Must match on server and client

View file

@ -1,6 +1,6 @@
{ pkgs, ... }:
{
# allows vial to identify the keyboard
# Allows vial to identify the keyboard
services.udev.packages = with pkgs; [
via
];

View file

@ -20,7 +20,7 @@ in
])
];
# System-wide packages, in case we log in as root
# System-wide packages, root accessible
environment.systemPackages = with pkgs; [
curl
git
@ -34,14 +34,12 @@ in
yay # my yay teehee
];
# Enable CUPS to print documents.
# Enable print to PDF.
services.printing.enable = true;
# Force home-manager to use global packages
home-manager.useGlobalPkgs = true;
# If there is a conflict file that is backed up, use this extension
home-manager.backupFileExtension = "homeManagerBackupFileExtension";
# home-manager.useUserPackages = true;
## Overlays ##
nixpkgs = {
@ -67,7 +65,6 @@ in
};
## SUDO and Terminal ##
# Database for aiding terminal-based programs
environment.enableAllTerminfo = true;
hardware.enableAllFirmware = true;

View file

@ -5,7 +5,6 @@
...
}:
{
## NETWORKING ##
networking = {
dhcpcd.enable = false;
hostName = config.hostSpec.hostName;

View file

@ -7,7 +7,6 @@
settings = {
AllowUsers = null; # everyone
# Harden
PasswordAuthentication = false;
PermitRootLogin = "no";
KbdInteractiveAuthentication = false;

View file

@ -62,10 +62,8 @@ in
}
];
# No matter what environment we are in we want these tools for root, and the user(s)
programs.git.enable = true;
# root's ssh key are mainly used for remote deployment, borg, and some other specific ops
users.users.root = {
shell = pkgs.bash;
hashedPassword = lib.mkForce hostSpec.hashedPassword;

View file

@ -2,6 +2,7 @@
services.caddy = {
enable = true;
virtualHosts = {
## Filerun ##
"drive.ryot.foo" = {
useACMEHost = "ryot.foo";
extraConfig = ''

View file

@ -1,6 +1,5 @@
{ config, lib, ... }:
{
# Install and configure NFS server
services.nfs.server = {
enable = true;

View file

@ -1,7 +1,9 @@
###############################################################
#
# Cloud - LXC Container
# NixOS container, Ryzen 5 5600G (4th Cores), 4GB/4GB RAM/SWAP
# NixOS container, Ryzen 5 5600G (4 Cores), 4GB/4GB RAM/SWAP
#
# Storage, NFS, Filerun, and Backups
#
###############################################################
@ -18,7 +20,6 @@ let
in
{
imports = lib.flatten [
## Cloud Only ##
./config

View file

@ -16,7 +16,7 @@ in
# Less permission issues with pool
programs.fuse.userAllowOther = true;
# File system co
# INFO: Cloud is the pool provider
fileSystems = {
"/pool" = {

View file

@ -1,7 +1,7 @@
###############################################################
#
# Rune - Main Desktop
# NixOS running on Ryzen 9 7900X3D , Radeon RX 6950 XT, 32GB RAM
# Gojo - Giovanni's Desktop
# NixOS running on Ryzen ___, Radeon RX 6950 XT, 32GB RAM
#
###############################################################
@ -18,7 +18,7 @@ let
in
{
imports = lib.flatten [
## Rune Only ##
## Gojo Only ##
inputs.chaotic.nixosModules.default
# ./config

View file

@ -1,7 +1,3 @@
# 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.
{
pkgs,
inputs,
@ -14,9 +10,6 @@
{
imports = lib.flatten [
(modulesPath + "/installer/scan/not-detected.nix")
(map lib.custom.relativeToRoot [
"hosts/global/common/system/pool.nix"
])
];
## Boot ##
@ -58,7 +51,6 @@
programs.fuse.userAllowOther = true;
# FIXME: Fix on first boot
# File system configurations
# fileSystems = {
# "/" = {
# device = "/dev/disk/by-uuid/d38c182c-6f05-4bf3-8a45-5532c10fd342";
@ -78,7 +70,6 @@
# FIXME: Fix on first boot
# swapDevices = [ { device = "/dev/disk/by-uuid/6586847d-eba9-4317-9077-98ae9b2812c9"; } ];
# Time and networking configurations
time.hardwareClockInLocalTime = true; # Fixes windows dual-boot time issues
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -1,7 +1,7 @@
###############################################################
#
# Rune - Main Desktop
# NixOS running on Ryzen 9 7900X3D , Radeon RX 6950 XT, 32GB RAM
# Haze - Cesar's Desktop
# NixOS running on Ryzen 7 ___ , Radeon RX 6950 XT, 32GB RAM
#
###############################################################
@ -18,7 +18,7 @@ let
in
{
imports = lib.flatten [
## Rune Only ##
## Haze Only ##
inputs.chaotic.nixosModules.default
# ./config

View file

@ -1,7 +1,3 @@
# 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.
{
pkgs,
inputs,
@ -58,7 +54,6 @@
programs.fuse.userAllowOther = true;
# FIXME: Fix on first boot
# File system configurations
# fileSystems = {
# "/" = {
# device = "/dev/disk/by-uuid/d38c182c-6f05-4bf3-8a45-5532c10fd342";
@ -78,7 +73,6 @@
# FIXME: Fix on first boot
# swapDevices = [ { device = "/dev/disk/by-uuid/6586847d-eba9-4317-9077-98ae9b2812c9"; } ];
# Time and networking configurations
time.hardwareClockInLocalTime = true; # Fixes windows dual-boot time issues
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -3,6 +3,8 @@
# Komodo - LXC Container
# NixOS container, Ryzen 5 5600G (12 Cores), 30GB/2GB RAM/SWAP
#
# Docker Environment, Managed by with Komodo
#
###############################################################
{

View file

@ -3,7 +3,7 @@
# Barebones LXC Container for Proxmox
#
# This is a special host for LXC installations in Proxmox.
# Has the barebones configuration needed to then setup the wanted new host config
# Has the bare-bones configuration needed to then setup the wanted new host config
#
###############################################################

View file

@ -3,6 +3,8 @@
# Nix - LXC Container
# NixOS container, Ryzen 5 5600G (10 Cores), 12GB/6GB RAM/SWAP
#
# Remote Desktop access, with vscode-server, WIP
#
###############################################################
# TODO: x2go server for remote access

View file

@ -3,6 +3,8 @@
# Proxy - LXC Container
# NixOS container, Ryzen 5 5600G (3 Cores), 2GB/2GB RAM/SWAP
#
# Cloudflare Tunnel Proxy, Zero Trust access
#
###############################################################
{

View file

@ -1,7 +1,7 @@
###############################################################
#
# Rune - Main Desktop
# NixOS running on Ryzen 9 7900X3D , Radeon RX 6950 XT, 32GB RAM
# Rune - Toph's Desktop
# NixOS running on Ryzen 9 7900X3D , Radeon RX 9070 XT, 32GB RAM
#
###############################################################

View file

@ -1,7 +1,3 @@
# 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.
{
pkgs,
inputs,
@ -57,7 +53,6 @@
# For less permission issues with SSHFS
programs.fuse.userAllowOther = true;
# File system configurations
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/d38c182c-6f05-4bf3-8a45-5532c10fd342";
@ -76,7 +71,6 @@
swapDevices = [ { device = "/dev/disk/by-uuid/6586847d-eba9-4317-9077-98ae9b2812c9"; } ];
# Time and networking configurations
time.hardwareClockInLocalTime = true; # Fixes windows dual-boot time issues
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -13,12 +13,11 @@
...
}:
let
username = "cesar";
username = "toph";
user = config.secretsSpec.users.${username};
in
{
imports = lib.flatten [
## Hardware ##
./hardware.nix
@ -27,9 +26,8 @@ in
"hosts/global/core"
## Optional Configs ##
"hosts/global/common/audio.nix" # pipewire and cli controls
"hosts/global/common/gnome.nix" # desktop
# "hosts/global/common/plymouth.nix" # fancy boot screen
"hosts/global/common/plymouth.nix" # fancy boot screen
## Misc Inputs ##
])
@ -70,5 +68,5 @@ in
];
# https://wiki.nixos.org/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "24.11";
system.stateVersion = "25.05";
}

View file

@ -1,7 +0,0 @@
# TODO:
- Fix up how DEs are configured, its not modular at all rn, i need to be able to select the DE from hostSpec and it should be able to change config per user
- decouple /pool from places its not needed, or should be optional
- some users should not have access to pool or just cant access it cuz not local
- ssh keys are not setup per user
- should probably fix

View file

@ -1,9 +1,9 @@
# FIXME(lib.custom): Add some stuff from hmajid2301/dotfiles/lib/module/default.nix, as simplifies option declaration
{ lib, ... }:
{
# use path relative to the root of the project
relativeToRoot = lib.path.append ../.;
# Scans the given directory for NixOS modules and imports them.
scanPaths =
path:
builtins.map (f: (path + "/${f}")) (

View file

@ -1,9 +1,6 @@
# Add your reusable NixOS modules to this directory, on their own file (https://wiki.nixos.org/wiki/NixOS_modules).
# These are modules you would share with others, not your personal configurations.
# Add your reusable NixOS or Home-Manger modules to this directory, on their own file (https://wiki.nixos.org/wiki/NixOS_modules).
# These are modules you would share with others, not your specific configurations.
{ lib, ... }:
{
# Imports all NixOS modules found in the current directory.
# `lib.custom.scanPaths ./.` scans the current directory (./) for NixOS modules and imports them.
imports = lib.custom.scanPaths ./.;
}

View file

@ -1,6 +1,5 @@
# Add your reusable home-manager modules to this directory, on their own file (https://wiki.nixos.org/wiki/NixOS_modules).
# These are modules you would share with others, not your personal configurations.
# Add your reusable NixOS modules to this directory, on their own file (https://wiki.nixos.org/wiki/NixOS_modules).
# These are modules you would share with others, not your specific configurations.
{ lib, ... }:
{
imports = lib.custom.scanPaths ./.;

View file

@ -1,9 +1,6 @@
# Add your reusable NixOS modules to this directory, on their own file (https://wiki.nixos.org/wiki/NixOS_modules).
# These are modules you would share with others, not your personal configurations.
# Add your reusable Home-Manager modules to this directory, on their own file (https://wiki.nixos.org/wiki/NixOS_modules).
# These are modules you would share with others, not your specific configurations.
{ lib, ... }:
{
# Imports all NixOS modules found in the current directory.
# `lib.custom.scanPaths ./.` scans the current directory (./) for NixOS modules and imports them.
imports = lib.custom.scanPaths ./.;
}

View file

@ -1,9 +1,6 @@
#
# This file defines overlays/custom modifications to upstream packages
#
# Defines overlays/custom modifications to upstream packages
{ inputs, ... }:
let
# Adds my custom packages
additions =
@ -11,7 +8,7 @@ let
let
packages = prev.lib.packagesFromDirectoryRecursive {
callPackage = prev.lib.callPackageWith final;
directory = ../pkgs; # Changed from ../pkgs/common to ../pkgs
directory = ../pkgs;
};
in
packages;

View file

@ -1,31 +0,0 @@
{ pkgs, lib, ... }:
# TODO: not really working, might just remove
let
pname = "fleet";
version = "1.46.97";
src = pkgs.fetchurl {
url = "https://download-cdn.jetbrains.com/fleet/installers/linux_x64/Fleet-${version}.tar.gz";
sha256 = "a7b66f9faff74f2b8b0143bc588a990304dd8efd3ea20fd8d2754cb064a993f3";
};
appimageContents = pkgs.appimageTools.extractType2 { inherit pname version src; };
in
pkgs.appimageTools.wrapType2 rec {
inherit pname version src;
extraInstallCommands = ''
mv $out/bin/${pname} $out/bin/${pname}
install -m 444 -D ${appimageContents}/lib/${pname}.png $out/share/icons/hicolor/512x512/apps/${pname}.png
'';
# install -m 444 -D ${appimageContents}/ubports-installer.desktop $out/share/applications/${pname}.desktop
# substituteInPlace $out/share/applications/${pname}.desktop \
# --replace 'Exec=AppRun --no-sandbox %U' 'Exec=${pname} %U'
meta = with lib; {
description = "Jetbrains Fleet";
platforms = [ "x86_64-linux" ];
};
}

Binary file not shown.

View file

@ -14,11 +14,12 @@
];
in
import nixpkgs { inherit overlays; },
inputs ? null,
...
}:
let
# Explicitly add the yay package to the shell in case overlay fucks up
yay = import ./pkgs/yay/package.nix { inherit pkgs lib; };
# Import yay directly from its flake, incase overlay or config flake fucks up
yay = builtins.getFlake "git+https://git.ryot.foo/toph/yay.nix.git";
inherit (pkgs) lib;
in
{
@ -32,7 +33,7 @@ in
home-manager
nh
# Git for repo management
# Git and git-crypt
git
git-crypt
gnupg
@ -45,7 +46,7 @@ in
# Config tools
dconf2nix
# Network tools (for recovery scenarios)
# Network tools
curl
wget
@ -55,7 +56,7 @@ in
gzip
zstd
# Text editors for emergency config edits
# Text editors
micro
nano
@ -67,9 +68,10 @@ in
;
}
++ [
yay
yay.packages.${pkgs.system}.default
];
# Overwrite FLAKE to current path, for yay and nh
FLAKE = toString ./.;
shellHook = ''