32 Commits

Author SHA1 Message Date
Alexander Wainwright
e67c840994 Merge remote-tracking branch 'origin/main' 2026-03-31 19:37:56 +10:00
Alexander Wainwright
00511b17a9 Add whosthere 2026-03-31 19:26:54 +10:00
Alexander Wainwright
587fad0769 Update lock file 2026-03-30 22:09:30 +10:00
Alexander Wainwright
645767b982 Merge remote-tracking branch 'origin/main' 2026-03-30 21:53:52 +10:00
Alexander Wainwright
34a9dcde1f Add more nerdfonts 2026-03-30 21:52:57 +10:00
Alexander Wainwright
698d8ed7db Waybar to own file, fix icons, add colour file 2026-03-30 21:51:28 +10:00
Alexander Wainwright
4a12606f4e Save screenshots to file and add Print key binding
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-30 21:32:44 +10:00
Alexander Wainwright
7aa5fb2295 Add claude and and gemini from unstable 2026-03-30 21:27:09 +10:00
Alexander Wainwright
46a7c6728d Change signal launching
Should hopefully make it work on sway.
2026-03-30 21:24:33 +10:00
Alexander Wainwright
6788693016 Add gpu drivers for count 2026-03-30 21:22:40 +10:00
Alexander Wainwright
06466f1064 Update lock file 2026-03-14 10:26:44 +10:00
Alexander Wainwright
4a185350a8 Update lock file 2026-03-14 10:24:40 +10:00
Alexander Wainwright
979b57474f Update lock file 2026-02-24 12:33:56 +10:00
Alexander Wainwright
61a8c459d6 Add more apps for desktop 2026-02-24 12:33:40 +10:00
Alexander Wainwright
c181767427 Merge remote-tracking branch 'origin/main' 2026-02-24 12:30:34 +10:00
Alexander Wainwright
9e0c352e0a Add groups 2026-02-24 12:30:24 +10:00
Alexander Wainwright
0838e60998 Add direnv to home-manager 2026-02-24 12:26:01 +10:00
Alexander Wainwright
4dd6269207 Merge remote-tracking branch 'origin/main' 2026-02-24 12:24:12 +10:00
Alexander Wainwright
c504fea109 Enable direnv 2026-02-24 12:21:43 +10:00
Alexander Wainwright
3e9aa3f842 Change swap settings 2026-02-24 12:21:01 +10:00
Alexander Wainwright
f33d6be892 Remove swap file 2026-02-24 12:20:06 +10:00
Alexander Wainwright
98f039d2a2 Add bc and qalc 2026-02-21 13:20:59 +10:00
Alexander Wainwright
931e6f1c8f Add user to dialout 2026-02-21 13:20:32 +10:00
Alexander Wainwright
28842f376b Update lock file 2026-02-13 23:33:30 +10:00
Alexander Wainwright
cf9881008a Add firefox shortcut 2026-02-03 12:19:29 +10:00
Alexander Wainwright
5c7992e05a Enable brightness buttons 2026-02-03 12:19:08 +10:00
Alexander Wainwright
a91960835c Make launcher smaller
Doesn't fit on my laptop otherwise.
2026-02-03 12:18:36 +10:00
Alexander Wainwright
0d298a56fc Update lock file 2026-02-03 12:09:27 +10:00
Alexander Wainwright
4b4fd35706 Add workaround for jrnl build failure 2026-02-03 12:09:08 +10:00
Alexander Wainwright
e06340c2d2 Move mosh from server to base 2026-01-31 10:38:07 +10:00
Alexander Wainwright
3c791598fa Add more file associations 2026-01-31 10:37:45 +10:00
Alexander Wainwright
99d40d1f8c Open new tmux tabs in cwd 2026-01-31 10:36:48 +10:00
12 changed files with 398 additions and 251 deletions

View 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";
}

View File

@@ -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`

View File

@@ -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" ];

View File

@@ -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 ];

View File

@@ -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};
}
'';
};
} }

View File

@@ -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
View 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
View File

@@ -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": {

View File

@@ -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;

View File

@@ -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

View File

@@ -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
]; ];
}; };

View File

@@ -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;
} }