dotfiles/hosts/myputer/default.nix

296 lines
7.3 KiB
Nix
Raw Normal View History

{
2024-10-30 13:51:36 +10:00
pkgs,
inputs,
2025-02-11 15:47:56 +10:00
lib,
...
}: let
2024-10-30 19:45:26 +10:00
home-manager = builtins.fetchTarball {
url = "https://github.com/nix-community/home-manager/archive/master.tar.gz";
2025-02-11 15:47:56 +10:00
sha256 = "1jxrzlgc0xzad5hrjixab4brhir1hyf6cvq0zhgb7z9x06kaydin"; #"0kg9iaixqygpncw7avgh1grwyjgnfc9i7k9pk8hc4xrvr8jv2l3c";
2024-10-30 19:45:26 +10:00
};
in {
2024-10-30 13:51:36 +10:00
imports = [
2024-10-30 19:45:26 +10:00
./hardware-configuration.nix
(import "${home-manager}/nixos")
inputs.spicetify-nix.nixosModules.default
2024-10-30 19:45:26 +10:00
];
2024-10-30 13:51:36 +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)
];
#theme = spicePkgs.themes.catppuccin;
#colorScheme = "mocha";
};
2024-10-30 23:25:57 +10:00
2025-02-11 15:47:56 +10:00
boot.loader.systemd-boot.enable = false;
2024-11-04 11:59:14 +10:00
boot.loader = {
efi = {
canTouchEfiVariables = true;
2025-02-11 15:47:56 +10:00
efiSysMountPoint = "/boot"; #/boot/efi
2024-11-04 11:59:14 +10:00
};
grub = {
efiSupport = true;
#efiInstallAsRemovable = true; # in case canTouchEfiVariables doesn't work on this system
device = "nodev";
2025-02-11 15:47:56 +10:00
#useOSProber = true;
};
grub2-theme = {
enable = true;
theme = "whitesur"; # stylish, vimix, or whitesur
footer = true;
customResolution = "1920x1080";
2024-11-04 11:59:14 +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";
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.
2024-10-30 13:51:36 +10:00
# 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;
2025-02-11 15:47:56 +10:00
wayland.enable = true; # enable experimental sddm support for wayland
theme = "corners";
2024-10-30 13:51:36 +10:00
};
defaultSession = "hyprland";
};
# Enable sound
pipewire = {
enable = true;
2025-02-11 15:47:56 +10:00
wireplumber.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
2024-10-30 13:51:36 +10:00
pulse.enable = true;
2025-02-11 15:47:56 +10:00
jack.enable = true;
2024-10-30 13:51:36 +10:00
};
2025-02-11 15:47:56 +10:00
tumbler.enable = true; # Thunar image thumbnail support
gvfs.enable = true; # Thunar mount, trash, and other functionality
2024-10-30 13:51:36 +10:00
};
2025-02-11 15:47:56 +10:00
security.rtkit.enable = true; # I *think* this is for pipewire
2024-10-30 13:51:36 +10:00
2024-11-07 17:37:15 +10:00
# allow wheel group to use passwordless sudo
security.sudo.wheelNeedsPassword = false;
2024-10-30 19:45:26 +10:00
users = {
2024-11-04 11:59:14 +10:00
# 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 :)
2024-10-30 19:45:26 +10:00
defaultUserShell = pkgs.bash;
users = {
# just me fr (personal account)
me = {
isNormalUser = true;
extraGroups = ["wheel"];
shell = pkgs.bash; #pkgs.fish
packages = with pkgs; [
firefox
nitch
starfetch
2025-02-11 15:47:56 +10:00
# flatpak requires gnome-software
flatpak
gnome-software
];
};
# user for my professional jobs and stuff
ae = {
isNormalUser = true;
extraGroups = ["wheel"];
shell = pkgs.bash; #pkgs.fish
packages = with pkgs; [
];
};
};
2024-10-30 13:51:36 +10:00
};
2024-11-07 17:37:15 +10:00
home-manager = {
users.me = import ../../homes/me;
sharedModules = [
2025-02-11 15:47:56 +10:00
inputs.nixcord.homeManagerModules.nixcord
inputs.ags.homeManagerModules.default
{nixpkgs.overlays = [inputs.hyprpanel.overlay];}
];
2024-11-07 17:37:15 +10:00
};
2024-10-30 13:51:36 +10:00
# ---- SYSTEM PACKAGES -----
environment.systemPackages = with pkgs; [
2024-11-04 11:59:14 +10:00
# User Environment
inputs.swww.packages.${pkgs.system}.swww
helvum
easyeffects
ani-cli
wl-clipboard # clipboard for wayland
2025-02-11 15:47:56 +10:00
hyprpicker
(callPackage ../sddm-theme-corners.nix {}).sddm-theme-corners
# dependencies for my sddm theme:
pkgs.libsForQt5.qt5.qtgraphicaleffects
2024-11-04 11:59:14 +10:00
python311 # I use 3.11 since it's in a pretty stable state now
poetry # python dependency management and packaging
2024-11-04 11:59:14 +10:00
# fish plugins
grc # colorise command outputs
2024-10-30 23:34:23 +10:00
2024-11-07 17:37:15 +10:00
httpie
curlie
zoxide
doggo
2025-02-11 15:47:56 +10:00
tldr
btop
2024-11-07 17:37:15 +10:00
2024-10-30 17:35:16 +10:00
# Pretty necessary
2024-10-30 13:51:36 +10:00
git
2024-11-07 17:37:15 +10:00
brightnessctl
acpi
2025-02-11 15:47:56 +10:00
vim
2024-11-07 17:37:15 +10:00
2024-11-04 11:59:14 +10:00
# Unix Commands
2024-10-30 17:35:16 +10:00
wget
tree
2025-02-11 15:47:56 +10:00
unzip
2024-10-30 13:51:36 +10:00
];
# Enable the use of certain programs
programs = {
2024-11-04 11:59:14 +10:00
hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
2024-11-04 11:59:14 +10:00
portalPackage = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
xwayland.enable = true;
};
2024-10-30 17:35:16 +10:00
2024-11-04 11:59:14 +10:00
zsh.enable = true;
fish.enable = true;
2024-10-30 19:45:26 +10:00
2024-10-30 17:35:16 +10:00
neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
configure = {
customRC = ''
2025-02-11 15:47:56 +10:00
set number
set tabstop=4
set shiftwidth=4
2024-10-30 17:35:16 +10:00
'';
};
};
2024-11-04 11:59:14 +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 = {
2024-11-04 11:59:14 +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
'';
2024-11-04 11:59:14 +10:00
};
2025-02-11 15:47:56 +10:00
# 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
];
};
2024-10-30 17:35:16 +10:00
};
# ----- FONTS -----
fonts = {
enableDefaultPackages = true; # no clue what this line does tbh
2024-10-30 19:45:26 +10:00
packages = with pkgs; [
2025-02-11 15:47:56 +10:00
/*
(nerdfonts.override {
2025-02-11 15:47:56 +10:00
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
];
2025-02-11 15:47:56 +10:00
# TODO: change my default fonts
fontconfig = {
defaultFonts = {
2025-02-11 15:47:56 +10:00
serif = ["Iosevka"];
sansSerif = ["Iosevka "];
monospace = ["Cousine"];
emoji = ["Noto Emoji"];
};
};
2024-10-30 13:51:36 +10:00
};
# Enable the new CLI commands and the flakes as experimental features
nix.settings.experimental-features = [
"nix-command"
2024-10-30 13:51:36 +10:00
"flakes"
];
# 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-04 11:59:14 +10:00
# Enable OpenGL
hardware = {
graphics.enable = true;
};
2024-10-30 13:51:36 +10:00
# DO NOT MODIFY
system.stateVersion = "24.05"; # Did you read the comment?
}