Cleanup of code and modules. Fully modular config now. Cleanup unused and redundant packages. Fix shell alias

This commit is contained in:
2025-08-31 15:00:59 +02:00
parent ffd8112f61
commit ad08a4fa5c
9 changed files with 253 additions and 303 deletions

View File

@@ -8,18 +8,17 @@
./../../modules/common.nix ./../../modules/common.nix
./../../modules/hardware/xremap.nix
./../../modules/services/webdav.nix ./../../modules/services/webdav.nix
./../../modules/graphics/workstation.nix ./../../modules/graphics/workstation.nix
./../../modules/hardware/nvidia.nix ./../../modules/hardware/nvidia.nix
./../../modules/hardware/boot.nix
./../../modules/hardware/xremap.nix
]; ];
networking.hostName = "minoxy"; networking.hostName = "minoxy";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
systemd.targets.sleep.enable = true; systemd.targets.sleep.enable = true;
systemd.targets.suspend.enable = true; systemd.targets.suspend.enable = true;

View File

@@ -9,25 +9,18 @@
./../../modules/common.nix ./../../modules/common.nix
./../../modules/hardware/xremap.nix ./../../modules/hardware/xremap.nix
./../../modules/hardware/battery.nix ./../../modules/hardware/boot.nix
./../../modules/laptop/powersave.nix
./../../modules/laptop/battery.nix
./../../modules/graphics/workstation.nix ./../../modules/graphics/workstation.nix
./../../modules/services/webdav.nix.nix ./../../modules/services/webdav.nix
./../../modules/services/scanning.nix.nix ./../../modules/services/scanning.nix
]; ];
networking.hostName = "nixyos"; networking.hostName = "nixyos";
batMode = "single";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking = {
networkmanager = {
wifi.powersave = true;
};
};
# Older machine # Older machine
system.stateVersion = "24.11"; system.stateVersion = "24.11";

View File

@@ -9,10 +9,13 @@
./../../modules/common.nix ./../../modules/common.nix
./../../modules/hardware/xremap.nix ./../../modules/hardware/xremap.nix
./../../modules/hardware/battery.nix ./../../modules/hardware/boot.nix
./../../modules/graphics/workstation.nix ./../../modules/graphics/workstation.nix
./../../modules/laptop/powersave.nix
./../../modules/laptop/battery.nix
./../../modules/services/webdav.nix.nix ./../../modules/services/webdav.nix.nix
./../../modules/services/scanning.nix.nix ./../../modules/services/scanning.nix.nix
]; ];
@@ -20,21 +23,12 @@
networking.hostName = "thinix"; networking.hostName = "thinix";
batMode = "double"; batMode = "double";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
pinentryPackage = with pkgs; pinentry-all; pinentryPackage = with pkgs; pinentry-all;
enableSSHSupport = true; enableSSHSupport = true;
}; };
networking = {
networkmanager = {
wifi.powersave = true;
};
};
swapDevices = [ swapDevices = [
{ {
device = "/swapfile"; device = "/swapfile";
@@ -42,6 +36,5 @@
} }
]; ];
# Older machine
system.stateVersion = "24.11"; system.stateVersion = "24.11";
} }

26
modules/hardware/boot.nix Normal file
View File

@@ -0,0 +1,26 @@
{ config, lib, ... }:
let
inherit (lib) mkOption types;
in {
options.bootMode = mkOption {
type = types.enum [ "uefi" "legacy" ];
default = "uefi";
};
config = {
boot.consoleLogLevel = 0;
boot.kernelParams = [ "quiet" "udev.log_level=3" ];
boot.loader = if config.bootMode == "uefi" then {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
timeout = 0;
} else {
grub.enable = true;
grub.device = "/dev/sda";
timeout = 0;
};
};
}

View File

@@ -13,11 +13,11 @@
package = config.boot.kernelPackages.nvidiaPackages.stable; package = config.boot.kernelPackages.nvidiaPackages.stable;
}; };
environment.systemPackages = with pkgs; [ #environment.systemPackages = with pkgs; [
(blender.override { # (blender.override {
cudaSupport = true; # cudaSupport = true;
}) # })
]; #];
# This causes very long build times # This causes very long build times
#nixpkgs.config.cudaSupport = true; #nixpkgs.config.cudaSupport = true;

View File

@@ -0,0 +1,9 @@
{ ... }:
{
networking = {
networkmanager = {
wifi.powersave = true;
};
};
}

View File

@@ -1,9 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports = [ ./packages.nix ];
./packages.nix
];
services.gnome-keyring.enable = true; services.gnome-keyring.enable = true;
@@ -31,14 +29,6 @@
home = { home = {
username = "jonas"; username = "jonas";
homeDirectory = "/home/jonas"; homeDirectory = "/home/jonas";
sessionVariables = {
EDITOR = "nvim";
HTTP_HOME = "duckduckgo.com";
MANPAGER="nvim +Man!";
};
shellAliases = {
fla = "sudo nixos-rebuild switch --flake '~/nixos#'";
};
pointerCursor = { pointerCursor = {
gtk.enable = true; gtk.enable = true;
name = "catppuccin-frappe-rosewater-cursors"; name = "catppuccin-frappe-rosewater-cursors";
@@ -64,19 +54,15 @@
platformTheme.name = "qtct"; platformTheme.name = "qtct";
style.name = "Kvantum"; style.name = "Kvantum";
}; };
xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini { }).generate "kvantum.kvconfig" {
xdg.configFile."Kvantum/kvantum.kvconfig".source =
(pkgs.formats.ini { }).generate "kvantum.kvconfig" {
General.theme = "Catppuccin-Frappe-Rosewater"; General.theme = "Catppuccin-Frappe-Rosewater";
}; };
xdg.configFile."qt6ct/qt6ct.conf".source = pkgs.writeTextFile { xdg.configFile."qt6ct/qt6ct.conf".source = pkgs.writeTextFile {
name = "qt6ct.conf"; name = "qt6ct.conf";
text = '' text =
[Appearance] " [Appearance]\n color_scheme_path=${pkgs.qt6ct}/share/qt6ct/colors/airy.conf\n custom_palette=false\n icon_theme=Papirus-Dark\n standard_dialogs=default\n style=kvantum\n";
color_scheme_path=${pkgs.qt6ct}/share/qt6ct/colors/airy.conf
custom_palette=false
icon_theme=Papirus-Dark
standard_dialogs=default
style=kvantum
'';
}; };
programs.starship = { programs.starship = {
@@ -86,7 +72,6 @@
aws.disabled = true; aws.disabled = true;
gcloud.disabled = true; gcloud.disabled = true;
line_break.disabled = true; line_break.disabled = true;
sudo = { sudo = {
disabled = false; disabled = false;
symbol = "SUDO "; symbol = "SUDO ";

View File

@@ -13,8 +13,6 @@
obsidian obsidian
rclone rclone
#jujutsu
unstable.spotify-player unstable.spotify-player
sops sops
@@ -42,11 +40,9 @@
shotcut shotcut
papirus-folders
todo-txt-cli todo-txt-cli
systemctl-tui systemctl-tui
acpi acpi
zsh
feh feh
watson watson
@@ -56,7 +52,6 @@
xdragon xdragon
luarocks luarocks
lua
gradle gradle
openjdk openjdk
@@ -70,7 +65,7 @@
zathura zathura
eza eza
fuzzel fuzzel
catppuccin-cursors
networkmanagerapplet networkmanagerapplet
gdu gdu
hyprpaper hyprpaper
@@ -84,7 +79,6 @@
signal-desktop signal-desktop
unison unison
trash-cli trash-cli
starship
python3 python3
fd fd
ttyper ttyper
@@ -92,46 +86,36 @@
vim vim
tofi tofi
bat bat
clipse
dunst dunst
killall killall
libreoffice libreoffice
perl perl
pipx pipx
wpgtk
waybar waybar
stow stow
brightnessctl brightnessctl
anki anki
unstable.typst unstable.typst
dnsmasq
davfs2
mediainfo mediainfo
powertop powertop
#midori
exiftool exiftool
gtk4.dev
curl curl
sioyek sioyek
qt6.qtbase
libpulseaudio
xournalpp xournalpp
rnote rnote
libinput
libGL
libglvnd
emacs emacs
cargo cargo
hyprshot hyprshot
hyprpicker hyprpicker
hyprsunset hyprsunset
wl-clipboard wl-clipboard
mpv mpv
gitui gitui
keepassxc keepassxc
kitty kitty
wlsunset
unstable.yazi unstable.yazi
neovim neovim
htop htop
@@ -142,49 +126,10 @@
zip zip
xz xz
unzip unzip
p7zip
jq
yq-go
mtr
iperf3
dnsutils
ldns
aria2
socat
nmap
ipcalc
# Misc
cowsay
file file
which
gnused
gnutar
gawk
zstd
gnupg gnupg
nix-output-monitor nix-output-monitor
# Productivity
hugo
glow
iotop
iftop
# System call monitoring
strace
ltrace
lsof
# System tools
sysstat
lm_sensors
pciutils
usbutils
]; ];
} }