Refactor flake:

- Delete homeManagerConfigurations from flake.
- Delete laptop nixosConfiguration.
- Delete `home-manager/` and `nixos/` directories.
- Switch from one general "vars" attrset for variables to using built-for-purpose attrsets for variables, each declared where it makes most sense (e.g. the "sys" attrset will be used for system-specific attributes).
- Create `systems/` directory for root-level system configurations and `modules/` directory for re-usable config files.
- Consolidate most app and system configuration into the `desktop-environment.nix` and `terminal-environment.nix` files.
- Standardize all `.nix` files to nixos config nodes, as opposed to home-manager. May reverse this decision.
- Use `${sys.username}` for the username of the primary user of the system.
- Use `${usr.${sys.username}}` for attributes related to that user (e.g. realname, email).
This commit is contained in:
Joey Hafner 2025-01-08 12:04:28 -08:00
parent 12ec03df16
commit 4e9d6dec6a
Signed by: Jafner
GPG Key ID: 6D9A24EF2F389E55
138 changed files with 1651 additions and 1985 deletions

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,5 @@
{ pkgs, ... }: {
home.packages = [
pkgs.libreoffice-qt6
];
}

View File

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{ pkgs, sysVars, ... }: {
home.packages = with pkgs; [ spotify-qt librespot ];
systemd.user.services.librespot = {
Unit = {
@ -8,7 +8,7 @@
Service = {
Restart = "always";
RestartSec = 10;
ExecStart = "${pkgs.librespot}/bin/librespot --backend pulseaudio --system-cache /home/joey/.spotify -j";
ExecStart = "${pkgs.librespot}/bin/librespot --backend pulseaudio --system-cache /home/${sysVars.username}/.spotify -j";
};
};
}
}

View File

@ -1,4 +1,4 @@
{ pkgs, pkgs-unstable, ... }: {
{ pkgs, pkgs-unstable, vars, ... }: {
home.packages = with pkgs; [
fastfetch
@ -39,9 +39,43 @@
programs.tmux = {
enable = true;
newSession = true;
baseIndex = 1;
disableConfirmationPrompt = true;
mouse = true;
prefix = "C-b";
resizeAmount = 2;
plugins = with pkgs; [
{ plugin = tmuxPlugins.resurrect; }
{ plugin = tmuxPlugins.tmux-fzf; }
];
shell = "$HOME/.nix-profile/bin/zsh";
};
# TODO: Declare tmux session presets
# - 'sysmon' session
# - 'sysmon' window
# - '1' pane: btop
# - '2' pane: ssh -o RequestTTY=true admin@192.168.1.23 btop
# - '3' pane: ssh -o RequestTTY=true admin@143.110.151.123 btop --utf-force
# - 'disks' window
# - '1' pane: watch 'df -h -xcifs'
# - '2' pane: ssh -o RequestTTY=true admin@192.168.1.23 watch 'df -h -xcifs -xiscsi'
# - '3' pane: ssh -o RequestTTY=true admin@143.110.151.123 watch 'df -h'
# - '4' pane: ssh -o RequestTTY=true admin@192.168.1.10 watch 'df -h'
# - '5' pane: ssh -o RequestTTY=true admin@192.168.1.12 watch 'df -h'
# - 'gpus' window
# - '1' pane: amdgpu_top
# - '2' pane: ssh -o RequestTTY=true admin@192.168.1.23 nvtop
# - 'ssh' session
# - 'fighter' window: ssh admin@192.168.1.23
# - 'wizard' window: ssh vyos@192.168.1.1
# - 'druid' window: ssh admin@143.110.151.123
# - 'paladin' window: ssh admin@192.168.1.12
# - 'barbarian' window: ssh admin@192.168.1.10
# - 'local' session
# - 'jafner.net' window
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
@ -88,6 +122,7 @@
fd --hidden --exclude .git . "$1"
}
eval "$(~/.nix-profile/bin/fzf --zsh)"
fastfetch
'';
};
@ -144,17 +179,44 @@
xdg.desktopEntries = {
btop = {
exec = "kitty-popup btop";
icon = "utilities-system-monitor";
icon = "utilities-system-monitor";
name = "btop";
categories = [ "Utility" "System" ];
categories = [ "Utility" "System" ];
type = "Application";
};
nethogs = {
exec = "kitty-popup sudo nethogs";
icon = "utilities-system-monitor";
icon = "utilities-system-monitor";
name = "nethogs";
categories = [ "Utility" "System" ];
categories = [ "Utility" "System" ];
type = "Application";
};
sysmon = {
exec = "kitty-popup tmux a -t sysmon";
icon = "utilities-system-monitor";
name = "tmux-sysmon";
categories = [ "Utility" "System" ];
type = "Application";
};
ssh = {
exec = "kitty-popup tmux a -t ssh";
icon = "utilities-terminal";
name = "SSH";
categories = [ "Utility" "System" ];
type = "Application";
};
nixos = {
icon = "nix-snowflake";
name = "NixOS";
categories = [ "System" ];
type = "Application";
exec = ''xdg-open "https://mynixos.com"'';
actions = {
"Rebuild" = { exec = ''kitty-popup nixos rebuild''; };
"Update" = { exec = ''kitty-popup nixos update''; };
"Cleanup" = { exec = ''kitty-popup nixos clean''; };
"Edit" = { exec = ''nixos edit''; };
};
};
};
}
}

View File

@ -0,0 +1,24 @@
{ ... }: {
programs.zed-editor = {
# https://mynixos.com/home-manager/options/programs.zed-editor
enable = true;
extensions = [ "Nix" "Catppuccin" ];
userSettings = {
languages."Nix" = {
"language_servers" = [ "!nil" "nixd" ];
"tab_size" = 2;
};
theme = {
mode = "system";
dark = "Catppuccin Mocha";
light = "Catppuccin Mocha";
};
terminal = {
# using bash as a workaround.
# zsh in the integrated terminal misbehaves.
# seems to render multiple characters with every keystroke (incl. backspace)
shell = { program = "bash"; };
};
};
};
}

View File

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

View File

@ -1,4 +1,4 @@
{ pkgs, vars, ... }: {
{ pkgs, vars, sysVars, ... }: {
home.packages = with pkgs; [ git ];
programs.git = {
enable = true;
@ -6,11 +6,11 @@
userEmail = "${vars.user.email}";
extraConfig = {
init.defaultBranch = "main";
core.sshCommand = "ssh -i /home/${vars.user.username}/.ssh/${vars.desktop.sshKey}";
core.sshCommand = "ssh -i /home/${vars.user.username}/.ssh/${sysVars.sshKey}";
gpg.format = "openpgp";
commit.gpgsign = true;
tag.gpgsign = true;
user.signingKey = "${vars.user.keys.gpgSigningKeyFingerprint}";
user.signingKey = "${sysVars.signingKey}";
};
delta.enable = true;
delta.options = {

View File

@ -1,4 +1,4 @@
{ pkgs, vars, ... }: {
{ pkgs, vars, sysVars, ... }: {
home.packages = with pkgs; [
ssh-to-age
pinentry-all
@ -10,10 +10,10 @@
# Fuck GPG. Miserable UX.
id="joey@jafner.net"
id="${vars.user.email}"
device="desktop"
homedir="/home/${vars.user.username}/.gpg"
backupdir="/home/${vars.user.username}/.keys"
homedir="/home/${sysVars.username}/.gpg"
backupdir="/home/${sysVars.username}/.keys"
mkdir -p "$homedir" "$backupdir"
getPrimaryKeyFingerprint() {
@ -21,7 +21,7 @@
}
bootstrap() {
gpg --quick-generate-key 'Joey Hafner <joey@jafner.net>' ed25519 cert 0
gpg --quick-generate-key '${vars.user.realname} <${vars.user.email}>' ed25519 cert 0
gpg --quick-add-key "$(getPrimaryKeyFingerprint)" ed25519 sign 0
gpg --quick-add-key "$(getPrimaryKeyFingerprint)" cv25519 encrypt 0
}
@ -77,7 +77,7 @@
programs.gpg = {
enable = true;
homedir = "/home/${vars.user.username}/.gpg";
homedir = "/home/${sysVars.username}/.gpg";
mutableKeys = true;
mutableTrust = true;
publicKeys = [ ];
@ -109,7 +109,7 @@
text = ''
Host *
ForwardAgent yes
IdentityFile ~/.ssh/${vars.desktop.sshKey}
IdentityFile ~/.ssh/${sysVars.sshKey}
'';
};
"authorized_keys" = {
@ -123,6 +123,6 @@
# Configure Sops key
home.sessionVariables = {
SOPS_AGE_KEY_FILE = "/home/${vars.user.username}/Git/Jafner.net/.sops/${vars.user.username}.author.key";
SOPS_AGE_KEY_FILE = "/home/${sysVars.username}/Git/Jafner.net/.sops/${sysVars.username}.author.key";
};
}

View File

@ -132,6 +132,134 @@
vram_color=94e2d5
'';
};
# home.file."Overwatch.conf" = {
# enable = true;
# target = ".config/MangoHud/Overwatch.conf";
# text = ''
# # FPS Limit
# #fps_limit=240,0
# #fps_limit_method=late
# # Software Information
# ## FPS
# fps=0
# fps_color_change=0
# fps_text=
# fps_value=59,239
# fps_metrics=0
# ## Frame Times
# frame_timing=1
# frame_timing_detailed=0
# dynamic_frame_timing=1
# frametime=0
# histogram=1
# show_fps_limit=0
# ## Environment
# gamemode=0
# present_mode=0
# vulkan_driver=0
# engine_version=0
# engine_short_names=0
# exec_name=0
# vkbasalt=0
# wine=0
# winesync=0
# # Info: CPU
# cpu_text=
# cpu_stats=0
# core_load=0
# core_bars=0
# cpu_power=0
# cpu_temp=0
# # Info: GPU
# gpu_text=
# gpu_stats=0
# gpu_power=0
# gpu_temp=0
# gpu_core_clock=0
# gpu_mem_clock=0
# gpu_fan=0
# gpu_voltage=0
# throttling_status=0
# throttling_status_graph=0
# # Info: Memory
# procmem=0
# procmem_shared=0
# procmem_virt=0
# ram=0
# vram=0
# swap=0
# # Info: Network
# network=0
# # Info: Other
# time=0
# time_format=%r
# time_no_label=1
# graphs=
# # Keybindings
# toggle_hud=Shift_R+F12
# toggle_logging=Shift_L+F2
# toggle_hud_position=R_Shift+F11
# toggle_preset=Shift_R+F10
# toggle_fps_limit=Shift_L+F1
# reload_cfg=Shift_L+F4
# upload_log=Shift_L+F3
# reset_fps_metrics=Shift_R+f9
# # Orientation: positioning, size, arrangement
# width=240
# table_columns=2
# offset_x=3
# offset_y=24
# position=top-left
# legacy_layout=1
# height=0
# horizontal=0
# horizontal_stretch=0
# hud_compact=0
# hud_no_margin=1
# cellpadding_y=0
# round_corners=10
# alpha=1.000000
# background_alpha=1.00000
# # Text: Font, colors, etc.
# font_scale=1.0
# font_size=24
# font_size_text=24
# no_small_font=0
# text_color=cdd6f4
# text_outline=1
# text_outline_thickness=1
# text_outline_color=#1e1e2e
# frametime_color=b2bedc
# frametime_text_color=
# background_color=1d253a
# battery_color=ff0000#585b70
# engine_color=cdd6f4
# cpu_color=89b4fa
# cpu_load_color=a6e3a1, f9e2af, f38ba8
# io_color=f9e2af
# media_player_color=cdd6f4
# gpu_color=a6e3a1
# gpu_load_color=a6e3a1, f9e2af, f38ba8
# fps_color=a6e3a1, f9e2af, f38ba8
# wine_color=cba6f7
# vram_color=94e2d5
# '';
# };
home.file."presets.conf" = {
target = ".config/MangoHud/presets.conf";
text = ''
@ -204,4 +332,4 @@
# OW HUD background: #1d253a
# OW HUD text: #b2bedc
# cat ~/.config/MangoHud/MangoHud.conf
# cat ~/.config/MangoHud/MangoHud.conf

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -22,6 +22,7 @@
./apps/email.nix
./apps/emulators.nix
./apps/ai.nix
./apps/office.nix
./services/flatpak.nix
./services/kdeconnect.nix

View File

@ -1,7 +1,7 @@
{ pkgs, ... }: {
{ pkgs, vars, ... }: {
home.packages = with pkgs; [
( writeShellApplication {
name = "nixos";
( writeShellApplication {
name = "nixos";
runtimeInputs = [
libnotify
jq
@ -9,8 +9,8 @@
];
text = ''
#!/bin/bash
FLAKE_DIR="$HOME/Git/Jafner.net/dotfiles/"
# shellcheck disable=SC2088
FLAKE_DIR=${vars.flakeDir}
CURRENT_CONFIGURATION="desktop"
cd "$FLAKE_DIR"
@ -23,18 +23,33 @@
}
rebuild() {
notify-send "Beginning rebuild"
notify-send "Nixos: Beginning rebuild"
sudo nixos-rebuild switch \
--flake ".#$CURRENT_CONFIGURATION" \
--impure \
--show-trace &&\
notify-send "Rebuilt successfully"
notify-send "Nixos: Rebuilt successfully"
}
update() {
notify-send "Beginning update" "Updating lockfile $FLAKE_DIR/flake.lock"
notify-send "Nixos: Beginning update" "Updating lockfile $FLAKE_DIR/flake.lock"
nix flake update --flake "$FLAKE_DIR"
notify-send "Update complete" "Finished updating lockfile $FLAKE_DIR/flake.lock"
notify-send "Nixos: Update complete" "Finished updating lockfile $FLAKE_DIR/flake.lock"
}
garbageCollect() {
notify-send "Nixos: Collecting garbage" "Deleting generations older than 7 days."
nix-env --delete-generations 7d &&\
nix-store --gc --print-dead
notify-send "Nixos: Garbage collection complete"
}
listGenerations() {
nixos-rebuild list-generations | less
}
edit() {
zeditor "${vars.flakeRepo}"
}
finish() {
@ -50,9 +65,12 @@
case "$1" in
rebuild) handleUntracked && rebuild && finish;;
update) handleUntracked && update && finish;;
clean) garbageCollect && finish;;
ls) listGenerations;;
edit) edit;;
*) error "Unrecognized subcommand $1";;
esac
'';
} )
];
}
}

View File

@ -1,4 +1,5 @@
{ pkgs, ... }: {
boot.kernelModules = [ "amdgpu" "kvm-amd" ];
hardware = {
amdgpu.amdvlk.enable = false;
graphics = {
@ -13,4 +14,4 @@
environment.variables = {
AMD_VULKAN_ICD = "RADV";
};
}
}

View File

@ -0,0 +1,13 @@
{ pkgs, sysVars, ... }: {
hardware.enableRedistributableFirmware = true;
hardware.cpu.amd.updateMicrocode = true;
boot = {
kernelPackages = pkgs.linuxKernel.packages."${sysVars.kernelPackage}";
initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" ];
kernelModules = [ "amdgpu" "kvm-amd" ];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};
}

View File

@ -7,6 +7,8 @@
};
services.goxlr-utility.enable = true;
hardware.wooting.enable = true;
services.hardware.openrgb.enable = false;
users.users."joey".extraGroups = [ "input" ];
hardware.xpadneo.enable = true;
hardware.openrazer = {
enable = true;
@ -20,6 +22,5 @@
environment.systemPackages = with pkgs; [
razergenie
gamepad-tool
linuxKernel.packages.linux_6_11.xpadneo
];
}
}

View File

@ -1,16 +1,11 @@
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
steam
steam-run
lutris-unwrapped
protonup-ng
vulkan-tools
mangohud
];
programs.steam = {
enable = true;
extraPackages = with pkgs; [];
};
programs.steam.enable = true;
programs.gamescope = {
enable = true;
capSysNice = false;

View File

@ -19,7 +19,7 @@
isNormalUser = true;
shell = pkgs.zsh;
description = "joey";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [ "networkmanager" "wheel" "input" ];
openssh.authorizedKeys.keys = let
authorizedKeys = pkgs.fetchurl {
url = "https://github.com/Jafner.keys";
@ -27,4 +27,4 @@
};
in pkgs.lib.splitString "\n" (builtins.readFile authorizedKeys);
};
}
}

View File

@ -37,154 +37,64 @@
...
}:
let
vars = {
repo = {
gitServerHttp = "https://gitea.jafner.tools";
gitServerSsh = "ssh://git@gitea.jafner.tools:2225";
owner = "Jafner";
repoName = "Jafner.net";
branch = "main";
flakePath = "dotfiles/flake.nix";
};
flakeRepo = "$HOME/Git/Jafner.net";
flakeDir = "$HOME/Git/Jafner.net/dotfiles";
user = {
username = "joey";
realname = "Joey Hafner";
email = "joey@jafner.net";
keys = {
gpgSigningKey = "$HOME/.keys/joey@jafner.net.desktop.sign.gpg";
gpgSigningKeyFingerprint = "B0BBF464024BCEAE";
gpgEncryptKey = "$HOME/.keys/joey@jafner.net.encrypt.gpg";
sshKey = "$HOME/.keys/joey.desktop@jafner.net";
ageKey = "$HOME/.keys/joey.author.key";
};
};
laptop = {
hostname = "joey-laptop";
theme = "gruvbox-warm";
sshKey = "joey.laptop@jafner.net";
};
flake = {
gitServer.http = "https://gitea.jafner.tools";
gitServer.ssh = "ssh://git@gitea.jafner.tools:2225";
owner = "Jafner";
repoName = "Jafner.net";
branch = "main";
repoPath = "Git/Jafner.net";
path = "dotfiles/flake.nix";
# Use the following to compose the full absolute path:
# "/home/${sys.username}/${flake.repoPath}/${flake.path}"
};
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ nixgl.overlay ];
config = { allowUnfreePredicate = (_: true); };
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
overlays = [ nixgl.overlay ];
config = { allowUnfreePredicate = (_: true); };
usr.joey = {
realname = "Joey Hafner";
email = "joey@jafner.net";
encryptKey = "$HOME/.keys/joey@jafner.net.encrypt.gpg";
ageKey = "$HOME/.keys/joey.author.key";
};
in {
nixosConfigurations = {
# Build nixos-installer with:
# nix build .#nixosConfigurations.nixos-installer.config.system.build.isoImage
nixos-installer = let
sysVars = {
username = "nixos-installer";
desktop = let
sys = {
username = "joey";
hostname = "desktop@jafner.net";
sshKey = "joey.desktop@jafner.net";
signingKey = "B0BBF464024BCEAE";
shellPackage = "zsh";
kernelPackage = "linux_zen"; # Read more: https://nixos.wiki/wiki/Linux_kernel; Other options: https://mynixos.com/nixpkgs/packages/linuxKernel.packages;
wallpaper = ./assets/romb-3840x2160.png;
arch = "x86_64-linux";
flakeDir = "Git/Jafner.net/dotfiles";
};
system = "x86_64-linux";
lib = nixpkgs.lib;
pkgs = import inputs.nixpkgs {
inherit system;
overlays = [ nixgl.overlay ];
config = { allowUnfreePredicate = (_: true); };
};
pkgs-unstable = import nixpkgs-unstable {
inherit system;
overlays = [ nixgl.overlay ];
config = { allowUnfreePredicate = (_: true); };
};
in lib.nixosSystem {
modules = [
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix"
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
./nixos-installer.nix
inputs.nix-flatpak.nixosModules.nix-flatpak
inputs.home-manager.nixosModules.home-manager
{ home-manager = {
users.nixos-installer = import ./nixos-installer.hm.nix;
sharedModules = [
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.stylix.homeManagerModules.stylix
];
extraSpecialArgs = { inherit pkgs pkgs-unstable inputs; inherit vars sysVars; };
}; }
];
inherit system;
specialArgs = {
inherit pkgs pkgs-unstable inputs;
inherit vars;
};
};
desktop = let sysVars = {
username = "joey";
arch = "x86_64-linux";
hostname = "joey-desktop-nixos";
sshKey = "joey.desktop@jafner.net";
signingKey = "B0BBF464024BCEAE";
kernelPackage = "linux_zen"; # Read more: https://nixos.wiki/wiki/Linux_kernel; Other options: https://mynixos.com/nixpkgs/packages/linuxKernel.packages;
wallpaper = ./assets/romb-3840x2160.png;
}; in lib.nixosSystem {
modules = [
./desktop/nixos/configuration.nix
inputs.nix-flatpak.nixosModules.nix-flatpak
inputs.home-manager.nixosModules.home-manager
{
home-manager = {
users.joey = import ./desktop/home-manager/home.nix;
sharedModules = [
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.stylix.homeManagerModules.stylix
];
extraSpecialArgs = { inherit pkgs pkgs-unstable inputs; inherit vars sysVars; };
};
}
];
inherit system;
specialArgs = { inherit pkgs pkgs-unstable inputs vars sysVars; };
};
desktop-refactored = let sysVars = {
username = "joey";
arch = "x86_64-linux";
hostname = "joey-desktop-nixos";
sshKey = "joey.desktop@jafner.net";
signingKey = "B0BBF464024BCEAE";
kernelPackage = "linux_zen"; # Read more: https://nixos.wiki/wiki/Linux_kernel; Other options: https://mynixos.com/nixpkgs/packages/linuxKernel.packages;
wallpaper = ./assets/romb-3840x2160.png;
}; in lib.nixosSystem {
modules = [
./desktop-refactored.nix
./systems/desktop/configuration.nix
inputs.nix-flatpak.nixosModules.nix-flatpak
inputs.home-manager.nixosModules.home-manager
{
home-manager.sharedModules = [
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.stylix.homeManagerModules.stylix
];
extraSpecialArgs = { inherit pkgs pkgs-unstable inputs; inherit vars sysVars; };
inputs.nix-flatpak.homeManagerModules.nix-flatpak
inputs.stylix.homeManagerModules.stylix
];
home-manager.extraSpecialArgs = { inherit pkgs pkgs-unstable inputs; inherit sys usr flake; };
}
];
inherit system;
specialArgs = { inherit pkgs pkgs-unstable inputs; inherit vars sysVars; };
};
};
homeConfigurations = {
laptop = home-manager.lib.homeManagerConfiguration {
modules = [
./home-manager/laptop/home.nix
inputs.stylix.homeManagerModules.stylix
inputs.plasma-manager.homeManagerModules.plasma-manager
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
inherit pkgs;
extraSpecialArgs = {
inherit pkgs pkgs-unstable inputs;
inherit vars;
};
};
desktop = home-manager.lib.homeManagerConfiguration {
modules = [
./home-manager/desktop/home.nix
inputs.nix-flatpak.homeManagerModules.nix-flatpak
];
inherit pkgs;
extraSpecialArgs = {
inherit pkgs pkgs-unstable inputs;
inherit vars;
};
specialArgs = { inherit pkgs pkgs-unstable inputs sys usr flake; };
};
};
};

View File

@ -1,15 +0,0 @@
{ ... }: {
programs.zed-editor = {
# https://mynixos.com/home-manager/options/programs.zed-editor
enable = true;
extensions = [ "Nix" "Catppuccin" ];
userSettings = {
languages."Nix"."language_servers" = [ "!nil" "nixd" ];
theme = {
mode = "system";
dark = "Catppuccin Mocha";
light = "Catppuccin Mocha";
};
};
};
}

View File

@ -1,28 +0,0 @@
{ pkgs, pkgs-unstable, ... }:
{
home.packages = with pkgs; [
rofi-rbw-wayland
rbw
pinentry-rofi
pinentry-all
];
home.file = {
rbw-config = {
target = ".config/rbw/config.json";
text = ''
{
"email": "jafner425@gmail.com",
"sso_id": null,
"base_url": "https://bitwarden.jafner.tools",
"identity_url": null,
"ui_url": null,
"notifications_url": null,
"lock_timeout": 3600,
"sync_interval": 3600,
"pinentry": "pinentry-curses",
"client_cert_path": null
}
'';
};
};
}

View File

@ -1,6 +0,0 @@
{ ... }:
{
services.flatpak.packages = [
{ appId = "io.github.zen_browser.zen"; origin = "flathub"; }
];
}

View File

@ -1,5 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ flatpak ];
services.flatpak.enable = true;
}

View File

@ -1,9 +0,0 @@
{ pkgs, ... }: {
home.packages = with pkgs; [
(wineWowPackages.full.override {
wineRelease = "staging";
mingwSupport = true;
})
winetricks
];
}

View File

@ -1,16 +0,0 @@
{ vars, ... }:
{
## Git
programs.git = {
enable = true;
userName = "${vars.user.realname}";
userEmail = "${vars.user.email}";
extraConfig = {
core.sshCommand = "ssh -i /home/joey/.ssh/${vars.user.username}@${vars.laptop.hostname}";
};
delta.enable = true;
delta.options = {
side-by-side = true;
};
};
}

View File

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
k3s
kubernetes-helm
helmfile-wrapped ];
}

View File

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ vlc feh ];
}

View File

@ -1,4 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [ vesktop ];
}

View File

@ -1,12 +0,0 @@
{ pkgs, ... }:
{
## OBS-Studio
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-vaapi
obs-vkcapture
input-overlay
];
};
}

View File

@ -1,72 +0,0 @@
{ ... }:
{
programs.plasma = {
enable = true;
shortcuts = {
"kwin"."Show Desktop" = "Meta+D";
"kwin"."Switch One Desktop Down" = "Meta+Ctrl+Down";
"kwin"."Switch One Desktop Up" = "Meta+Ctrl+Up";
"kwin"."Switch One Desktop to the Left" = "Meta+Ctrl+Left";
"kwin"."Switch One Desktop to the Right" = "Meta+Ctrl+Right";
"kwin"."Switch Window Down" = "Meta+Alt+Down";
"kwin"."Switch Window Left" = "Meta+Alt+Left";
"kwin"."Switch Window Right" = "Meta+Alt+Right";
"kwin"."Switch Window Up" = "Meta+Alt+Up";
"kwin"."Walk Through Windows" = "Alt+Tab";
"kwin"."Walk Through Windows (Reverse)" = "Alt+Shift+Tab";
"kwin"."Walk Through Windows of Current Application" = "Alt+`";
"kwin"."Walk Through Windows of Current Application (Reverse)" = "Alt+~";
"kwin"."Window Close" = "Alt+F4";
"kwin"."Window Fullscreen" = "Meta+F";
"kwin"."Window Maximize" = "Meta+PgUp";
"kwin"."Window Minimize" = "Meta+PgDown";
"kwin"."Window One Desktop Down" = "Meta+Ctrl+Shift+Down";
"kwin"."Window One Desktop Up" = "Meta+Ctrl+Shift+Up";
"kwin"."Window One Desktop to the Left" = "Meta+Ctrl+Shift+Left";
"kwin"."Window One Desktop to the Right" = "Meta+Ctrl+Shift+Right";
"kwin"."Window Operations Menu" = "Alt+F3";
"kwin"."Window Quick Tile Bottom" = "Meta+Down";
"kwin"."Window Quick Tile Left" = "Meta+Left";
"kwin"."Window Quick Tile Right" = "Meta+Right";
"kwin"."Window Quick Tile Top" = "Meta+Up";
"kwin"."view_actual_size" = "Meta+0";
"kwin"."view_zoom_in" = ["Meta++" "Meta+=,Meta++" "Meta+=,Zoom In"];
"kwin"."view_zoom_out" = "Meta+-";
"org_kde_powerdevil"."Decrease Keyboard Brightness" = "Keyboard Brightness Down";
"org_kde_powerdevil"."Decrease Screen Brightness" = "Monitor Brightness Down";
"org_kde_powerdevil"."Decrease Screen Brightness Small" = "Shift+Monitor Brightness Down";
"org_kde_powerdevil"."Hibernate" = "Hibernate";
"org_kde_powerdevil"."Increase Keyboard Brightness" = "Keyboard Brightness Up";
"org_kde_powerdevil"."Increase Screen Brightness" = "Monitor Brightness Up";
"org_kde_powerdevil"."Increase Screen Brightness Small" = "Shift+Monitor Brightness Up";
"org_kde_powerdevil"."PowerDown" = "Power Down";
"org_kde_powerdevil"."PowerOff" = "Power Off";
"org_kde_powerdevil"."Sleep" = "Sleep";
"org_kde_powerdevil"."Toggle Keyboard Backlight" = "Keyboard Light On/Off";
"org_kde_powerdevil"."Turn Off Screen" = [ ];
};
configFile = {
"kcminputrc"."Libinput/1739/30382/DLL0704:01 06CB:76AE Mouse"."NaturalScroll" = true;
"kded5rc"."Module-device_automounter"."autoload" = false;
"kwinrulesrc"."1"."Description" = "Start Kitty fullscreen";
"kwinrulesrc"."1"."desktops" = "8174df23-1d2f-4d61-aef3-9b44ed596ed4";
"kwinrulesrc"."1"."desktopsrule" = 3;
"kwinrulesrc"."1"."fullscreenrule" = 3;
"kwinrulesrc"."1"."wmclass" = "kitty";
"kwinrulesrc"."1"."wmclassmatch" = 1;
"kwinrulesrc"."2"."Description" = "Start Zen Browser fullscreen";
"kwinrulesrc"."2"."desktops" = "ff42d652-e597-4e3c-9eb7-0cb2f5124dfe";
"kwinrulesrc"."2"."desktopsrule" = 3;
"kwinrulesrc"."2"."fullscreen" = true;
"kwinrulesrc"."2"."fullscreenrule" = 3;
"kwinrulesrc"."2"."title" = "Zen Browser";
"kwinrulesrc"."2"."wmclass" = "zen-alpha";
"kwinrulesrc"."2"."wmclassmatch" = 1;
"kwinrulesrc"."3"."Description" = "Start Vesktop fullscreen";
"kwinrulesrc"."3"."desktopsrule" = 3;
"kwinrulesrc"."3"."fullscreenrule" = 3;
"kwinrulesrc"."3"."wmclass" = "vesktop";
"kwinrulesrc"."3"."wmclassmatch" = 1;
};
};
}

View File

@ -1,120 +0,0 @@
{ pkgs, pkgs-unstable, ... }:
{
# Terminal
## Kitty
programs.kitty = {
enable = true;
};
## Tmux
programs.tmux = {
enable = true;
newSession = true;
shell = "$HOME/.nix-profile/bin/zsh";
};
# Shell
## Zsh
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
bat = "bat --paging=never --color=always";
fd = "fd -Lu";
ls = "eza";
lt = "eza --tree";
fetch = "fastfetch";
neofetch = "fetch";
find = ''fzf --preview "bat --color=always --style=numbers --line-range=:500 {}"'';
nu = "sudo nixos-rebuild switch --flake ~/Jafner.net/nix";
hmu = "home-manager switch -b bak --flake ~/Jafner.net/nix";
ngls = "nix-env --profile /nix/var/nix/profiles/system --list-generations";
ngclean = "nix-collect-garbage --delete-old";
ngcleanboot = "/run/current-system/bin/switch-to-configuration boot";
};
history = {
share = true;
save = 10000;
size = 10000;
expireDuplicatesFirst = false;
extended = false;
ignoreAllDups = false;
ignoreDups = true;
};
initExtra = ''
bindkey '^[[1;5A' history-search-backward # Ctrl+Up-arrow
bindkey '^[[1;5B' history-search-forward # Ctrl+Down-arrow
bindkey '^[[1;5D' backward-word # Ctrl+Left-arrow
bindkey '^[[1;5C' forward-word # Ctrl+Right-arrow
bindkey '^[[H' beginning-of-line # Home
bindkey '^[[F' end-of-line # End
bindkey '^[w' kill-region # Delete
bindkey '^I^I' autosuggest-accept # Tab, Tab
bindkey '^[' autosuggest-clear # Esc
_fzf_compgen_path() {
fd --hidden --exclude .git . "$1"
}
_fzf_compgen_dir() {
fd --hidden --exclude .git . "$1"
}
eval "$(~/.nix-profile/bin/fzf --zsh)"
source ${pkgs.fzf-git-sh}/share/fzf-git-sh/fzf-git.sh
'';
};
# CLI Utilities
home.packages = with pkgs; [
fastfetch
tree btop
bat fd eza fzf-git-sh
wl-clipboard
killall
pkgs-unstable.fzf
];
## eza
programs.eza = {
enable = true;
enableZshIntegration = true;
git = true;
extraOptions = [
"--color=always"
"--long"
"--icons=always"
"--no-time"
"--no-user"
];
};
## vim
programs.vim = {
enable = true;
defaultEditor = true;
settings = {
copyindent = true;
relativenumber = true;
expandtab = true;
tabstop = 2;
};
extraConfig = ''
set nocompatible
filetype on
filetype plugin on
filetype indent on
syntax on
set cursorline
set wildmenu
set wildmode=list:longest
'';
};
## fzf
programs.fzf = {
enable = true;
package = pkgs-unstable.fzf;
};
}

View File

@ -1,49 +0,0 @@
{ pkgs, lib, ... }:
{
## Nix LSP
home.packages = with pkgs; [ nixd ];
## VSCodium
programs.vscode = {
enable = true;
package = pkgs.vscodium;
mutableExtensionsDir = true;
extensions = with pkgs.vscode-extensions; [
jnoortheen.nix-ide
continue.continue
];
userSettings = {
"nix.serverPath" = "nixd";
"nix.enableLanguageServer" = true;
"explorer.confirmDragAndDrop" = false;
"workbench.colorTheme" = "Stylix";
"git.autofetch" = true;
"git.confirmSync" = false;
"editor.fontFamily" = lib.mkForce "'Symbols Nerd Font Mono', 'PowerlineSymbols', 'DejaVu Sans Mono'";
"git.enableSmartCommit" = true;
"security.workspace.trust.untrustedFiles" = "open";
};
userTasks = {
version = "2.0.0";
tasks = [
{
type = "shell";
label = "NixOS Rebuild Switch";
command = "sudo nixos-rebuild switch --flake ~/Jafner.net/nix";
problemMatcher = [];
}
{
type = "shell";
label = "Home-Manager Switch";
command = "home-manager switch -b bak --flake ~/Jafner.net/nix";
problemMatcher = [];
}
{
label = "System Rebuild";
dependsOn = ["NixOS Rebuild Switch" "Home-Manager Switch" ];
dependsOrder = "sequence";
problemMatcher = [];
}
];
};
};
}

View File

@ -1,5 +0,0 @@
{ inputs, ... }: {
home.packages = [
inputs.nix-ecuflash.packages."x86_64-linux".ecuflash
];
}

View File

@ -1,33 +0,0 @@
{ pkgs, vars, ... }:
{
home.stateVersion = "24.05";
home.username = "${vars.user.username}";
home.homeDirectory = "/home/${vars.user.username}";
imports = [
./style.nix
./app/wine/wine.nix
./app/browser/zen.nix
./app/flatpak/flatpak.nix
./app/git/git.nix
./app/games/games.nix
./app/media/media.nix
./app/messaging/discord.nix
./app/obs-studio/obs-studio.nix
./app/bitwarden/bitwarden.nix
./app/sh/sh.nix # Consider splitting out to "terminal", "shell", and "cmd" or similar
./app/vscode/vscode.nix # Consider using a generalized "IDE" or "Editor" folder.
./wm/hyprland/wm.nix
];
# Desktop apps
home.packages = with pkgs; [
git
kdePackages.kdeconnect-kde
nix-prefetch
];
programs.home-manager = {
enable = true;
};
}

View File

@ -1,43 +0,0 @@
{ pkgs, vars, ... }:
{
home.packages = with pkgs; [ base16-schemes ];
## Stylix
imports = [ ./themes/${vars.laptop.theme}/theme.nix ];
stylix = {
enable = true;
autoEnable = true;
polarity = "dark";
targets = {
wofi.enable = true;
waybar = {
enableLeftBackColors = true;
enableCenterBackColors = true;
enableRightBackColors = true;
};
};
fonts = {
monospace = {
name = "DejaVu Sans Mono";
package = pkgs.dejavu_fonts;
};
serif = {
name = "DejaVu Serif";
package = pkgs.dejavu_fonts;
};
sansSerif = {
name = "DejaVu Sans";
package = pkgs.dejavu_fonts;
};
emoji = {
name = "Noto Color Emoji";
package = pkgs.noto-fonts-color-emoji;
};
sizes = {
terminal = 14;
applications = 12;
popups = 12;
desktop = 12;
};
};
};
}

View File

@ -1,7 +0,0 @@
{ ... }:
{
stylix = {
image = ./wallpaper.png;
override = { base01 = "332330"; };
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 MiB

View File

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
stylix = {
image = pkgs.fetchurl { url = "https://wallpaperaccess.com/full/7731794.png"; sha256 = "1n0l1v0hfna5378zdfazvhq1np8x1wgjcmfnphxj4vjb48gkzmjk"; };
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
};
}

View File

@ -1,7 +0,0 @@
{ pkgs, ... }:
{
stylix = {
image = pkgs.fetchurl { url = "https://wallpaperaccess.com/full/7731826.png"; sha256 = "07cq8vvi25h8wp21jgmj1yw3w4674khxcjb6c8vgybi94ikjqcyv"; };
base16Scheme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-medium.yaml";
};
}

View File

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
stylix = {
image = ./blue-material.jpg;
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

View File

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
stylix = {
image = ./red-black-material.jpg;
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 47 KiB

View File

@ -1,25 +0,0 @@
{ pkgs, ... }:
{
stylix = {
image = ./wallpaper.jpg;
override = { base01 = "332330"; };
};
}
# Generated Colors
# base00: #111349; /* Black */
# base01: #2c4482; /* Bright Black */
# base02: #156eb2; /* Grey */
# base03: #66a3da; /* Brighter Grey */
# base04: #95bede; /* Bright Grey */
# base05: #e2e1ef; /* White */
# base06: #e0e3f4; /* Brighter White */
# base07: #cce8f6; /* Bright White */
# base08: #5196d1; /* Red */
# base09: #5196cf; /* Orange */
# base0A: #5796cc; /* Yellow */
# base0B: #5595d3; /* Green */
# base0C: #5896c9; /* Cyan */
# base0D: #5795d0; /* Blue */
# base0E: #4f96d8; /* Purple */
# base0F: #5894d3; /* Magenta */

Binary file not shown.

Before

Width:  |  Height:  |  Size: 53 KiB

View File

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
stylix = {
image = ./wallpaper.jpg;
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

View File

@ -1,6 +0,0 @@
{ pkgs, ... }:
{
stylix = {
image = ./wallpaper.jpg;
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

Some files were not shown because too many files have changed in this diff Show More