5 Commits

Author SHA1 Message Date
Smaug123
ef0d29ba6f Pipewire 2024-10-23 21:50:38 +01:00
Smaug123
9e79528620 Extract Sway config 2024-10-22 00:21:51 +01:00
Smaug123
25c2ca91c8 font-awesome 2024-10-22 00:20:06 +01:00
Smaug123
b3661558ba Better 2024-10-22 00:18:12 +01:00
Smaug123
0972b16055 Use waybar 2024-10-21 23:29:39 +01:00
14 changed files with 125 additions and 133 deletions

1
.envrc
View File

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

1
.gitignore vendored
View File

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

View File

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

98
flake.lock generated
View File

@@ -7,11 +7,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1737610453,
"narHash": "sha256-OLgl/kgjOmDFrkU04PlqVklXj1m9y8xF7xbD+blAdg8=",
"lastModified": 1725418254,
"narHash": "sha256-2zPzPP9Eu5NxgJxTVcuCCX5xh7CWy7rYaLHfaAZS6H8=",
"owner": "tpwrules",
"repo": "nixos-apple-silicon",
"rev": "1f7bdbb82f6b9ec1d8d206e2c64d36f13bae91a1",
"rev": "c5f944f49a052232015bb3c03524b69e3fdd2aa4",
"type": "github"
},
"original": {
@@ -27,11 +27,11 @@
]
},
"locked": {
"lastModified": 1737504076,
"narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=",
"lastModified": 1729382845,
"narHash": "sha256-REiWck1zIOnZIgGmmOWfwvkQw1f4UrBsxxOSKVSAG4w=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3",
"rev": "a001f44cfc47164839eb61c6b1e7f4288813f7e8",
"type": "github"
},
"original": {
@@ -43,17 +43,18 @@
},
"emacs": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1737770462,
"narHash": "sha256-d+VpkYISLIBRvSFUCyPbpcanPCheC7THbW2cbgTlb/s=",
"lastModified": 1729390258,
"narHash": "sha256-z4Hg8k6iXIV55lA8HUntfJBdBzxOuG8M4ftWoJhrVqU=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "1daea5ddf4cebd26c500f265edbeb62d679c7ff7",
"rev": "89860b1c343648e8d71b6820e9311b98353ff14e",
"type": "github"
},
"original": {
@@ -82,11 +83,29 @@
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
@@ -102,11 +121,11 @@
]
},
"locked": {
"lastModified": 1737762889,
"narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=",
"lastModified": 1729321331,
"narHash": "sha256-KVyQq+ez/oB30/WbdNgVD8g/bda34z8NiU187QKQb74=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "daf04c5950b676f47a794300657f1d3d14c1a120",
"rev": "122f70545b29ccb922e655b08acfe05bfb44ec68",
"type": "github"
},
"original": {
@@ -129,11 +148,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1737469691,
"narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=",
"lastModified": 1725103162,
"narHash": "sha256-Ym04C5+qovuQDYL/rKWSR+WESseQBbNAe5DsXNx5trY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab",
"rev": "12228ff1752d7b7624a54e9c1af4b222b3c1073b",
"type": "github"
},
"original": {
@@ -145,27 +164,27 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1737672001,
"narHash": "sha256-YnHJJ19wqmibLQdUeq9xzE6CjrMA568KN/lFPuSVs4I=",
"lastModified": 1729181673,
"narHash": "sha256-LDiPhQ3l+fBjRATNtnuDZsBS7hqoBtPkKBkhpoBHv3I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "035f8c0853c2977b24ffc4d0a42c74f00b182cd8",
"rev": "4eb33fe664af7b41a4c446f87d20c9a0a6321fa3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1737717945,
"narHash": "sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM=",
"lastModified": 1729265718,
"narHash": "sha256-4HQI+6LsO3kpWTYuVGIzhJs1cetFcwT7quWCk/6rqeo=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ecd26a469ac56357fd333946a99086e992452b6a",
"rev": "ccc0c2126893dd20963580b6478d1a10a4512185",
"type": "github"
},
"original": {
@@ -177,11 +196,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1734254970,
"narHash": "sha256-yZzYWWWeOqSFvIirHzY1SJiuSBPmXIYJFhyt+1zkv8A=",
"lastModified": 1695033101,
"narHash": "sha256-RQ4m+ycjdLdass7Hr4+Lzwnjw7wGhcUkKqWiJS3YxPM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d388ee0ec8c623389ab3a7caead258a94cec14de",
"rev": "d941d9491804e0ca01e03468dbf6f8d3a7919a16",
"type": "github"
},
"original": {
@@ -231,18 +250,33 @@
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"whisper": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"model": "model",
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1734268803,
"narHash": "sha256-KDfUObdMdMSM7prp2QO4f5DRCv9Z2TSCZEL0kFEBzN4=",
"lastModified": 1704121968,
"narHash": "sha256-N8FJb+ohJ4Qt/m5RoAbwm3RP4VRjl+hA6PUCfjPhZo8=",
"owner": "Smaug123",
"repo": "whisper.cpp",
"rev": "8cbc79c799212037e1c7b45548179f9548ea77a5",
"rev": "04f8e0cdc73abe7c593b2c9405f0f590c51de95a",
"type": "github"
},
"original": {

View File

@@ -1,6 +1,8 @@
{
pkgs,
config,
username,
dotnet,
...
}: {
nixpkgs.config.allowUnfree = true;
@@ -10,26 +12,33 @@
hardware.graphics = {
enable = true;
enable32Bit = true;
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
services.xserver.videoDrivers = ["nvidia"];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
# I don't have a Turing GPU
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
};
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.grub.useOSProber = true;
boot.kernelParams = [
"video=DP-1:2560x1440@144"
"video=HDMI-A-1:1920x1080@144"
];
boot.extraModulePackages = [config.boot.kernelPackages.rtl8821au];
networking = {

View File

@@ -3,47 +3,7 @@
../hardware/earthworm.nix
];
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";
}
];
};
hardware.asahi.peripheralFirmwareDirectory = ../firmware;
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
@@ -54,10 +14,6 @@
networking = {
hostName = "earthworm";
networkmanager.enable = true;
wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
};
time.timeZone = "Europe/London";
@@ -75,11 +31,10 @@
environment.systemPackages = [
pkgs.vim
pkgs.wget
pkgs.mesa-asahi-edge
];
environment.loginShellInit = ''
[[ "$(tty)" == /dev/tty1 ]] && export WLR_RENDER_NO_EXPLICIT_SYNC=1 && sway
[[ "$(tty)" == /dev/tty1 ]] && sway
'';
services.openssh.enable = true;

View File

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

View File

@@ -13,7 +13,7 @@
{command = "${nixpkgs.waybar}/bin/waybar";}
];
};
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);
extraConfig = builtins.readFile ./sway.conf;
};
programs.waybar = {
@@ -157,7 +157,7 @@
"car" = "";
"default" = ["" "" ""];
};
"on-click" = "${nixpkgs.pavucontrol}/bin/pavucontrol";
"on-click" = "pavucontrol";
};
"custom/media" = {
"format" = "{icon} {text}";
@@ -178,7 +178,7 @@
"menu" = "on-click";
"menu-file" = ./modules/waybar/power_menu.xml;
"menu-actions" = {
"shutdown" = "shutdown now";
"shutdown" = "shutdown";
"reboot" = "reboot";
"suspend" = "systemctl suspend";
"hibernate" = "systemctl hibernate";

View File

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

View File

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

View File

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

View File

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

View File

@@ -15,8 +15,6 @@ local schemas = {
require("lspconfig")["clangd"].setup({})
require("lspconfig")["gopls"].setup({})
require("lspconfig")["yamlls"].setup({
settings = {
yaml = {

View File

@@ -2,12 +2,3 @@ output Unknown-1 scale 2
input * {
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@@