13 Commits

Author SHA1 Message Date
Patrick Stevens
28dab00b65 Bump nixpkgs (#109) 2025-01-25 14:55:13 +00:00
Patrick Stevens
ca85c8de24 Delete some things we should be putting in devshells, and move to ghostty (#108) 2025-01-06 23:46:35 +00:00
Patrick Stevens
c45222500f Use discord-canary (#107) 2025-01-02 19:45:42 +00:00
Patrick Stevens
04fab0bad0 Bump nixpkgs (#106) 2025-01-02 19:41:32 +00:00
Patrick Stevens
04079d1082 Enable bluetooth on earthworm (#105) 2024-12-22 22:48:05 +00:00
Patrick Stevens
6973cbbd99 Fix volume keys (#104) 2024-12-22 21:56:00 +00:00
Patrick Stevens
2346cbb7ce Bump nixpkgs (#102) 2024-12-22 21:54:14 +00:00
Patrick Stevens
247c3419a8 Bump nixpkgs (#103) 2024-12-22 21:43:54 +00:00
Patrick Stevens
8a1f2af5bb Upgrade Nixpkgs (#97) 2024-12-15 10:00:49 +00:00
Patrick Stevens
3bfb4e7ec5 Freeze tty (#101) 2024-12-13 09:27:45 +00:00
Patrick Stevens
d857f7ab9f Screenshots (#100) 2024-11-29 19:05:10 +00:00
Patrick Stevens
cb3c993507 Fix sway on Earthworm (#99) 2024-11-29 09:41:46 +00:00
Patrick Stevens
14f21cb172 Fix shutdown menu (#98) 2024-11-29 09:35:39 +00:00
12 changed files with 113 additions and 71 deletions

1
.envrc Normal file
View File

@@ -0,0 +1 @@
use flake .

1
.gitignore vendored
View File

@@ -3,3 +3,4 @@ result
bin/ bin/
obj/ obj/
.DS_Store .DS_Store
.direnv/

View File

@@ -7,10 +7,6 @@ in {
# $ nix-env -qaP | grep wget # $ nix-env -qaP | grep wget
environment.systemPackages = [ environment.systemPackages = [
pkgs.alacritty
pkgs.rustup
pkgs.libiconv
pkgs.clang
pkgs.python3 pkgs.python3
]; ];

62
flake.lock generated
View File

@@ -7,11 +7,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1731473366, "lastModified": 1737610453,
"narHash": "sha256-sE2WfD3YyNrCROfRZKqMDR77g3KV4FXUaJ7NWe+A7ro=", "narHash": "sha256-OLgl/kgjOmDFrkU04PlqVklXj1m9y8xF7xbD+blAdg8=",
"owner": "tpwrules", "owner": "tpwrules",
"repo": "nixos-apple-silicon", "repo": "nixos-apple-silicon",
"rev": "3eee753e4b074790342fadb1c4e7183d037ddac4", "rev": "1f7bdbb82f6b9ec1d8d206e2c64d36f13bae91a1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -27,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731454423, "lastModified": 1737504076,
"narHash": "sha256-TtwvgFxUa0wyptLhQbKaixgNW1UXf3+TDqfX3Kp63oM=", "narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=",
"owner": "lnl7", "owner": "lnl7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "6c71c49e2448e51ad830ed211024e6d0edc50116", "rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -49,11 +49,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1731604406, "lastModified": 1737770462,
"narHash": "sha256-CUkO4CXaDcGyUqQ+/ArvekL3hlfgass7LjrnG6m2+g8=", "narHash": "sha256-d+VpkYISLIBRvSFUCyPbpcanPCheC7THbW2cbgTlb/s=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "f6c94b95f529cfbd29848c12816111a2471a5293", "rev": "1daea5ddf4cebd26c500f265edbeb62d679c7ff7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -82,11 +82,11 @@
"systems": "systems" "systems": "systems"
}, },
"locked": { "locked": {
"lastModified": 1701680307, "lastModified": 1731533236,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725", "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -102,11 +102,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731604581, "lastModified": 1737762889,
"narHash": "sha256-Qq2YZZaDTB3FZLWU/Hgh1uuWlUBl3cMLGB99bm7rFUM=", "narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "1d0862ee2d7c6f6cd720d6f32213fa425004be10", "rev": "daf04c5950b676f47a794300657f1d3d14c1a120",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -129,11 +129,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1731139594, "lastModified": 1737469691,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", "narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", "rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -145,27 +145,27 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1731386116, "lastModified": 1737672001,
"narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", "narHash": "sha256-YnHJJ19wqmibLQdUeq9xzE6CjrMA568KN/lFPuSVs4I=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "689fed12a013f56d4c4d3f612489634267d86529", "rev": "035f8c0853c2977b24ffc4d0a42c74f00b182cd8",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1731531548, "lastModified": 1737717945,
"narHash": "sha256-sz8/v17enkYmfpgeeuyzniGJU0QQBfmAjlemAUYhfy8=", "narHash": "sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "24f0d4acd634792badd6470134c387a3b039dace", "rev": "ecd26a469ac56357fd333946a99086e992452b6a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -177,11 +177,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1695033101, "lastModified": 1734254970,
"narHash": "sha256-RQ4m+ycjdLdass7Hr4+Lzwnjw7wGhcUkKqWiJS3YxPM=", "narHash": "sha256-yZzYWWWeOqSFvIirHzY1SJiuSBPmXIYJFhyt+1zkv8A=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "d941d9491804e0ca01e03468dbf6f8d3a7919a16", "rev": "d388ee0ec8c623389ab3a7caead258a94cec14de",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -238,11 +238,11 @@
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_3"
}, },
"locked": { "locked": {
"lastModified": 1704121968, "lastModified": 1734268803,
"narHash": "sha256-N8FJb+ohJ4Qt/m5RoAbwm3RP4VRjl+hA6PUCfjPhZo8=", "narHash": "sha256-KDfUObdMdMSM7prp2QO4f5DRCv9Z2TSCZEL0kFEBzN4=",
"owner": "Smaug123", "owner": "Smaug123",
"repo": "whisper.cpp", "repo": "whisper.cpp",
"rev": "04f8e0cdc73abe7c593b2c9405f0f590c51de95a", "rev": "8cbc79c799212037e1c7b45548179f9548ea77a5",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -3,7 +3,47 @@
../hardware/earthworm.nix ../hardware/earthworm.nix
]; ];
hardware.asahi.peripheralFirmwareDirectory = ../firmware; hardware.asahi.peripheralFirmwareDirectory = ./../firmware;
hardware.asahi = {
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "overlay";
setupAsahiSound = true;
withRust = true;
};
hardware.graphics.enable = true;
hardware.bluetooth.enable = true;
programs.light.enable = true;
services.actkbd = {
enable = true;
bindings = [
{
keys = [225];
events = ["key"];
command = "${pkgs.light}/bin/light -A 10";
}
{
keys = [224];
events = ["key"];
command = "${pkgs.light}/bin/light -U 10";
}
{
keys = [113];
events = ["key"];
command = "${pkgs.alsa-utils}/bin/amixer -q set Master toggle";
}
{
keys = [114];
events = ["key"];
command = "${pkgs.alsa-utils}/bin/amixer -q set Master 10- unmute";
}
{
keys = [115];
events = ["key"];
command = "${pkgs.alsa-utils}/bin/amixer -q set Master 10+ unmute";
}
];
};
boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false; boot.loader.efi.canTouchEfiVariables = false;
@@ -14,6 +54,10 @@
networking = { networking = {
hostName = "earthworm"; hostName = "earthworm";
networkmanager.enable = true; networkmanager.enable = true;
wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
}; };
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
@@ -31,10 +75,11 @@
environment.systemPackages = [ environment.systemPackages = [
pkgs.vim pkgs.vim
pkgs.wget pkgs.wget
pkgs.mesa-asahi-edge
]; ];
environment.loginShellInit = '' environment.loginShellInit = ''
[[ "$(tty)" == /dev/tty1 ]] && sway [[ "$(tty)" == /dev/tty1 ]] && export WLR_RENDER_NO_EXPLICIT_SYNC=1 && sway
''; '';
services.openssh.enable = true; services.openssh.enable = true;

View File

@@ -33,8 +33,8 @@
./modules/tmux.nix ./modules/tmux.nix
./modules/zsh.nix ./modules/zsh.nix
./modules/ripgrep.nix ./modules/ripgrep.nix
./modules/alacritty.nix
./modules/rust.nix ./modules/rust.nix
./modules/posix-sh.nix
(import ./modules/mail.nix (import ./modules/mail.nix
{ {
inherit mbsync secretsPath; inherit mbsync secretsPath;
@@ -269,39 +269,29 @@
nixpkgs.difftastic nixpkgs.difftastic
nixpkgs.syncthing nixpkgs.syncthing
nixpkgs.nodePackages_latest.dockerfile-language-server-nodejs nixpkgs.nodePackages_latest.dockerfile-language-server-nodejs
nixpkgs.nodePackages_latest.bash-language-server
nixpkgs.nodePackages_latest.vscode-json-languageserver nixpkgs.nodePackages_latest.vscode-json-languageserver
nixpkgs.nodePackages_latest.vscode-langservers-extracted nixpkgs.nodePackages_latest.vscode-langservers-extracted
nixpkgs.hadolint nixpkgs.hadolint
nixpkgs.yaml-language-server nixpkgs.yaml-language-server
nixpkgs.csharp-ls
nixpkgs.netcoredbg nixpkgs.netcoredbg
nixpkgs.nil nixpkgs.nil
nixpkgs.fsautocomplete nixpkgs.fsautocomplete
nixpkgs.wget nixpkgs.wget
nixpkgs.yt-dlp nixpkgs.yt-dlp
nixpkgs.cmake
nixpkgs.gnumake
nixpkgs.gcc
nixpkgs.lldb nixpkgs.lldb
nixpkgs.hledger nixpkgs.hledger
nixpkgs.hledger-web nixpkgs.hledger-web
dotnet dotnet
nixpkgs.elan nixpkgs.elan
nixpkgs.coreutils-prefixed nixpkgs.coreutils-prefixed
nixpkgs.shellcheck
nixpkgs.universal-ctags
nixpkgs.asciinema nixpkgs.asciinema
nixpkgs.git-lfs nixpkgs.git-lfs
nixpkgs.imagemagick nixpkgs.imagemagick
nixpkgs.nixpkgs-fmt nixpkgs.nixpkgs-fmt
nixpkgs.lnav
nixpkgs.age nixpkgs.age
nixpkgs.nodejs
nixpkgs.pyright nixpkgs.pyright
nixpkgs.woodpecker-agent nixpkgs.woodpecker-agent
nixpkgs.lynx nixpkgs.lynx
nixpkgs.alejandra
nixpkgs.ffmpeg nixpkgs.ffmpeg
nixpkgs.bat nixpkgs.bat
nixpkgs.pandoc nixpkgs.pandoc
@@ -315,10 +305,13 @@
nixpkgs.font-awesome nixpkgs.font-awesome
nixpkgs.gopls nixpkgs.gopls
nixpkgs.go nixpkgs.go
nixpkgs.libiconv
] ]
++ ( ++ (
if nixpkgs.stdenv.isLinux if nixpkgs.stdenv.isLinux
then [ then [
nixpkgs.ghostty
nixpkgs.xwaylandvideobridge
nixpkgs.protonmail-bridge nixpkgs.protonmail-bridge
nixpkgs.pinentry nixpkgs.pinentry
nixpkgs.signal-desktop nixpkgs.signal-desktop
@@ -330,7 +323,7 @@
if machinename == "capybara" if machinename == "capybara"
then [ then [
nixpkgs.steam-run nixpkgs.steam-run
nixpkgs.discord nixpkgs.discord-canary
nixpkgs.anki-bin nixpkgs.anki-bin
] ]
else [] else []

View File

@@ -13,7 +13,7 @@
{command = "${nixpkgs.waybar}/bin/waybar";} {command = "${nixpkgs.waybar}/bin/waybar";}
]; ];
}; };
extraConfig = builtins.readFile ./sway.conf; extraConfig = builtins.replaceStrings ["@@WL-COPY@@" "@@GRIM@@" "@@SLURP@@"] ["${nixpkgs.wl-clipboard}/bin/wl-copy" "${nixpkgs.grim}/bin/grim" "${nixpkgs.slurp}/bin/slurp"] (builtins.readFile ./sway.conf);
}; };
programs.waybar = { programs.waybar = {
@@ -178,7 +178,7 @@
"menu" = "on-click"; "menu" = "on-click";
"menu-file" = ./modules/waybar/power_menu.xml; "menu-file" = ./modules/waybar/power_menu.xml;
"menu-actions" = { "menu-actions" = {
"shutdown" = "shutdown"; "shutdown" = "shutdown now";
"reboot" = "reboot"; "reboot" = "reboot";
"suspend" = "systemctl suspend"; "suspend" = "systemctl suspend";
"hibernate" = "systemctl hibernate"; "hibernate" = "systemctl hibernate";

View File

@@ -1,18 +0,0 @@
{pkgs, ...}: {
programs.alacritty = {
enable = true;
settings = {
font = {
normal = {
family = "FiraCode Nerd Font Mono";
};
};
terminal = {shell = "${pkgs.zsh}/bin/zsh";};
};
};
home.packages = [
pkgs.alacritty
(pkgs.nerdfonts.override {fonts = ["FiraCode" "DroidSansMono"];})
];
}

View File

@@ -0,0 +1,9 @@
{pkgs, ...}: {
programs.ghostty = {
enable = true;
};
home.packages = [
pkgs.ghostty
];
}

View File

@@ -0,0 +1,6 @@
{pkgs, ...}: {
home.packages = [
pkgs.shellcheck
pkgs.nodePackages_latest.bash-language-server
];
}

View File

@@ -29,8 +29,8 @@ zle -N edit-command-line
bindkey '^X^E' edit-command-line bindkey '^X^E' edit-command-line
bindkey -e bindkey -e
PATH="$PATH:$HOME/.cargo/bin"
if [[ -z "$TMUX" ]]; then if [[ -z "$TMUX" ]]; then
tmux new-session -A -s default tmux new-session -A -s default
fi fi
ttyctl -f

View File

@@ -2,3 +2,12 @@ output Unknown-1 scale 2
input * { input * {
xkb_layout "gb" xkb_layout "gb"
} }
# capture all screens to clipboard
bindsym Shift+Print exec @@GRIM@@ - | @@WL-COPY@@
# capture the specified screen area to clipboard
bindsym Shift+Alt+Print exec @@GRIM@@ -g "$(@@SLURP@@)" - | @@WL-COPY@@
# capture the focused monitor to clipboard
bindsym Shift+Control+Print exec @@GRIM@@ -o $(swaymsg -t get_outputs | jq -r '.[] | select(.focused) | .name') - | @@WL-COPY@@