Compare commits
11 Commits
ed74e01691
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ec7ada6ade | |||
| de494a2a87 | |||
| 2b7d9a5b20 | |||
| b9ddd8eb78 | |||
| bd906ed581 | |||
| 0d498744d7 | |||
| 4102f034e6 | |||
| e3b28f3bfc | |||
| 5dc8fed824 | |||
| cb97c289d5 | |||
| 2ca8c974ea |
@@ -1,13 +1,17 @@
|
|||||||
|
# Shared configuration across all machines
|
||||||
# Help is available in the configuration.nix(5) man page
|
# Help is available in the configuration.nix(5) man page
|
||||||
# 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 = [
|
||||||
./hardware-configuration.nix
|
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.home-manager.nixosModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -19,8 +23,6 @@
|
|||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
# Networking
|
# Networking
|
||||||
networking.hostName = "TrudePC";
|
|
||||||
#networking.wireless.enable = true;
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
time.timeZone = "Europe/Lisbon";
|
time.timeZone = "Europe/Lisbon";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
@@ -66,13 +68,16 @@
|
|||||||
users.users.trude = {
|
users.users.trude = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "TrudeEH";
|
description = "TrudeEH";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = [
|
||||||
packages = with pkgs; [
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
];
|
];
|
||||||
|
packages = with pkgs; [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
useUserPackages = true;
|
||||||
|
useGlobalPkgs = true;
|
||||||
backupFileExtension = "~";
|
backupFileExtension = "~";
|
||||||
extraSpecialArgs = { inherit inputs; };
|
extraSpecialArgs = { inherit inputs; };
|
||||||
users = {
|
users = {
|
||||||
@@ -101,7 +106,37 @@
|
|||||||
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
|
||||||
|
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
|
||||||
|
};
|
||||||
|
services.wivrn = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
# Write information to /etc/xdg/openxr/1/active_runtime.json, VR applications
|
||||||
|
# will automatically read this and work with WiVRn (Note: This does not currently
|
||||||
|
# apply for games run in Valve's Proton)
|
||||||
|
defaultRuntime = true;
|
||||||
|
autoStart = true;
|
||||||
|
};
|
||||||
|
# Kernel patch for SteamVR performance issues on AMD GPUs
|
||||||
|
# boot.kernelPatches = [
|
||||||
|
# {
|
||||||
|
# name = "amdgpu-ignore-ctx-privileges";
|
||||||
|
# patch = pkgs.fetchpatch {
|
||||||
|
# name = "cap_sys_nice_begone.patch";
|
||||||
|
# url = "https://github.com/Frogging-Family/community-patches/raw/master/linux61-tkg/cap_sys_nice_begone.mypatch";
|
||||||
|
# hash = "sha256-Y3a0+x2xvHsfLax/uwycdJf3xLxvVfkfDVqjkxNaYEo=";
|
||||||
|
# };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
# Some programs need SUID wrappers, can be configured further or are
|
||||||
# started in user sessions.
|
# started in user sessions.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
description = "Nixos config flake";
|
description = "Trude's NixOS configuration flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
@@ -10,13 +10,26 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs: {
|
outputs =
|
||||||
nixosConfigurations.TrudePC = nixpkgs.lib.nixosSystem {
|
{ self, nixpkgs, ... }@inputs:
|
||||||
specialArgs = {inherit inputs;};
|
{
|
||||||
|
nixosConfigurations = {
|
||||||
|
TrudePC = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
inputs.home-manager.nixosModules.default
|
./hosts/TrudePC
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Add future machines here following the same pattern:
|
||||||
|
# MachineName = nixpkgs.lib.nixosSystem {
|
||||||
|
# specialArgs = { inherit inputs; };
|
||||||
|
# modules = [
|
||||||
|
# ./common.nix
|
||||||
|
# ./hosts/MachineName
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
# 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.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports =
|
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{ device = "/dev/disk/by-uuid/e8428e24-2b69-46e4-80d2-328a3fa676d0";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{ device = "/dev/disk/by-uuid/1AEE-516A";
|
|
||||||
fsType = "vfat";
|
|
||||||
options = [ "fmask=0077" "dmask=0077" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/4c979cc9-574c-4e15-865f-bde3031ccafa"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
||||||
132
nixos/home.nix
132
nixos/home.nix
@@ -1,14 +1,19 @@
|
|||||||
# man home-configuration.nix
|
# man home-configuration.nix
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
home.username = "trude";
|
home.username = "trude";
|
||||||
home.homeDirectory = "/home/trude";
|
home.homeDirectory = "/home/trude";
|
||||||
home.stateVersion = "25.11"; # Do not change after initial installation.
|
home.stateVersion = "25.11"; # Do not change after initial installation.
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
|
nixfmt
|
||||||
bat
|
bat
|
||||||
|
|
||||||
vscode
|
vscode
|
||||||
@@ -21,20 +26,27 @@
|
|||||||
|
|
||||||
# VR / Games
|
# VR / Games
|
||||||
bs-manager
|
bs-manager
|
||||||
steam
|
|
||||||
slimevr
|
slimevr
|
||||||
wivrn
|
|
||||||
prismlauncher
|
prismlauncher
|
||||||
|
|
||||||
# Gnome Extensions
|
# Gnome Extensions
|
||||||
gnomeExtensions.caffeine
|
gnomeExtensions.caffeine
|
||||||
gnomeExtensions.vitals
|
gnomeExtensions.vitals
|
||||||
gnomeExtensions.appindicator
|
gnomeExtensions.appindicator
|
||||||
gnomeExtensions.blur-my-shell
|
# gnomeExtensions.blur-my-shell
|
||||||
|
|
||||||
# Gnome Apps
|
# Gnome Apps
|
||||||
|
file-roller
|
||||||
commit
|
commit
|
||||||
binary
|
binary
|
||||||
|
resources
|
||||||
|
raider
|
||||||
|
gnome-podcasts
|
||||||
|
gnome-obfuscate
|
||||||
|
collision
|
||||||
|
switcheroo
|
||||||
|
wordbook
|
||||||
|
textpieces
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
(pkgs.writeShellScriptBin "colors" ''
|
(pkgs.writeShellScriptBin "colors" ''
|
||||||
@@ -63,22 +75,41 @@
|
|||||||
(pkgs.writeShellScriptBin "rebuild" ''
|
(pkgs.writeShellScriptBin "rebuild" ''
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
# ANSI color codes
|
||||||
|
GRAY='\e[90m'
|
||||||
|
ORANGE='\e[38;5;214m'
|
||||||
|
RESET='\e[0m'
|
||||||
|
|
||||||
pushd ~/dotfiles
|
pushd ~/dotfiles
|
||||||
git diff -U0 *.nix
|
git diff -U0 *.nix
|
||||||
echo "NixOS Rebuilding..."
|
echo -e "''${ORANGE}NixOS Rebuilding...''${RESET}"
|
||||||
sudo nixos-rebuild switch --flake ./nixos#TrudePC &> ~/.nixos-rebuild.log || ( cat ~/.nixos-rebuild.log | grep --color error && false )
|
if ! sudo nixos-rebuild switch --flake ./nixos#TrudePC &> ~/.nixos-rebuild.log; then
|
||||||
gen=$(nixos-rebuild list-generations | grep current)
|
cat ~/.nixos-rebuild.log | grep --color error
|
||||||
echo "Pushing changes..."
|
exit 1
|
||||||
git commit -am "$gen"
|
fi
|
||||||
git push
|
cat ~/.nixos-rebuild.log | grep --color error
|
||||||
sudo nix-collect-garbage --delete-older-than 15d
|
echo -e "''${ORANGE}Cleaning up old generations...''${RESET}"
|
||||||
|
echo -e "''${GRAY}$(sudo nix-collect-garbage --delete-older-than 15d 2>&1)''${RESET}"
|
||||||
popd
|
popd
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
EDITOR = "gnome-text-editor";
|
EDITOR = "gnome-text-editor";
|
||||||
SSH_AUTH_SOCK = "$XDG_RUNTIME_DIR/gcr/.ssh";
|
};
|
||||||
|
|
||||||
|
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 = {
|
||||||
@@ -198,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 = {
|
||||||
@@ -224,7 +242,12 @@
|
|||||||
};
|
};
|
||||||
"org/gnome/desktop/input-sources" = {
|
"org/gnome/desktop/input-sources" = {
|
||||||
show-all-sources = true;
|
show-all-sources = true;
|
||||||
sources = [ (lib.hm.gvariant.mkTuple [ "xkb" "us+altgr-intl" ]) ];
|
sources = [
|
||||||
|
(lib.hm.gvariant.mkTuple [
|
||||||
|
"xkb"
|
||||||
|
"us+altgr-intl"
|
||||||
|
])
|
||||||
|
];
|
||||||
xkb-options = [ "terminate:ctrl_alt_bksp" ];
|
xkb-options = [ "terminate:ctrl_alt_bksp" ];
|
||||||
};
|
};
|
||||||
"org/gnome/desktop/interface" = {
|
"org/gnome/desktop/interface" = {
|
||||||
@@ -257,8 +280,19 @@
|
|||||||
dynamic-workspaces = true;
|
dynamic-workspaces = true;
|
||||||
};
|
};
|
||||||
"org/gnome/shell" = {
|
"org/gnome/shell" = {
|
||||||
disabled-extensions = [ "tiling-assistant@ubuntu.com" "ubuntu-dock@ubuntu.com" "ding@rastersoft.com" ];
|
disable-user-extensions = false;
|
||||||
enabled-extensions = [ "blur-my-shell@aunetx" "gsconnect@andyholmes.github.io" "appindicatorsupport@rgcjonas.gmail.com" "caffeine@patapon.info" "Vitals@CoreCoding.com" ];
|
disabled-extensions = [
|
||||||
|
"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;
|
||||||
@@ -272,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;
|
||||||
@@ -283,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;
|
||||||
};
|
};
|
||||||
@@ -329,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;
|
||||||
@@ -341,6 +397,18 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
|
mimeApps = {
|
||||||
|
associations.added = {
|
||||||
|
"text/x-shellscript" = [ "org.gnome.TextEditor.desktop" ];
|
||||||
|
};
|
||||||
|
defaultApplications = {
|
||||||
|
"text/x-shellscript" = [ "org.gnome.TextEditor.desktop" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Let Home Manager install and manage itself.
|
# Let Home Manager install and manage itself.
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
11
nixos/hosts/TrudePC/default.nix
Normal file
11
nixos/hosts/TrudePC/default.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
# TrudePC-specific configuration
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# Machine-specific settings
|
||||||
|
networking.hostName = "TrudePC";
|
||||||
|
}
|
||||||
47
nixos/hosts/TrudePC/hardware-configuration.nix
Normal file
47
nixos/hosts/TrudePC/hardware-configuration.nix
Normal file
@@ -0,0 +1,47 @@
|
|||||||
|
# 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.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"nvme"
|
||||||
|
"ahci"
|
||||||
|
"usbhid"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/e8428e24-2b69-46e4-80d2-328a3fa676d0";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/1AEE-516A";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/4c979cc9-574c-4e15-865f-bde3031ccafa"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user