Compare commits
32 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e67c840994 | ||
|
|
00511b17a9 | ||
|
|
587fad0769 | ||
|
|
645767b982 | ||
|
|
34a9dcde1f | ||
|
|
698d8ed7db | ||
|
|
4a12606f4e | ||
|
|
7aa5fb2295 | ||
|
|
46a7c6728d | ||
|
|
6788693016 | ||
|
|
06466f1064 | ||
|
|
4a185350a8 | ||
|
|
979b57474f | ||
|
|
61a8c459d6 | ||
|
|
c181767427 | ||
|
|
9e0c352e0a | ||
|
|
0838e60998 | ||
|
|
4dd6269207 | ||
|
|
c504fea109 | ||
|
|
3e9aa3f842 | ||
|
|
f33d6be892 | ||
|
|
98f039d2a2 | ||
|
|
931e6f1c8f | ||
|
|
28842f376b | ||
|
|
cf9881008a | ||
|
|
5c7992e05a | ||
|
|
a91960835c | ||
|
|
0d298a56fc | ||
|
|
4b4fd35706 | ||
|
|
e06340c2d2 | ||
|
|
3c791598fa | ||
|
|
99d40d1f8c |
17
alex/colours/catppuchin-mocha.nix
Normal file
17
alex/colours/catppuchin-mocha.nix
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
# Catppuccin Mocha Palette
|
||||||
|
base = "#1e1e2e";
|
||||||
|
mantle = "#181825";
|
||||||
|
surface0 = "#313244";
|
||||||
|
surface1 = "#45475a";
|
||||||
|
text = "#cdd6f4";
|
||||||
|
lavender = "#b4befe";
|
||||||
|
blue = "#89b4fa";
|
||||||
|
sapphire = "#74c7ec";
|
||||||
|
red = "#f38ba8";
|
||||||
|
peach = "#fab387";
|
||||||
|
yellow = "#f9e2af";
|
||||||
|
green = "#a6e3a1";
|
||||||
|
mauve = "#cba6f7";
|
||||||
|
overlay0 = "#6c7086";
|
||||||
|
}
|
||||||
@@ -1,5 +1,11 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
{
|
{
|
||||||
home.username = "alex";
|
home.username = "alex";
|
||||||
home.homeDirectory = "/home/alex";
|
home.homeDirectory = "/home/alex";
|
||||||
@@ -16,6 +22,12 @@
|
|||||||
tm = "tmux attach || tmux";
|
tm = "tmux attach || tmux";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
# enableFishIntegration = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
home.file.".config/atuin/config.toml".source = ./atuin/config.toml;
|
home.file.".config/atuin/config.toml".source = ./atuin/config.toml;
|
||||||
home.file.".config/nvim/init.lua".source = ./nvim/init.lua;
|
home.file.".config/nvim/init.lua".source = ./nvim/init.lua;
|
||||||
home.file.".config/tmux/tmux.conf".source = ./tmux/tmux.conf;
|
home.file.".config/tmux/tmux.conf".source = ./tmux/tmux.conf;
|
||||||
@@ -48,6 +60,7 @@
|
|||||||
|
|
||||||
# networking tools
|
# networking tools
|
||||||
dig
|
dig
|
||||||
|
unstable.whosthere
|
||||||
# iperf3
|
# iperf3
|
||||||
# dnsutils # `dig` + `nslookup`
|
# dnsutils # `dig` + `nslookup`
|
||||||
# ldns # replacement of `dig`, it provide the command `drill`
|
# ldns # replacement of `dig`, it provide the command `drill`
|
||||||
|
|||||||
@@ -27,6 +27,8 @@
|
|||||||
chromium
|
chromium
|
||||||
loupe
|
loupe
|
||||||
papers
|
papers
|
||||||
|
brightnessctl
|
||||||
|
wev
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.ghostty = {
|
programs.ghostty = {
|
||||||
@@ -41,7 +43,14 @@
|
|||||||
xdg.mimeApps = {
|
xdg.mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
"image/jpeg" = [ "loupe" ];
|
"text/html" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/http" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/https" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/about" = "firefox.desktop";
|
||||||
|
"x-scheme-handler/unknown" = "firefox.desktop";
|
||||||
|
|
||||||
|
"image/jpeg" = [ "org.gnome.Loupe.desktop" ];
|
||||||
|
"image/jpg" = [ "org.gnome.Loupe.desktop" ];
|
||||||
"image/png" = [ "org.gnome.Loupe.desktop" ];
|
"image/png" = [ "org.gnome.Loupe.desktop" ];
|
||||||
"image/gif" = [ "org.gnome.Loupe.desktop" ];
|
"image/gif" = [ "org.gnome.Loupe.desktop" ];
|
||||||
"image/webp" = [ "org.gnome.Loupe.desktop" ];
|
"image/webp" = [ "org.gnome.Loupe.desktop" ];
|
||||||
|
|||||||
@@ -10,7 +10,15 @@ in
|
|||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
foliate
|
foliate
|
||||||
inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default
|
inputs.locutus.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
jrnl
|
# jrnl
|
||||||
|
# disable tests for now until the bug is fixed
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/476190
|
||||||
|
# https://github.com/NixOS/nixpkgs/pull/479705
|
||||||
|
(jrnl.overrideAttrs (old: {
|
||||||
|
disabledTests = (old.disabledTests or []) ++ [
|
||||||
|
"test_override_configured_linewrap_with_a_value_of_23"
|
||||||
|
];
|
||||||
|
}))
|
||||||
mullvad-browser
|
mullvad-browser
|
||||||
tor-browser
|
tor-browser
|
||||||
exiftool
|
exiftool
|
||||||
@@ -18,12 +26,33 @@ in
|
|||||||
shotwell
|
shotwell
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
bitwarden-desktop
|
bitwarden-desktop
|
||||||
signal-desktop
|
(symlinkJoin {
|
||||||
|
name = "signal-desktop-wrapped";
|
||||||
|
paths = [ signal-desktop ];
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
postBuild = ''
|
||||||
|
rm $out/bin/signal-desktop
|
||||||
|
makeWrapper ${signal-desktop}/bin/signal-desktop $out/bin/signal-desktop \
|
||||||
|
--add-flags "--password-store=gnome-libsecret"
|
||||||
|
'';
|
||||||
|
})
|
||||||
spotify
|
spotify
|
||||||
gemini-cli
|
unstable.gemini-cli
|
||||||
|
unstable.claude-code
|
||||||
|
|
||||||
foliate
|
foliate
|
||||||
|
|
||||||
|
wine
|
||||||
|
lutris
|
||||||
|
steam
|
||||||
|
|
||||||
|
gqrx
|
||||||
|
sdrpp
|
||||||
|
rtl-sdr
|
||||||
|
rtl_433
|
||||||
|
|
||||||
|
ledger-live-desktop
|
||||||
|
|
||||||
(symlinkJoin {
|
(symlinkJoin {
|
||||||
name = "darktable";
|
name = "darktable";
|
||||||
paths = [ unstable.darktable ];
|
paths = [ unstable.darktable ];
|
||||||
|
|||||||
233
alex/sway.nix
233
alex/sway.nix
@@ -18,6 +18,10 @@ let
|
|||||||
overlay0 = "#6c7086";
|
overlay0 = "#6c7086";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
./waybar.nix
|
||||||
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
swaybg
|
swaybg
|
||||||
swayidle
|
swayidle
|
||||||
@@ -64,7 +68,7 @@ in
|
|||||||
line-clear-color = base;
|
line-clear-color = base;
|
||||||
line-wrong-color = base;
|
line-wrong-color = base;
|
||||||
bs-hl-color = red;
|
bs-hl-color = red;
|
||||||
grace = 2;
|
grace = 6;
|
||||||
grace-no-mouse = true;
|
grace-no-mouse = true;
|
||||||
grace-no-touch = true;
|
grace-no-touch = true;
|
||||||
datestr = "%a, %B %e";
|
datestr = "%a, %B %e";
|
||||||
@@ -154,6 +158,7 @@ in
|
|||||||
keybindings = let
|
keybindings = let
|
||||||
modifier = "Mod4";
|
modifier = "Mod4";
|
||||||
in lib.mkOptionDefault {
|
in lib.mkOptionDefault {
|
||||||
|
"${modifier}+Caps_Lock" = "input * xkb_switch_layout next";
|
||||||
"${modifier}+Return" = "exec wezterm";
|
"${modifier}+Return" = "exec wezterm";
|
||||||
"${modifier}+d" = "exec fuzzel";
|
"${modifier}+d" = "exec fuzzel";
|
||||||
"${modifier}+space" = "floating toggle";
|
"${modifier}+space" = "floating toggle";
|
||||||
@@ -162,9 +167,13 @@ in
|
|||||||
"${modifier}+Shift+c" = "reload";
|
"${modifier}+Shift+c" = "reload";
|
||||||
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'";
|
"${modifier}+Shift+e" = "exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -B 'Yes, exit sway' 'swaymsg exit'";
|
||||||
|
|
||||||
|
"${modifier}+b" = "exec firefox";
|
||||||
|
|
||||||
"${modifier}+Shift+l" = "exec swaylock -f";
|
"${modifier}+Shift+l" = "exec swaylock -f";
|
||||||
|
|
||||||
"${modifier}+Shift+s" = "exec grim -g \"$(slurp)\" - | wl-copy";
|
"${modifier}+Shift+s" = "exec grim -g \"$(slurp)\" - | tee \"/home/alex/Pictures/Screenshots/$(date +'%Y%m%d_%Hh%Mm%Ss_grim.png')\" | wl-copy";
|
||||||
|
|
||||||
|
"Print" = "exec grim - | tee \"/home/alex/Pictures/Screenshots/$(date +'%Y%m%d_%Hh%Mm%Ss_grim.png')\" | wl-copy";
|
||||||
|
|
||||||
# Workspaces
|
# Workspaces
|
||||||
"--whole-window ${modifier}+button4" = "workspace prev";
|
"--whole-window ${modifier}+button4" = "workspace prev";
|
||||||
@@ -173,8 +182,8 @@ in
|
|||||||
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
"XF86AudioRaiseVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+";
|
||||||
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
"XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||||
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
"XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
"XF86MonBrightnessUp" = "exec light -A 5";
|
"XF86MonBrightnessUp" = "exec brightnessctl set 10%+";
|
||||||
"XF86MonBrightnessDown" = "exec light -U 5";
|
"XF86MonBrightnessDown" = "exec brightnessctl set 10%-";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -210,7 +219,8 @@ in
|
|||||||
|
|
||||||
services.swayidle =
|
services.swayidle =
|
||||||
let
|
let
|
||||||
lock = "${pkgs.swaylock-effects}/bin/swaylock --daemonize";
|
lock = "${pkgs.swaylock-effects}/bin/swaylock -f";
|
||||||
|
lockNow = "${pkgs.swaylock-effects}/bin/swaylock -f --grace 0";
|
||||||
# modify "display" function based on your window manager
|
# modify "display" function based on your window manager
|
||||||
# Sway
|
# Sway
|
||||||
display = status: "${pkgs.sway}/bin/swaymsg 'output * power ${status}'";
|
display = status: "${pkgs.sway}/bin/swaymsg 'output * power ${status}'";
|
||||||
@@ -242,7 +252,7 @@ in
|
|||||||
{
|
{
|
||||||
event = "before-sleep";
|
event = "before-sleep";
|
||||||
# adding duplicated entries for the same event may not work
|
# adding duplicated entries for the same event may not work
|
||||||
command = (display "off") + "; " + lock;
|
command = lockNow + "; " + (display "off");
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
event = "after-resume";
|
event = "after-resume";
|
||||||
@@ -266,7 +276,7 @@ in
|
|||||||
terminal = "${pkgs.wezterm}/bin/wezterm";
|
terminal = "${pkgs.wezterm}/bin/wezterm";
|
||||||
layer = "overlay";
|
layer = "overlay";
|
||||||
width = 100;
|
width = 100;
|
||||||
line-height = 40;
|
line-height = 25;
|
||||||
font = "JetBrainsMono Nerd Font:size=12";
|
font = "JetBrainsMono Nerd Font:size=12";
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
@@ -284,213 +294,4 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.waybar = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
mainBar = {
|
|
||||||
layer = "top";
|
|
||||||
position = "top";
|
|
||||||
height = 30;
|
|
||||||
margin-top = 5;
|
|
||||||
margin-left = 10;
|
|
||||||
margin-right = 10;
|
|
||||||
spacing = 4;
|
|
||||||
|
|
||||||
modules-left = [ "sway/workspaces" "sway/mode" ];
|
|
||||||
modules-center = [ "clock" ];
|
|
||||||
modules-right = [ "pulseaudio" "network" "cpu" "memory" "battery" "tray" ];
|
|
||||||
|
|
||||||
"sway/workspaces" = {
|
|
||||||
disable-scroll = true;
|
|
||||||
all-outputs = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
"clock" = {
|
|
||||||
format = "{:%a %d %b %H:%M:%S}";
|
|
||||||
tooltip-format = "<big>{:%Y %B}</big>\n<tt>{calendar}</tt>";
|
|
||||||
interval = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
"cpu" = {
|
|
||||||
format = "{usage}% ";
|
|
||||||
};
|
|
||||||
|
|
||||||
"memory" = {
|
|
||||||
format = "{}% ";
|
|
||||||
tooltip-format = "RAM: {used}GiB / {total}GiB ({percentage}%)\nSwap: {swapUsed}GiB / {swapTotal}GiB ({swapPercentage}%)";
|
|
||||||
};
|
|
||||||
|
|
||||||
"battery" = {
|
|
||||||
states = {
|
|
||||||
warning = 30;
|
|
||||||
critical = 15;
|
|
||||||
};
|
|
||||||
format = "{capacity}% {icon}";
|
|
||||||
format-charging = "{capacity}% ";
|
|
||||||
format-plugged = "{capacity}% ";
|
|
||||||
format-icons = ["" "" "" "" ""];
|
|
||||||
};
|
|
||||||
|
|
||||||
"network" = {
|
|
||||||
format-wifi = "{essid} ({signalStrength}%) ";
|
|
||||||
format-ethernet = "{ipaddr}/{cidr} ";
|
|
||||||
tooltip-format = "{ifname} via {gwaddr} ";
|
|
||||||
format-linked = "{ifname} (No IP) ";
|
|
||||||
format-disconnected = "Disconnected ⚠";
|
|
||||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
|
||||||
};
|
|
||||||
|
|
||||||
"pulseaudio" = {
|
|
||||||
format = "{volume}% {icon} {format_source}";
|
|
||||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
|
||||||
format-bluetooth-muted = " {icon} {format_source}";
|
|
||||||
format-muted = " {format_source}";
|
|
||||||
format-source = "{volume}% ";
|
|
||||||
format-source-muted = "";
|
|
||||||
format-icons = {
|
|
||||||
headphone = "";
|
|
||||||
hands-free = "";
|
|
||||||
headset = "";
|
|
||||||
phone = "";
|
|
||||||
portable = "";
|
|
||||||
car = "";
|
|
||||||
default = ["" "" ""];
|
|
||||||
};
|
|
||||||
on-click = "pavucontrol";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
style = ''
|
|
||||||
* {
|
|
||||||
font-family: "JetBrainsMono Nerd Font";
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar {
|
|
||||||
background-color: transparent;
|
|
||||||
color: ${text};
|
|
||||||
transition-property: background-color;
|
|
||||||
transition-duration: .5s;
|
|
||||||
}
|
|
||||||
|
|
||||||
window#waybar > box {
|
|
||||||
background-color: ${base};
|
|
||||||
border-radius: 15px;
|
|
||||||
opacity: 1.0;
|
|
||||||
padding: 0 3px 0 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
box-shadow: inset 0 -3px transparent;
|
|
||||||
border: none;
|
|
||||||
border-radius: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover {
|
|
||||||
background: inherit;
|
|
||||||
box-shadow: inset 0 -3px ${text};
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button {
|
|
||||||
padding: 0 5px;
|
|
||||||
background-color: transparent;
|
|
||||||
color: ${text};
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button:hover {
|
|
||||||
background: rgba(0, 0, 0, 0.2);
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.focused {
|
|
||||||
background-color: ${surface1};
|
|
||||||
box-shadow: inset 0 -3px ${lavender};
|
|
||||||
}
|
|
||||||
|
|
||||||
#workspaces button.urgent {
|
|
||||||
background-color: ${red};
|
|
||||||
}
|
|
||||||
|
|
||||||
#mode {
|
|
||||||
background-color: ${surface0};
|
|
||||||
border-bottom: 3px solid ${text};
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock,
|
|
||||||
#battery,
|
|
||||||
#cpu,
|
|
||||||
#memory,
|
|
||||||
#disk,
|
|
||||||
#temperature,
|
|
||||||
#backlight,
|
|
||||||
#network,
|
|
||||||
#pulseaudio,
|
|
||||||
#custom-media,
|
|
||||||
#tray,
|
|
||||||
#mode,
|
|
||||||
#idle_inhibitor,
|
|
||||||
#mpd {
|
|
||||||
padding: 0 10px;
|
|
||||||
color: ${text};
|
|
||||||
background-color: ${surface0};
|
|
||||||
border-radius: 10px;
|
|
||||||
margin: 5px 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#clock {
|
|
||||||
background-color: ${mauve};
|
|
||||||
color: ${base};
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery {
|
|
||||||
background-color: ${green};
|
|
||||||
color: ${base};
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.charging, #battery.plugged {
|
|
||||||
color: ${base};
|
|
||||||
background-color: ${green};
|
|
||||||
}
|
|
||||||
|
|
||||||
#battery.critical:not(.charging) {
|
|
||||||
background-color: ${red};
|
|
||||||
color: ${text};
|
|
||||||
animation-name: blink;
|
|
||||||
animation-duration: 0.5s;
|
|
||||||
animation-timing-function: linear;
|
|
||||||
animation-iteration-count: infinite;
|
|
||||||
animation-direction: alternate;
|
|
||||||
}
|
|
||||||
|
|
||||||
#cpu {
|
|
||||||
background-color: ${peach};
|
|
||||||
color: ${base};
|
|
||||||
}
|
|
||||||
|
|
||||||
#memory {
|
|
||||||
background-color: ${yellow};
|
|
||||||
color: ${base};
|
|
||||||
}
|
|
||||||
|
|
||||||
#network {
|
|
||||||
background-color: ${sapphire};
|
|
||||||
color: ${base};
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio {
|
|
||||||
background-color: ${blue};
|
|
||||||
color: ${base};
|
|
||||||
}
|
|
||||||
|
|
||||||
#pulseaudio.muted {
|
|
||||||
background-color: ${overlay0};
|
|
||||||
color: ${text};
|
|
||||||
}
|
|
||||||
|
|
||||||
#tray {
|
|
||||||
background-color: ${surface0};
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ tmux_conf_new_session_retain_current_path=false
|
|||||||
# - true
|
# - true
|
||||||
# - false (default)
|
# - false (default)
|
||||||
# - disabled (do not modify new-window bindings)
|
# - disabled (do not modify new-window bindings)
|
||||||
tmux_conf_new_window_retain_current_path=false
|
tmux_conf_new_window_retain_current_path=true
|
||||||
|
|
||||||
# new window tries to reconnect ssh sessions, possible values are:
|
# new window tries to reconnect ssh sessions, possible values are:
|
||||||
# - true
|
# - true
|
||||||
|
|||||||
224
alex/waybar.nix
Normal file
224
alex/waybar.nix
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
palette = import ./colours/catppuchin-mocha.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 30;
|
||||||
|
margin-top = 10;
|
||||||
|
margin-bottom = 0;
|
||||||
|
margin-left = 10;
|
||||||
|
margin-right = 10;
|
||||||
|
spacing = 4;
|
||||||
|
|
||||||
|
modules-left = if (config.programs.niri or {}).enable or false then
|
||||||
|
[ "niri/workspaces" ]
|
||||||
|
else
|
||||||
|
[ "sway/workspaces" "sway/mode" ];
|
||||||
|
modules-center = [ "clock" ];
|
||||||
|
modules-right = [ "pulseaudio" "network" "cpu" "memory" "battery" "tray" ];
|
||||||
|
|
||||||
|
"sway/workspaces" = {
|
||||||
|
disable-scroll = true;
|
||||||
|
all-outputs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"niri/workspaces" = {
|
||||||
|
disable-scroll = true;
|
||||||
|
all-outputs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"clock" = {
|
||||||
|
format = "{:%a %d %b %H:%M:%S}";
|
||||||
|
tooltip-format = "<big>{:%Y %B}</big>\n<tt>{calendar}</tt>";
|
||||||
|
interval = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
"cpu" = {
|
||||||
|
format = "{usage}% ";
|
||||||
|
};
|
||||||
|
|
||||||
|
"memory" = {
|
||||||
|
format = "{}% ";
|
||||||
|
tooltip-format = "RAM: {used}GiB / {total}GiB ({percentage}%)\nSwap: {swapUsed}GiB / {swapTotal}GiB ({swapPercentage}%)";
|
||||||
|
};
|
||||||
|
|
||||||
|
"battery" = {
|
||||||
|
states = {
|
||||||
|
warning = 30;
|
||||||
|
critical = 15;
|
||||||
|
};
|
||||||
|
format = "{capacity}% {icon} icon";
|
||||||
|
format-full = "{capacity}% {icon} full";
|
||||||
|
format-charging = "{capacity}% charged";
|
||||||
|
format-plugged = "{capacity}% ";
|
||||||
|
format-icons = ["" "" "" "" ""];
|
||||||
|
};
|
||||||
|
|
||||||
|
"network" = {
|
||||||
|
format-wifi = "{essid} ({signalStrength}%) ";
|
||||||
|
format-ethernet = "{ipaddr}/{cidr} ";
|
||||||
|
tooltip-format = "{ifname} via {gwaddr} ";
|
||||||
|
format-linked = "{ifname} (No IP) ";
|
||||||
|
format-disconnected = "Disconnected ⚠";
|
||||||
|
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"pulseaudio" = {
|
||||||
|
format = "{volume}% {icon} {format_source}";
|
||||||
|
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||||
|
format-bluetooth-muted = " {icon} {format_source}";
|
||||||
|
format-muted = " {format_source}";
|
||||||
|
format-source = "{volume}% ";
|
||||||
|
format-source-muted = "";
|
||||||
|
format-icons = {
|
||||||
|
headphone = "";
|
||||||
|
hands-free = "";
|
||||||
|
headset = "";
|
||||||
|
phone = "";
|
||||||
|
portable = "";
|
||||||
|
car = "";
|
||||||
|
default = ["" "" ""];
|
||||||
|
};
|
||||||
|
on-click = "pavucontrol";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
style = ''
|
||||||
|
* {
|
||||||
|
font-family: "Symbols Nerd Font Mono", "Lilex Nerd Font", "JetBrainsMono Nerd Font";
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: transparent;
|
||||||
|
color: ${palette.text};
|
||||||
|
transition-property: background-color;
|
||||||
|
transition-duration: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar > box {
|
||||||
|
background-color: ${palette.base};
|
||||||
|
border-radius: 15px;
|
||||||
|
opacity: 1.0;
|
||||||
|
padding: 0 3px 0 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
box-shadow: inset 0 -3px transparent;
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background: inherit;
|
||||||
|
box-shadow: inset 0 -3px ${palette.text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
background-color: transparent;
|
||||||
|
color: ${palette.text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.focused {
|
||||||
|
background-color: ${palette.surface1};
|
||||||
|
box-shadow: inset 0 -3px ${palette.lavender};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: ${palette.red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: ${palette.surface0};
|
||||||
|
border-bottom: 3px solid ${palette.text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#custom-media,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#mpd {
|
||||||
|
padding: 0 10px;
|
||||||
|
color: ${palette.text};
|
||||||
|
background-color: ${palette.surface0};
|
||||||
|
border-radius: 10px;
|
||||||
|
margin: 5px 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background-color: ${palette.mauve};
|
||||||
|
color: ${palette.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery {
|
||||||
|
background-color: ${palette.green};
|
||||||
|
color: ${palette.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.charging, #battery.plugged {
|
||||||
|
color: ${palette.base};
|
||||||
|
background-color: ${palette.green};
|
||||||
|
}
|
||||||
|
|
||||||
|
#battery.critical:not(.charging) {
|
||||||
|
background-color: ${palette.red};
|
||||||
|
color: ${palette.text};
|
||||||
|
animation-name: blink;
|
||||||
|
animation-duration: 0.5s;
|
||||||
|
animation-timing-function: linear;
|
||||||
|
animation-iteration-count: infinite;
|
||||||
|
animation-direction: alternate;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
background-color: ${palette.peach};
|
||||||
|
color: ${palette.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
background-color: ${palette.yellow};
|
||||||
|
color: ${palette.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
background-color: ${palette.sapphire};
|
||||||
|
color: ${palette.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
background-color: ${palette.blue};
|
||||||
|
color: ${palette.base};
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
background-color: ${palette.overlay0};
|
||||||
|
color: ${palette.text};
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background-color: ${palette.surface0};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
18
flake.lock
generated
18
flake.lock
generated
@@ -25,11 +25,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767514898,
|
"lastModified": 1774559029,
|
||||||
"narHash": "sha256-ONYqnKrPzfKEEPChoJ9qPcfvBqW9ZgieDKD7UezWPg4=",
|
"narHash": "sha256-deix7yg3j6AhjMPnFDCmWB3f83LsajaaULP5HH2j34k=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "7a06e8a2f844e128d3b210a000a62716b6040b7f",
|
"rev": "a0bb0d11514f92b639514220114ac8063c72d0a3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -76,11 +76,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767379071,
|
"lastModified": 1774709303,
|
||||||
"narHash": "sha256-EgE0pxsrW9jp9YFMkHL9JMXxcqi/OoumPJYwf+Okucw=",
|
"narHash": "sha256-D3Q07BbIA2KnTcSXIqqu9P586uWxN74zNoCH3h2ESHg=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "fb7944c166a3b630f177938e478f0378e64ce108",
|
"rev": "8110df5ad7abf5d4c0f6fb0f8f978390e77f9685",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -92,11 +92,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767325753,
|
"lastModified": 1774388614,
|
||||||
"narHash": "sha256-yA/CuWyqm+AQo2ivGy6PlYrjZBQm7jfbe461+4HF2fo=",
|
"narHash": "sha256-tFwzTI0DdDzovdE9+Ras6CUss0yn8P9XV4Ja6RjA+nU=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "64049ca74d63e971b627b5f3178d95642e61cedd",
|
"rev": "1073dad219cb244572b74da2b20c7fe39cb3fa9e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -24,6 +24,27 @@
|
|||||||
# Use latest kernel.
|
# Use latest kernel.
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# Enable AMD GPU drivers
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
|
|
||||||
|
# Enable ROCm support
|
||||||
|
hardware.graphics.enable = true;
|
||||||
|
hardware.amdgpu.opencl.enable = true;
|
||||||
|
|
||||||
|
# Add the ROCm packages to your system
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
rocmPackages.rocminfo
|
||||||
|
rocmPackages.rocm-smi
|
||||||
|
];
|
||||||
|
|
||||||
|
services.ollama = {
|
||||||
|
enable = true;
|
||||||
|
acceleration = "rocm";
|
||||||
|
# Force the RX 6600 to use compatible ROCm kernels
|
||||||
|
rocmOverrideGfx = "10.3.0";
|
||||||
|
};
|
||||||
|
|
||||||
# Setup keyfile
|
# Setup keyfile
|
||||||
boot.initrd.secrets = {
|
boot.initrd.secrets = {
|
||||||
"/boot/crypto_keyfile.bin" = null;
|
"/boot/crypto_keyfile.bin" = null;
|
||||||
|
|||||||
@@ -1,32 +1,47 @@
|
|||||||
{ config, pkgs, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.alex = {
|
users = {
|
||||||
|
users.alex = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Alexander Wainwright";
|
description = "Alexander Wainwright";
|
||||||
extraGroups = [ "networkmanager" "wheel" ];
|
extraGroups = [
|
||||||
|
"dialout"
|
||||||
|
"input"
|
||||||
|
"networkmanager"
|
||||||
|
"plugdev"
|
||||||
|
"render"
|
||||||
|
"video"
|
||||||
|
"wheel"
|
||||||
|
];
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
# thunderbird
|
# thunderbird
|
||||||
];
|
];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
};
|
};
|
||||||
|
groups.pluggdev = {};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.udev.packages = [ pkgs.rtl-sdr ];
|
||||||
|
|
||||||
# this is to avoid some problem that happens apparently only when fish is
|
# this is to avoid some problem that happens apparently only when fish is
|
||||||
# enabled, where generating man cahes takes a very long time. note that it may
|
# enabled, where generating man cahes takes a very long time. note that it may
|
||||||
# break fish man completion and apropos.
|
# break fish man completion and apropos.
|
||||||
documentation.man.generateCaches = false;
|
documentation.man.generateCaches = false;
|
||||||
|
|
||||||
# enable a 1GB swap file
|
|
||||||
swapDevices = [{
|
|
||||||
device = "/swapfile";
|
|
||||||
size = 1024;
|
|
||||||
}];
|
|
||||||
|
|
||||||
# enable zram. not totally sure if this does it in physical ram or just swap
|
# enable zram. not totally sure if this does it in physical ram or just swap
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
|
boot.kernel.sysctl = {
|
||||||
|
"vm.swappiness" = 10;
|
||||||
|
};
|
||||||
|
|
||||||
# enable earlyoom to stop the system becoming unresponsive when out of ram
|
# enable earlyoom to stop the system becoming unresponsive when out of ram
|
||||||
services.earlyoom.enable = true;
|
services.earlyoom = {
|
||||||
|
enable = true;
|
||||||
|
freeMemThreshold = 10;
|
||||||
|
freeSwapThreshold = 90;
|
||||||
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 8000 8080 ];
|
networking.firewall.allowedTCPPorts = [ 8000 8080 ];
|
||||||
|
|
||||||
@@ -54,6 +69,19 @@
|
|||||||
# fish shell
|
# fish shell
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
# direnv
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.direnv;
|
||||||
|
silent = false;
|
||||||
|
loadInNixShell = true;
|
||||||
|
direnvrcExtra = "";
|
||||||
|
nix-direnv = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.nix-direnv;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# Create a library path that only applies to unpackaged programs by using
|
# Create a library path that only applies to unpackaged programs by using
|
||||||
# nix-ldo
|
# nix-ldo
|
||||||
# https://nix.dev/guides/faq#how-to-run-non-nix-executables
|
# https://nix.dev/guides/faq#how-to-run-non-nix-executables
|
||||||
@@ -109,6 +137,9 @@
|
|||||||
# Enable the OpenSSH daemon.
|
# Enable the OpenSSH daemon.
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# enable mosh
|
||||||
|
programs.mosh.enable = true;
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||||
@@ -140,6 +171,10 @@
|
|||||||
wireguard-tools
|
wireguard-tools
|
||||||
zip
|
zip
|
||||||
|
|
||||||
|
# maths
|
||||||
|
bc
|
||||||
|
libqalculate
|
||||||
|
|
||||||
# build tools
|
# build tools
|
||||||
binutils
|
binutils
|
||||||
cmake
|
cmake
|
||||||
|
|||||||
@@ -40,6 +40,7 @@
|
|||||||
noto-fonts-cjk-sans
|
noto-fonts-cjk-sans
|
||||||
noto-fonts-cjk-serif
|
noto-fonts-cjk-serif
|
||||||
nerd-fonts.lilex
|
nerd-fonts.lilex
|
||||||
|
nerd-fonts.symbols-only
|
||||||
fira-code
|
fira-code
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -5,7 +5,4 @@
|
|||||||
"192.168.1.80"
|
"192.168.1.80"
|
||||||
"192.168.1.20"
|
"192.168.1.20"
|
||||||
];
|
];
|
||||||
|
|
||||||
# enable mosh
|
|
||||||
programs.mosh.enable = true;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user