super massive rewrite
This commit is contained in:
parent
a2192c9341
commit
1de15c45f2
19 changed files with 746 additions and 1000 deletions
|
|
@ -1,139 +1,16 @@
|
|||
{
|
||||
lib,
|
||||
pkgs,
|
||||
upkgs,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
home-manager = builtins.fetchTarball {
|
||||
url = "https://github.com/nix-community/home-manager/archive/release-25.05.tar.gz";
|
||||
sha256 = "0q3lv288xlzxczh6lc5lcw0zj9qskvjw3pzsrgvdh8rl8ibyq75s";
|
||||
};
|
||||
in {
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
|
||||
../modules/bashistrans.nix
|
||||
|
||||
../modules/wm/hyprland.nix
|
||||
|
||||
../modules/steam.nix
|
||||
|
||||
../modules/obsidian.nix
|
||||
../modules/apps/rider.nix
|
||||
../modules/apps/winbox.nix
|
||||
|
||||
#../modules/flipperzero.nix
|
||||
#../modules/chameleonultragui.nix
|
||||
|
||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||
];
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [
|
||||
"flakes"
|
||||
"nix-command"
|
||||
"pipe-operators"
|
||||
];
|
||||
download-buffer-size = 524288000; # 500 MiB
|
||||
};
|
||||
# nixpkgs.overlays = [
|
||||
# (self: super: {
|
||||
# jdk17 = super.jdk17.override (prev: {
|
||||
# enableJavaFX = true;
|
||||
# });
|
||||
# })
|
||||
# ];
|
||||
|
||||
nixpkgs.config.allowUnfreePredicate = let
|
||||
vscext = pkgs.vscode-extensions;
|
||||
whitelist = with pkgs;
|
||||
map lib.getName [
|
||||
discord
|
||||
steam
|
||||
steamcmd
|
||||
steam-unwrapped
|
||||
|
||||
winbox
|
||||
|
||||
obsidian
|
||||
gitkraken
|
||||
|
||||
vscode
|
||||
vscext.ms-dotnettools.csharp
|
||||
vscext.ms-dotnettools.csdevkit
|
||||
vscext.github.copilot
|
||||
vscext.github.copilot-chat
|
||||
|
||||
# XXX: DEBUG
|
||||
# rider-override
|
||||
# XXX: DEBUG
|
||||
|
||||
# jetbrains.rider
|
||||
];
|
||||
in
|
||||
pkg: builtins.elem (lib.getName pkg) whitelist;
|
||||
|
||||
boot.loader = {
|
||||
efi = {
|
||||
canTouchEfiVariables = true;
|
||||
efiSysMountPoint = "/boot/efi";
|
||||
};
|
||||
grub = {
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
# useOSProber = true;
|
||||
};
|
||||
# GitHub: vinceliuice/grub2-themes
|
||||
grub2-theme = {
|
||||
enable = true;
|
||||
theme = "whitesur"; # stylish, vimix, or whitesur
|
||||
footer = true;
|
||||
# TODO: switch my cables to switch default grub display
|
||||
customResolution = "3840x2160";
|
||||
};
|
||||
};
|
||||
|
||||
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 = "myputer";
|
||||
networkmanager.enable = true;
|
||||
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [
|
||||
22 # SSH
|
||||
80 # HTTP
|
||||
|
|
@ -147,239 +24,40 @@ in {
|
|||
# ----- SERVICES -----
|
||||
services = {
|
||||
flatpak.enable = 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
|
||||
then "-uwsm"
|
||||
else null
|
||||
);
|
||||
};
|
||||
|
||||
# Multimedia Framework
|
||||
# With backwards compatability for alsa/pulseaudio/jack
|
||||
pipewire = {
|
||||
enable = true;
|
||||
wireplumber.enable = true;
|
||||
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.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 -------
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
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 = {
|
||||
# just 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
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
nitch
|
||||
starfetch
|
||||
|
||||
colmena-latest
|
||||
colmena-latest
|
||||
|
||||
gitkraken
|
||||
# NOTE: downloadthing this causes my PC to freak!! ("too many open files" error)
|
||||
#keyguard # bitwarden client app
|
||||
];
|
||||
gitkraken
|
||||
# NOTE: downloadthing this causes my PC to freak!! ("too many open files" error)
|
||||
#keyguard # bitwarden client app
|
||||
];
|
||||
};
|
||||
|
||||
# user for my professional jobs and stuff
|
||||
ae = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel"];
|
||||
shell = pkgs.bash;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
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
|
||||
qbittorrent
|
||||
signal-desktop
|
||||
kdePackages.gwenview # image viewer
|
||||
libreoffice
|
||||
|
||||
# TEST: WARNING
|
||||
# ospd-openvas
|
||||
# openvas-scanner
|
||||
# openvas-smb
|
||||
|
||||
(callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners
|
||||
# dependencies for my sddm theme:
|
||||
pkgs.libsForQt5.qt5.qtgraphicaleffects
|
||||
|
||||
# Shell
|
||||
bash
|
||||
fish
|
||||
shellcheck
|
||||
grc # colorise command outputs
|
||||
moreutils
|
||||
|
||||
# Systems Programming & Compilation
|
||||
qemu # Fellice Bellard's Quick Emulator
|
||||
# GNU Utils
|
||||
gnumake
|
||||
# Binaries
|
||||
binutils
|
||||
strace
|
||||
ltrace
|
||||
perf-tools # ftrace + perf
|
||||
radare2
|
||||
gdb
|
||||
# ASM
|
||||
nasm
|
||||
(callPackage ../packages/x86-manpages {})
|
||||
# C Family
|
||||
gcc
|
||||
clang
|
||||
clang-tools
|
||||
|
||||
# Rust
|
||||
cargo
|
||||
rustc
|
||||
# Go
|
||||
go
|
||||
# Nim
|
||||
nim
|
||||
nimble
|
||||
# Haskell
|
||||
ghc
|
||||
ghcid
|
||||
ormolu
|
||||
|
||||
# Java
|
||||
visualvm
|
||||
|
||||
# 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
|
||||
wireguard-tools
|
||||
|
||||
httpie
|
||||
curlie
|
||||
zoxide
|
||||
doggo
|
||||
tldr
|
||||
# btop
|
||||
eza
|
||||
yazi
|
||||
lazygit
|
||||
ripgrep
|
||||
viddy # modern `watch` command
|
||||
|
||||
deploy-rs
|
||||
|
||||
tesseract # for my work with Agribit
|
||||
|
||||
# Pretty necessary
|
||||
git
|
||||
git-filter-repo
|
||||
nix-prefetch-git
|
||||
brightnessctl
|
||||
acpi
|
||||
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
|
||||
upkgs.olympus # CELESTE!! <3 :3
|
||||
discord
|
||||
];
|
||||
|
||||
|
|
@ -399,122 +77,6 @@ in {
|
|||
# ];
|
||||
#};
|
||||
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
fish.enable = true;
|
||||
|
||||
nix-ld.enable = true;
|
||||
|
||||
neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
configure = {
|
||||
customRC = ''
|
||||
set number
|
||||
set tabstop=4
|
||||
set shiftwidth=4
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
# Thunar also (optionally) requires: `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;
|
||||
|
||||
java = let
|
||||
# XXX: WARNING: TEST :WARNING: XXX
|
||||
# Test for CrazyCraft VoidLauncher
|
||||
myjdk = pkgs.jdk17.override {
|
||||
enableJavaFX = true;
|
||||
# openjfx_jdk = pkgs.openjfx17.override {withWebKit = true;};
|
||||
};
|
||||
in {
|
||||
enable = true;
|
||||
package = myjdk;
|
||||
};
|
||||
};
|
||||
|
||||
# ----- FONTS -----
|
||||
fonts = {
|
||||
enableDefaultPackages = true; # no clue what this line does tbh
|
||||
packages = with pkgs;
|
||||
[
|
||||
# (nerdfonts.override {
|
||||
# fonts = [
|
||||
# "Cousine" # its ok i guess
|
||||
# "Iosevka" # nah nah
|
||||
# "IosevkaTerm" # big nah
|
||||
# "CascadiaCode" # potential
|
||||
# "FiraCode" # potential
|
||||
# "JetBrainsMono" # for my rofi theme
|
||||
# "Hasklig"
|
||||
# "Hack"
|
||||
# ];
|
||||
# })
|
||||
|
||||
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 = ["Iosevka"];
|
||||
sansSerif = ["Iosevka "];
|
||||
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
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue