refactor!: restructure and document configuration

This commit is contained in:
Alexandre Cavalheiro S. Tiago da Silva 2025-03-06 05:30:47 -03:00
parent 4a02e072a7
commit f87f9995be
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
126 changed files with 957 additions and 590 deletions

8
modules/README.md Normal file
View file

@ -0,0 +1,8 @@
This directory encompasses all modules/resources that are exported by this repository's flake.
## Currently maintained modules
- [hyprland](./hyprland)
- [neovim](./neovim)
- [emacs](./emacs)
- [template](./template)

6
modules/emacs/README.md Normal file
View file

@ -0,0 +1,6 @@
This module has no options, it simply just adds the necessary packages to run
[DOOM Emacs](https://github.com/doomemacs/doomemacs) and writes contents inside [./doom](./doom) into `$XDG_CONFIG_HOME/doom`.
## Screenshots
![image](/assets/screenshots/doomemacs.png)

View file

@ -1,80 +0,0 @@
{ pkgs, ... }:
{
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
};
home.file = {
# Configuration for gamemode, for running games with optimizations.
".config/gamemode.ini".source = ./programs/gamemode.ini;
# Configuration for mako, a notification daemon.
".config/mako".source = ./programs/mako;
# Configure pipewire for microphone noise supression.
".config/pipewire/pipewire.conf.d/99-input-denoising.conf".text = ''
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "Noise Canceling source"
media.name = "Noise Canceling source"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = ${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so
label = noise_suppressor_mono
control = {
"VAD Threshold (%)" = 60.0
"VAD Grace Period (ms)" = 175
"Retroactive VAD Grace (ms)" = 50
}
}
]
}
capture.props = {
node.name = "capture.rnnoise_source"
node.passive = true
audio.rate = 48000
}
playback.props = {
node.name = "rnnoise_source"
media.class = Audio/Source
audio.rate = 48000
}
}
}
]
'';
# Configure DXVK
".config/dxvk.conf".text = ''
dxvk.enableGraphicsPipelineLibrary = Auto
'';
# My utility scripts
".local/share/scripts" = {
source = ./scripts;
recursive = true;
};
};
# Configure XDG
xdg.mimeApps.defaultApplications = {
"inode/directory" = [ "thunar.desktop" ];
"text/html" = [ "firefox.desktop" ];
"video/mp4" = [ "vlc.desktop" ];
"video/x-matroska" = [ "vlc.desktop" ];
"x-scheme-handler/about" = [ "firefox.desktop" ];
"x-scheme-handler/http" = [ "firefox.desktop" ];
"x-scheme-handler/https" = [ "firefox.desktop" ];
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
};
}

View file

@ -1,9 +0,0 @@
{ ... }:
{
imports = [
./common.nix
./packages.nix
./theming.nix
];
}

View file

@ -1,92 +0,0 @@
{ pkgs, clipboard-sync, ... }:
{
imports = [
./programs
];
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = with pkgs; [
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
## Tools
# Utilities
fastfetch
firefox
pavucontrol
protonvpn-gui
qbittorrent
qdirstat
speedcrunch
vlc
yt-dlp
zathura
# Personal utilities
anki
ledger
(vesktop.override {
# FIXME: Need to pin until https://github.com/NixOS/nixpkgs/issues/380429 gets resolved.
electron = electron_33;
})
# Editing
libreoffice
# Creative work
aseprite
blender
krita
lmms
orca-slicer
shotcut
vcv-rack
vhs
## Entertainment
jellyfin-media-player
# Gaming
gamescope
heroic
protontricks
wineWowPackages.unstableFull
winetricks
# Games
openttd
prismlauncher
shattered-pixel-dungeon
xonotic
## Libraries
libsForQt5.kdegraphics-thumbnailers
libsForQt5.kio-extras
rnnoise-plugin
## Development
beekeeper-studio
godot_4
hoppscotch
lazygit
## Desktop environment
clipboard-sync.packages.${pkgs.stdenv.hostPlatform.system}.default
cliphist
grim
libsForQt5.ark
loupe
mako
slurp
swww
# Mail client
thunderbird
];
}

View file

@ -1,37 +0,0 @@
{ pkgs, ... }:
let
catppuccin-theme = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "alacritty";
rev = "94800165c13998b600a9da9d29c330de9f28618e";
hash = "sha256-Pi1Hicv3wPALGgqurdTzXEzJNx7vVh+8B9tlqhRpR2Y=";
};
in
{
programs.alacritty = {
enable = true;
settings = {
general.import = [ "${catppuccin-theme}/catppuccin-frappe.toml" ];
font = {
normal = {
family = "BlexMono Nerd Font";
style = "Regular";
};
size = 12;
};
window = {
decorations = "None";
opacity = 0.8;
padding = {
x = 18;
y = 18;
};
};
};
};
}

View file

@ -1,19 +0,0 @@
{ ... }:
{
imports = [
./alacritty.nix
./direnv
./emacs
./fish
./git.nix
./hyprland
./mangohud.nix
./neovim
./obs-studio.nix
./rofi
./spotify
./tmux
./waybar.nix
];
}

View file

@ -1,8 +0,0 @@
{ ... }:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -1,30 +0,0 @@
# name: 'Catppuccin frappe'
# url: 'https://github.com/catppuccin/fish'
# preferred_background: 303446
fish_color_normal c6d0f5
fish_color_command 8caaee
fish_color_param eebebe
fish_color_keyword e78284
fish_color_quote a6d189
fish_color_redirection f4b8e4
fish_color_end ef9f76
fish_color_comment 838ba7
fish_color_error e78284
fish_color_gray 737994
fish_color_selection --background=414559
fish_color_search_match --background=414559
fish_color_option a6d189
fish_color_operator f4b8e4
fish_color_escape ea999c
fish_color_autosuggestion 737994
fish_color_cancel e78284
fish_color_cwd e5c890
fish_color_user 81c8be
fish_color_host 8caaee
fish_color_host_remote a6d189
fish_color_status e78284
fish_pager_color_progress 737994
fish_pager_color_prefix f4b8e4
fish_pager_color_completion c6d0f5
fish_pager_color_description 737994

View file

@ -1,71 +0,0 @@
{ pkgs, ... }:
{
programs.fish = {
enable = true;
interactiveShellInit = ''
## Set vim mode
set -g fish_key_bindings fish_vi_key_bindings
# Configure FZF
set -x FZF_DEFAULT_OPTS '--color=fg:#f8f8f2,hl:#bd93f9 --color=fg+:#f8f8f2,bg+:#44475a,hl+:#bd93f9 --color=info:#ffb86c,prompt:#50fa7b,pointer:#ff79c6 --color=marker:#ff79c6,spinner:#ffb86c,header:#6272a4 --layout=reverse --height 50%'
# Remove welcome message
set -x fish_greeting ""
## Add directories to $PATH
fish_add_path /home/wizardlink/.local/share/scripts \
/home/wizardlink/.config/emacs/bin \
/home/wizardlink/.nimble/bin \
/home/wizardlink/.cargo/bin \
/home/wizardlink/.local/bin \
/lib/flatpak/exports/bin
zoxide init --cmd cd fish | source
'';
shellAbbrs = {
z = "zoxide";
pkg_expr = {
position = "anywhere";
expansion = "--expr 'with import <nixpkgs> { % }; '";
};
impure_cmd = {
position = "command";
expansion = "NIXPKGS_ALLOW_UNFREE=1 nix % --impure";
};
};
shellAliases = {
del = "trash_file";
dev = "nix develop -c fish";
doom = "~/.config/emacs/bin/doom";
repl = "NIXPKGS_ALLOW_UNFREE=1 nix repl --impure --extra-experimental-features 'flakes' nixpkgs#legacyPackages.x86_64-linux";
};
functions = {
fish_prompt.body = ''
set_color CC241D
echo '&' (set_color normal)
'';
fzf_edit.body = ''
fzf --multi --bind 'enter:become(nvim {+})'
'';
trash_file.body = ''
mv $argv ~/.local/share/Trash
'';
ya.body = ''
set tmp (mktemp -t "yazi-cwd.XXXXX")
yazi $argv --cwd-file="$tmp"
if set cwd (cat -- "$tmp"); and [ -n "$cwd" ]; and [ "$cwd" != "$PWD" ]
cd -- "$cwd"
end
rm -f -- "$tmp"
'';
};
};
}

View file

@ -1,76 +0,0 @@
[general]
; The reaper thread will check every 5 seconds for exited clients, for config file changes, and for the CPU/iGPU power balance
reaper_freq=5
; The desired governor is used when entering GameMode instead of "performance"
desiredgov=performance
; The default governor is used when leaving GameMode instead of restoring the original value
;defaultgov=powersave
; GameMode can change the scheduler policy to SCHED_ISO on kernels which support it (currently
; not supported by upstream kernels). Can be set to "auto", "on" or "off". "auto" will enable
; with 4 or more CPU cores. "on" will always enable. Defaults to "off".
softrealtime=off
; GameMode can renice game processes. You can put any value between 0 and 20 here, the value
; will be negated and applied as a nice value (0 means no change). Defaults to 0.
renice=0
; By default, GameMode adjusts the iopriority of clients to BE/0, you can put any value
; between 0 and 7 here (with 0 being highest priority), or one of the special values
; "off" (to disable) or "reset" (to restore Linux default behavior based on CPU priority),
; currently, only the best-effort class is supported thus you cannot set it here
ioprio=reset
; Sets whether gamemode will inhibit the screensaver when active
; Defaults to 1
inhibit_screensaver=0
[filter]
; If "whitelist" entry has a value(s)
; gamemode will reject anything not in the whitelist
;whitelist=RiseOfTheTombRaider
; Gamemode will always reject anything in the blacklist
;blacklist=HalfLife3
; glxgears
[gpu]
; Here Be Dragons!
; Warning: Use these settings at your own risk
; Any damage to hardware incurred due to this feature is your responsibility and yours alone
; It is also highly recommended you try these settings out first manually to find the sweet spots
; Setting this to the keyphrase "accept-responsibility" will allow gamemode to apply GPU optimisations such as overclocks
;apply_gpu_optimisations=accept-responsibility
; The DRM device number on the system (usually 0), ie. the number in /sys/class/drm/card0/
;gpu_device=1
; AMD specific settings
; Requires a relatively up to date AMDGPU kernel module
; See: https://dri.freedesktop.org/docs/drm/gpu/amdgpu.html#gpu-power-thermal-controls-and-monitoring
; It is also highly recommended you use lm-sensors (or other available tools) to verify card temperatures
; This corresponds to power_dpm_force_performance_level, "manual" is not supported for now
;amd_performance_level=auto
[supervisor]
; This section controls the new gamemode functions gamemode_request_start_for and gamemode_request_end_for
; The whilelist and blacklist control which supervisor programs are allowed to make the above requests
;supervisor_whitelist=
;supervisor_blacklist=
; In case you want to allow a supervisor to take full control of gamemode, this option can be set
; This will only allow gamemode clients to be registered by using the above functions by a supervisor client
;require_supervisor=0
[custom]
; Custom scripts (executed using the shell) when gamemode starts and ends
;start=notify-send "GameMode started"
; /home/me/bin/stop_ethmining.sh
;end=notify-send "GameMode ended"
; /home/me/bin/start_ethmining.sh
; Timeout for scripts (seconds). Scripts will be killed if they do not complete within this time.
;script_timeout=10

View file

@ -1,91 +0,0 @@
{ ... }:
{
# Enable GIT.
programs.git = {
enable = true;
aliases = {
# List aliases
aliases = "config --get-regexp alias";
# List all the contributors with commit amount
contributors = "shortlog --summary --numbered";
# Output verbose info about branches and tags
branches = "branch -avv";
# List all tags
tags = "tag -l";
# Pretty logs
plog = "log --graph --decorate --all";
# Pretty grep
gcommit = "log --graph --decorate --grep";
};
extraConfig = {
core = {
# Set the editor to be used by GIT
editor = "nvim";
# Custom .gitignore
excludesfile = "~/.gitignore";
# Treat trailing whitespaces and spaces before tabs as an error
whitespace = "space-before-tab,-indent-with-non-tab,trailing-space";
};
color = {
# Use colors in GIT commmands.
ui = "auto";
};
commit = {
# https://help.github.com/articles/signing-commits-using-gpg/
gpgsign = true;
};
tag = {
gpgsign = true;
};
difftool = {
prompt = true;
};
mergetool = {
# https://www.git-scm.com/docs/git-mergetool#Documentation/git-mergetool.txt---no-prompt
prompt = false;
};
merge = {
# https://git-scm.com/docs/git-merge#_how_conflicts_are_presented
conflictstyle = "diff3";
};
push = {
# https://stackoverflow.com/questions/21839651/git-what-is-the-difference-between-push-default-matching-and-simple
default = "simple";
# git-push pushes relevant annotated tags when pushing branches out
followTags = true;
};
user = {
name = "Alexandre Cavalheiro S. Tiago da Silva";
email = "contact@thewizard.link";
signingkey = "A1D3A2B4E14BD7C0445BB749A5767B54367CFBDF";
};
pull = {
ff = "only";
};
init = {
defaultBranch = "main";
};
};
};
}

View file

@ -1,32 +0,0 @@
anchor=bottom-right
background-color=#282a36
border-color=#282a36
border-radius=20
border-size=2
default-timeout=10000
format=<span font="IBM Plex Serif weight=325 Italic" size="12288">%s</span>\n<span font="IBM Plex Serif weight=325" size="12288">%b</span>
group-by=summary
height=125
icon-location=right
layer=top
margin=0,20,15
markup=1
max-icon-size=48
padding=10,5,10
text-color=#44475a
width=300
[grouped]
format=<span font="IBM Plex Serif weight=325 Italic" size="12288">%s</span>\n<span font="IBM Plex Serif weight=325" size="12288">%b</span>
[mode=do-not-disturb]
invisible=1
[urgency=low]
border-color=#282a36
[urgency=normal]
border-color=#f1fa8c
[urgency=high]
border-color=#ff5555

View file

@ -1,101 +0,0 @@
{ ... }:
{
programs.mangohud = {
enable = true;
settings = {
# Limitations
fps_limit = 165;
#vsync = 1; # Disables VSync
#gl_vsync = 0; # - in OpenGL applications
# GPU Statistics
gpu_core_clock = true;
gpu_fan = true;
gpu_junction_temp = true;
gpu_load_change = true;
gpu_load_color = [
"39F900"
"FDFD09"
"B22222"
];
gpu_load_value = [
60
90
];
gpu_mem_clock = true;
gpu_mem_temp = true;
gpu_power = true;
gpu_stats = true;
gpu_temp = true;
gpu_voltage = true;
# CPU Statistics
cpu_load_change = true;
cpu_load_color = [
"39F900"
"FDFD09"
"B22222"
];
cpu_load_value = [
60
90
];
cpu_mhz = true;
cpu_power = true;
cpu_stats = true;
cpu_temp = true;
# IO Statistics
io_read = true;
io_stats = true;
io_write = true;
# RAM Statistics
ram = true;
swap = true;
vram = true;
# FPS Statistics
fps = true;
fps_color_change = true;
fps_value = [
60
90
];
fps_color = [
"B22222"
"FDFD09"
"39F900"
];
frametime = true;
frame_timing = true; # Display graphs
histogram = true; # ^
# Show whether gamemode is enabled for the application.
gamemode = true;
# Make so MangoHud starts hidden.
no_display = true;
# Show whether the GPU is throttling.
throttling_status = true;
# Show wine/proton version.
wine = true;
# Show the vulkan driver in-use.
vulkan_driver = true;
# Display the process' memory usage.
procmem = true;
# Show the application's architecture.
arch = true;
# Where to output log files.
output_folder = /home/wizardlink/.config/MangoHud;
};
};
}

View file

@ -1,14 +0,0 @@
{
"neoconf": {
"plugins": {
"lua_ls": {
"enabled": true
}
}
},
"lspconfig": {
"lua_ls": {
"Lua.completion.callSnippet": "Replace"
}
}
}

View file

@ -1,5 +0,0 @@
quote_style = "AutoPreferDouble"
call_parentheses = "None"
[sort_requires]
enabled = true

View file

@ -1,73 +0,0 @@
# My [Home Manager] module for neovim configuration
This is my personal configuration for _[neovim]_ using [Nix](https://nixos.org/), so this will not work outside of it - though it can be made to be.
In this case, I am outputting a [Home Manager] module to be used directly in your configuration, it currently barely has
any
options and is opinionated due to it being my personal configuration for daily use... But I plan to slowly add options
to make it usable by other people.
## Installing
First you add this repository as a flake input:
```nix
{
inputs = {
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
wizardlink.url = "git+https://git.thewizard.link/wizardlink/linuxware";
};
outputs = { home-manager, ... }@inputs: {
homeConfigurations.YOURHOSTNAME = home-manager.lib.homeManagerConfiguration {
# ...
extraSPecialArgs = inputs;
};
};
}
```
Then in your [Home Manager] configuration you can just import it:
```nix
{ wizardlink }:
{
imports = [
wizardlink.homeManagerModules.neovim
];
}
```
## Configuring
### [nixd](https://github.com/nix-community/nixd/)
```nix
programs.neovim.flake = {
hostname = "nixos"; # Your hostname used to build your system.
location = "git+file:///home/wizardlink/.system"; # Where you store your flake.
};
```
## My neovim failed because of package X not existing
My configuration is based off of `nixos-unstable` so sometimes your package may not exist or have a different name, I
apologise for that but I don't plan on maintaining backwards compatibility. :(
## How it looks
Here's some screenshots of how it currently looks like:
![image](./docs/example_1.png)
![image](./docs/example_2.png)
![image](./docs/example_3.png)
The theme I'm using is [catppuccin](https://github.com/catppuccin) in case you're curious.
[neovim]: https://neovim.io/
[Home Manager]: https://github.com/nix-community/home-manager

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 MiB

View file

@ -1,12 +0,0 @@
{ pkgs, ... }:
{
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
input-overlay
obs-backgroundremoval
obs-pipewire-audio-capture
];
};
}

View file

@ -1,111 +0,0 @@
* {
bg-col: #303446;
bg-col-light: #303446;
border-col: #303446;
selected-col: #303446;
blue: #8caaee;
fg-col: #c6d0f5;
fg-col2: #e78284;
grey: #737994;
width: 600;
font: "IBM Plex Sans 14";
}
element-text, element-icon , mode-switcher {
background-color: inherit;
text-color: inherit;
}
window {
height: 360px;
border: 3px;
border-color: @border-col;
background-color: @bg-col;
}
mainbox {
background-color: @bg-col;
}
inputbar {
children: [prompt,entry];
background-color: @bg-col;
border-radius: 5px;
padding: 2px;
}
prompt {
background-color: @blue;
padding: 6px;
text-color: @bg-col;
border-radius: 3px;
margin: 20px 0px 0px 20px;
}
textbox-prompt-colon {
expand: false;
str: ":";
}
entry {
padding: 6px;
margin: 20px 0px 0px 10px;
text-color: @fg-col;
background-color: @bg-col;
}
listview {
border: 0px 0px 0px;
padding: 6px 0px 0px;
margin: 10px 0px 0px 20px;
columns: 2;
lines: 5;
background-color: @bg-col;
}
element {
padding: 5px;
background-color: @bg-col;
text-color: @fg-col ;
}
element-icon {
size: 25px;
}
element selected {
background-color: @selected-col ;
text-color: @fg-col2 ;
}
mode-switcher {
spacing: 0;
}
button {
padding: 10px;
background-color: @bg-col-light;
text-color: @grey;
vertical-align: 0.5;
horizontal-align: 0.5;
}
button selected {
background-color: @bg-col;
text-color: @blue;
}
message {
background-color: @bg-col-light;
margin: 2px;
padding: 2px;
border-radius: 5px;
}
textbox {
padding: 6px;
margin: 20px 0px 0px 20px;
text-color: @blue;
background-color: @bg-col-light;
}

View file

@ -1,28 +0,0 @@
{ pkgs, ... }:
{
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
font = "IBM Plex Sans";
extraConfig = {
disable-history = false;
display-Network = " 󰤨 Network";
display-drun = " Apps ";
display-run = " Run ";
display-window = " Window";
drun-display-format = "{icon} {name}";
hide-scrollbar = true;
icon-theme = "Papirus-Dark";
location = 0;
modi = "run,drun,window";
show-icons = true;
sidebar-mode = true;
terminal = "alacritty";
};
theme = ./catppuccin-frappe.rasi;
};
}

View file

@ -1,19 +0,0 @@
{ pkgs, spicetify-nix, ... }:
let
spicePkgs = spicetify-nix.legacyPackages.${pkgs.system};
in
{
imports = [ spicetify-nix.homeManagerModules.default ];
programs.spicetify = {
enable = true;
theme = spicePkgs.themes.catppuccin;
colorScheme = "frappe";
enabledExtensions = with spicePkgs.extensions; [
autoVolume
shuffle
];
};
}

View file

@ -1,25 +0,0 @@
{ pkgs, ... }:
{
programs.tmux = {
enable = true;
clock24 = true;
keyMode = "vi";
terminal = "screen-256color";
extraConfig = ''
# Fix colors
set -sg terminal-overrides ",*:RGB"
'';
plugins = with pkgs.tmuxPlugins; [
{
plugin = catppuccin;
extraConfig = ''
# Set theme
set -g @catppuccin_flavour 'frappe'
'';
}
];
};
}

View file

@ -1,205 +0,0 @@
{ ... }:
{
programs.waybar = {
enable = true;
settings = {
mainBar = {
layer = "top";
margin = "10px 10px 0";
height = 30;
modules-left = [ "hyprland/workspaces" ];
modules-center = [ "clock" ];
modules-right = [
"network"
"memory"
"cpu"
"temperature"
"battery"
"tray"
];
"hyprland/workspaces" = {
format = "{icon}";
format-icons = {
active = "";
default = "";
empty = "";
persistent = "";
special = "";
urgent = "";
};
};
clock = {
format = "{:%H:%M} ";
format-alt = "{:%A; %B %d, %Y (%R)} ";
tooltip-format = "<tt><small>{calendar}</small></tt>";
calendar = {
mode = "month";
mode-mon-col = 3;
weeks-pos = "right";
on-scroll = 1;
on-click-right = "mode";
format = {
months = "<span color='#e5c890'><b>{}</b></span>";
days = "<span color='#c6d0f5'><b>{}</b></span>";
weeks = "<span color='#81c8be'><b>W{}</b></span>";
weekdays = "<span color='#ef9f76'><b>{}</b></span>";
today = "<span color='#a6d189'><b><u>{}</u></b></span>";
};
actions = {
on-click-backward = "tz_down";
on-click-forward = "tz_up";
on-click-right = "mode";
on-scroll-down = "shift_down";
on-scroll-up = "shift_up";
};
};
};
network = {
interval = 5;
format = " {bandwidthUpBits} 󰇙 {bandwidthDownBits} ";
format-disconnected = " No connection";
tooltip-format-wifi = " {essid} ({signalStrength}%)";
};
memory = {
interval = 5;
format = " {percentage}%";
states = {
warning = 70;
critical = 90;
};
"tooltip-format" = " {used:0.1f}G/{total:0.1f}G";
};
cpu = {
interval = 5;
tooltip = false;
format = " {usage}%";
format-alt = " {load}";
states = {
warning = 70;
critical = 90;
};
};
temperature = {
critical-threshold = 90;
interval = 5;
format = "{icon} {temperatureC}°";
format-icons = [
""
""
""
""
""
];
tooltip = false;
};
# Module configuration
battery = {
interval = 10;
states = {
warning = 30;
critical = 15;
};
format-time = "{H}:{M:02}";
format = "{icon} {capacity}% ({time})";
format-charging = " {capacity}% ({time})";
format-charging-full = " {capacity}%";
format-full = "{icon} {capacity}%";
format-alt = "{icon} {power}W";
format-icons = [
""
""
""
""
""
];
tooltip = false;
};
tray = {
icon-size = 18;
spacing = 10;
};
};
};
style = ''
/* Using https://github.com/catppuccin/catppuccin for color reference. */
/* Keyframes */
@keyframes blink-critical {
to {
/*color: @white;*/
background-color: @critical;
}
}
* {
all: unset;
color: #c6d0f5;
font-family: "IBM Plex Sans", 'Courier New', Courier, monospace;
font-size: 14px;
}
.modules-left,
.modules-right,
.modules-center {
padding: 0 20px;
border-radius: 10px;
background-color: rgba(48, 52, 70, 0.85);
}
tooltip {
background-color: rgba(48, 52, 70, 0.85);
border-radius: 10px;
padding: 8px;
}
tooltip label {
color: #c6d0f5;
}
#workspaces {
margin-left: -5px;
padding-left: 0px;
}
#workspaces button {
margin: 0 8px;
}
#workspaces button:hover {
background: #414559;
border: none;
}
#clock {
padding: 0 10px;
}
#network, #cpu, #memory, #temperature {
margin: 0 8px;
}
#tray {
margin-left: 8px;
}
#tray menu {
background-color: rgba(48, 52, 70, 0.85);
border-radius: 10px;
padding: 8px;
}
'';
};
}

View file

@ -1,18 +0,0 @@
#!/bin/sh
#
# Load sinks
#
pactl load-module module-null-sink formats=pcm,float32le sink_name=output sink_properties=device.description="Output"
pactl load-module module-null-sink formats=pcm,float32le sink_name=applications sink_properties=device.description="Applications"
#
# Loopback audio to the correct places
#
# Application audio forwarded to microphone
pactl load-module module-loopback latency_msec=25 source=applications.monitor sink=output
# Microphone
pactl load-module module-loopback latency_msec=25 source=rnnoise_source sink=output
# Application audio forwarded to me
pactl load-module module-loopback latency_msec=25 source=applications.monitor sink=alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.pro-output-0

View file

@ -1,4 +0,0 @@
#!/bin/sh
pactl unload-module module-loopback
pactl unload-module module-null-sink

View file

@ -1,7 +0,0 @@
#!/bin/sh
# I've removed all environment variables
# but there might be useful ones in the future.
# https://docs.mesa3d.org/envvars.html
mangohud gamemoderun "$@"

View file

@ -1,82 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
ibm-plex
nerd-fonts.blex-mono
nerd-fonts.symbols-only
libsForQt5.qtstyleplugin-kvantum
libsForQt5.qtwayland
qt6Packages.qtstyleplugin-kvantum
qt6Packages.qtwayland
];
home.file = {
# Cattpuccin theme for fish shell.
".config/fish/themes/Catppuccin-Frappe.theme".source = ./theming/Catppuccin-Frappe.theme;
## Kvantum's theme configuration.
".config/Kvantum/catppuccin-frappe-lavender" = {
source = "${
pkgs.catppuccin-kvantum.override {
accent = "lavender";
variant = "frappe";
}
}/share/Kvantum/catppuccin-frappe-lavender";
};
".config/Kvantum/kvantum.kvconfig".text = ''
[General]
theme=catppuccin-frappe-lavender
'';
##
## Themeing configuration for qt5 and qt6
".config/qt5ct/colors".source = ./theming/qt5ct;
".config/qt6ct/colors".source = ./theming/qt5ct; # We use the qt5ct because it's the SAME spec
##
".local/share/SpeedCrunch/color-schemes/catppuccin-frappe.json" = {
recursive = true;
source = builtins.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/speedcrunch/34f2b382de0188d2fd85f59a8a366f313fc30a71/themes/catppuccin-frappe.json";
sha256 = "sha256:0imx5a53p3ls5kddplgr7mbpbidrmzl9qiwpv7r8jjmsf8yxs0i4";
};
};
};
home.pointerCursor = {
package = pkgs.catppuccin-cursors.frappeLavender;
name = "catppuccin-frappe-lavender-cursors";
size = 24;
gtk.enable = true;
x11.enable = true;
};
# Configure GTK.
gtk = {
enable = true;
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme.override { color = "violet"; };
};
};
# Configure QT
qt = {
enable = true;
platformTheme.name = "qtct";
};
}

View file

@ -1,4 +0,0 @@
[ColorScheme]
active_colors=#ffc6d0f5, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994, #ffc6d0f5, #ffc6d0f5, #ffc6d0f5, #ff303446, #ff292c3c, #ff838ba7, #ff8caaee, #ff303446, #ff8caaee, #ffe78284, #ff303446, #ffc6d0f5, #ff232634, #ffc6d0f5, #80838ba7
disabled_colors=#ffa5adce, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994, #ffa5adce, #ffa5adce, #ffa5adce, #ff303446, #ff292c3c, #ff838ba7, #ff626880, #ffb5bfe2, #ff8caaee, #ffe78284, #ff303446, #ffc6d0f5, #ff232634, #ffc6d0f5, #80838ba7
inactive_colors=#ffc6d0f5, #ff292c3c, #ffa5adce, #ff949cbb, #ff51576d, #ff737994, #ffc6d0f5, #ffc6d0f5, #ffc6d0f5, #ff303446, #ff292c3c, #ff838ba7, #ff414559, #ffa5adcb, #ff8caaee, #ffe78284, #ff303446, #ffc6d0f5, #ff232634, #ffc6d0f5, #80838ba7

View file

@ -1,4 +0,0 @@
[ColorScheme]
active_colors=#ff4c4f69, #ffe6e9ef, #ff6c6f85, #ff7c7f93, #ffbcc0cc, #ff9ca0b0, #ff4c4f69, #ff4c4f69, #ff4c4f69, #ffeff1f5, #ffe6e9ef, #ff8c8fa1, #ff1e66f5, #ffeff1f5, #ff7287fd, #ffe64553, #ffeff1f5, #ff4c4f69, #ffdce0e8, #ff4c4f69, #808c8fa1
disabled_colors=#ff6c6f85, #ffe6e9ef, #ff6c6f85, #ff7c7f93, #ffbcc0cc, #ff9ca0b0, #ff6c6f85, #ff6c6f85, #ff6c6f85, #ffeff1f5, #ffe6e9ef, #ff8c8fa1, #ff9ca0b0, #ff5c5f77, #ff7287fd, #ffe64553, #ffeff1f5, #ff4c4f69, #ffdce0e8, #ff4c4f69, #808c8fa1
inactive_colors=#ff4c4f69, #ffe6e9ef, #ff6c6f85, #ff7c7f93, #ffbcc0cc, #ff9ca0b0, #ff4c4f69, #ff4c4f69, #ff4c4f69, #ffeff1f5, #ffe6e9ef, #ff8c8fa1, #ffccd0da, #ff6c6f85, #ff7287fd, #ffe64553, #ffeff1f5, #ff4c4f69, #ffdce0e8, #ff4c4f69, #808c8fa1

View file

@ -1,4 +0,0 @@
[ColorScheme]
active_colors=#ffcad3f5, #ff1e2030, #ffa5adcb, #ff939ab7, #ff494d64, #ff6e738d, #ffcad3f5, #ffcad3f5, #ffcad3f5, #ff24273a, #ff1e2030, #ff8087a2, #ff8aadf4, #ff24273a, #ff8aadf4, #ffed8796, #ff24273a, #ffcad3f5, #ff181926, #ffcad3f5, #808087a2
disabled_colors=#ffa5adcb, #ff1e2030, #ffa5adcb, #ff939ab7, #ff494d64, #ff6e738d, #ffa5adcb, #ffa5adcb, #ffa5adcb, #ff24273a, #ff1e2030, #ff8087a2, #ff8aadf4, #ff494d64, #ff8aadf4, #ffed8796, #ff24273a, #ffcad3f5, #ff181926, #ffcad3f5, #808087a2
inactive_colors=#ffcdd6f4, #ff1e2030, #ffa5adcb, #ff939ab7, #ff494d64, #ff6e738d, #ffcad3f5, #ffcad3f5, #ffcad3f5, #ff24273a, #ff1e2030, #ff8087a2, #ff8aadf4, #ffa5adcb, #ff8aadf4, #ffed8796, #ff24273a, #ffcad3f5, #ff181926, #ffcad3f5, #808087a2

View file

@ -1,4 +0,0 @@
[ColorScheme]
active_colors=#ffcdd6f4, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffcdd6f4, #ffcdd6f4, #ffcdd6f4, #ff1e1e2e, #ff181825, #ff7f849c, #ff89b4fa, #ff1e1e2e, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c
disabled_colors=#ffa6adc8, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffa6adc8, #ffa6adc8, #ffa6adc8, #ff1e1e2e, #ff11111b, #ff7f849c, #ff89b4fa, #ff45475a, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c
inactive_colors=#ffcdd6f4, #ff1e1e2e, #ffa6adc8, #ff9399b2, #ff45475a, #ff6c7086, #ffcdd6f4, #ffcdd6f4, #ffcdd6f4, #ff1e1e2e, #ff181825, #ff7f849c, #ff89b4fa, #ffa6adc8, #ff89b4fa, #fff38ba8, #ff1e1e2e, #ffcdd6f4, #ff11111b, #ffcdd6f4, #807f849c

View file

@ -0,0 +1,60 @@
The [NixOS] module installs [Hyprland] onto the system.
Whilst the [Home Manager] module generates the dotfiles for [Hyprland] and optionally [hyprlock] and [hypridle].
It can be configured through `modules.hyprland`.
## Module options
### extraConfig
`modules.hyprland.extraConfig` when set will be appended to the top of the configuration I generate, you can see where
that is [here](./home-manager.nix#L189).
There are no monitors configured by default, so you should use this option to do so.
### hypridle.enable
Whether to configure and enable the [hypridle] package. Be mindful that it may not auto-start, I have yet to find why but
even though it configures to start after `graphical-session.target`, that isn't reached in Hyprland sometimes.
### hyprlock.enable
Whether to configure and enable the [hyprlock] package, by itself it does nothing but when [hypridle] is also enabled it
will automatically call [hyprlock] after a 120 second timeout.
### hyprlock.background
A path to an image that will be used as background when [hyprlock] is invoked.
### scripts.screenshot.enable
When enabled it will create two script files in `$XDG_DATA_HOME/scripts/hyprland` and two keybinds for you to run these
scripts, allowing you to take screenshots of a region and the entire screen of your first monitor.
### scripts.startup.enable
Not my proudest option, this will add two packages containing a startup script for apps that I use in the daily &
services. If this module ever gets actually used by someone, then I'll refine it.
## Visuals
### Active window
![image](/assets/screenshots/hyprland-active.png)
### Inactive window
![image](/assets/screenshots/hyprland-inactive.png)
### Gaps
![image](/assets/screenshots/hyprland-gaps.png)
<!-- REFERENCES -->
[hyprland]: https://hyprland.org/
[hyprlock]: https://github.com/hyprwm/hyprlock
[hypridle]: https://github.com/hyprwm/hypridle
[home manager]: https://github.com/nix-community/home-manager
[nixos]: https://nixos.org

View file

@ -21,6 +21,18 @@ in
description = "Configuration to be appended to my own.";
};
hypridle.enable = lib.mkEnableOption "hypridle";
hyprlock = {
enable = lib.mkEnableOption "hyprlock";
background = lib.mkOption {
type = lib.types.path;
default = "";
example = "~/wallpapers/abc.png";
description = "The image to be used as background for hyprlock.";
};
};
scripts = {
screenshot.enable = lib.mkEnableOption "screenshot";
startup.enable = lib.mkEnableOption "startup";
@ -28,13 +40,18 @@ in
};
config = {
home.sessionVariables = {
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
};
xdg.configFile."hypr/frappe.conf".source = builtins.fetchurl {
url = "https://raw.githubusercontent.com/catppuccin/hyprland/main/themes/frappe.conf";
sha256 = "1clw669i1n3dhawdw4clmjv75fy3smycb5iqk3sanzpr3y0i4vwx";
};
# Enable hypridle and hyprlock
services.hypridle = {
services.hypridle = lib.mkIf cfg.hypridle.enable {
enable = true;
settings = {
general = {
@ -43,21 +60,24 @@ in
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 120;
on-timeout = "hyprlock";
}
{
timeout = 180;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
listener =
[
{
timeout = 180;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
]
++ lib.optionals cfg.hyprlock.enable [
{
timeout = 120;
on-timeout = "hyprlock";
}
];
};
};
programs.hyprlock = {
programs.hyprlock = lib.mkIf cfg.hyprlock.enable {
enable = true;
extraConfig = # hyprlang
''
@ -76,7 +96,7 @@ in
# BACKGROUND
background {
monitor =
path = $HOME/internal/personal/wallpapers/wallhaven-2em8y6.jpg
path = ${cfg.hyprlock.background}
blur_passes = 0
color = $base
}

View file

@ -0,0 +1,26 @@
{ pkgs, hyprland, ... }:
let
hyprland-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
# Enable Hyprland's cachix
nix.settings.substituters = [ "https://hyprland.cachix.org" ];
nix.settings.trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
# Enable Hyprland
programs.hyprland = {
enable = true;
package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
# Overwrite the Mesa packages with Hyprland's for consitency
hardware.graphics = {
package = hyprland-pkgs.mesa.drivers;
package32 = hyprland-pkgs.pkgsi686Linux.mesa.drivers;
};
}

43
modules/neovim/README.md Normal file
View file

@ -0,0 +1,43 @@
This module generates dotfiles for [neovim].
The module extends `programs.neovim`.
## Module options
### programs.neovim.nixd.hostname
By default [nixd] is enabled, you **need** to pass the current machine's
hostname that is used to generate your system.
### programs.neovim.nixd.location
The location of your system's flake, [nixd] will execute an expression defined in the LSP's configuration that reads
the flake's contents to evaluate [NixOS] and [Home Manager] options.
### programs.neovim.ollama.enable
Whether to add an [ollama] package to be used with [ollama.nvim](https://github.com/nomnivore/ollama.nvim).
### programs.neovim.ollama.type
The type of [ollama] package to be added, valid options are: `amd`, `nvidia` or `cpu`.
## My neovim failed because of package X not existing
My configuration is based off of `nixos-unstable` so sometimes your package may not exist or have a different name, I
apologise for that but I don't plan on maintaining backwards compatibility. :(
## How it looks
Here's some screenshots of how it currently looks like:
![image](/assets/screenshots/neovim-dashboard.png)
![image](/assets/screenshots/neovim-nix.png)
![image](/assets/screenshots/neovim-rust.png)
The theme I'm using is [catppuccin](https://github.com/catppuccin) in case you're curious.
[neovim]: https://neovim.io/
[Home Manager]: https://github.com/nix-community/home-manager
[nixd]: https://github.com/nix-community/nixd/
[ollama]: https://ollama.com/

View file

@ -56,81 +56,89 @@ in
};
config = {
home.sessionVariables = {
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
};
programs.neovim = {
withNodeJs = true;
withPython3 = true;
extraLuaConfig = builtins.readFile ./init.lua;
extraPackages = with pkgs; [
# Needed by ollama.nvim
curl
ollamaPackage
extraPackages =
with pkgs;
[
# Needed by LuaSnip
luajitPackages.jsregexp
# Needed by LuaSnip
luajitPackages.jsregexp
# Treesitter
gcc # For compiling languages
# Treesitter
gcc # For compiling languages
# CMAKE
neocmakelsp
# CMAKE
neocmakelsp
# C/C++
clang-tools
vscode-extensions.ms-vscode.cpptools
# C/C++
clang-tools
vscode-extensions.ms-vscode.cpptools
# C#
#csharp-ls Testing roslyn.nvim
roslyn-ls
rzls
csharpier
netcoredbg
# C#
#csharp-ls Testing roslyn.nvim
roslyn-ls
rzls
csharpier
netcoredbg
# HTML/CSS/JSON
emmet-ls
vscode-langservers-extracted
# HTML/CSS/JSON
emmet-ls
vscode-langservers-extracted
# LUA
lua-language-server
stylua
# LUA
lua-language-server
stylua
# Markdown
markdownlint-cli
marksman
# Markdown
markdownlint-cli
marksman
# Nix
deadnix
nixd
nixfmt-rfc-style
statix
# Nix
deadnix
nixd
nixfmt-rfc-style
statix
# Python
basedpyright
python312Packages.flake8
ruff
# Python
basedpyright
python312Packages.flake8
ruff
# TypeScript/JavaScript
vtsls
deno
vscode-js-debug
# TypeScript/JavaScript
vtsls
deno
vscode-js-debug
# Rust
rust-analyzer
cargo # Needed by blink-cmp
taplo
vscode-extensions.vadimcn.vscode-lldb
# Rust
rust-analyzer
cargo # Needed by blink-cmp
taplo
vscode-extensions.vadimcn.vscode-lldb
# Vue
prettierd
vue-language-server
# Vue
prettierd
vue-language-server
# Svelte
nodePackages.svelte-language-server
# Svelte
nodePackages.svelte-language-server
# YAML
yaml-language-server
];
# YAML
yaml-language-server
]
++ pkgs.lib.optionals config.programs.neovim.ollama.enable [
# Needed by ollama.nvim
curl
ollamaPackage
];
};
xdg.configFile."nvim/lua" = {

View file

@ -1,39 +0,0 @@
{ nixpkgs, ... }:
{
# Enable experimental features
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Enable nh, a bundle of CLI utilities for NixOS
programs.nh = {
enable = true;
# Enable automatic garbage collection.
clean.enable = true;
clean.dates = "daily";
clean.extraArgs = "--keep-since 4d --keep 3";
flake = "/home/wizardlink/.system";
};
# Optimize storage
nix.optimise.automatic = true;
nix.settings.auto-optimise-store = true;
# Enable Hyprland's cachix
nix.settings.substituters = [ "https://hyprland.cachix.org" ];
nix.settings.trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
# Pin the nix registry
nix.registry = {
nixpkgs.flake = nixpkgs;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
}

View file

@ -1,14 +0,0 @@
{ ... }:
{
imports = [
./common.nix
./desktop.nix
./hardware.nix
./packages.nix
./services.nix
./sound.nix
./system.nix
./theming.nix
];
}

View file

@ -1,90 +0,0 @@
{
pkgs,
hyprland,
...
}:
let
hyprland-pkgs = hyprland.inputs.nixpkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in
{
environment.sessionVariables = {
# Set env for Fcitx5
QMODIFIERS = "@im=fcitx5";
};
# Enable SDDM.
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
theme = "catppuccin-frappe";
package = pkgs.kdePackages.sddm;
};
# Enable Hyprland
programs.hyprland = {
enable = true;
package = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage = hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
# Enable XDG Desktop Portals.
xdg.portal = {
enable = true;
config = {
common = {
default = [ "wlr" ];
};
};
};
# Needed for home-manager
environment.pathsToLink = [
"/share/xdg-desktop-portal"
"/share/applications"
];
# Enable OpenGL.
hardware.graphics = {
enable = true;
enable32Bit = true;
package = hyprland-pkgs.mesa.drivers;
package32 = hyprland-pkgs.pkgsi686Linux.mesa.drivers;
extraPackages = with pkgs; [
rocmPackages.clr.icd # OpenGL hwa
];
};
# Enable Thunar and it's dependencies
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [ thunar-archive-plugin ];
};
programs.xfconf.enable = true; # For configuring
services.gvfs.enable = true; # For mounting drives, trash, etc.
services.tumbler.enable = true; # Thumbnail support
# Enable the Fcitx5 IME
i18n.inputMethod = {
enable = true;
type = "fcitx5";
fcitx5 = {
addons = with pkgs; [
fcitx5-mozc
fcitx5-gtk
fcitx5-catppuccin
];
quickPhrase = {
proud = "<()>";
};
waylandFrontend = true;
};
};
}

View file

@ -1,13 +0,0 @@
{ ... }:
{
# Enable Bluetooth
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
# Enable fstrim for better ssd lifespan
services.fstrim.enable = true;
}

View file

@ -1,111 +0,0 @@
{ pkgs, ... }:
{
# Enable GPG.
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Enable fish system-wide to integrate with nixpkgs.
programs.fish.enable = true;
# Enable Steam.
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
localNetworkGameTransfers.openFirewall = true;
# ^ Enables so we can transfer games to other computers in the network.
# Add Proton-GE to 'compatibilitytools.d'.
extraCompatPackages = with pkgs; [ proton-ge-bin ];
};
# Enable and configure gamemode.
programs.gamemode = {
enable = true;
enableRenice = true;
settings = {
gpu = {
apply_gpu_optimisations = "accept-responsibility";
gpu_device = 1;
amd_performance_level = "auto";
};
};
};
# Enable KDEConnect
programs.kdeconnect = {
enable = true;
package = pkgs.kdePackages.kdeconnect-kde;
};
# Enable Docker.
virtualisation.docker.enable = true;
# Enable virt-manager
programs.virt-manager.enable = true;
# Enable virtd and spice USB redirection
virtualisation.spiceUSBRedirection.enable = true;
virtualisation.libvirtd.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
## Tools
# Utilities
bat
duf
fuseiso
lm_sensors
p7zip
tree
unrar
unzip
wget
zip
# File managing
sshfs
yazi
# Virtualization
docker-compose
quickemu
# Desktop
wl-clipboard
xclip
zoxide
(catppuccin-sddm.override # So SDDM finds the theme files.
{
flavor = "frappe";
font = "IBM Plex Sans";
fontSize = "11";
background = "${./theming/sddm/Background.jpg}";
loginBackground = true;
}
)
# Networking
gping
nmap
# Processes
(btop.override {
# AMD GPU support
rocmSupport = true;
})
killall
# Filter
fzf
ripgrep
## Libraries
libsForQt5.qt5.qtgraphicaleffects
libsForQt5.qt5.qtquickcontrols2
];
}

View file

@ -1,41 +0,0 @@
{
pkgs,
lib,
config,
...
}:
{
# Enable polkit,
security.polkit.enable = true;
# install an agent to interface with it,
environment.systemPackages = with pkgs; [ polkit_gnome ];
# And enable GNOME keyring for registering keys.
services.gnome.gnome-keyring.enable = true;
# Enable flatpak to all users.
services.flatpak.enable = true;
services.postgresql = {
identMap = lib.mkIf config.services.postgresql.enable ''
# MAP_NAME SYSTEM_USER DB_USER
superuser_map root postgres
superuser_map postgres postgres
superuser_map /^(.*)$ \1
'';
authentication = lib.mkIf config.services.postgresql.enable (
lib.mkOverride 10 ''
# TYPE DATABASE USER ADDRESS METHOD MAP
local all all peer map=superuser_map
host all all 127.0.0.1/32 md5
host all all ::1/128 md5
local replication all peer map=superuser_map
host replication all 127.0.0.1/32 ident map=superuser_map
host replication all ::1/128 ident map=superuser_map
''
);
};
}

View file

@ -1,15 +0,0 @@
{ ... }:
{
# Enable sound with pipewire.
services.pulseaudio.enable = false;
services.pipewire = {
enable = true;
audio.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

View file

@ -1,53 +0,0 @@
{ pkgs, config, ... }:
{
# Kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
# Add AMD drivers.
boot.initrd.kernelModules = [
"amdgpu"
"v4l2loopback"
];
boot.extraModulePackages = [
config.boot.kernelPackages.v4l2loopback
];
boot.extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="Virtual camera" exclusive_caps=1
'';
# Bootloader.
boot.loader = {
systemd-boot = {
enable = true;
configurationLimit = 10;
};
efi.canTouchEfiVariables = true;
};
# Enables zram.
zramSwap.enable = true;
# Enable networking
networking.networkmanager.enable = true;
# Set fish as the default shell for all users.
users.defaultUserShell = pkgs.fish;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
PermitRootLogin = "no";
StreamLocalBindUnlink = "yes";
};
};
}

View file

@ -1,12 +0,0 @@
{ ... }:
{
# Set the default fonts for the system.
fonts.fontconfig = {
defaultFonts = {
serif = [ "IBM Plex Serif" ];
sansSerif = [ "IBM Plex Sans" ];
monospace = [ "IBM Plex Mono" ];
};
};
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 MiB

View file

@ -0,0 +1,18 @@
# READ THIS BEFORE PROCEEDING
Below is a checklist of changes you need to do before rebuilding your system.
## Generate your system configuration and replace the placeholders.
You can achieve this by running `sudo nixos-generate-config`, then overwrite `hardware-configuration.nix` and
`configuration.nix` with the contents of the files found in `/etc/nixos`.
## Replace placeholder text
In `flake.nix` you will find `your-hostname-here`, replace with your machine's current hostname.
In `home-manager.nix` you have to replace:
- `your-username-here` with your user's username;
- `your-home-directory-here` with the path of your home directory, usually the same as your username;
- `your-hostname-here` with your machine's current hostname;
- `your-flake-location-here` with where you are storing the flake.

View file

@ -0,0 +1 @@
{ ... }: { }

View file

@ -0,0 +1,48 @@
{
description = "NixOS System Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Ideally using nixos-unstable since my configuration
# is based off of this channel.
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
linuxware = {
url = "github:wizardlink/linuxware";
inputs.nixpkgs.follows = "nixpkgs"; # Pin to your local `nixpkgs` if you use the unstable channel.
};
};
outputs =
{
home-manager,
nixpkgs,
linuxware,
...
}@inputs:
let
system = "x86_64-linux";
in
{
your-hostname-here =
let
specialArgs = inputs;
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.extraSpecialArgs = inputs;
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.wizardlink = import ./home-manager.nix;
}
linuxware.nixosModules.hyprland
];
in
nixpkgs.lib.nixosSystem { inherit system specialArgs modules; };
};
}

View file

@ -0,0 +1 @@
{ ... }: { }

View file

@ -0,0 +1,98 @@
{
config,
pkgs,
linuxware,
...
}:
{
imports = [
linuxware.homeManagerModules.emacs
linuxware.homeManagerModules.hyprland
linuxware.homeManagerModules.neovim
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "your-username-here";
home.homeDirectory = "/home/your-home-directory-here";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
# EDITOR = "emacs";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
programs.neovim = {
# Enable Neovim, pre-configured by `linuxware`.
enable = true;
# Configure nixd
nixd = {
hostname = "your-hostname-here";
location = "your-flake-location-here";
};
};
}