360 lines
9.1 KiB
Nix
Executable file
360 lines
9.1 KiB
Nix
Executable file
{
|
|
pkgs,
|
|
inputs,
|
|
lib,
|
|
wishlist,
|
|
...
|
|
}: let
|
|
home-manager = builtins.fetchTarball {
|
|
url = "https://github.com/nix-community/home-manager/archive/release-24.11.tar.gz";
|
|
sha256 = "1dga3vsd60v9mfyhwgbil13mrchw5crbpgh4zjw9fghv1vyk89vq";
|
|
};
|
|
in {
|
|
imports = [
|
|
./hardware-configuration.nix
|
|
(import "${home-manager}/nixos")
|
|
inputs.spicetify-nix.nixosModules.default
|
|
];
|
|
|
|
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)
|
|
];
|
|
#theme = spicePkgs.themes.catppuccin;
|
|
#colorScheme = "mocha";
|
|
};
|
|
|
|
boot.loader.systemd-boot.enable = false;
|
|
boot.loader = {
|
|
efi = {
|
|
canTouchEfiVariables = true;
|
|
efiSysMountPoint = "/boot/efi"; #/boot/efi
|
|
};
|
|
grub = {
|
|
efiSupport = true;
|
|
#efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system
|
|
device = "nodev";
|
|
#useOSProber = true;
|
|
};
|
|
grub2-theme = {
|
|
enable = true;
|
|
theme = "whitesur"; # stylish, vimix, or whitesur
|
|
footer = true;
|
|
customResolution = "1920x1080";
|
|
};
|
|
};
|
|
|
|
# Set your time zone.
|
|
time.timeZone = "Australia/Brisbane";
|
|
|
|
# Select internationalisation properties.
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
console = {
|
|
font = "Lat2-Terminus16";
|
|
keyMap = "us";
|
|
};
|
|
|
|
# ----- NETWORKING SECTION -----
|
|
networking.hostName = "myputer";
|
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
|
|
# Open ports in the firewall.
|
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
# Or disable the firewall altogether.
|
|
networking.firewall.enable = true;
|
|
|
|
# ----- SERVICES -----
|
|
services = {
|
|
# Set display manager (login screen)
|
|
displayManager = {
|
|
sddm = {
|
|
enable = true;
|
|
wayland.enable = true; # enable experimental sddm support for wayland
|
|
theme = "corners";
|
|
};
|
|
defaultSession = "hyprland";
|
|
};
|
|
|
|
# Enable sound
|
|
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
|
|
|
|
# allow wheel group to use passwordless sudo
|
|
security.sudo.wheelNeedsPassword = false;
|
|
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 = {
|
|
# just me fr (personal account)
|
|
me = {
|
|
isNormalUser = true;
|
|
extraGroups = ["wheel" "docker"];
|
|
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-new = pkgs.callPackage "${colmena-src}/package.nix" {};
|
|
in
|
|
with pkgs; [
|
|
firefox
|
|
nitch
|
|
starfetch
|
|
|
|
# flatpak requires gnome-software
|
|
flatpak
|
|
gnome-software
|
|
|
|
colmena-new
|
|
|
|
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; #pkgs.fish
|
|
packages = with pkgs; [
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
home-manager = {
|
|
users.me = import ../../homes/me;
|
|
sharedModules = [
|
|
inputs.nixcord.homeManagerModules.nixcord
|
|
inputs.ags.homeManagerModules.default
|
|
{nixpkgs.overlays = [inputs.hyprpanel.overlay];}
|
|
];
|
|
};
|
|
|
|
# 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";
|
|
};
|
|
|
|
# ---- SYSTEM PACKAGES -----
|
|
environment.systemPackages = with pkgs; [
|
|
# User Environment
|
|
inputs.swww.packages.${pkgs.system}.swww
|
|
helvum
|
|
easyeffects
|
|
pavucontrol
|
|
ani-cli
|
|
wl-clipboard # clipboard for wayland
|
|
hyprpicker
|
|
|
|
#(callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners
|
|
# dependencies for my sddm theme:
|
|
pkgs.libsForQt5.qt5.qtgraphicaleffects
|
|
|
|
python311 # I use 3.11 since it's in a pretty stable state now
|
|
poetry # python dependency management and packaging
|
|
|
|
nixd # lsp for nix
|
|
|
|
neofetch # TODO: remove (installed to debug something)
|
|
|
|
# fish plugins
|
|
grc # colorise command outputs
|
|
|
|
httpie
|
|
curlie
|
|
zoxide
|
|
doggo
|
|
tldr
|
|
#btop
|
|
|
|
tesseract # for my work with Agribit
|
|
|
|
# TODO: remove this and host my nix flake on github instead
|
|
#wishlist
|
|
|
|
# Pretty necessary
|
|
git
|
|
git-filter-repo
|
|
brightnessctl
|
|
acpi
|
|
vim
|
|
nix-prefetch-git
|
|
|
|
# Unix Commands
|
|
wget
|
|
tree
|
|
unzip
|
|
|
|
# Cryptography
|
|
openssl
|
|
libargon2
|
|
];
|
|
|
|
# DEBUG: configuring xdg portal here instead?
|
|
# REFERENCE: https://discourse.nixos.org/t/hyprland-screen-sharing/43658
|
|
#xdg.portal = {
|
|
# enable = true;
|
|
# xdgOpenUsePortal = true;
|
|
# config = {
|
|
# common.default = ["gtk"];
|
|
# hyprland.default = ["gtk" "hyprland"];
|
|
# };
|
|
# extraPortals = with pkgs; [
|
|
# #xdg-desktop-portal-gtk
|
|
# #xdg-desktop-portal-wlr
|
|
# xdg-desktop-portal-hyprland
|
|
# ];
|
|
#};
|
|
|
|
# Enable the use of certain programs
|
|
programs = {
|
|
hyprland = {
|
|
enable = true;
|
|
# TODO: uncomment, I did this when hyprland wasn't working
|
|
#package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
|
|
#portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
|
|
|
xwayland.enable = true;
|
|
};
|
|
|
|
zsh.enable = true;
|
|
fish.enable = true;
|
|
|
|
neovim = {
|
|
enable = true;
|
|
defaultEditor = true;
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
configure = {
|
|
customRC = ''
|
|
set number
|
|
set tabstop=4
|
|
set shiftwidth=4
|
|
'';
|
|
};
|
|
};
|
|
|
|
# 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 = {
|
|
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 users: `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" # its already i guess
|
|
"Iosevka" # nah nah
|
|
"IosevkaTerm" # big nah
|
|
"CascadiaCode" # potential
|
|
"FiraCode" # potential
|
|
"JetBrainsMono" # for my rofi theme
|
|
"Hasklig"
|
|
"Hack"
|
|
];
|
|
})
|
|
*/
|
|
nerdfonts
|
|
geist-font # for my hyprlock theme
|
|
|
|
# texlive maintains a noto-emoji flake
|
|
texlivePackages.noto-emoji
|
|
];
|
|
|
|
# TODO: change my default fonts
|
|
fontconfig = {
|
|
defaultFonts = {
|
|
serif = ["Iosevka"];
|
|
sansSerif = ["Iosevka "];
|
|
monospace = ["Cousine"];
|
|
emoji = ["Noto Emoji"];
|
|
};
|
|
};
|
|
};
|
|
|
|
# Enable the new CLI commands and the flakes as experimental features
|
|
nix.settings.experimental-features = [
|
|
"nix-command"
|
|
"flakes"
|
|
];
|
|
|
|
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 = {
|
|
graphics.enable = true;
|
|
};
|
|
|
|
# DO NOT MODIFY
|
|
system.stateVersion = "24.05"; # Did you read the comment?
|
|
}
|