initial restructuring
|
After Width: | Height: | Size: 664 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 394 KiB |
|
After Width: | Height: | Size: 113 KiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 850 KiB |
|
After Width: | Height: | Size: 6.2 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 924 KiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 2.4 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 2.1 MiB |
|
After Width: | Height: | Size: 1.1 MiB |
|
After Width: | Height: | Size: 1.6 MiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 662 KiB |
|
After Width: | Height: | Size: 1.5 MiB |
|
After Width: | Height: | Size: 229 KiB |
|
After Width: | Height: | Size: 7.6 MiB |
|
After Width: | Height: | Size: 731 KiB |
|
After Width: | Height: | Size: 1.9 MiB |
|
After Width: | Height: | Size: 10 MiB |
|
After Width: | Height: | Size: 12 MiB |
|
After Width: | Height: | Size: 4.9 MiB |
|
After Width: | Height: | Size: 1.3 MiB |
|
After Width: | Height: | Size: 1.0 MiB |
|
After Width: | Height: | Size: 1.5 MiB |
@@ -0,0 +1,7 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./niri.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
launch-lisgd = pkgs.writeShellScriptBin "launch-lisgd" ''
|
||||
# Search for the capacitive touch layer and extract its event number.
|
||||
# UPDATE 'Touchscreen' below to match the unique word you found in step 1.
|
||||
TOUCH_EVENT=$(grep -i -E 'name=".*Finger.*"' -A 5 /proc/bus/input/devices | grep -o 'event[0-9]\+' | head -n 1)
|
||||
|
||||
if [ -n "$TOUCH_EVENT" ]; then
|
||||
# Start lisgd locked exclusively to the finger digitizer
|
||||
${pkgs.lisgd}/bin/lisgd -t 30 -m 150 -r 45 -d "/dev/input/$TOUCH_EVENT" \
|
||||
-g "3,LR,*,*,P,niri msg action focus-column-left && sleep 0.4" \
|
||||
-g "3,RL,*,*,P,niri msg action focus-column-right && sleep 0.4" \
|
||||
-g "3,UD,*,*,P,niri msg action focus-workspace-up && sleep 0.4" \
|
||||
-g "3,DU,*,*,P,niri msg action focus-workspace-down && sleep 0.4" \
|
||||
-g "4,DU,*,*,P,dms ipc spotlight toggle && sleep 0.4" \
|
||||
-g "1,DU,B,*,pkill -u jashton -RTMIN wvkbd-mobintl && sleep 0.4"
|
||||
fi
|
||||
'';
|
||||
|
||||
launch-wvkbd = pkgs.writeShellScriptBin "launch-wvkbd" ''
|
||||
THEME_CACHE="$HOME/.cache/DankMaterialShell/dms-colors.json"
|
||||
|
||||
if [ -f "$THEME_CACHE" ]; then
|
||||
BG=$(jq -r '.["colors"]["dark"]["background"]' "$THEME_CACHE" | tr -d '#')
|
||||
FG=$(jq -r '.["colors"]["dark"]["surface_container_lowest"]' "$THEME_CACHE" | tr -d '#')
|
||||
TXT=$(jq -r '.["colors"]["dark"]["on_background"]' "$THEME_CACHE" | tr -d '#')
|
||||
PRIMARY=$(jq -r '.["colors"]["dark"]["surface_container_lowest"]' "$THEME_CACHE" | tr -d '#')
|
||||
ON_PRIMARY=$(jq -r '.["colors"]["dark"]["on_background"]' "$THEME_CACHE" | tr -d '#')
|
||||
|
||||
wvkbd-mobintl --hidden --no-popup --bg "$BG" --press "$BG" --fg "$FG" --text "$TXT" --fg-sp "$PRIMARY" --text-sp "$ON_PRIMARY" -L 300
|
||||
else
|
||||
wvkbd-mobintl --hidden --no-popup
|
||||
fi
|
||||
'';
|
||||
in
|
||||
|
||||
{
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
# Use gtk or kde based on your preferred file picker dialog
|
||||
config.niri = {
|
||||
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ]; # or "kde"
|
||||
};
|
||||
|
||||
# Ensure the GTK portal is installed
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
|
||||
programs.niri = {
|
||||
settings = {
|
||||
# Autostart DMS if you prefer launching it directly from Niri instead of systemd
|
||||
spawn-at-startup = [
|
||||
{ command = [ "dms" "run" ]; }
|
||||
{ command = [ "${launch-wvkbd}/bin/launch-wvkbd" ]; }
|
||||
{ command = [ "${launch-lisgd}/bin/launch-lisgd" ]; } # Spawns the daemon
|
||||
];
|
||||
|
||||
hotkey-overlay = {
|
||||
skip-at-startup = true;
|
||||
};
|
||||
|
||||
input = {
|
||||
keyboard.xkb.layout = "us";
|
||||
touchpad = {
|
||||
tap = true;
|
||||
natural-scroll = true;
|
||||
};
|
||||
};
|
||||
|
||||
layout = {
|
||||
gaps = 8;
|
||||
center-focused-column = "never";
|
||||
default-column-width.proportion = 1.0;
|
||||
border.enable = false;
|
||||
#tab-indicator.corner-radius = 18.0;
|
||||
focus-ring = {
|
||||
|
||||
enable = false;
|
||||
width = 2;
|
||||
};
|
||||
};
|
||||
|
||||
prefer-no-csd = true;
|
||||
window-rules = [
|
||||
{ # All windows
|
||||
geometry-corner-radius = {
|
||||
bottom-left = 25.0;
|
||||
bottom-right = 25.0;
|
||||
top-right = 25.0;
|
||||
top-left = 25.0;
|
||||
};
|
||||
|
||||
draw-border-with-background = true;
|
||||
clip-to-geometry = true;
|
||||
}
|
||||
];
|
||||
|
||||
# Vim Keybindings & Built-in Features
|
||||
binds = with config.lib.niri.actions; {
|
||||
# Launchers & Session Control
|
||||
"Mod+Return".action.spawn = [ "alacritty" ];
|
||||
"Mod+P".action.spawn = [ "pkill" "-RTMIN" "wvkbd-mobintl" ];
|
||||
"Mod+Space".action.spawn = [ "dms" "ipc" "spotlight" "toggle" ];
|
||||
"Mod+X".action.close-window = [];
|
||||
"Mod+F".action.fullscreen-window = [];
|
||||
"Mod+Shift+E".action.quit = [];
|
||||
"Mod+Shift+P".action.toggle-overview = [];
|
||||
|
||||
# Vim Focus Movement
|
||||
"Mod+H".action.focus-column-left = [];
|
||||
"Mod+J".action.focus-window-down = [];
|
||||
"Mod+K".action.focus-window-up = [];
|
||||
"Mod+L".action.focus-column-right = [];
|
||||
|
||||
# Workspace Navigation
|
||||
"Mod+N".action.focus-workspace-down = [];
|
||||
"Mod+U".action.focus-workspace-up = [];
|
||||
|
||||
# Vim Window Reordering
|
||||
"Mod+Shift+H".action.move-column-left = [];
|
||||
"Mod+Shift+L".action.move-column-right = [];
|
||||
"Mod+Shift+J".action.move-column-to-workspace-down = [];
|
||||
"Mod+Shift+K".action.move-column-to-workspace-up = [];
|
||||
|
||||
# Volume & Brightness Media Controls
|
||||
"XF86AudioRaiseVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05+" ];
|
||||
"XF86AudioLowerVolume".action.spawn = [ "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.05-" ];
|
||||
"XF86AudioMute".action.spawn = [ "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle" ];
|
||||
"XF86MonBrightnessUp".action.spawn = [ "dms" "ipc" "call" "brightness" "increment" "5" "" ];
|
||||
"XF86MonBrightnessDown".action.spawn = [ "dms" "ipc" "call" "brightness" "decrement" "5" "" ];
|
||||
|
||||
# Screenshots
|
||||
"Print".action.screenshot = [];
|
||||
"Ctrl+Print".action.screenshot-screen = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{ pkgs, config, ... }:
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,128 @@
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
# Compile your custom wvkbd build
|
||||
custom_wvkbd = pkgs.wvkbd.overrideAttrs (oldAttrs: {
|
||||
# Pin the package version to the exact commit from your flake input
|
||||
src = inputs.wvkbd-src;
|
||||
version = "custom-git";
|
||||
|
||||
# Choose your preferred layout layout (e.g., mobintl, standard, cyrillic)
|
||||
makeFlags = (oldAttrs.makeFlags or []) ++ [ "LAYOUT=mobintl" ];
|
||||
|
||||
# Optional: Swap out the layout with your own config.h file if you have one
|
||||
preBuild = ''
|
||||
cp ${./programs/layout.custom.h} layout.mobintl.h
|
||||
cp ${./programs/config.custom.h} config.mobintl.h
|
||||
cp ${./programs/keymap.custom.h} keymap.mobintl.h
|
||||
'';
|
||||
});
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./programs
|
||||
./desktop
|
||||
];
|
||||
|
||||
home.username = "jashton";
|
||||
home.homeDirectory = "/home/jashton";
|
||||
home.file.".zshrc".text = ''
|
||||
# Zsh is configured globally at the NixOS system level.
|
||||
# This file exists solely to prevent the zsh-newuser-install prompt.
|
||||
'';
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
NIXOS_OZONE_WL = "1"; # Forces Electron/Chromium apps to use Wayland natively
|
||||
GTK_IM_MODULE = "wayland"; # Forces GTK apps to use Wayland text-input protocols
|
||||
QT_IM_MODULE = "wayland"; # Forces Qt apps to use Wayland text-input protocols
|
||||
TEXT_INPUT_PRESENT = "1"; # Explicitly signals virtual keyboard capability to the shell
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
antigravity
|
||||
asciinema
|
||||
discord
|
||||
ffmpeg
|
||||
gemini-cli
|
||||
libreoffice
|
||||
mc
|
||||
opencode
|
||||
pdftk
|
||||
scrot
|
||||
spotify
|
||||
vlc
|
||||
wtype
|
||||
xwayland-satellite
|
||||
yt-dlp
|
||||
zathura
|
||||
|
||||
custom_wvkbd
|
||||
|
||||
(pkgs.writeShellScriptBin "find-open-port" ''
|
||||
if [ -z "$1" ]; then
|
||||
echo "Please provide an application name, project directory, or other identifier."
|
||||
echo " Usage: find-open-port $HOME/dev/some-project"
|
||||
echo " Usage: find-open-port some-app"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
|
||||
APP_NAME=$1
|
||||
REGISTRY_FILE=$HOME/.dotfiles/ports.registry
|
||||
|
||||
MIN_PORT=8000
|
||||
MAX_PORT=8999
|
||||
MAX_RETRIES=50
|
||||
|
||||
echo "Searching for available port between $MIN_PORT and $MAX_PORT for $APP_NAME..."
|
||||
|
||||
for ((i=1; i<=MAX_RETRIES; i++)); do
|
||||
RANDOM_PORT=$(shuf -i $MIN_PORT-$MAX_PORT -n 1)
|
||||
|
||||
if ! ss -tuln | grep -E -q ":$RANDOM_PORT\b"; then
|
||||
if [ -f "$REGISTRY_FILE" ] && grep -q "\b$RANDOM_PORT\b" "$REGISTRY_FILE"; then
|
||||
continue
|
||||
fi
|
||||
|
||||
echo "$APP_NAME : $RANDOM_PORT" >> "$REGISTRY_FILE"
|
||||
echo -e "\nSuccessfully wrote '$APP_NAME : $RANDOM_PORT' to $REGISTRY_FILE"
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
echo -e "\nError: Could not find an open port between $MIN_PORT and $MAX_PORT after $MAX_RETRIES attempts."
|
||||
exit 1
|
||||
'')
|
||||
];
|
||||
|
||||
home.activation = {
|
||||
# 1. Create the persistent directories
|
||||
createWorkspaceDirs = lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
$DRY_RUN_CMD mkdir -p $HOME/dev
|
||||
$DRY_RUN_CMD mkdir -p $HOME/downloads
|
||||
$DRY_RUN_CMD mkdir -p $HOME/life
|
||||
$DRY_RUN_CMD mkdir -p $HOME/media/pics
|
||||
$DRY_RUN_CMD mkdir -p $HOME/media/videos
|
||||
$DRY_RUN_CMD mkdir -p $HOME/school
|
||||
'';
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"heliotrope" = {
|
||||
hostname = "100.77.235.110";
|
||||
};
|
||||
"lavender" = {
|
||||
hostname = "100.99.189.49";
|
||||
};
|
||||
"violet" = {
|
||||
hostname = "100.101.100.84";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.stateVersion = "26.05"; # DO NOT CHANGE
|
||||
}
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
theme = "hyper";
|
||||
|
||||
settings = {
|
||||
window = {
|
||||
padding = { x = 20; y = 20; };
|
||||
opacity = .85;
|
||||
};
|
||||
|
||||
font = {
|
||||
normal = {
|
||||
family = "Hack Nerd Font";
|
||||
style = "Mono";
|
||||
};
|
||||
size = 14.0;
|
||||
};
|
||||
|
||||
colors = {
|
||||
primary = {
|
||||
background = "#08090b"; # Black
|
||||
foreground = "#8d739c"; # Vintage Lavender 1
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = "#1e1f21"; # Carbon Black
|
||||
red = "#4f3963"; # Vintage Grape
|
||||
green = "#7e6790"; # Vintage Lavender 2
|
||||
yellow = "#847397"; # Vintage Lavender 3
|
||||
blue = "#2c2137"; # Midnight Violet
|
||||
magenta = "#8d739c"; # Vintage Lavender 1
|
||||
cyan = "#7e6790"; # Vintage Lavender 2
|
||||
white = "#323335"; # Graphite
|
||||
};
|
||||
|
||||
# Bright colors map to the same palette for a consistent, flat aesthetic
|
||||
bright = {
|
||||
black = "#323335"; # Graphite
|
||||
red = "#4f3963"; # Vintage Grape
|
||||
green = "#7e6790"; # Vintage Lavender 2
|
||||
yellow = "#847397"; # Vintage Lavender 3
|
||||
blue = "#2c2137"; # Midnight Violet
|
||||
magenta = "#8d739c"; # Vintage Lavender 1
|
||||
cyan = "#7e6790"; # Vintage Lavender 2
|
||||
white = "#8d739c"; # Vintage Lavender 1
|
||||
};
|
||||
};
|
||||
|
||||
scrolling.multiplier = 3;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
#ifndef config_h_INCLUDED
|
||||
#define config_h_INCLUDED
|
||||
|
||||
#define DEFAULT_FONT "Sans 14"
|
||||
#define DEFAULT_ROUNDING 5
|
||||
#define SHIFT_SPACE_IS_TAB
|
||||
static const int transparency = 255;
|
||||
|
||||
struct clr_scheme schemes[] = {
|
||||
{
|
||||
/* colors */
|
||||
.bg = {.bgra = {15, 15, 15, transparency}},
|
||||
.fg = {.bgra = {45, 45, 45, transparency}},
|
||||
.high = {.bgra = {100, 100, 100, transparency}},
|
||||
.swipe = {.bgra = {100, 255, 100, 64}},
|
||||
.text = {.color = UINT32_MAX},
|
||||
.text_press = {.color = UINT32_MAX},
|
||||
.text_swipe = {.color = UINT32_MAX},
|
||||
.font = DEFAULT_FONT,
|
||||
.rounding = DEFAULT_ROUNDING,
|
||||
},
|
||||
{
|
||||
/* colors */
|
||||
.bg = {.bgra = {15, 15, 15, transparency}},
|
||||
.fg = {.bgra = {32, 32, 32, transparency}},
|
||||
.high = {.bgra = {100, 100, 100, transparency}},
|
||||
.swipe = {.bgra = {100, 255, 100, 64}},
|
||||
.text_press = {.color = UINT32_MAX},
|
||||
.text_swipe = {.color = UINT32_MAX},
|
||||
.text = {.color = UINT32_MAX},
|
||||
.font = DEFAULT_FONT,
|
||||
.rounding = DEFAULT_ROUNDING,
|
||||
}
|
||||
};
|
||||
|
||||
/* layers is an ordered list of layouts, used to cycle through */
|
||||
static enum layout_id layers[] = {
|
||||
Full, // First layout is the default layout on startup
|
||||
Special,
|
||||
NumLayouts // signals the last item, may not be omitted
|
||||
};
|
||||
|
||||
/* layers is an ordered list of layouts, used to cycle through */
|
||||
static enum layout_id landscape_layers[] = {
|
||||
Landscape, // First layout is the default layout on startup
|
||||
LandscapeSpecial,
|
||||
NumLayouts // signals the last item, may not be omitted
|
||||
};
|
||||
|
||||
#endif // config_h_INCLUDED
|
||||
@@ -0,0 +1,50 @@
|
||||
#ifndef config_h_INCLUDED
|
||||
#define config_h_INCLUDED
|
||||
|
||||
#define DEFAULT_FONT "Hack Nerd Font Mono 12"
|
||||
#define DEFAULT_ROUNDING 12
|
||||
#define SHIFT_SPACE_IS_TAB
|
||||
static const int transparency = 255;
|
||||
|
||||
struct clr_scheme schemes[] = {
|
||||
{
|
||||
/* colors */
|
||||
.bg = {.bgra = {15, 15, 15, transparency}},
|
||||
.fg = {.bgra = {45, 45, 45, transparency}},
|
||||
.high = {.bgra = {100, 100, 100, transparency}},
|
||||
.swipe = {.bgra = {100, 255, 100, 64}},
|
||||
.text = {.color = UINT32_MAX},
|
||||
.text_press = {.color = UINT32_MAX},
|
||||
.text_swipe = {.color = UINT32_MAX},
|
||||
.font = DEFAULT_FONT,
|
||||
.rounding = DEFAULT_ROUNDING,
|
||||
},
|
||||
{
|
||||
/* colors */
|
||||
.bg = {.bgra = {15, 15, 15, transparency}},
|
||||
.fg = {.bgra = {32, 32, 32, transparency}},
|
||||
.high = {.bgra = {100, 100, 100, transparency}},
|
||||
.swipe = {.bgra = {100, 255, 100, 64}},
|
||||
.text_press = {.color = UINT32_MAX},
|
||||
.text_swipe = {.color = UINT32_MAX},
|
||||
.text = {.color = UINT32_MAX},
|
||||
.font = DEFAULT_FONT,
|
||||
.rounding = DEFAULT_ROUNDING,
|
||||
}
|
||||
};
|
||||
|
||||
/* layers is an ordered list of layouts, used to cycle through */
|
||||
static enum layout_id layers[] = {
|
||||
Landscape, // First layout is the default layout on startup
|
||||
LandscapeSpecial,
|
||||
NumLayouts // signals the last item, may not be omitted
|
||||
};
|
||||
|
||||
/* layers is an ordered list of layouts, used to cycle through */
|
||||
static enum layout_id landscape_layers[] = {
|
||||
Landscape, // First layout is the default layout on startup
|
||||
LandscapeSpecial,
|
||||
NumLayouts // signals the last item, may not be omitted
|
||||
};
|
||||
|
||||
#endif // config_h_INCLUDED
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, dms, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./alacritty.nix
|
||||
./git.nix
|
||||
./nvim.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "joshashtondev";
|
||||
email = "me@joshashton.dev";
|
||||
};
|
||||
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = true;
|
||||
push.autoSetupRemote = true;
|
||||
};
|
||||
|
||||
ignores = [
|
||||
".env"
|
||||
"*.log"
|
||||
"*.swp"
|
||||
".DS_STORE"
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,184 @@
|
||||
/* constants */
|
||||
/* how tall the keyboard should be by default (can be overriden) */
|
||||
#define KBD_PIXEL_HEIGHT 250
|
||||
|
||||
/* how tall the keyboard should be by default (can be overriden) */
|
||||
#define KBD_PIXEL_LANDSCAPE_HEIGHT 120
|
||||
|
||||
/* spacing around each key */
|
||||
#define KBD_KEY_BORDER 4
|
||||
|
||||
/* layout declarations */
|
||||
enum layout_id {
|
||||
Landscape = 1,
|
||||
LandscapeSpecial = 2,
|
||||
Emoji = 3,
|
||||
Index,
|
||||
NumLayouts,
|
||||
};
|
||||
|
||||
static struct key keys_landscape[], keys_landscape_special[], keys_emoji[];
|
||||
|
||||
static struct layout layouts[NumLayouts] = {
|
||||
[Landscape] = {keys_landscape, "latin", "landscape", true},
|
||||
[LandscapeSpecial] = {keys_landscape_special, "latin", "landscapespecial", true},
|
||||
[Emoji] = {keys_emoji, "latin", "emoji", false},
|
||||
};
|
||||
|
||||
static struct key keys_emoji[] = {
|
||||
{"🙂", "🙏", 1.0, Copy, 0x1f642, 0, 0x1f64f}, // Emojis
|
||||
{"😀", "🙋", 1.0, Copy, 0x1f600, 0, 0x1f64b},
|
||||
{"😁", "✋", 1.0, Copy, 0x1f601, 0, 0x270B},
|
||||
{"😂", "🙇", 1.0, Copy, 0x1f602, 0, 0x1f647},
|
||||
{"😃", "👨", 1.0, Copy, 0x1f603, 0, 0x1f468},
|
||||
{"😄", "👩", 1.0, Copy, 0x1f604, 0, 0x1f469},
|
||||
{"😅", "👶", 1.0, Copy, 0x1f605, 0, 0x1f476},
|
||||
{"😆", "👻", 1.0, Copy, 0x1f606, 0, 0x1f47b},
|
||||
{"😇", "✨", 1.0, Copy, 0x1f607, 0, 0x2728},
|
||||
{"🤣", "💰", 1.0, Copy, 0x1f923, 0, 0x1f4b0},
|
||||
{"", "", 0.0, EndRow},
|
||||
{"😉", "🐕", 1.0, Copy, 0x1f609, 0, 0x1f415},
|
||||
{"😊", "🐈", 1.0, Copy, 0x1f60a, 0, 0x1f408},
|
||||
{"😋", "🐧", 1.0, Copy, 0x1f60b, 0, 0x1f427},
|
||||
{"😌", "🐇", 1.0, Copy, 0x1f60c, 0, 0x1f407},
|
||||
{"😍", "💔", 1.0, Copy, 0x1f60d, 0, 0x1f494},
|
||||
{"😘", "💕", 1.0, Copy, 0x1f618, 0, 0x1f495},
|
||||
{"😎", "❤", 1.0, Copy, 0x1f60e, 0, 0x2764},
|
||||
{"😐", "😏", 1.0, Copy, 0x1f610, 0, 0x1f60f},
|
||||
{"😒", "👀", 1.0, Copy, 0x1f612, 0, 0x1f440},
|
||||
{"😓", "💀", 1.0, Copy, 0x1f613, 0, 0x1f480},
|
||||
{"", "", 0.0, EndRow},
|
||||
{"⇧", "⇫", 1.0, Mod, Shift, .scheme = 1},
|
||||
{"😛", "😜", 1.0, Copy, 0x1f61b, 0, 0x1f61c},
|
||||
{"😮", "😝", 1.0, Copy, 0x1f62e, 0, 0x1f61d},
|
||||
{"😟", "😞", 1.0, Copy, 0x1f61f, 0, 0x1f61e},
|
||||
{"😠", "🥺", 1.0, Copy, 0x1f620, 0, 0x1f97a},
|
||||
{"😢", "👿", 1.0, Copy, 0x1f622, 0, 0x1f47f},
|
||||
{"😭", "😯", 1.0, Copy, 0x1f62d, 0, 0x1f62f},
|
||||
{"😳", "😕", 1.0, Copy, 0x1f633, 0, 0x1f615},
|
||||
{"😴", "😵", 1.0, Copy, 0x1f634, 0, 0x1f635},
|
||||
{"⌫", "⌫", 1.0, Code, KEY_BACKSPACE, .scheme = 1},
|
||||
{"", "", 0.0, EndRow},
|
||||
{"Abc", "Abc", 1.0, BackLayer, .scheme = 1},
|
||||
{"⌨͕", "⌨͔", 1.0, NextLayer, .scheme = 1},
|
||||
{"👆", "👊", 1.0, Copy, 0x1f446, 0, 0x1f44a},
|
||||
{"👇", "👌", 1.0, Copy, 0x1f447, 0, 0x1f44c},
|
||||
{"👈", "👏", 1.0, Copy, 0x1f448, 0, 0x1f44f},
|
||||
{"👉", "👐", 1.0, Copy, 0x1f449, 0, 0x1f450},
|
||||
{"👋", "🙌", 1.0, Copy, 0x1f44b, 0, 0x1f64c},
|
||||
{"👍", "✅", 1.0, Copy, 0x1f44d, 0, 0x2705},
|
||||
{"👎", "💪", 1.0, Copy, 0x1f44e, 0, 0x1f4aa},
|
||||
{"Enter", "Enter", 1.0, Code, KEY_ENTER, .scheme = 1},
|
||||
{"", "", 0.0, Last},
|
||||
};
|
||||
|
||||
static struct key keys_landscape[] = {
|
||||
{"q", "Q", 1.0, Code, KEY_Q, .scheme = 1},
|
||||
{"w", "W", 1.0, Code, KEY_W, .scheme = 1},
|
||||
{"e", "E", 1.0, Code, KEY_E, .scheme = 1},
|
||||
{"r", "R", 1.0, Code, KEY_R, .scheme = 1},
|
||||
{"t", "T", 1.0, Code, KEY_T, .scheme = 1},
|
||||
{"y", "Y", 1.0, Code, KEY_Y, .scheme = 1},
|
||||
{"u", "U", 1.0, Code, KEY_U, .scheme = 1},
|
||||
{"i", "I", 1.0, Code, KEY_I, .scheme = 1},
|
||||
{"o", "O", 1.0, Code, KEY_O, .scheme = 1},
|
||||
{"p", "P", 1.0, Code, KEY_P, .scheme = 1},
|
||||
{"", "", 0.0, EndRow},
|
||||
|
||||
{"a", "A", 1.0, Code, KEY_A, .scheme = 1},
|
||||
{"s", "S", 1.0, Code, KEY_S, .scheme = 1},
|
||||
{"d", "D", 1.0, Code, KEY_D, .scheme = 1},
|
||||
{"f", "F", 1.0, Code, KEY_F, .scheme = 1},
|
||||
{"g", "G", 1.0, Code, KEY_G, .scheme = 1},
|
||||
{"h", "H", 1.0, Code, KEY_H, .scheme = 1},
|
||||
{"j", "J", 1.0, Code, KEY_J, .scheme = 1},
|
||||
{"k", "K", 1.0, Code, KEY_K, .scheme = 1},
|
||||
{"l", "L", 1.0, Code, KEY_L, .scheme = 1},
|
||||
{"", "", 0.0, EndRow},
|
||||
|
||||
{"⇧", "⇫", 1.5, Mod, Shift},
|
||||
{"z", "Z", 1.0, Code, KEY_Z, .scheme = 1},
|
||||
{"x", "X", 1.0, Code, KEY_X, .scheme = 1},
|
||||
{"c", "C", 1.0, Code, KEY_C, .scheme = 1},
|
||||
{"v", "V", 1.0, Code, KEY_V, .scheme = 1},
|
||||
{"b", "B", 1.0, Code, KEY_B, .scheme = 1},
|
||||
{"n", "N", 1.0, Code, KEY_N, .scheme = 1},
|
||||
{"m", "M", 1.0, Code, KEY_M, .scheme = 1},
|
||||
{"⌫", "⌫", 1.5, Code, KEY_BACKSPACE, .scheme = 1},
|
||||
{"", "", 0.0, EndRow},
|
||||
|
||||
{"?123", "?123", 1.0, Layout, 0, &layouts[LandscapeSpecial]},
|
||||
{"Ctr", "Ctr", 1.0, Mod, Ctrl, .scheme = 1},
|
||||
{",", ",", 1.0, Code, KEY_COMMA, .scheme = 1},
|
||||
{"🙂", "🙂", 1.0, Layout, 0, &layouts[Emoji]},
|
||||
{"", "", 5.0, Code, KEY_SPACE, .scheme = 1},
|
||||
{".", ".", 1.0, Code, KEY_DOT, .scheme = 1},
|
||||
{"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme = 1},
|
||||
|
||||
/* end of layout */
|
||||
{"", "", 0.0, Last},
|
||||
};
|
||||
|
||||
static struct key keys_landscape_special[] = {
|
||||
{"Esc", "Esc", 1.0, Code, KEY_ESC, .scheme = 1},
|
||||
{"1", "1", 1.0, Code, KEY_1, .scheme = 1},
|
||||
{"2", "2", 1.0, Code, KEY_2, .scheme = 1},
|
||||
{"3", "3", 1.0, Code, KEY_3, .scheme = 1},
|
||||
{"4", "4", 1.0, Code, KEY_4, .scheme = 1},
|
||||
{"5", "5", 1.0, Code, KEY_5, .scheme = 1},
|
||||
{"6", "6", 1.0, Code, KEY_6, .scheme = 1},
|
||||
{"7", "7", 1.0, Code, KEY_7, .scheme = 1},
|
||||
{"8", "8", 1.0, Code, KEY_8, .scheme = 1},
|
||||
{"9", "9", 1.0, Code, KEY_9, .scheme = 1},
|
||||
{"0", "0", 1.0, Code, KEY_0, .scheme = 1},
|
||||
{"", "", 0.0, EndRow},
|
||||
|
||||
{"`", "`", 0.5, Code, KEY_GRAVE, .scheme = 1},
|
||||
{"~", "~", 0.5, Code, KEY_GRAVE, .scheme = 1},
|
||||
{"!", "!", 1.0, Code, KEY_1, .scheme = 1},
|
||||
{"@", "@", 1.0, Code, KEY_2, .scheme = 1},
|
||||
{"#", "#", 1.0, Code, KEY_3, .scheme = 1},
|
||||
{"$", "$", 1.0, Code, KEY_4, .scheme = 1},
|
||||
{"%", "%", 1.0, Code, KEY_5, .scheme = 1},
|
||||
{"^", "^", 1.0, Code, KEY_6, .scheme = 1},
|
||||
{"&", "&", 1.0, Code, KEY_7, .scheme = 1},
|
||||
{"*", "*", 1.0, Code, KEY_8, .scheme = 1},
|
||||
{"-", "-", 1.0, Code, KEY_MINUS, .scheme = 1},
|
||||
{"=", "=", 1.0, Code, KEY_EQUAL, .scheme = 1},
|
||||
{"", "", 0.0, EndRow},
|
||||
|
||||
{"Abc", "Abc", 1.0, Layout, 0, &layouts[Landscape]},
|
||||
{"(", "(", 0.5, Code, KEY_9, .scheme = 1},
|
||||
{")", ")", 0.5, Code, KEY_0, .scheme = 1},
|
||||
{"[", "[", 0.5, Code, KEY_LEFTBRACE, .scheme = 1},
|
||||
{"]", "]", 0.5, Code, KEY_RIGHTBRACE, .scheme = 1},
|
||||
{"{", "{", 0.5, Code, KEY_LEFTBRACE, .scheme = 1},
|
||||
{"}", "}", 0.5, Code, KEY_RIGHTBRACE, .scheme = 1},
|
||||
{"\\", "\\", 0.75, Code, KEY_BACKSLASH, .scheme = 1},
|
||||
{"|", "|", 0.75, Code, KEY_BACKSLASH, .scheme = 1},
|
||||
{";", ";", 1.0, Code, KEY_SEMICOLON, .scheme = 1},
|
||||
{":", ":", 1.0, Code, KEY_SEMICOLON, .scheme = 1},
|
||||
{"'", "'", 1.0, Code, KEY_APOSTROPHE, .scheme = 1},
|
||||
{"\"", "\"", 1.0, Code, KEY_APOSTROPHE, .scheme = 1},
|
||||
{"/", ">", 1.0, Code, KEY_SLASH, .scheme = 1},
|
||||
{"", "", 0.0, EndRow},
|
||||
|
||||
{"↑", "↑", 1.5, Code, KEY_UP, .scheme = 1},
|
||||
{"↓", "↓", 1.5, Code, KEY_DOWN, .scheme = 1},
|
||||
{"_", "_", 1.0, Code, KEY_MINUS, .scheme = 1},
|
||||
{"+", "+", 1.0, Code, KEY_EQUAL, .scheme = 1},
|
||||
{"<", "<", 1.0, Code, KEY_COMMA, .scheme = 1},
|
||||
{">", ">", 1.0, Code, KEY_DOT, .scheme = 1},
|
||||
{"/", "/", 1.0, Code, KEY_SLASH, .scheme = 1},
|
||||
{"⌫", "⌫", 3.0, Code, KEY_BACKSPACE, .scheme = 1},
|
||||
{"", "", 0.0, EndRow},
|
||||
|
||||
{"←", "←", 1.5, Code, KEY_LEFT, .scheme = 1},
|
||||
{"→", "→", 1.5, Code, KEY_RIGHT, .scheme = 1},
|
||||
{"Sup", "Sup", 1.0, Mod, Super, .scheme = 1},
|
||||
{"", "", 6.0, Code, KEY_SPACE, .scheme = 1},
|
||||
{"Enter", "Enter", 2.0, Code, KEY_ENTER, .scheme = 1},
|
||||
|
||||
/* end of layout */
|
||||
{"", "", 0.0, Last},
|
||||
};
|
||||
@@ -0,0 +1,100 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
|
||||
initLua = ''
|
||||
vim.opt.number = true
|
||||
vim.opt.relativenumber = true
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.smartindent = true
|
||||
vim.opt.wrap = false
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undofile = false
|
||||
vim.opt.hlsearch = false
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.termguicolors = true
|
||||
vim.opt.clipboard = "unnamedplus"
|
||||
vim.opt.scrolloff = 999
|
||||
vim.opt.updatetime = 50
|
||||
vim.opt.foldmethod = "indent"
|
||||
vim.opt.foldlevel = 99
|
||||
|
||||
vim.g.mapleader = " "
|
||||
vim.keymap.set("n", "<leader>", ":")
|
||||
vim.keymap.set("n", "<leader>w", "<cmd>w<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<leader>q", "<cmd>q<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<leader>wq", "<cmd>wq<CR>", { silent = true })
|
||||
vim.keymap.set("n", "<leader>x", "<cmd>!chmod +x %<CR>", { silent = true })
|
||||
vim.keymap.set("n", "Q", "<nop>")
|
||||
vim.keymap.set("n", "o", "o<esc>")
|
||||
vim.keymap.set("n", "O", "O<esc>")
|
||||
vim.keymap.set("i", "jj", "<esc>")
|
||||
|
||||
local is_dark = vim.o.background ~= "light"
|
||||
require("cyberdream").setup({
|
||||
transparent = is_dark,
|
||||
variant = is_dark and "dark" or "light",
|
||||
terminal_colors = true,
|
||||
})
|
||||
vim.cmd.colorscheme("cyberdream")
|
||||
|
||||
require("nvim-tree").setup({
|
||||
view = { width = 30 },
|
||||
renderer = { group_empty = true },
|
||||
filters = { dotfiles = false },
|
||||
})
|
||||
|
||||
require("bufferline").setup({
|
||||
options = {
|
||||
offsets = {
|
||||
{
|
||||
filetype = "NvimTree",
|
||||
text = "Files",
|
||||
highlight = "Directory",
|
||||
separator = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("lualine").setup({
|
||||
ons = { theme = "auto" },
|
||||
})
|
||||
|
||||
require("neocord").setup({
|
||||
logo = "auto",
|
||||
logo_tooltip = "Neovim",
|
||||
main_image = "language",
|
||||
show_time = true,
|
||||
global_timer = true,
|
||||
})
|
||||
|
||||
require("gitsigns").setup({
|
||||
signs = {
|
||||
add = { text = "+" },
|
||||
change = { text = "~" },
|
||||
delete = { text = "_" },
|
||||
},
|
||||
})
|
||||
'';
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
{ plugin = cyberdream-nvim; }
|
||||
{ plugin = nvim-web-devicons; }
|
||||
{ plugin = nvim-tree-lua; }
|
||||
{ plugin = bufferline-nvim; }
|
||||
{ plugin = lualine-nvim; }
|
||||
{ plugin = neocord; }
|
||||
{ plugin = gitsigns-nvim; }
|
||||
];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
security.rtkit.enable = true;
|
||||
services.avahi.enable = true;
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
systemd.user.services.mpris-proxy = {
|
||||
description = "Mpris proxy";
|
||||
after = [ "network.target" "sound.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
};
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
wireplumber.enable = true;
|
||||
raopOpenFirewall = true;
|
||||
|
||||
# Dynamic, optimized buffer sizes to eliminate data starvation
|
||||
extraConfig.pipewire = {
|
||||
"context.properties" = {
|
||||
"default.clock.rate" = 48000;
|
||||
"default.clock.quantum" = 1024;
|
||||
"default.clock.min-quantum" = 512;
|
||||
"default.clock.max-quantum" = 2048;
|
||||
};
|
||||
|
||||
"10-airplay" = {
|
||||
"context-modules" = [
|
||||
{
|
||||
name = "libpipewire-module-raop-discover";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wireplumber.extraConfig = {
|
||||
"10-bluetooth-policy" = {
|
||||
"wireplumber.settings" = {
|
||||
"bluetooth.autoswitch-to-headset" = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Properly disables node suspension using WirePlumber 0.5+ syntax
|
||||
"10-disable-suspend" = {
|
||||
"monitor.bluez.rules" = [
|
||||
{
|
||||
matches = [
|
||||
{
|
||||
"node.name" = "~bluez_output.*";
|
||||
}
|
||||
];
|
||||
actions = {
|
||||
update-props = {
|
||||
"session.suspend-timeout-seconds" = 0;
|
||||
};
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Force High Quality Audio profiles ONLY (Blocks Handsfree Mic Downgrades)
|
||||
"11-bluetooth-enhancements" = {
|
||||
"monitor.bluez.properties" = {
|
||||
"bluez5.roles" = [ "a2dp_sink" "a2dp_source" ];
|
||||
"bluez5.codecs" = [ "aac" "aptx" "sbc" ];
|
||||
"bluez5.enable-sbc-xq" = false;
|
||||
"bluez5.enable-hw-volume" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelModules = [ "uinput" ];
|
||||
system.nixos.label = "niri-v.1.2";
|
||||
environment.pathsToLink = [ "/libexec" ];
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./boot.nix
|
||||
./env.nix
|
||||
./locale.nix
|
||||
./power.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.shells = with pkgs; [ zsh ];
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.hack
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
histSize = 1000000;
|
||||
|
||||
setOptions = [
|
||||
"HIST_IGNORE_ALL_DUPS"
|
||||
];
|
||||
|
||||
shellAliases = {
|
||||
enix = "nvim $HOME/.dotfiles/flake.nix";
|
||||
ehome = "nvim $HOME/.dotfiles/home/jashton.nix";
|
||||
l = "ls -la";
|
||||
ports = "cat $HOME/.dotfiles/ports.registry";
|
||||
};
|
||||
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
theme = "aussiegeek";
|
||||
plugins = [
|
||||
"git"
|
||||
];
|
||||
};
|
||||
|
||||
interactiveShellInit = ''
|
||||
if [ -f "/run/secrets/vaultwarden_clientid" ]; then
|
||||
export BW_CLIENTID=$(cat /run/secrets/vaultwarden_clientid)
|
||||
export BW_CLIENTSECRET=$(cat /run/secrets/vaultwarden_clientsecret)
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
time.timeZone = "America/Denver";
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = "en_US.UTF-8";
|
||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||
LC_MEASUREMENT = "en_US.UTF-8";
|
||||
LC_MONETARY = "en_US.UTF-8";
|
||||
LC_NAME = "en_US.UTF-8";
|
||||
LC_NUMERIC = "en_US.UTF-8";
|
||||
LC_PAPER = "en_US.UTF-8";
|
||||
LC_TELEPHONE = "en_US.UTF-8";
|
||||
LC_TIME = "en_US.UTF-8";
|
||||
LC_CTYPE = "en_US.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
boot.kernelParams = [ "mem_sleep_default=deep" ];
|
||||
|
||||
services.power-profiles-daemon.enable = false;
|
||||
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
USB_AUTOSUSPEND = 0;
|
||||
|
||||
# AC
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
|
||||
SOUND_POWER_SAVE_ON_AC = 0;
|
||||
PCIE_ASPM_ON_AC = "default";
|
||||
CPU_BOOST_ON_BAT = 0;
|
||||
|
||||
# Battery
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
|
||||
SOUND_POWER_SAVE_ON_BAT = 1;
|
||||
PCIE_ASPM_ON_BAT = "powersupersave";
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
|
||||
# Battery Thresholds
|
||||
START_CHARGE_THRESH_BAT0 = 40;
|
||||
STOP_CHARGE_THRESH_BAT0 = 80;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./packages.nix
|
||||
./core
|
||||
./network
|
||||
./security
|
||||
./services
|
||||
./virtualisation
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
imports = [
|
||||
./pi-hole.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
|
||||
firewall = {
|
||||
enable = true;
|
||||
allowedTCPPorts = [];
|
||||
allowedUDPPorts = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
|
||||
networking.networkmanager.insertNameservers = [ "127.0.0.1" ];
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/pihole 0777 root root -"
|
||||
"d /var/lib/pihole/etc 0777 root root -"
|
||||
"d /var/lib/pihole/dnsmasq 0777 root root -"
|
||||
];
|
||||
|
||||
# Explicitly set the OCI container backend to Podman
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
|
||||
# Define the Pi-Hole container
|
||||
virtualisation.oci-containers.containers.pihole = {
|
||||
image = "docker.io/pihole/pihole:latest";
|
||||
|
||||
ports = [
|
||||
"53:53/tcp" # DNS
|
||||
"53:53/udp" # DNS
|
||||
"8775:80/tcp" # Web UI
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"/var/lib/pihole/etc:/etc/pihole"
|
||||
"/var/lib/pihole/dnsmasq:/etc/dnsmasq.d"
|
||||
];
|
||||
|
||||
environment = {
|
||||
TZ = "America/Denver";
|
||||
};
|
||||
|
||||
autoStart = true;
|
||||
|
||||
# Extra Podman arguments for additional capabilities Pi-Hole requires
|
||||
extraOptions = [
|
||||
"--cap-add=NET_ADMIN"
|
||||
];
|
||||
};
|
||||
|
||||
# Open the required ports in the NixOS firewall
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 53 80 ];
|
||||
allowedUDPPorts = [ 53 ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
acpi
|
||||
age
|
||||
alacritty
|
||||
bitwarden-cli
|
||||
btop
|
||||
dconf
|
||||
fastfetch
|
||||
firefox
|
||||
git
|
||||
github-cli
|
||||
(google-chrome.override {
|
||||
commandLineArgs = [
|
||||
"--disable-pinch"
|
||||
];
|
||||
})
|
||||
google-chrome
|
||||
gnupg
|
||||
jq
|
||||
keepassxc
|
||||
libnotify
|
||||
mypy
|
||||
networkmanagerapplet
|
||||
nitrogen
|
||||
ollama
|
||||
pasystray
|
||||
pulseaudioFull
|
||||
rclone
|
||||
rnote
|
||||
sops
|
||||
ssh-to-age
|
||||
tldr
|
||||
tmux
|
||||
unrar
|
||||
unzip
|
||||
upower
|
||||
v4l-utils
|
||||
vim
|
||||
wget
|
||||
wl-clipboard
|
||||
xclip
|
||||
xournalpp
|
||||
|
||||
(pkgs.writeShellScriptBin "unix" ''
|
||||
set -u
|
||||
|
||||
DOTFILES="$HOME/.dotfiles"
|
||||
ERRFILE=$(mktemp)
|
||||
HOST=$(cat /etc/hostname)
|
||||
trap "rm -f '$ERRFILE'" EXIT
|
||||
|
||||
echo "Building NixOS..."
|
||||
sudo nixos-rebuild switch --flake "$DOTFILES#$HOST" 2>&1 | tee "$ERRFILE"
|
||||
STATUS=''${PIPESTATUS[0]}
|
||||
|
||||
if [ "$STATUS" -ne 0 ]; then
|
||||
PATTERN=$(find "$DOTFILES" -type f -name "*.nix" -printf "%f\n" | sort -u | tr '\n' '|' | sed 's/|$//')
|
||||
MATCHES=$(grep -E "$PATTERN" "$ERRFILE" | sort -u)
|
||||
if [ -n "$MATCHES" ]; then
|
||||
printf '\nErrors in repo files:\n%s\n' "$MATCHES"
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
GEN=$(readlink /nix/var/nix/profiles/system | sed 's/system-\([0-9]*\)-link/\1/')
|
||||
VER=$(nixos-version)
|
||||
TIMESTAMP=$(date '+%Y-%m-%d %H:%M')
|
||||
|
||||
cd "$DOTFILES"
|
||||
|
||||
if [ -z "$(${pkgs.git}/bin/git status --porcelain)" ]; then
|
||||
echo "Generation $GEN active — no config changes to commit."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Append to default commit message? Hit enter to skip."
|
||||
read -r msg_to_append
|
||||
|
||||
${pkgs.git}/bin/git add -A
|
||||
${pkgs.git}/bin/git commit -m "nixos: gen $GEN @ $(hostname) — $TIMESTAMP $VER ----- $msg_to_append"
|
||||
${pkgs.git}/bin/git push
|
||||
'')
|
||||
];
|
||||
|
||||
programs.firefox.enable = true;
|
||||
programs.thunar.enable = true;
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = true;
|
||||
dedicatedServer.openFirewall = true;
|
||||
localNetworkGameTransfers.openFirewall = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./sops.nix
|
||||
./sudo.nix
|
||||
./systemd.nix
|
||||
./users.nix
|
||||
];
|
||||
|
||||
systemd.user.services.niri-flake-polkit.enable = false;
|
||||
|
||||
security = {
|
||||
pam.services.swaylock = {};
|
||||
polkit.enable = true;
|
||||
rtkit.enable = true;
|
||||
|
||||
tpm2 = {
|
||||
enable = true;
|
||||
pkcs11.enable = true;
|
||||
tctiEnvironment.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"
|
||||
'';
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
sops.defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
||||
sops.secrets."vaultwarden_clientid".owner = config.users.users.jashton.name;
|
||||
sops.secrets."vaultwarden_clientsecret".owner = config.users.users.jashton.name;
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "jashton" ];
|
||||
|
||||
commands = [
|
||||
{
|
||||
command = "/run/current-system/sw/bin/tlp";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{}
|
||||
@@ -0,0 +1,9 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
services.fprintd = {
|
||||
enable = true;
|
||||
#tod.enable = true;
|
||||
#tod.driver = pkgs.libfprint-2-tod1-goodix;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
users.groups.jashton = {};
|
||||
users.groups.greetd = {};
|
||||
users.groups.heliotrope-backups = {};
|
||||
|
||||
users.users.jashton = {
|
||||
isNormalUser = true;
|
||||
description = "Josh Ashton";
|
||||
group = "jashton";
|
||||
extraGroups = [ "networkmanager" "wheel" "tss" "video" "audio" "input" ];
|
||||
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
users.users.heliotrope-backups = {
|
||||
isNormalUser = true;
|
||||
description = "heliotrope remote server backups.";
|
||||
group = "heliotrope-backups";
|
||||
|
||||
shell = pkgs.bash;
|
||||
};
|
||||
|
||||
users.users.root = {
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
users.extraUsers.greetd = {
|
||||
isSystemUser = true;
|
||||
group = "greetd";
|
||||
extraGroups = [ "input" ];
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
{ config, pkgs, inputs, ... }:
|
||||
|
||||
let
|
||||
# Instantiate the unstable package set for your system architecture
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
system = pkgs.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.dms.nixosModules.greeter
|
||||
];
|
||||
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
# Tell the Niri module to use the unstable package directly from the niri-flake
|
||||
package = inputs.niri.packages.${pkgs.system}.niri-unstable;
|
||||
};
|
||||
|
||||
programs.dsearch.enable = true;
|
||||
|
||||
programs.dank-material-shell.greeter = {
|
||||
enable = true;
|
||||
compositor.name = "niri";
|
||||
|
||||
configHome = "/home/jashton";
|
||||
};
|
||||
|
||||
programs.dms-shell = {
|
||||
enable = true;
|
||||
enableSystemMonitoring = true;
|
||||
enableVPN = true;
|
||||
enableDynamicTheming = true;
|
||||
enableAudioWavelength = true;
|
||||
enableCalendarEvents = true;
|
||||
|
||||
systemd = {
|
||||
enable = false;
|
||||
restartIfChanged = true;
|
||||
};
|
||||
|
||||
quickshell.package = unstable.quickshell;
|
||||
|
||||
plugins = {
|
||||
developerUtilities.enable = true;
|
||||
batteryPlus.enable = true;
|
||||
mediaDownloader.enable = true;
|
||||
dankBatteryAlerts.enable = true;
|
||||
dmsThemeSync.enable = true;
|
||||
dmsPass.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
libinput = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
openssh = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
tailscale = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
upower.enable = true;
|
||||
printing.enable = true;
|
||||
gvfs.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
blueman.enable = true;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
};
|
||||
|
||||
waydroid.enable = true;
|
||||
|
||||
virtualbox.host.enable = true;
|
||||
libvirtd.enable = true;
|
||||
};
|
||||
|
||||
networking.firewall.trustedInterfaces = [ "waydroid0" ];
|
||||
}
|
||||