Compare commits

..
15 Commits
16 changed files with 187 additions and 81 deletions
+28
View File
@@ -0,0 +1,28 @@
profile docked {
# Center 4K monitor
output "Dell Inc. DELL S3221QS 9Y4W6N3" {
mode 3840x2160@60.000
position 1920,120
scale 1.25
}
# Right 1080p monitor (rotated left)
output "Dell Inc. DELL U2417H XVNNT6B1890L" {
mode 1920x1080@60.000
position 3072,0
transform 90
}
# Laptop screen (below)
output eDP-1 {
mode 1920x1080@144.003
position 0,1060
}
}
profile undocked {
output eDP-1 {
mode 1920x1080@144.003
position 0,0
}
}
+25
View File
@@ -0,0 +1,25 @@
font=monospace 12
background-color=#000000e6
text-color=#eeeeeeff
border-color=#eeeeeeff
border-size=3
default-timeout=10000
[urgency=low]
background-color=#1a1a1ae6
text-color=#999999ff
border-color=#444444ff
default-timeout=5000
[urgency=normal]
background-color=#000000e6
text-color=#eeeeeeff
border-color=#eeeeeeff
default-timeout=10000
[urgency=critical]
background-color=#4d0000e6
text-color=#ffffffff
border-color=#ff0000ff
border-size=5
default-timeout=0
+19 -51
View File
@@ -69,43 +69,6 @@ input {
focus-follows-mouse max-scroll-amount="0%" focus-follows-mouse max-scroll-amount="0%"
} }
// You can configure outputs by their name, which you can find
// by running `niri msg outputs` while inside a niri instance.
// The built-in laptop monitor is usually called "eDP-1".
// Find more information on the wiki:
// https://niri-wm.github.io/niri/Configuration:-Outputs
// Remember to uncomment the node by removing "/-"!
/-output "eDP-1" {
// Uncomment this line to disable this output.
// off
// Resolution and, optionally, refresh rate of the output.
// The format is "<width>x<height>" or "<width>x<height>@<refresh rate>".
// If the refresh rate is omitted, niri will pick the highest refresh rate
// for the resolution.
// If the mode is omitted altogether or is invalid, niri will pick one automatically.
// Run `niri msg outputs` while inside a niri instance to list all outputs and their modes.
mode "1920x1080@120.030"
// You can use integer or fractional scale, for example use 1.5 for 150% scale.
scale 2
// Transform allows to rotate the output counter-clockwise, valid values are:
// normal, 90, 180, 270, flipped, flipped-90, flipped-180 and flipped-270.
transform "normal"
// Position of the output in the global coordinate space.
// This affects directional monitor actions like "focus-monitor-left", and cursor movement.
// The cursor can only move between directly adjacent outputs.
// Output scale and rotation has to be taken into account for positioning:
// outputs are sized in logical, or scaled, pixels.
// For example, a 3840×2160 output with scale 2.0 will have a logical size of 1920×1080,
// so to put another output directly adjacent to it on the right, set its x to 1920.
// If the position is unset or results in an overlap, the output is instead placed
// automatically.
position x=1280 y=0
}
// Settings that influence how windows are positioned and sized. // Settings that influence how windows are positioned and sized.
// Find more information on the wiki: // Find more information on the wiki:
// https://niri-wm.github.io/niri/Configuration:-Layout // https://niri-wm.github.io/niri/Configuration:-Layout
@@ -268,8 +231,12 @@ layout {
// See the binds section below for more spawn examples. // See the binds section below for more spawn examples.
// This line starts waybar, a commonly used bar for Wayland compositors. // This line starts waybar, a commonly used bar for Wayland compositors.
spawn-at-startup "kanshi"
spawn-at-startup "waybar" spawn-at-startup "waybar"
spawn-sh-at-startup "kanshi"
spawn-sh-at-startup "awww-daemon"
spawn-at-startup "mako"
spawn-sh-at-startup "polkit-gnome-authentication-agent-1"
spawn-at-startup "xwayland-satellite"
// To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup: // To run a shell command (with variables, pipes, etc.), use spawn-sh-at-startup:
// spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell" // spawn-sh-at-startup "qs -c ~/source/qs/MyAwesomeShell"
@@ -316,6 +283,13 @@ animations {
clip-to-geometry true clip-to-geometry true
} }
// Turn off hot corners
gestures {
hot-corners {
off;
}
}
binds { binds {
// Keys consist of modifiers separated by + signs, followed by an XKB key name // Keys consist of modifiers separated by + signs, followed by an XKB key name
// in the end. To find an XKB name for a particular key, you may use a program // in the end. To find an XKB name for a particular key, you may use a program
@@ -334,15 +308,15 @@ binds {
// Suggested binds for running programs: terminal, app launcher, screen locker. // Suggested binds for running programs: terminal, app launcher, screen locker.
Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; } Mod+Return hotkey-overlay-title="Open a Terminal: alacritty" { spawn "alacritty"; }
Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; } Mod+D hotkey-overlay-title="Run an Application: fuzzel" { spawn "fuzzel"; }
Mod+Shift+B { spawn "blueman-manager"; }
Mod+Shift+D { spawn "vesktop"; } Mod+Shift+D { spawn "vesktop"; }
Mod+Shift+E hotkey-overlay-title="Run an Application: emacs" { spawn "emacsclient" "-c"; } Mod+Shift+E hotkey-overlay-title="Run an Application: emacs" { spawn "emacsclient" "-c"; }
Mod+Shift+F hotkey-overlay-title="Run an Application: brave" { spawn "brave"; } Mod+Shift+F hotkey-overlay-title="Run an Application: brave" { spawn "brave"; }
Mod+Shift+M { spawn "proton-mail"; } Mod+Shift+M { spawn "proton-mail"; }
Mod+Shift+P { spawn "rofi-rbw"; } Mod+Shift+P { spawn "rofi-rbw"; }
Mod+Shift+S { spawn-sh "flameshot gui"; }
Mod+Shift+T { spawn "thunar"; } Mod+Shift+T { spawn "thunar"; }
Mod+Shift+X hotkey-overlay-title="Lock the Screen: swaylock" { spawn "swaylock"; } Mod+Shift+X hotkey-overlay-title="Lock the Screen: swaylock" {
spawn "sh" "-c" "loginctl lock-session; swaylock -f; niri msg action power-off-monitors";
}
// Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc. // Use spawn-sh to run a shell command. Do this if you need pipes, multiple commands, etc.
// Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`. // Note: the entire command goes as a single argument. It's passed verbatim to `sh -c`.
@@ -516,7 +490,9 @@ binds {
Mod+Ctrl+Shift+R { switch-preset-window-height; } Mod+Ctrl+Shift+R { switch-preset-window-height; }
Mod+Ctrl+R { reset-window-height; } Mod+Ctrl+R { reset-window-height; }
Mod+F { fullscreen-window; } // Fullscreen/maximized column views.
Mod+F { maximize-column; }
Mod+Ctrl+F { fullscreen-window; }
// While maximize-column leaves gaps and borders around the window, // While maximize-column leaves gaps and borders around the window,
// maximize-window-to-edges doesn't: the window expands to the edges of the screen. // maximize-window-to-edges doesn't: the window expands to the edges of the screen.
@@ -524,10 +500,6 @@ binds {
// e.g. by double-clicking on the titlebar. // e.g. by double-clicking on the titlebar.
Mod+M { maximize-window-to-edges; } Mod+M { maximize-window-to-edges; }
// Expand the focused column to space not taken up by other fully visible columns.
// Makes the column "fill the rest of the space".
Mod+Ctrl+F { expand-column-to-available-width; }
Mod+C { center-column; } Mod+C { center-column; }
// Center all fully visible columns on screen. // Center all fully visible columns on screen.
@@ -555,7 +527,7 @@ binds {
// Toggle tabbed column display mode. // Toggle tabbed column display mode.
// Windows in this column will appear as vertical tabs, // Windows in this column will appear as vertical tabs,
// rather than stacked on top of each other. // rather than stacked on top of each other.
Mod+E { toggle-column-tabbed-display; } Mod+T { toggle-column-tabbed-display; }
// Actions to switch layouts. // Actions to switch layouts.
// Note: if you uncomment these, make sure you do NOT have // Note: if you uncomment these, make sure you do NOT have
@@ -581,8 +553,4 @@ binds {
// The quit action will show a confirmation dialog to avoid accidental exits. // The quit action will show a confirmation dialog to avoid accidental exits.
Ctrl+Alt+Delete { quit; } Ctrl+Alt+Delete { quit; }
// Powers off the monitors. To turn them back on, do any input like
// moving the mouse or pressing any other key.
Mod+Shift+P { power-off-monitors; }
} }
+7
View File
@@ -0,0 +1,7 @@
selector = fuzzel
clipboarder = wl-copy
typer = wtype
clear-after = 30
prompt = "🔑 "
action = copy
target = password
+1 -1
View File
@@ -40,7 +40,7 @@
host = "0.0.0.0"; host = "0.0.0.0";
openFirewall = true; openFirewall = true;
# Make sure this path is created and has the permissions of ollama:ollama. # Make sure this path is created and has the permissions of ollama:ollama.
models = "/mnt/storage/models"; modelsDir = "/mnt/storage/models";
environmentVariables = { environmentVariables = {
OLLAMA_CONTEXT_LENGTH = "8192"; OLLAMA_CONTEXT_LENGTH = "8192";
}; };
+25 -2
View File
@@ -1,4 +1,4 @@
{ config, pkgs, inputs, ... }: { { pkgs, ... }: {
imports = [ ./shared.nix ]; imports = [ ./shared.nix ];
@@ -22,10 +22,32 @@
# Enable niri window manager. # Enable niri window manager.
programs.niri.enable = true; programs.niri.enable = true;
# XDG Desktop Portals (used for wayland screen sharing, file pickets, etc.) # Display manager for graphical login
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.tuigreet}/bin/tuigreet --time --remember --cmd niri";
user = "greeter";
};
};
};
# Suppress greetd's default virtual terminal log spam.
systemd.services.greetd.serviceConfig.LogStandardStream = "journal";
# XDG Desktop Portals (used for wayland screen sharing, file pickers, etc.)
xdg.portal = { xdg.portal = {
enable = true; enable = true;
wlr.enable = true; wlr.enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
config = {
common = {
default = [ "wlr" "gtk" ];
"org.freedesktop.impl.portal.Settings" = [ "gtk" ];
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
};
};
}; };
# Configure keymap # Configure keymap
@@ -37,6 +59,7 @@
# List packages to be installed for headful systems # List packages to be installed for headful systems
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
awww
fuzzel fuzzel
waybar waybar
kanshi kanshi
+3
View File
@@ -25,6 +25,9 @@
http_port = 3000; http_port = 3000;
domain = "grafana.randomctf.lan"; domain = "grafana.randomctf.lan";
}; };
# Legacy default secret key, kept so existing datasource secrets
# in the database remain decryptable.
settings.security.secret_key = "SW2YcwTIb9zpOOhoPsMm";
}; };
services.nginx = { services.nginx = {
+23
View File
@@ -148,6 +148,29 @@
''; '';
}; };
# Actual
"actual.randomctf.lan" = {
enableACME = true;
forceSSL = true;
extraConfig = ''
access_log /var/log/nginx/access.actual.log;
'';
locations."/".extraConfig = ''
allow 127.0.0.1;
allow 10.0.0.0/8;
allow 172.16.0.0/12;
allow 192.168.0.0/16;
allow 100.64.0.0/10;
allow 24.130.12.156;
deny all;
proxy_buffering off;
proxy_pass https://localhost:5006/;
'';
};
# Kiwix # Kiwix
"kiwix.randomctf.com" = { "kiwix.randomctf.com" = {
enableACME = true; enableACME = true;
+2 -3
View File
@@ -54,11 +54,10 @@
# Enable bluetooth # Enable bluetooth
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;
services.blueman.enable = true;
# System Packages # System Packages
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pinentry-gtk2 pinentry-gnome3
protonmail-bridge protonmail-bridge
pass pass
@@ -79,7 +78,7 @@
path = with pkgs; [ path = with pkgs; [
pass pass
gnupg gnupg
pinentry-gtk2 pinentry-gnome3
]; ];
serviceConfig = { serviceConfig = {
Restart = "always"; Restart = "always";
+1 -1
View File
@@ -56,7 +56,7 @@
# Setup Pinentry # Setup Pinentry
programs.gnupg.agent = { programs.gnupg.agent = {
enable = true; enable = true;
pinentryPackage = pkgs.pinentry-gtk2; pinentryPackage = pkgs.pinentry-gnome3;
enableSSHSupport = true; enableSSHSupport = true;
}; };
Generated
+15 -15
View File
@@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1781981105, "lastModified": 1788642154,
"narHash": "sha256-/1nNBbA7PrSQpTc9Qazkhl4kIPg+TNl0CjxS3UQJKlw=", "narHash": "sha256-sPpQFVaFTDqO/4vvCAhuAhqTgqN/ygu+9eJcs5eB0js=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "7bfff44b465909f69a442701293bc0badcf476dc", "rev": "fd0956c99c41ae3c13a73a638f1f7e963aebc4ab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -28,11 +28,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1782134359, "lastModified": 1788651960,
"narHash": "sha256-dh0RDcJ17Rubgk3hGTugYmTu6rnUPfRu5vA7MA1Pdo0=", "narHash": "sha256-v9wJd32eZ2bvhBzVOd7TIjLQd011P7nwOhjKtWlci5I=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "979bfee6e1a7996fc395270d54c9b59e88762494", "rev": "2c0350c759688177331b8f5242311fae8877bdb3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -48,11 +48,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1782030356, "lastModified": 1788680125,
"narHash": "sha256-h4WpMr455AfRub0FXBaon6Vcpe0waUyJ4GivIW6oyd4=", "narHash": "sha256-amGSoDobwmp4CFvCn841ws2iuitus+HUJdD/gKgsrJA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-index-database", "repo": "nix-index-database",
"rev": "3017088b49efd404f78e3b104f553b97e4af786b", "rev": "116ad1c2adb642405ef8916f6a94c8626f971344",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -63,11 +63,11 @@
}, },
"nix-unstable": { "nix-unstable": {
"locked": { "locked": {
"lastModified": 1781577229, "lastModified": 1788614874,
"narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", "narHash": "sha256-7QYjT2vHLuX9Z1pdxHXDKCbh1CR3D/2rywB9Tx0MPRg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", "rev": "c043004d1c6985732bcc1cbc5a9c9aecbbb4e0f0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -79,11 +79,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1782134769, "lastModified": 1788797584,
"narHash": "sha256-Dxq6CN42CeUcIReDgcKz322t0HvUl3j4nlYpIGwYjtE=", "narHash": "sha256-APhAHYS9dgOtYJC0+fGKLhCPflfv96jYBVbz55TpGNw=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e19832a27f7760bef9296d968c25e24765e8a679", "rev": "b279e6203ee1bf865290fb789e804d83a1e81718",
"type": "github" "type": "github"
}, },
"original": { "original": {
+12 -2
View File
@@ -15,17 +15,27 @@
./modules/zsh.nix ./modules/zsh.nix
]; ];
services.emacs.enable = true;
home.packages = with pkgs; [ home.packages = with pkgs; [
# Password manager
rbw rbw
wtype
rofi-rbw rofi-rbw
# Notifications
mako
libnotify
polkit_gnome
# Other
wireguard-tools wireguard-tools
]; ];
home.file = { home.file = {
".config/kanshi/config".source = ../assets/.config/kanshi/config;
".config/niri/config.kdl".source = ../assets/.config/niri/config.kdl; ".config/niri/config.kdl".source = ../assets/.config/niri/config.kdl;
".config/fuzzel/fuzzel.ini".source = ../assets/.config/fuzzel/fuzzel.ini; ".config/fuzzel/fuzzel.ini".source = ../assets/.config/fuzzel/fuzzel.ini;
".config/alacritty/alacritty.toml".source = ../assets/.config/alacritty/alacritty.toml; ".config/alacritty/alacritty.toml".source = ../assets/.config/alacritty/alacritty.toml;
".config/rofi-rbw.rc".source = ../assets/.config/rofi-rbw.rc;
".config/mako/config".source = ../assets/.config/mako/config;
}; };
} }
+1
View File
@@ -23,6 +23,7 @@
# Other # Other
python3 python3
ansible ansible
jujutsu
]; ];
# To prevent sysroot errors in rust-analyzer # To prevent sysroot errors in rust-analyzer
+6 -1
View File
@@ -28,7 +28,7 @@
programs = { programs = {
emacs = { emacs = {
enable = true; enable = true;
package = pkgs.emacs30; package = pkgs.emacs;
extraPackages = epkgs: with epkgs; [ extraPackages = epkgs: with epkgs; [
mu4e mu4e
vterm vterm
@@ -37,4 +37,9 @@
]; ];
}; };
}; };
services.emacs = {
enable = true;
defaultEditor = true;
};
} }
+18 -4
View File
@@ -36,13 +36,27 @@
gtk = let gtk = let
theme = { theme = {
name = "Materia-dark"; name = "Colloid-Dark";
package = pkgs.materia-theme; package = pkgs.colloid-gtk-theme;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
}; };
in { in {
enable = true; enable = true;
inherit theme; inherit theme iconTheme;
gtk4.theme = theme; gtk4 = {
inherit theme iconTheme;
extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-color-scheme = "prefer-dark";
};
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = 1;
gtk-color-scheme = "prefer-dark";
};
}; };
xdg.mimeApps = { xdg.mimeApps = {