Format config

This commit is contained in:
2026-01-27 17:38:40 +00:00
parent de494a2a87
commit ec7ada6ade
4 changed files with 135 additions and 66 deletions

View File

@@ -3,10 +3,15 @@
# and in the NixOS manual (accessible by running 'nixos-help'). # and in the NixOS manual (accessible by running 'nixos-help').
# man configuration.nix # man configuration.nix
{ config, pkgs, inputs, ... }: {
config,
pkgs,
inputs,
...
}:
{ {
imports = [ imports = [
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
]; ];
@@ -63,7 +68,10 @@
users.users.trude = { users.users.trude = {
isNormalUser = true; isNormalUser = true;
description = "TrudeEH"; description = "TrudeEH";
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = [
"networkmanager"
"wheel"
];
packages = with pkgs; [ ]; packages = with pkgs; [ ];
}; };
@@ -98,7 +106,10 @@
programs.nix-ld.libraries = with pkgs; [ programs.nix-ld.libraries = with pkgs; [
# Add missing dynamic libraries for unpackaged executables here. # Add missing dynamic libraries for unpackaged executables here.
]; ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Steam and VR # Steam and VR
programs.steam = { programs.steam = {

View File

@@ -10,24 +10,26 @@
}; };
}; };
outputs = { self, nixpkgs, ... }@inputs: { outputs =
nixosConfigurations = { { self, nixpkgs, ... }@inputs:
TrudePC = nixpkgs.lib.nixosSystem { {
specialArgs = { inherit inputs; }; nixosConfigurations = {
modules = [ TrudePC = nixpkgs.lib.nixosSystem {
./configuration.nix specialArgs = { inherit inputs; };
./hosts/TrudePC modules = [
]; ./configuration.nix
}; ./hosts/TrudePC
];
};
# Add future machines here following the same pattern: # Add future machines here following the same pattern:
# MachineName = nixpkgs.lib.nixosSystem { # MachineName = nixpkgs.lib.nixosSystem {
# specialArgs = { inherit inputs; }; # specialArgs = { inherit inputs; };
# modules = [ # modules = [
# ./common.nix # ./common.nix
# ./hosts/MachineName # ./hosts/MachineName
# ]; # ];
# }; # };
};
}; };
};
} }

View File

@@ -1,5 +1,10 @@
# man home-configuration.nix # man home-configuration.nix
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
home.username = "trude"; home.username = "trude";
@@ -8,6 +13,7 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
nerd-fonts.jetbrains-mono nerd-fonts.jetbrains-mono
nixfmt
bat bat
vscode vscode
@@ -69,22 +75,23 @@
(pkgs.writeShellScriptBin "rebuild" '' (pkgs.writeShellScriptBin "rebuild" ''
#! /bin/bash #! /bin/bash
set -e set -e
# ANSI color codes # ANSI color codes
GRAY='\e[90m' GRAY='\e[90m'
ORANGE='\e[38;5;214m' ORANGE='\e[38;5;214m'
RESET='\e[0m' RESET='\e[0m'
pushd ~/dotfiles > /dev/null pushd ~/dotfiles
git diff -U0 *.nix git diff -U0 *.nix
echo -e "''${ORANGE}NixOS Rebuilding...''${RESET}" echo -e "''${ORANGE}NixOS Rebuilding...''${RESET}"
if ! sudo nixos-rebuild switch --flake ./nixos#TrudePC &> ~/.nixos-rebuild.log; then if ! sudo nixos-rebuild switch --flake ./nixos#TrudePC &> ~/.nixos-rebuild.log; then
cat ~/.nixos-rebuild.log | grep --color error cat ~/.nixos-rebuild.log | grep --color error
exit 1 exit 1
fi fi
cat ~/.nixos-rebuild.log | grep --color error
echo -e "''${ORANGE}Cleaning up old generations...''${RESET}" echo -e "''${ORANGE}Cleaning up old generations...''${RESET}"
echo -e "''${GRAY}$(sudo nix-collect-garbage --delete-older-than 15d 2>&1)''${RESET}" echo -e "''${GRAY}$(sudo nix-collect-garbage --delete-older-than 15d 2>&1)''${RESET}"
popd > /dev/null popd
'') '')
]; ];
@@ -92,6 +99,19 @@
EDITOR = "gnome-text-editor"; EDITOR = "gnome-text-editor";
}; };
home.file = {
"Templates/markdown.md".text = "";
"Templates/text.txt".text = "";
".config/vesktop/settings/settings.json" = {
source = ../vencord/settings.json;
force = true;
};
".config/vesktop/themes/trude.theme.css" = {
source = ../vencord/trude.theme.css;
force = true;
};
};
programs.git = { programs.git = {
enable = true; enable = true;
settings = { settings = {
@@ -136,7 +156,7 @@
}; };
}; };
}; };
programs.bash = { programs.bash = {
enable = true; enable = true;
shellAliases = { shellAliases = {
@@ -209,19 +229,6 @@
''; '';
}; };
home.file = {
"Templates/markdown.md".text = "";
"Templates/text.txt".text = "";
".config/vesktop/settings/settings.json" = {
source = ../vencord/settings.json;
force = true;
};
".config/vesktop/themes/trude.theme.css" = {
source = ../vencord/trude.theme.css;
force = true;
};
};
dconf = { dconf = {
enable = true; enable = true;
settings = { settings = {
@@ -236,7 +243,10 @@
"org/gnome/desktop/input-sources" = { "org/gnome/desktop/input-sources" = {
show-all-sources = true; show-all-sources = true;
sources = [ sources = [
(lib.hm.gvariant.mkTuple [ "xkb" "us+altgr-intl" ]) (lib.hm.gvariant.mkTuple [
"xkb"
"us+altgr-intl"
])
]; ];
xkb-options = [ "terminate:ctrl_alt_bksp" ]; xkb-options = [ "terminate:ctrl_alt_bksp" ];
}; };
@@ -271,8 +281,18 @@
}; };
"org/gnome/shell" = { "org/gnome/shell" = {
disable-user-extensions = false; disable-user-extensions = false;
disabled-extensions = [ "tiling-assistant@ubuntu.com" "ubuntu-dock@ubuntu.com" "ding@rastersoft.com" ]; disabled-extensions = [
enabled-extensions = [ "blur-my-shell@aunetx" "gsconnect@andyholmes.github.io" "appindicatorsupport@rgcjonas.gmail.com" "caffeine@patapon.info" "Vitals@CoreCoding.com" ]; "tiling-assistant@ubuntu.com"
"ubuntu-dock@ubuntu.com"
"ding@rastersoft.com"
];
enabled-extensions = [
"blur-my-shell@aunetx"
"gsconnect@andyholmes.github.io"
"appindicatorsupport@rgcjonas.gmail.com"
"caffeine@patapon.info"
"Vitals@CoreCoding.com"
];
}; };
"org/gnome/shell/extensions/dash-to-dock" = { "org/gnome/shell/extensions/dash-to-dock" = {
dash-max-icon-size = 32; dash-max-icon-size = 32;
@@ -286,7 +306,7 @@
show-home = false; show-home = false;
}; };
"org/gnome/shell/world-clocks" = { "org/gnome/shell/world-clocks" = {
locations = []; locations = [ ];
}; };
"org/gnome/Console" = { "org/gnome/Console" = {
use-system-font = false; use-system-font = false;
@@ -297,7 +317,24 @@
cell-width-scale = 1.0; cell-width-scale = 1.0;
font = "JetBrainsMono NF 10"; font = "JetBrainsMono NF 10";
foreground-color = "rgb(208,207,204)"; foreground-color = "rgb(208,207,204)";
palette = [ "rgb(36,31,49)" "rgb(192,28,40)" "rgb(46,194,126)" "rgb(245,194,17)" "rgb(30,120,228)" "rgb(152,65,187)" "rgb(10,185,220)" "rgb(192,191,188)" "rgb(94,92,100)" "rgb(237,51,59)" "rgb(87,227,137)" "rgb(248,228,92)" "rgb(81,161,255)" "rgb(192,97,203)" "rgb(79,210,253)" "rgb(246,245,244)" ]; palette = [
"rgb(36,31,49)"
"rgb(192,28,40)"
"rgb(46,194,126)"
"rgb(245,194,17)"
"rgb(30,120,228)"
"rgb(152,65,187)"
"rgb(10,185,220)"
"rgb(192,191,188)"
"rgb(94,92,100)"
"rgb(237,51,59)"
"rgb(87,227,137)"
"rgb(248,228,92)"
"rgb(81,161,255)"
"rgb(192,97,203)"
"rgb(79,210,253)"
"rgb(246,245,244)"
];
use-system-font = false; use-system-font = false;
use-theme-colors = false; use-theme-colors = false;
}; };
@@ -343,7 +380,12 @@
}; };
"org/gnome/shell/extensions/vitals" = { "org/gnome/shell/extensions/vitals" = {
fixed-widths = false; fixed-widths = false;
hot-sensors = [ "_processor_usage_" "_gpu#1_usage_" "_memory_usage_" "__temperature_max__" ]; hot-sensors = [
"_processor_usage_"
"_gpu#1_usage_"
"_memory_usage_"
"__temperature_max__"
];
icon-style = 1; icon-style = 1;
menu-centered = false; menu-centered = false;
position-in-panel = 0; position-in-panel = 0;
@@ -359,10 +401,10 @@
enable = true; enable = true;
mimeApps = { mimeApps = {
associations.added = { associations.added = {
"text/x-shellscript" = ["org.gnome.TextEditor.desktop"]; "text/x-shellscript" = [ "org.gnome.TextEditor.desktop" ];
}; };
defaultApplications = { defaultApplications = {
"text/x-shellscript" = ["org.gnome.TextEditor.desktop"]; "text/x-shellscript" = [ "org.gnome.TextEditor.desktop" ];
}; };
}; };
}; };

View File

@@ -1,32 +1,46 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }: {
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = imports = [
[ (modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usbhid" ]; boot.initrd.availableKernelModules = [
"xhci_pci"
"nvme"
"ahci"
"usbhid"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/e8428e24-2b69-46e4-80d2-328a3fa676d0"; device = "/dev/disk/by-uuid/e8428e24-2b69-46e4-80d2-328a3fa676d0";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/1AEE-516A"; device = "/dev/disk/by-uuid/1AEE-516A";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = [
}; "fmask=0077"
"dmask=0077"
swapDevices =
[ { device = "/dev/disk/by-uuid/4c979cc9-574c-4e15-865f-bde3031ccafa"; }
]; ];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/4c979cc9-574c-4e15-865f-bde3031ccafa"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;