super massive rewrite
This commit is contained in:
parent
a2192c9341
commit
1de15c45f2
19 changed files with 746 additions and 1000 deletions
|
|
@ -1,451 +1,20 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
upkgs,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
{...}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
|
||||
../modules/bashistrans.nix
|
||||
|
||||
../modules/wm/hyprland.nix
|
||||
|
||||
../modules/steam.nix
|
||||
../modules/obsidian.nix
|
||||
];
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
"pipe-operators"
|
||||
];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = let
|
||||
whitelist = with pkgs;
|
||||
map lib.getName [
|
||||
discord
|
||||
steam
|
||||
steamcmd
|
||||
steam-unwrapped
|
||||
|
||||
winbox
|
||||
|
||||
obsidian
|
||||
gitkraken
|
||||
];
|
||||
in
|
||||
pkg: builtins.elem (lib.getName pkg) whitelist;
|
||||
|
||||
boot.loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
grub = {
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
useOSProber = false;
|
||||
};
|
||||
# GitHub: vinceliuice/grub2-themes
|
||||
grub2-theme = {
|
||||
enable = true;
|
||||
theme = "whitesur"; # stylish, vimix, or whitesur
|
||||
footer = true;
|
||||
customResolution = "1920x1080";
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "Australia/Brisbane";
|
||||
i18n.defaultLocale = "en_US.UTF-8"; # internationalisation
|
||||
|
||||
# Enable initrd hook for virtual console customisation
|
||||
# aka cool colours when bootting yay!!
|
||||
console = {
|
||||
enable = true;
|
||||
earlySetup = true; # initrd pre hook
|
||||
keyMap = "us";
|
||||
font = "Lat2-Terminus16";
|
||||
# ANSI 24-bit color definitions (theme: dracula)
|
||||
colors = [
|
||||
"21222c"
|
||||
"ff5555"
|
||||
"50fa7b"
|
||||
"f1fa8c"
|
||||
"bd93f9"
|
||||
"ff79c6"
|
||||
"8be9fd"
|
||||
"f8f8f2"
|
||||
"6272a4"
|
||||
"ff6e6e"
|
||||
"69ff94"
|
||||
"ffffa5"
|
||||
"d6acff"
|
||||
"ff92df"
|
||||
"a4ffff"
|
||||
"ffffff"
|
||||
];
|
||||
};
|
||||
|
||||
# ----- NETWORKING -----
|
||||
networking = {
|
||||
hostName = "lolcathost";
|
||||
networkmanager.enable = true;
|
||||
|
||||
firewall.enable = false;
|
||||
|
||||
# Use CloudFlare's WARP+ 1.1.1.1 DNS service
|
||||
nameservers = [
|
||||
"1.1.1.1#one.one.one.one"
|
||||
"1.0.0.1#one.one.one.one"
|
||||
];
|
||||
};
|
||||
networking.hostName = "lolcathost";
|
||||
|
||||
# ----- SERVICES -----
|
||||
services = {
|
||||
# systemd-resolved provides network name resolution
|
||||
# to local processes via a D-Bus interface.
|
||||
resolved = {
|
||||
enable = true;
|
||||
dnssec = "true";
|
||||
domains = ["~."];
|
||||
# Use CloudFlare's WARP+ 1.1.1.1 DNS service
|
||||
fallbackDns = [
|
||||
"1.1.1.1#one.one.one.one"
|
||||
"1.0.0.1#one.one.one.one"
|
||||
];
|
||||
dnsovertls = "true";
|
||||
};
|
||||
|
||||
# Set display manager (login screen)
|
||||
displayManager = {
|
||||
# sddm relies on pkgs.libsForQt5.qt5.qtgraphicaleffects
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true; # experimental
|
||||
theme = "corners";
|
||||
};
|
||||
defaultSession =
|
||||
"hyprland"
|
||||
+ (
|
||||
if config.programs.hyprland.withUWSM == true
|
||||
then "-uwsm"
|
||||
else null
|
||||
);
|
||||
};
|
||||
|
||||
# dbus = {
|
||||
# # NOTE: programs.uwsm.enable sets implementation to dbus-broker,
|
||||
# # NOTE: however this seems to break dbus
|
||||
# implementation = lib.mkForce "dbus";
|
||||
# };
|
||||
|
||||
# Multimedia Framework
|
||||
# With backwards compatability for alsa/pulseaudio/jack
|
||||
pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
wireplumber.enable = true;
|
||||
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
# Touchpad support
|
||||
libinput.enable = true;
|
||||
|
||||
tumbler.enable = true; # Thunar image thumbnail support
|
||||
gvfs.enable = true; # Thunar mount, trash, and other functionality
|
||||
};
|
||||
security.rtkit.enable = true; # I *think* this is for pipewire
|
||||
|
||||
# ------- USERS -------
|
||||
users = {
|
||||
# Using fish as the login shell tends to go very poorly because it isn't
|
||||
# POSIX compliant, so we default the login shell to Bash instead :)
|
||||
defaultUserShell = pkgs.bash;
|
||||
|
||||
users = {
|
||||
# literally me fr (personal account)
|
||||
me = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "netdev" "docker"];
|
||||
shell = pkgs.bash;
|
||||
packages = let
|
||||
# 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?
|
||||
colmena-src = pkgs.fetchFromGitHub {
|
||||
owner = "zhaofengli";
|
||||
repo = "colmena";
|
||||
rev = "47b6414d800c8471e98ca072bc0835345741a56a";
|
||||
sha256 = "rINodqeUuezuCWOnpJgrH7u9vJ86fYT+Dj8Mu8T/IBc=";
|
||||
};
|
||||
colmena-latest = pkgs.callPackage "${colmena-src}/package.nix" {};
|
||||
in
|
||||
with pkgs; [
|
||||
firefox
|
||||
nitch
|
||||
starfetch
|
||||
|
||||
colmena-latest
|
||||
|
||||
gitkraken
|
||||
];
|
||||
};
|
||||
|
||||
# user for friends to ssh into
|
||||
friends = {
|
||||
isNormalUser = true;
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
users.me = import ../../homes/me;
|
||||
extraSpecialArgs = {inherit inputs pkgs upkgs;};
|
||||
sharedModules = [];
|
||||
};
|
||||
|
||||
# ---- ENVIRONMENT VARIABLES ----
|
||||
environment = {
|
||||
# always install "dev" derivation outputs
|
||||
extraOutputsToInstall = ["dev" "man"];
|
||||
|
||||
sessionVariables = {
|
||||
# folder names with capitalisation look awful!
|
||||
XDG_DOWNLOAD_DIR = "$HOME/downloads";
|
||||
|
||||
# Hint Electrons apps to use Wayland
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
};
|
||||
|
||||
# ---- SYSTEM PACKAGES -----
|
||||
environment.systemPackages = with pkgs; [
|
||||
# User Environment
|
||||
swww
|
||||
helvum
|
||||
easyeffects
|
||||
pavucontrol
|
||||
ani-cli
|
||||
bluetui
|
||||
wl-clipboard # clipboard for wayland
|
||||
hyprpicker # color picker
|
||||
hyprshot # screenshot utility
|
||||
wl-screenrec # screen recording utility
|
||||
qbittorrent # torrenting
|
||||
signal-desktop
|
||||
video-trimmer
|
||||
|
||||
(callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners
|
||||
# dependencies for my sddm theme:
|
||||
pkgs.libsForQt5.qt5.qtgraphicaleffects
|
||||
|
||||
# Shell
|
||||
bash
|
||||
fish
|
||||
elvish # reference for crysh development
|
||||
shellcheck
|
||||
grc # colorise command outputs
|
||||
moreutils
|
||||
|
||||
# Systems Emulation
|
||||
qemu # Fellice Bellard's Quick Emulator
|
||||
# Binaries
|
||||
binutils
|
||||
strace
|
||||
ltrace
|
||||
perf-tools # ftrace + perf
|
||||
radare2
|
||||
gdb
|
||||
hexyl
|
||||
# ASM
|
||||
nasm
|
||||
# x86-manpages # WARNING: cerulean doesn't allow overlays bruh
|
||||
# C Family
|
||||
gcc
|
||||
clang
|
||||
clang-tools
|
||||
gnumake
|
||||
cmake
|
||||
|
||||
# Rust
|
||||
cargo
|
||||
rustc
|
||||
rustfmt
|
||||
# Go
|
||||
go
|
||||
# Nim
|
||||
nim
|
||||
nimble
|
||||
# Haskell
|
||||
ghc
|
||||
ghcid
|
||||
ormolu
|
||||
|
||||
# Nix
|
||||
nix-prefetch-git
|
||||
nix-index
|
||||
nix-unit
|
||||
deploy-rs.deploy-rs
|
||||
|
||||
# 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
|
||||
|
||||
# .NET
|
||||
dotnetCorePackages.dotnet_9.sdk
|
||||
dotnetCorePackages.dotnet_9.aspnetcore
|
||||
dotnetCorePackages.dotnet_9.runtime
|
||||
|
||||
openvpn
|
||||
inetutils
|
||||
|
||||
# security tools
|
||||
rustscan
|
||||
nmap
|
||||
dig
|
||||
gobuster
|
||||
nth
|
||||
zap
|
||||
|
||||
httpie
|
||||
curlie
|
||||
zoxide
|
||||
doggo
|
||||
tldr
|
||||
btop
|
||||
eza
|
||||
yazi
|
||||
lazygit
|
||||
ripgrep
|
||||
viddy # modern `watch` command
|
||||
timg # terminal image (sixel) viewer
|
||||
|
||||
# Pretty necessary
|
||||
git
|
||||
git-filter-repo
|
||||
brightnessctl
|
||||
acpi
|
||||
# upower
|
||||
vim
|
||||
powertop
|
||||
imagemagick
|
||||
|
||||
# "Standard" Unix Commands
|
||||
file
|
||||
wget
|
||||
tree
|
||||
pstree
|
||||
unzip
|
||||
unrar-free
|
||||
lz4
|
||||
man-pages
|
||||
man-pages-posix
|
||||
|
||||
# Cryptography
|
||||
gnupg
|
||||
openssl
|
||||
libargon2
|
||||
|
||||
# Games
|
||||
prismlauncher # minecraft
|
||||
upkgs.olympus # celeste
|
||||
discord
|
||||
discordo
|
||||
# ekphos # WARNING: cerulean doesnt allow overlays yet
|
||||
];
|
||||
|
||||
programs = {
|
||||
fish.enable = true;
|
||||
|
||||
nix-ld.enable = true;
|
||||
|
||||
# Thunar also uses: `services.tumbler` & `services.gvfs`
|
||||
thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-volman # for removable drives (ie USBs)
|
||||
thunar-archive-plugin # create and extract archives
|
||||
thunar-media-tags-plugin # change metadata for media files
|
||||
];
|
||||
};
|
||||
|
||||
# mozilla's email client
|
||||
thunderbird.enable = true;
|
||||
};
|
||||
|
||||
# ----- FONTS -----
|
||||
fonts = {
|
||||
enableDefaultPackages = true; # no clue what this line does tbh
|
||||
packages = with pkgs;
|
||||
[
|
||||
#(nerdfonts.override {
|
||||
# fonts = [
|
||||
# "Cousine"
|
||||
# "Iosevka"
|
||||
# "JetBrainsMono"
|
||||
# ];
|
||||
# })
|
||||
|
||||
geist-font # for my hyprlock theme
|
||||
# texlive maintains a noto-emoji flake
|
||||
texlivePackages.noto-emoji
|
||||
]
|
||||
++ builtins.filter lib.attrsets.isDerivation (
|
||||
builtins.attrValues pkgs.nerd-fonts
|
||||
);
|
||||
|
||||
# TODO: change my default fonts
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = ["Geist"]; # TODO: package Iosevka Etoile since Iosevka isn't a serif font
|
||||
sansSerif = ["Geist"];
|
||||
monospace = ["Cousine"];
|
||||
emoji = ["Noto Emoji"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = true; # install /share/doc packages
|
||||
man.enable = true; # install manpages
|
||||
info.enable = true; # install GNU info
|
||||
dev.enable = true; # install docs intended for developers
|
||||
nixos = {
|
||||
enable = true; # install NixOS documentation (ie man -k nix, & nixos-help)
|
||||
options.splitBuild = true;
|
||||
# includeAllModules = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.docker.enable = true;
|
||||
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
# opengl = {
|
||||
# enable = true;
|
||||
# driSupport = true;
|
||||
# driSupport32Bit = true;
|
||||
# }
|
||||
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
};
|
||||
};
|
||||
|
||||
# DO NOT MODIFY
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue