dotfiles/hosts/lolcathost/default.nix

399 lines
9.9 KiB
Nix
Raw Normal View History

2024-11-07 17:37:15 +10:00
{
2024-10-30 13:51:36 +10:00
pkgs,
inputs,
2024-11-07 17:37:15 +10:00
...
}: let
home-manager = builtins.fetchTarball {
2025-02-19 12:14:25 +10:00
url = "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz";
sha256 = "0gjfa3bv0m0kymxqla9iih11gjb6czyj942v34pyc7xy4qsx898k";
2024-11-07 17:37:15 +10:00
};
in {
2024-10-30 13:51:36 +10:00
imports = [
2024-11-07 17:37:15 +10:00
./hardware-configuration.nix
(import "${home-manager}/nixos")
inputs.spicetify-nix.nixosModules.default
../modules/steam.nix
../modules/obsidian.nix
../modules/angryoxide.nix
../modules/flipperzero.nix
../modules/chameleonultragui.nix
2024-11-07 17:37:15 +10:00
];
programs.spicetify = let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
in {
enable = true;
enabledExtensions = with spicePkgs.extensions; [
adblock
hidePodcasts
shuffle # shuffle+ (special characters are sanitized out of extension names)
2024-10-30 13:51:36 +10:00
];
2024-11-07 17:37:15 +10:00
#theme = spicePkgs.themes.catppuccin;
#colorScheme = "mocha";
};
2024-10-30 13:51:36 +10:00
2024-11-07 17:37:15 +10:00
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
grub = {
efiSupport = true;
#efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system
device = "nodev";
useOSProber = false;
2024-11-07 17:37:15 +10:00
};
# GitHub: vinceliuice/grub2-themes
grub2-theme = {
enable = true;
2025-02-11 15:47:56 +10:00
theme = "whitesur"; # stylish, vimix, or whitesur
footer = true;
customResolution = "1920x1080"; # Optional: Set a custom resolution
};
2024-11-07 17:37:15 +10:00
};
2024-10-30 13:51:36 +10:00
# Set your time zone.
time.timeZone = "Australia/Brisbane";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Enable initrd hook for virtual console customisation
# aka cool colours when bootting yay!!
2024-10-30 13:51:36 +10:00
console = {
enable = true;
earlySetup = true; # initrd pre hook
2024-10-30 13:51:36 +10:00
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"
];
2024-10-30 13:51:36 +10:00
};
2024-11-07 17:37:15 +10:00
# ----- NETWORKING SECTION -----
networking.hostName = "lolcathost";
networking.networkmanager.enable = true;
# Open ports in the firewall.
#networking.firewall.allowedTCPPorts = [ ... ];
2024-11-07 17:37:15 +10:00
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
networking.firewall.enable = false;
2024-10-30 13:51:36 +10:00
2024-11-07 17:37:15 +10:00
# ----- SERVICES -----
services = {
# Set display manager (login screen)
displayManager = {
# sddm relies on pkgs.libsForQt5.qt5.qtgraphicaleffects
sddm = {
enable = true;
wayland.enable = true; # enable experimental sddm support for wayland
theme = "corners";
};
defaultSession = "hyprland";
};
2024-10-30 13:51:36 +10:00
2024-11-07 17:37:15 +10:00
# Enable sound
#hardware.pulseaudio.enable = false;
2024-11-07 17:37:15 +10:00
pipewire = {
enable = true;
2025-02-11 15:47:56 +10:00
wireplumber.enable = true;
2024-11-08 04:16:46 +10:00
alsa.enable = true;
alsa.support32Bit = true;
2024-11-07 17:37:15 +10:00
pulse.enable = true;
2024-11-08 04:16:46 +10:00
jack.enable = true;
2024-11-07 17:37:15 +10:00
};
# Enable touchpad support
libinput.enable = true;
tumbler.enable = true; # Thunar image thumbnail support
gvfs.enable = true; # Thunar mount, trash, and other functionality
2024-11-07 17:37:15 +10:00
};
2025-02-11 15:47:56 +10:00
security.rtkit.enable = true; # I *think* this is for pipewire
2024-11-07 17:37:15 +10:00
# allow wheel group to use passwordless sudo
users = {
# using fish as the login shell tends
# to go very poorly because it isn't
# POSIX compliant, so we'll just use
# simple Bash then :)
defaultUserShell = pkgs.bash;
users = {
# literally me fr (personal account)
2024-11-07 17:37:15 +10:00
me = {
isNormalUser = true;
extraGroups = ["wheel" "netdev" "docker"];
2024-11-07 17:37:15 +10:00
shell = pkgs.bash; #pkgs.fish
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
hyprpanel
# flatpak requires gnome-software
# for graphical applications
flatpak
gnome-software
colmena-latest
jetbrains.rider
gitkraken
];
2024-11-07 17:37:15 +10:00
};
2024-11-08 04:08:30 +10:00
# user for my professional jobs and stuff
ae = {
2024-11-07 17:37:15 +10:00
isNormalUser = true;
extraGroups = ["wheel"];
2024-11-08 04:08:30 +10:00
shell = pkgs.bash; #pkgs.fish
2024-11-07 17:37:15 +10:00
packages = with pkgs; [
];
};
# # This is the user account for servers
2024-11-08 04:08:30 +10:00
# dev = {
# isNormalUser = true;
# extraGroups = ["wheel"];
# shell = pkgs.bash; #pkgs.zsh
# packages = with pkgs; [
# ];
# };
# user for friends to ssh into
friends = {
2024-11-07 17:37:15 +10:00
isNormalUser = true;
2024-11-08 04:08:30 +10:00
shell = pkgs.fish;
2024-11-07 17:37:15 +10:00
packages = with pkgs; [
];
};
};
};
home-manager = {
users.me = import ../../homes/me;
#extraSpecialArgs = {inherit inputs pkgs;};
2024-11-07 17:37:15 +10:00
sharedModules = [
inputs.ags.homeManagerModules.default
inputs.nixcord.homeManagerModules.nixcord
#{nixpkgs.overlays = [inputs.hyprpanel.overlay];}
2024-10-30 13:51:36 +10:00
];
};
# set environment variables
environment.sessionVariables = {
# folder names with capitalisation look awful!
XDG_DOWNLOAD_DIR = "$HOME/downloads";
# Hint Electrons apps to use Wayland
NIXOS_OZONE_WL = "1";
};
2024-11-07 17:37:15 +10:00
# ---- SYSTEM PACKAGES -----
2024-10-30 13:51:36 +10:00
environment.systemPackages = with pkgs; [
2024-11-07 17:37:15 +10:00
# User Environment
inputs.swww.packages.${pkgs.system}.swww
helvum
easyeffects
ani-cli
wl-clipboard # clipboard for wayland
2025-02-21 18:48:51 +10:00
pavucontrol
2025-07-06 19:18:14 +10:00
qbittorrent # torrenting
2024-11-07 17:37:15 +10:00
(callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners
# dependencies for my sddm theme:
pkgs.libsForQt5.qt5.qtgraphicaleffects
2025-07-01 14:55:10 +10:00
python312 # I use 3.12 since it's in a pretty stable state now
python314 # also 3.14 for latest features
2024-11-07 17:37:15 +10:00
poetry # python dependency management and packaging
2025-07-01 14:55:10 +10:00
clang-tools
nim-2_2
nimble
# nimlangserver # FUCK THIS LSP, ITS AWFUL WITH HELIX
sageWithDoc # SageMath + HTML Documentation
2024-11-07 17:37:15 +10:00
# DEBUG: using neofetch temporarily to see if my system upgrades properly
neofetch
openvpn
inetutils
2024-11-07 17:37:15 +10:00
# fish plugins
grc # colorise command outputs
httpie
curlie
zoxide
doggo
2024-11-08 04:08:30 +10:00
tldr
# btop
eza
ripgrep
viddy # modern `watch` command
2024-11-07 17:37:15 +10:00
2025-02-13 12:23:39 +10:00
# TODO: once upgraded past Nix-24.07 this line won't be necessary (I think)
# 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
2024-11-07 17:37:15 +10:00
# Pretty necessary
git
2025-02-21 21:49:44 +10:00
git-filter-repo
2024-11-07 17:37:15 +10:00
brightnessctl
acpi
# upower
vim
powertop
gcc
gnumake
2025-07-06 19:18:14 +10:00
imagemagick
2024-11-07 17:37:15 +10:00
# Unix Commands
2024-10-30 13:51:36 +10:00
wget
2024-11-07 17:37:15 +10:00
tree
2024-11-08 04:08:30 +10:00
unzip
2025-07-06 19:18:14 +10:00
unrar-free
# Man Pages
man-pages
man-pages-posix
2024-11-07 17:37:15 +10:00
];
# Enable the use of certain programs
programs = {
hyprland = {
enable = true;
#package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
#portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
2024-11-07 17:37:15 +10:00
xwayland.enable = true;
};
zsh.enable = true;
fish.enable = true;
nix-ld.enable = true;
2024-11-07 17:37:15 +10:00
# I want to use fish as my login shell but it always goes terrible
# cause it isn't POSIX compliant, so instead Bash is my login and
# will just exec fish (^-^)
bash = {
completion.enable = true;
2024-11-07 17:37:15 +10:00
interactiveShellInit = ''
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
fi
'';
};
# 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
];
};
2024-11-07 17:37:15 +10:00
};
# ----- FONTS -----
fonts = {
enableDefaultPackages = true; # no clue what this line does tbh
packages = with pkgs; [
#(nerdfonts.override {
# fonts = [
# "Cousine"
# "Iosevka"
# "JetBrainsMono"
# ];
# })
nerdfonts
geist-font # for my hyprlock theme
2024-11-07 17:37:15 +10:00
# texlive maintains a noto-emoji flake
texlivePackages.noto-emoji
];
2025-02-11 15:47:56 +10:00
# TODO: change my default fonts
2024-11-07 17:37:15 +10:00
fontconfig = {
defaultFonts = {
serif = ["Geist"]; # TODO: package Iosevka Etoile since Iosevka isn't a serif font
sansSerif = ["Geist"];
2024-11-07 17:37:15 +10:00
monospace = ["Cousine"];
emoji = ["Noto Emoji"];
};
};
};
# Enable the new CLI commands and the flakes as experimental features
nix.settings.experimental-features = [
"nix-command"
"flakes"
2024-10-30 13:51:36 +10:00
];
2025-02-26 08:42:18 +10:00
virtualisation.docker.enable = true;
2024-10-30 13:51:36 +10:00
# 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;
2024-11-07 17:37:15 +10:00
# Enable OpenGL
hardware = {
graphics.enable = true;
# opengl = {
# enable = true;
# driSupport = true;
# driSupport32Bit = true;
# }
2024-11-07 17:37:15 +10:00
};
2024-10-30 13:51:36 +10:00
2024-11-07 17:37:15 +10:00
# DO NOT MODIFY
2024-10-30 13:51:36 +10:00
system.stateVersion = "24.05"; # Did you read the comment?
}