clean <host>/default.nix (part 3)

This commit is contained in:
Emile Clark-Boman 2025-08-01 13:17:12 +10:00
parent 20bdc7b50c
commit e4bfdad61b
2 changed files with 105 additions and 85 deletions

View file

@ -22,6 +22,11 @@ in {
../modules/chameleonultragui.nix ../modules/chameleonultragui.nix
]; ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfreePredicate = let nixpkgs.config.allowUnfreePredicate = let
whitelist = map lib.getName [ whitelist = map lib.getName [
pkgs.obsidian pkgs.obsidian
@ -125,12 +130,10 @@ in {
}; };
security.rtkit.enable = true; # I *think* this is for pipewire security.rtkit.enable = true; # I *think* this is for pipewire
# allow wheel group to use passwordless sudo # ------- USERS -------
users = { users = {
# using fish as the login shell tends # Using fish as the login shell tends to go very poorly because it isn't
# to go very poorly because it isn't # POSIX compliant, so we default the login shell to Bash instead :)
# POSIX compliant, so we'll just use
# simple Bash then :)
defaultUserShell = pkgs.bash; defaultUserShell = pkgs.bash;
users = { users = {
@ -138,7 +141,7 @@ in {
me = { me = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel" "netdev" "docker"]; extraGroups = ["wheel" "netdev" "docker"];
shell = pkgs.bash; #pkgs.fish shell = pkgs.bash;
packages = let packages = let
# TODO: can I just do this: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#url-like-syntax # TODO: can I just do this: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#url-like-syntax
# instead to use colmena's flake.nix by specifying a rev hash in the flake input? # instead to use colmena's flake.nix by specifying a rev hash in the flake input?
@ -165,8 +168,6 @@ in {
friends = { friends = {
isNormalUser = true; isNormalUser = true;
shell = pkgs.fish; shell = pkgs.fish;
packages = with pkgs; [
];
}; };
}; };
}; };
@ -179,7 +180,7 @@ in {
]; ];
}; };
# set environment variables # ---- ENVIRONMENT VARIABLES ----
environment.sessionVariables = { environment.sessionVariables = {
# folder names with capitalisation look awful! # folder names with capitalisation look awful!
XDG_DOWNLOAD_DIR = "$HOME/downloads"; XDG_DOWNLOAD_DIR = "$HOME/downloads";
@ -194,10 +195,10 @@ in {
swww swww
helvum helvum
easyeffects easyeffects
pavucontrol
ani-cli ani-cli
bluetui bluetui
wl-clipboard # clipboard for wayland wl-clipboard # clipboard for wayland
pavucontrol
qbittorrent # torrenting qbittorrent # torrenting
signal-desktop signal-desktop
@ -206,10 +207,14 @@ in {
pkgs.libsForQt5.qt5.qtgraphicaleffects pkgs.libsForQt5.qt5.qtgraphicaleffects
# Shell # Shell
bash
zsh
fish
shellcheck shellcheck
# Fish Plugins
grc # colorise command outputs grc # colorise command outputs
# Make
gnumake
# C Family # C Family
gcc gcc
clang clang
@ -228,9 +233,6 @@ in {
# Sage # Sage
sageWithDoc # SageMath + HTML Documentation sageWithDoc # SageMath + HTML Documentation
# DEBUG: using neofetch temporarily to see if my system upgrades properly
neofetch
openvpn openvpn
inetutils inetutils
@ -263,12 +265,12 @@ in {
# Pretty necessary # Pretty necessary
git git
git-filter-repo git-filter-repo
nix-prefetch-git
brightnessctl brightnessctl
acpi acpi
# upower # upower
vim vim
powertop powertop
gnumake
imagemagick imagemagick
# "Standard" Unix Commands # "Standard" Unix Commands
@ -279,7 +281,11 @@ in {
unrar-free unrar-free
man-pages man-pages
man-pages-posix man-pages-posix
# Cryptography
gnupg gnupg
openssl
libargon2
# Games # Games
mindustry mindustry
@ -294,6 +300,7 @@ in {
xwayland.enable = true; xwayland.enable = true;
}; };
zsh.enable = true;
fish.enable = true; fish.enable = true;
nix-ld.enable = true; nix-ld.enable = true;
@ -322,6 +329,9 @@ in {
thunar-media-tags-plugin # change metadata for media files thunar-media-tags-plugin # change metadata for media files
]; ];
}; };
# mozilla's email client
thunderbird.enable = true;
}; };
# ----- FONTS ----- # ----- FONTS -----
@ -357,26 +367,8 @@ in {
}; };
}; };
# Enable the new CLI commands and the flakes as experimental features
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Enable OpenGL
hardware = { hardware = {
graphics.enable = true; graphics.enable = true;

View file

@ -7,7 +7,7 @@
}: let }: let
home-manager = builtins.fetchTarball { home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz"; url = "https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz";
sha256 = "1kk5qzfb87mkgy6vzm7x8z8akxr3k8k7839yjdy48z034pvidhsr"; sha256 = "026rvynmzmpigax9f8gy9z67lsl6dhzv2p6s8wz4w06v3gjvspm1";
}; };
in { in {
imports = [ imports = [
@ -21,6 +21,11 @@ in {
../modules/chameleonultragui.nix ../modules/chameleonultragui.nix
]; ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
nixpkgs.config.allowUnfreePredicate = let nixpkgs.config.allowUnfreePredicate = let
whitelist = map lib.getName [ whitelist = map lib.getName [
pkgs.obsidian pkgs.obsidian
@ -48,7 +53,8 @@ in {
enable = true; enable = true;
theme = "whitesur"; # stylish, vimix, or whitesur theme = "whitesur"; # stylish, vimix, or whitesur
footer = true; footer = true;
customResolution = "1920x1080"; # TODO: switch my cables to switch default grub display
customResolution = "3840x2160";
}; };
}; };
@ -121,21 +127,19 @@ in {
}; };
security.rtkit.enable = true; # I *think* this is for pipewire security.rtkit.enable = true; # I *think* this is for pipewire
# allow wheel group to use passwordless sudo # ------- USERS -------
security.sudo.wheelNeedsPassword = false; security.sudo.wheelNeedsPassword = false;
users = { users = {
# using fish as the login shell tends # Using fish as the login shell tends to go very poorly because it isn't
# to go very poorly because it isn't # POSIX compliant, so we default the login shell to Bash instead :)
# POSIX compliant, so we'll just use
# simple Bash then :)
defaultUserShell = pkgs.bash; defaultUserShell = pkgs.bash;
users = { users = {
# just me fr (personal account) # just me fr (personal account)
me = { me = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel" "docker"]; extraGroups = ["wheel" "netdev" "docker"];
shell = pkgs.bash; #pkgs.fish shell = pkgs.bash;
packages = let packages = let
# TODO: can I just do this: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#url-like-syntax # TODO: can I just do this: https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-flake#url-like-syntax
# instead to use colmena's flake.nix by specifying a rev hash in the flake input? # instead to use colmena's flake.nix by specifying a rev hash in the flake input?
@ -164,9 +168,7 @@ in {
ae = { ae = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel"]; extraGroups = ["wheel"];
shell = pkgs.bash; #pkgs.fish shell = pkgs.bash;
packages = with pkgs; [
];
}; };
}; };
}; };
@ -178,7 +180,7 @@ in {
]; ];
}; };
# set environment variables # ---- ENVIRONMENT VARIABLES ----
environment.sessionVariables = { environment.sessionVariables = {
# folder names with capitalisation look awful! # folder names with capitalisation look awful!
XDG_DOWNLOAD_DIR = "$HOME/downloads"; XDG_DOWNLOAD_DIR = "$HOME/downloads";
@ -198,60 +200,97 @@ in {
bluetui bluetui
wl-clipboard # clipboard for wayland wl-clipboard # clipboard for wayland
hyprpicker hyprpicker
qbittorrent
signal-desktop
#(callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners (callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners
# dependencies for my sddm theme: # dependencies for my sddm theme:
pkgs.libsForQt5.qt5.qtgraphicaleffects pkgs.libsForQt5.qt5.qtgraphicaleffects
python311 # I use 3.11 since it's in a pretty stable state now # Shell
poetry # python dependency management and packaging bash
zsh
nixd # lsp for nix fish
shellcheck
neofetch # TODO: remove (installed to debug something)
# fish plugins
grc # colorise command outputs grc # colorise command outputs
# Make
gnumake
# C Family
gcc
clang
# Rust
cargo
rustc
# Nim
nim
# Go
go
# Python
python312 # I use 3.12 since it's in a pretty stable state now
python314 # also 3.14 for latest features
poetry
# Sage
sageWithDoc # SageMath + HTML Documentation
openvpn
inetutils
# security tools
rustscan
nmap
dig
gobuster
nth
zap
httpie httpie
curlie curlie
zoxide zoxide
doggo doggo
tldr tldr
viddy # btop
eza
yazi
lazygit
ripgrep
viddy # modern `watch` command
thefuck
tesseract # for my work with Agribit tesseract # for my work with Agribit
# TODO: remove this and host my nix flake on github instead # TODO: once upgraded past Nix-24.07 this line won't be necessary (I think)
#wishlist # helix will support nixd by default
# SOURCE: https://github.com/nix-community/nixd/blob/main/nixd/docs/editor-setup.md#Helix
# nixd # lsp for nix # DEBUG
# Pretty necessary # Pretty necessary
git git
git-filter-repo git-filter-repo
nix-prefetch-git
brightnessctl brightnessctl
acpi acpi
vim vim
nix-prefetch-git powertop
gcc imagemagick
gnumake
# Unix Commands # "Standard" Unix Commands
file file
wget wget
tree tree
unzip unzip
# Man Pages unrar-free
man-pages man-pages
man-pages-posix man-pages-posix
# Cryptography # Cryptography
gnupg
openssl openssl
libargon2 libargon2
# Games # Games
mindustry-wayland prismlauncher # minecraft
dwarf-fortress
nethack
]; ];
# DEBUG: configuring xdg portal here instead? # DEBUG: configuring xdg portal here instead?
@ -270,7 +309,6 @@ in {
# ]; # ];
#}; #};
# Enable the use of certain programs
programs = { programs = {
hyprland = { hyprland = {
enable = true; enable = true;
@ -281,6 +319,8 @@ in {
zsh.enable = true; zsh.enable = true;
fish.enable = true; fish.enable = true;
nix-ld.enable = true;
neovim = { neovim = {
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
@ -360,29 +400,17 @@ in {
}; };
}; };
# Enable the new CLI commands and the flakes as experimental features
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
#programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
#};
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Enable OpenGL
hardware = { hardware = {
graphics.enable = true; graphics.enable = true;
# opengl = {
# enable = true;
# driSupport = true;
# driSupport32Bit = true;
# }
bluetooth = { bluetooth = {
enable = true; enable = true;
powerOnBoot = true; powerOnBoot = true;