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

@@ -1,31 +1,30 @@
{ ... }:
{
imports = [
./hardware-configuration.nix
imports = [
./hardware-configuration.nix
./../../user/users.nix
./../../user/users.nix
./../../modules/common.nix
./../../modules/common.nix
./../../modules/hardware/xremap.nix
./../../modules/services/webdav.nix
./../../modules/graphics/workstation.nix
./../../modules/services/webdav.nix
./../../modules/hardware/nvidia.nix
];
./../../modules/graphics/workstation.nix
networking.hostName = "minoxy";
./../../modules/hardware/nvidia.nix
./../../modules/hardware/boot.nix
./../../modules/hardware/xremap.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "minoxy";
systemd.targets.sleep.enable = true;
systemd.targets.suspend.enable = true;
systemd.targets.sleep.enable = true;
systemd.targets.suspend.enable = true;
virtualisation.docker.enable = true;
virtualisation.docker.storageDriver = "btrfs";
virtualisation.docker.enable = true;
virtualisation.docker.storageDriver = "btrfs";
# Never change this!
system.stateVersion = "25.05";
# Never change this!
system.stateVersion = "25.05";
}

View File

@@ -9,25 +9,18 @@
./../../modules/common.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/services/webdav.nix.nix
./../../modules/services/scanning.nix.nix
./../../modules/services/webdav.nix
./../../modules/services/scanning.nix
];
networking.hostName = "nixyos";
batMode = "single";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking = {
networkmanager = {
wifi.powersave = true;
};
};
# Older machine
system.stateVersion = "24.11";

View File

@@ -9,10 +9,13 @@
./../../modules/common.nix
./../../modules/hardware/xremap.nix
./../../modules/hardware/battery.nix
./../../modules/hardware/boot.nix
./../../modules/graphics/workstation.nix
./../../modules/laptop/powersave.nix
./../../modules/laptop/battery.nix
./../../modules/services/webdav.nix.nix
./../../modules/services/scanning.nix.nix
];
@@ -20,21 +23,12 @@
networking.hostName = "thinix";
batMode = "double";
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
programs.gnupg.agent = {
enable = true;
pinentryPackage = with pkgs; pinentry-all;
enableSSHSupport = true;
};
networking = {
networkmanager = {
wifi.powersave = true;
};
};
swapDevices = [
{
device = "/swapfile";
@@ -42,6 +36,5 @@
}
];
# Older machine
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;
};
environment.systemPackages = with pkgs; [
(blender.override {
cudaSupport = true;
})
];
#environment.systemPackages = with pkgs; [
# (blender.override {
# cudaSupport = true;
# })
#];
# This causes very long build times
#nixpkgs.config.cudaSupport = true;

View File

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

View File

@@ -1,102 +1,87 @@
{ pkgs, ... }:
{
imports = [
./packages.nix
];
imports = [ ./packages.nix ];
services.gnome-keyring.enable = true;
services.gnome-keyring.enable = true;
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
"application/pdf" = "sioyek.desktop";
"application/rnote" = "rnote.desktop";
"video/mp4" = "mpv.desktop";
"image/*" = "fehcustom.desktop";
};
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
"application/pdf" = "sioyek.desktop";
"application/rnote" = "rnote.desktop";
"video/mp4" = "mpv.desktop";
"image/*" = "fehcustom.desktop";
};
};
xdg.desktopEntries.fehcustom = {
name = "FehCustom";
terminal = false;
exec = "${pkgs.feh}/bin/feh -d --keep-zoom-vp --draw-exif --start-at %u";
};
xdg.desktopEntries.fehcustom = {
name = "FehCustom";
terminal = false;
exec = "${pkgs.feh}/bin/feh -d --keep-zoom-vp --draw-exif --start-at %u";
};
home = {
username = "jonas";
homeDirectory = "/home/jonas";
sessionVariables = {
EDITOR = "nvim";
HTTP_HOME = "duckduckgo.com";
MANPAGER="nvim +Man!";
};
shellAliases = {
fla = "sudo nixos-rebuild switch --flake '~/nixos#'";
};
pointerCursor = {
gtk.enable = true;
name = "catppuccin-frappe-rosewater-cursors";
package = pkgs.catppuccin-cursors.frappeRosewater;
size = 18;
};
};
home = {
username = "jonas";
homeDirectory = "/home/jonas";
pointerCursor = {
gtk.enable = true;
name = "catppuccin-frappe-rosewater-cursors";
package = pkgs.catppuccin-cursors.frappeRosewater;
size = 18;
};
};
gtk = {
enable = true;
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
};
gtk = {
enable = true;
iconTheme = {
package = pkgs.papirus-icon-theme;
name = "Papirus-Dark";
};
theme = {
name = "Adwaita-dark";
package = pkgs.gnome-themes-extra;
};
};
qt = {
enable = true;
platformTheme.name = "qtct";
style.name = "Kvantum";
};
xdg.configFile."Kvantum/kvantum.kvconfig".source = (pkgs.formats.ini { }).generate "kvantum.kvconfig" {
General.theme = "Catppuccin-Frappe-Rosewater";
};
xdg.configFile."qt6ct/qt6ct.conf".source = pkgs.writeTextFile {
name = "qt6ct.conf";
text = ''
[Appearance]
color_scheme_path=${pkgs.qt6ct}/share/qt6ct/colors/airy.conf
custom_palette=false
icon_theme=Papirus-Dark
standard_dialogs=default
style=kvantum
'';
};
qt = {
enable = true;
platformTheme.name = "qtct";
style.name = "Kvantum";
};
programs.starship = {
enable = true;
settings = {
add_newline = false;
aws.disabled = true;
gcloud.disabled = true;
line_break.disabled = true;
xdg.configFile."Kvantum/kvantum.kvconfig".source =
(pkgs.formats.ini { }).generate "kvantum.kvconfig" {
General.theme = "Catppuccin-Frappe-Rosewater";
};
xdg.configFile."qt6ct/qt6ct.conf".source = pkgs.writeTextFile {
name = "qt6ct.conf";
text =
" [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";
};
sudo = {
disabled = false;
symbol = "SUDO ";
style = "bold red";
};
programs.starship = {
enable = true;
settings = {
add_newline = false;
aws.disabled = true;
gcloud.disabled = true;
line_break.disabled = true;
sudo = {
disabled = false;
symbol = "SUDO ";
style = "bold red";
};
};
};
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.stateVersion = "24.11";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.stateVersion = "24.11";
}

View File

@@ -1,190 +1,135 @@
{ pkgs, ...}:
{ pkgs, ... }:
{
home.packages = with pkgs; [
weechat
just
iamb
wiki-tui
home.packages = with pkgs; [
weechat
just
iamb
wiki-tui
vscode
vscode
simple-scan
obsidian
rclone
simple-scan
obsidian
rclone
#jujutsu
unstable.spotify-player
unstable.spotify-player
sops
gimp
audio-recorder
cheese
age
git-lfs
sops
gimp
audio-recorder
cheese
age
git-lfs
tor
torsocks
w3m
timer
qbittorrent
discord
blender
audacity
zoom-us
vlc
thunderbird
obsidian
obs-studio
prismlauncher
inkscape
tor
torsocks
w3m
timer
qbittorrent
discord
blender
audacity
zoom-us
vlc
thunderbird
obsidian
obs-studio
prismlauncher
inkscape
shotcut
shotcut
todo-txt-cli
systemctl-tui
acpi
feh
papirus-folders
todo-txt-cli
systemctl-tui
acpi
zsh
feh
watson
slides
watson
slides
imagemagick
xdragon
imagemagick
xdragon
luarocks
luarocks
lua
gradle
openjdk
gradle
openjdk
findutils.locate
ethtool
qalculate-qt
wl-clip-persist
btop
fastfetch
zathura
eza
fuzzel
findutils.locate
ethtool
qalculate-qt
wl-clip-persist
btop
fastfetch
zathura
eza
fuzzel
catppuccin-cursors
networkmanagerapplet
gdu
hyprpaper
tokei
fzf
gcc
gnumake
lazygit
nodejs
ripgrep
signal-desktop
unison
trash-cli
starship
python3
fd
ttyper
zoxide
vim
tofi
bat
clipse
dunst
killall
libreoffice
perl
pipx
wpgtk
waybar
stow
brightnessctl
anki
unstable.typst
dnsmasq
davfs2
mediainfo
powertop
#midori
exiftool
gtk4.dev
curl
sioyek
qt6.qtbase
networkmanagerapplet
gdu
hyprpaper
tokei
fzf
gcc
gnumake
lazygit
nodejs
ripgrep
signal-desktop
unison
trash-cli
python3
fd
ttyper
zoxide
vim
tofi
bat
dunst
killall
libreoffice
perl
pipx
waybar
stow
brightnessctl
anki
unstable.typst
mediainfo
powertop
exiftool
curl
sioyek
libpulseaudio
xournalpp
rnote
libinput
libGL
libglvnd
emacs
cargo
hyprshot
hyprpicker
hyprsunset
wl-clipboard
mpv
gitui
keepassxc
kitty
wlsunset
unstable.yazi
neovim
htop
alpine
wget
tmux
xournalpp
rnote
emacs
cargo
hyprshot
hyprpicker
hyprsunset
zip
xz
unzip
p7zip
wl-clipboard
jq
yq-go
mpv
gitui
keepassxc
kitty
unstable.yazi
neovim
htop
alpine
wget
tmux
mtr
iperf3
dnsutils
ldns
aria2
socat
nmap
ipcalc
zip
xz
unzip
# Misc
cowsay
file
which
gnused
gnutar
gawk
zstd
gnupg
file
gnupg
nix-output-monitor
# Productivity
hugo
glow
iotop
iftop
# System call monitoring
strace
ltrace
lsof
# System tools
sysstat
lm_sensors
pciutils
usbutils
];
nix-output-monitor
];
}