Compare commits

...

23 Commits

Author SHA1 Message Date
Jan-Bulthuis f98b995b80 System update 2025-02-12 03:37:45 +01:00
Jan-Bulthuis c44bffaeb0 Made quit action repeating 2025-02-12 03:35:09 +01:00
Jan-Bulthuis 4f4e2087b0 Updated river configuration 2025-02-12 03:32:53 +01:00
Jan-Bulthuis a04f791e06 Ly implementation 2025-02-12 03:23:49 +01:00
Jan-Bulthuis fa95171f28 Code cleanup 2025-02-12 02:18:58 +01:00
Jan-Bulthuis 4c04d14d8f Fixed dina-psf 2025-02-12 02:17:20 +01:00
Jan-Bulthuis 86f4a23831 Corrected filename 2025-02-12 00:57:09 +01:00
Jan-Bulthuis e3877111b5 Added sfm file 2025-02-12 00:54:56 +01:00
Jan-Bulthuis 2374c19a0f Added custom fontset 2025-02-12 00:40:12 +01:00
Jan-Bulthuis 5995d1ea37 Progress on dina-psf 2025-02-11 23:01:54 +01:00
Jan-Bulthuis fc5429a981 Added ly dependencies 2025-02-11 22:33:14 +01:00
Jan-Bulthuis b453a32d70 Added overlay package for ly 2025-02-11 22:28:25 +01:00
Jan-Bulthuis f94242e4b5 Removed dina-vector 2025-02-11 22:27:40 +01:00
Jan-Bulthuis 7a1dca2a96 Added ly as displaymanager 2025-02-11 22:21:52 +01:00
Jan-Bulthuis f9bf846c72 Modified font 2025-02-11 19:31:06 +01:00
Jan-Bulthuis 4400dc070f Fixed font 2025-02-11 19:30:26 +01:00
Jan-Bulthuis 555c48dc3b Removed console 2025-02-11 19:30:20 +01:00
Jan-Bulthuis 2c533f6f57 Added derivation for ttf2psf 2025-02-11 18:45:13 +01:00
Jan-Bulthuis 7bd321e3f6 Added config file for console 2025-02-11 18:15:04 +01:00
Jan-Bulthuis 1e8b56f03b Moved from overrides to overlay for custom packages 2025-02-11 16:09:01 +01:00
Jan-Bulthuis fc5a748fa5 Created dina-psf package 2025-02-11 15:48:55 +01:00
Jan-Bulthuis 1b35d92f6b Adding dina as console font 2025-02-11 13:27:35 +01:00
Jan-Bulthuis 750ca2f3a8 Added GDM 2025-02-11 12:24:10 +01:00
14 changed files with 417 additions and 155 deletions

View File

@ -53,16 +53,17 @@
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1735953590,
"narHash": "sha256-YbQwaApLFJobn/0lbpMKcJ8N5axKlW2QIGkDS5+xoSU=",
"lastModified": 1732806396,
"narHash": "sha256-e0bpPySdJf0F68Ndanwm+KWHgQiZ0s7liLhvJSWDNsA=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "c2a1232aa2c0ed27dcbf005779bcfe0e0ab5e85d",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "577fe8125d74ff456cf942c733a85d769afe58b7",
"type": "github"
}
},
@ -157,11 +158,11 @@
]
},
"locked": {
"lastModified": 1736143030,
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
@ -384,11 +385,11 @@
]
},
"locked": {
"lastModified": 1737762889,
"narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=",
"lastModified": 1739314552,
"narHash": "sha256-ggVf2BclyIW3jexc/uvgsgJH4e2cuG6Nyg54NeXgbFI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "daf04c5950b676f47a794300657f1d3d14c1a120",
"rev": "83bd3a26ac0526ae04fa74df46738bb44b89dcdd",
"type": "github"
},
"original": {
@ -405,11 +406,11 @@
]
},
"locked": {
"lastModified": 1737762889,
"narHash": "sha256-5HGG09bh/Yx0JA8wtBMAzt0HMCL1bYZ93x4IqzVExio=",
"lastModified": 1738878603,
"narHash": "sha256-fmhq8B3MvQLawLbMO+LWLcdC2ftLMmwSk+P29icJ3tE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "daf04c5950b676f47a794300657f1d3d14c1a120",
"rev": "433799271274c9f2ab520a49527ebfe2992dcfbd",
"type": "github"
},
"original": {
@ -426,11 +427,11 @@
]
},
"locked": {
"lastModified": 1736785676,
"narHash": "sha256-TY0jUwR3EW0fnS0X5wXMAVy6h4Z7Y6a3m+Yq++C9AyE=",
"lastModified": 1737630279,
"narHash": "sha256-wJQCxyMRc4P26zDrHmZiRD5bbfcJpqPG3e2djdGG3pk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "fc52a210b60f2f52c74eac41a8647c1573d2071d",
"rev": "0db5c8bfcce78583ebbde0b2abbc95ad93445f7c",
"type": "github"
},
"original": {
@ -475,11 +476,11 @@
]
},
"locked": {
"lastModified": 1737504076,
"narHash": "sha256-/B4XJnzYU/6K1ZZOBIgsa3K4pqDJrnC2579c44c+4rI=",
"lastModified": 1738743987,
"narHash": "sha256-O3bnAfsObto6l2tQOmQlrO6Z2kD6yKwOWfs7pA0CpOc=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "65cc1fa8e36ceff067daf6cfb142331f02f524d3",
"rev": "ae406c04577ff9a64087018c79b4fdc02468c87c",
"type": "github"
},
"original": {
@ -496,11 +497,11 @@
]
},
"locked": {
"lastModified": 1737840943,
"narHash": "sha256-64j4mytkcPjd+k8KwDRzti/mc5cOJgY/LeOxbAykoag=",
"lastModified": 1739286116,
"narHash": "sha256-618wom6GTRr8bNStidWo8y39NJfpX530pOThWALmDuw=",
"owner": "doronbehar",
"repo": "nix-matlab",
"rev": "4151ee1768ae1842f3505c0927eefbc977fcf046",
"rev": "d3590698a626e135e8dc6e350089a308a72ef539",
"type": "gitlab"
},
"original": {
@ -511,11 +512,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1737746512,
"narHash": "sha256-nU6AezEX4EuahTO1YopzueAXfjFfmCHylYEFCagduHU=",
"lastModified": 1739214665,
"narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "825479c345a7f806485b7f00dbe3abb50641b083",
"rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a",
"type": "github"
},
"original": {
@ -527,11 +528,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1737717945,
"narHash": "sha256-ET91TMkab3PmOZnqiJQYOtSGvSTvGeHoegAv4zcTefM=",
"lastModified": 1738797219,
"narHash": "sha256-KRwX9Z1XavpgeSDVM/THdFd6uH8rNm/6R+7kIbGa+2s=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ecd26a469ac56357fd333946a99086e992452b6a",
"rev": "1da52dd49a127ad74486b135898da2cef8c62665",
"type": "github"
},
"original": {
@ -570,11 +571,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1737832569,
"narHash": "sha256-VkK73VRVgvSQOPw9qx9HzvbulvUM9Ae4nNd3xNP+pkI=",
"lastModified": 1739121491,
"narHash": "sha256-BEmyAozR3Pc2qwPtC4rgUglzi3cw4nv4fXEY23NxOrQ=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "d7df58321110d3b0e12a829bbd110db31ccd34b1",
"rev": "13341a4c1238b7974e7bad9c7a6d5c51ca3cf81a",
"type": "github"
},
"original": {
@ -592,11 +593,11 @@
"treefmt-nix": "treefmt-nix_2"
},
"locked": {
"lastModified": 1737897819,
"narHash": "sha256-oVr0st3IHSgIPLDCoDtbI/TiLcMqs85KGBfLqFV3xQU=",
"lastModified": 1739229047,
"narHash": "sha256-sSTgA86wdk8d544c2+gzrfvVPHQF4mbsomvLOW2thn0=",
"owner": "nix-community",
"repo": "NUR",
"rev": "ee6e560d3cbfdbb2d92d1d95c83aaa434ed42dc5",
"rev": "8348d89f30598a73fee7efb4b5d34c3de201e71b",
"type": "github"
},
"original": {
@ -615,11 +616,11 @@
]
},
"locked": {
"lastModified": 1737372689,
"narHash": "sha256-nH3zK2ki0fd5o5qvbGHxukE4qnOLJa1uCzoDObG5vrE=",
"lastModified": 1738508923,
"narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=",
"owner": "NuschtOS",
"repo": "search",
"rev": "570cc17bbc25650eb7d69e4fcda8cfd2f1656922",
"rev": "86e2038290859006e05ca7201425ea5b5de4aecb",
"type": "github"
},
"original": {
@ -655,15 +656,16 @@
"systems": "systems_3",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-schemes": "tinted-schemes",
"tinted-tmux": "tinted-tmux",
"tinted-zed": "tinted-zed"
},
"locked": {
"lastModified": 1737861120,
"narHash": "sha256-V/GWU1BQwbxyZif9RBvwn10S1KX+86uPkkI41KQEcQQ=",
"lastModified": 1739309576,
"narHash": "sha256-IMK19j1b2VH44lUad2/3BSski9T4ecrCHFlkjKWQV2o=",
"owner": "danth",
"repo": "stylix",
"rev": "d6951d0b2ffe74e4779a180e9b6a0e17627756e1",
"rev": "d8289c3f0e5995863921ea207392c122f5d59f6d",
"type": "github"
},
"original": {
@ -751,6 +753,22 @@
"type": "github"
}
},
"tinted-schemes": {
"flake": false,
"locked": {
"lastModified": 1737565458,
"narHash": "sha256-y+9cvOA6BLKT0WfebDsyUpUa/YxKow9hTjBp6HpQv68=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "ae31625ba47aeaa4bf6a98cf11a8d4886f9463d9",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
@ -791,11 +809,11 @@
]
},
"locked": {
"lastModified": 1737483750,
"narHash": "sha256-5An1wq5U8sNycOBBg3nsDDgpwBmR9liOpDGlhliA6Xo=",
"lastModified": 1738680491,
"narHash": "sha256-8X7tR3kFGkE7WEF5EXVkt4apgaN85oHZdoTGutCFs6I=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "f2cc121df15418d028a59c9737d38e3a90fbaf8f",
"rev": "64dbb922d51a42c0ced6a7668ca008dded61c483",
"type": "github"
},
"original": {

View File

@ -36,6 +36,7 @@ in
# usbutils
# udiskie
# udisks
brightnessctl
];
security.krb5 = {
@ -60,7 +61,7 @@ in
fontconfig.enable = true;
neovim.enable = true;
systemd-boot.enable = true;
tuigreet.enable = true; # TODO: Re-enable
ly.enable = true;
};
# TODO: Remove everything below, it is here out of convenience and should be elsewhere
@ -100,38 +101,11 @@ in
# services.gvfs.enable = true;
services.udisks2.enable = true;
# TODO: Remove?
# Temporarily disable nvidia dgpu
# boot.extraModprobeConfig = ''
# blacklist nouveau
# options nouveau modeset=0
# '';
# services.udev.extraRules = ''
# # Remove NVIDIA USB xHCI Host Controller devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA USB Type-C UCSI devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA Audio devices, if present
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
# # Remove NVIDIA VGA/3D controller devices
# ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
# '';
# boot.blacklistedKernelModules = [
# "nouveau"
# "nvidia"
# ];
# TODO: Move to module
# Adds gnome as DE
# modules.greetd.enable = lib.mkForce false;
# modules.tuigreet.enable = lib.mkForce false;
# services.xserver = {
# enable = true;
# displayManager.gdm.enable = true;
# desktopManager.gnome.enable = true;
# };
console.packages = [
pkgs.dina-psf
];
console.font = "dina";
console.earlySetup = true;
boot.loader.timeout = 0;
};
}

View File

@ -19,6 +19,7 @@ with lib;
./graphics/default.nix
./greeter/greetd/default.nix
./greeter/greetd/tuigreet.nix
./greeter/ly/default.nix
./locale/default.nix
./neovim/default.nix
./networkmanager/default.nix

View File

@ -0,0 +1,29 @@
{
config,
lib,
...
}:
with lib;
let
cfg = config.modules.ly;
in
{
options.modules.ly = {
enable = mkEnableOption "ly";
};
config = mkIf cfg.enable {
services.displayManager.ly = {
enable = true;
settings = {
animation = "matrix";
animation_refresh_ms = 32;
box_title = "Hewwo! >_< :3";
clear_password = true;
load = true;
save = true;
};
};
};
}

View File

@ -2,13 +2,17 @@
...
}:
{
nixpkgs.config = {
packageOverrides = pkgs: {
dina-vector = pkgs.callPackage ./fonts/dina-vector.nix { };
wqy-zenhei = pkgs.callPackage ./fonts/wqy-zenhei.nix { };
wqy-microhei = pkgs.callPackage ./fonts/wqy-microhei.nix { };
wqy-bitmapsong = pkgs.callPackage ./fonts/wqy-bitmapsong.nix { };
};
let
overlay = final: prev: {
dina-psf = prev.callPackage ./fonts/dina-psf.nix { };
ttf2psf = prev.callPackage ./fonts/ttf2psf.nix { };
wqy-zenhei = prev.callPackage ./fonts/wqy-zenhei.nix { };
wqy-microhei = prev.callPackage ./fonts/wqy-microhei.nix { };
wqy-bitmapsong = prev.callPackage ./fonts/wqy-bitmapsong.nix { };
# ly = prev.callPackage ./programs/ly/default.nix { };
};
in
{
nixpkgs.overlays = [ overlay ];
}

75
pkgs/fonts/dina-psf.nix Normal file
View File

@ -0,0 +1,75 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "dina-psfu";
version = "1.0.0";
src = pkgs.fetchzip {
url = "https://www.dcmembers.com/jibsen/download/61/?wpdmdl=61";
hash = "sha256-JK+vnOyhAbwT825S+WKbQuWgRrfZZHfyhaMQ/6ljO8s=";
extension = "zip";
stripRoot = false;
};
buildInputs = with pkgs; [
bdf2psf
fontforge
];
buildPhase = ''
# Get the base Dina font
cp BDF/Dina_r400-9.bdf ./dina.bdf
# Set the AVERAGE_WIDTH property on the font
sed 's/STARTPROPERTIES 16/STARTPROPERTIES 17\
AVERAGE_WIDTH 70/' ./dina.bdf > ./dina-mod.bdf
# Reencode the font from code page CP1252 (Windows) to unicode
fontforge -lang=ff -c "Open(\"dina-mod.bdf\"); Reencode(\"win\", 1); Reencode(\"iso10646-1\"); Generate(\"dina-enc.bdf\")"
mv dina-enc-*.bdf dina-enc.bdf
# Move the artsy characters around
sed -i 's/STARTCHAR uni000E$/STARTCHAR uni2518/' ./dina-enc.bdf
sed -i 's/ENCODING 14$/ENCODING 9496/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni000F$/STARTCHAR uni2514/' ./dina-enc.bdf
sed -i 's/ENCODING 15$/ENCODING 9492/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0010$/STARTCHAR uni250C/' ./dina-enc.bdf
sed -i 's/ENCODING 16$/ENCODING 9484/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0011$/STARTCHAR uni2510/' ./dina-enc.bdf
sed -i 's/ENCODING 17$/ENCODING 9488/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0012$/STARTCHAR uni2500/' ./dina-enc.bdf
sed -i 's/ENCODING 18$/ENCODING 9472/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0013$/STARTCHAR uni2502/' ./dina-enc.bdf
sed -i 's/ENCODING 19$/ENCODING 9474/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0014$/STARTCHAR uni2524/' ./dina-enc.bdf
sed -i 's/ENCODING 20$/ENCODING 9508/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0015$/STARTCHAR uni2534/' ./dina-enc.bdf
sed -i 's/ENCODING 21$/ENCODING 9524/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0016$/STARTCHAR uni251C/' ./dina-enc.bdf
sed -i 's/ENCODING 22$/ENCODING 9500/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0017$/STARTCHAR uni252C/' ./dina-enc.bdf
sed -i 's/ENCODING 23$/ENCODING 9516/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0018$/STARTCHAR uni253C/' ./dina-enc.bdf
sed -i 's/ENCODING 24$/ENCODING 9532/' ./dina-enc.bdf
sed -i 's/STARTCHAR uni0019$/STARTCHAR uni2592/' ./dina-enc.bdf
sed -i 's/ENCODING 25$/ENCODING 9618/' ./dina-enc.bdf
# Create the equivalents file
touch empty.equivalents
# Convert the bdf to psf
bdf2psf --fb ./dina-enc.bdf \
./empty.equivalents \
${pkgs.bdf2psf}/share/bdf2psf/fontsets/Uni2.512 \
512 ./dina.psfu ./dina.sfm
'';
installPhase = ''
install -Dm644 -t $out/debug ./*.*
install -Dm644 -t $out/debug/BDF ./BDF/*.*
install -Dm644 -t $out/share/consolefonts dina.psfu
'';
}

View File

@ -1,30 +0,0 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "dina-font";
version = "1.0.0";
# src = pkgs.fetchurl {
# url = "mirror://sourceforge/wqy/${pname}-${version}.tar.gz";
# # hash = "sha256-r2Vf7ftJCqu7jOc2AqCKaoR/r8eNw2P/OQGqbDOEyl0=";
# hash = "sha256-0uvwkRUbvJ0remTnlP8dElRjaBVd6iukNYBTE/CTO7s=";
# };
unpackPhase = "true";
buildInputs = [
pkgs.fontforge
pkgs.dina-font
pkgs.wqy-bitmapsong
pkgs.tree
];
buildPhase = ''
tree > debug.txt
'';
installPhase = ''
install -Dm644 $out/debug.txt
'';
}

31
pkgs/fonts/ttf2psf.nix Normal file
View File

@ -0,0 +1,31 @@
{
pkgs,
...
}:
pkgs.stdenv.mkDerivation {
pname = "ttf2psf";
version = "1.0.0";
src = pkgs.fetchFromGitHub {
owner = "NateChoe1";
repo = "ttf2psf";
rev = "8db09d05385f595c320eccae4c48ff4393ca5bde";
sha256 = "v52TZp+GyXHBAMsIoHFA8ZIMPsDVls13WW29vpesCig=";
};
buildInputs = with pkgs; [
pkg-config
freetype
];
buildPhase = ''
make build/ttf2psf
'';
installPhase = ''
install -Dm 755 -t $out/bin build/ttf2psf
install -Dm 644 -t $out/share/ttf2psf data/*.*
install -Dm 644 -t $out/share/ttf2psf/fontsets data/fontsets/*
'';
}

View File

@ -0,0 +1,47 @@
{
stdenv,
lib,
fetchFromGitHub,
linux-pam,
libxcb,
makeBinaryWrapper,
zig_0_12,
callPackage,
nixosTests,
}:
stdenv.mkDerivation {
pname = "ly";
version = "1.0.2";
src = fetchFromGitHub {
owner = "peterc-s";
repo = "ly";
rev = "e6d8bea236dd0097adb1c22e9a23d95102ebe9d9";
sha256 = "w9YdNVD+8UhrEbPJ7xqsd/WoxU2rlo2GXFtc9JpWHxo=";
};
nativeBuildInputs = [
makeBinaryWrapper
zig_0_12.hook
];
buildInputs = [
libxcb
linux-pam
];
postPatch = ''
ln -s ${callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
'';
passthru.tests = { inherit (nixosTests) ly; };
meta = with lib; {
description = "TUI display manager";
license = licenses.wtfpl;
homepage = "https://github.com/fairyglade/ly";
maintainers = [ maintainers.vidister ];
platforms = platforms.linux;
mainProgram = "ly";
};
}

110
pkgs/programs/ly/deps.nix Normal file
View File

@ -0,0 +1,110 @@
# generated by zon2nix (https://github.com/Cloudef/zig2nix)
{
lib,
linkFarm,
fetchurl,
fetchgit,
runCommandLocal,
zig,
name ? "zig-packages",
}:
let
unpackZigArtifact =
{ name, artifact }:
runCommandLocal name { nativeBuildInputs = [ zig ]; } ''
hash="$(zig fetch --global-cache-dir "$TMPDIR" ${artifact})"
mv "$TMPDIR/p/$hash" "$out"
chmod 755 "$out"
'';
fetchZig =
{
name,
url,
hash,
}:
let
artifact = fetchurl { inherit url hash; };
in
unpackZigArtifact { inherit name artifact; };
fetchGitZig =
{
name,
url,
hash,
}:
let
parts = lib.splitString "#" url;
base = lib.elemAt parts 0;
rev = lib.elemAt parts 1;
in
fetchgit {
inherit name rev hash;
url = base;
deepClone = false;
};
fetchZigArtifact =
{
name,
url,
hash,
}:
let
parts = lib.splitString "://" url;
proto = lib.elemAt parts 0;
path = lib.elemAt parts 1;
fetcher = {
"git+http" = fetchGitZig {
inherit name hash;
url = "http://${path}";
};
"git+https" = fetchGitZig {
inherit name hash;
url = "https://${path}";
};
http = fetchZig {
inherit name hash;
url = "http://${path}";
};
https = fetchZig {
inherit name hash;
url = "https://${path}";
};
file = unpackZigArtifact {
inherit name;
artifact = /. + path;
};
};
in
fetcher.${proto};
in
linkFarm name [
{
name = "122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b";
path = fetchZigArtifact {
name = "clap";
url = "https://github.com/Hejsil/zig-clap/archive/refs/tags/0.9.1.tar.gz";
hash = "sha256-7qxm/4xb+58MGG+iUzssUtR97OG2dRjAqyS0BAet4HY=";
};
}
{
name = "12209b971367b4066d40ecad4728e6fdffc4cc4f19356d424c2de57f5b69ac7a619a";
path = fetchZigArtifact {
name = "zigini";
url = "https://github.com/Kawaii-Ash/zigini/archive/0bba97a12582928e097f4074cc746c43351ba4c8.tar.gz";
hash = "sha256-OdaJ5tqmk2MPwaAbpK4HRD/CcQCN+Cjj8U63BqUcFMs=";
};
}
{
name = "1220b0979ea9891fa4aeb85748fc42bc4b24039d9c99a4d65d893fb1c83e921efad8";
path = fetchZigArtifact {
name = "ini";
url = "https://github.com/ziglibs/ini/archive/e18d36665905c1e7ba0c1ce3e8780076b33e3002.tar.gz";
hash = "sha256-RQ6OPJBqqH7PCL+xiI58JT7vnIo6zbwpLWn+byZO5iM=";
};
}
]

View File

@ -23,7 +23,7 @@ in
policies = {
AppAutoUpdate = false;
BlockAboutAddons = true;
BlockAboutAddons = false;
BlockAboutConfig = true;
BlockAboutProfiles = true;
DisableAppUpdate = true;
@ -50,6 +50,7 @@ in
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
tridactyl # TODO: Add toggle for this extension?
];
# Theming

View File

@ -23,7 +23,7 @@ in
enable = true;
extraConfig = ''
# config.set("completion.web_history.max_items", 30)
config.set("completion.web_history.max_items", 256)
config.set("colors.webpage.darkmode.enabled", False)
config.set("colors.webpage.preferred_color_scheme", "${if theme.darkMode then "dark" else "light"}")
config.set("fonts.default_family", "${theme.fonts.interface.name}")

View File

@ -65,7 +65,7 @@ in
settings =
let
layout = "filtile";
layoutOptions = "-outer-padding ${toString config.theming.layout.windowPadding} -view-padding ${toString config.theming.layout.windowPadding}";
layoutOptions = "-outer-padding ${toString config.theming.layout.windowPadding} -view-padding ${toString config.theming.layout.windowPadding} -main-ratio 0.5";
modes = [
"normal"
"locked"
@ -119,36 +119,54 @@ in
map = (
lib.attrsets.recursiveUpdate
{
"-repeat".normal = {
# Basic utilities
"${main} Q" = "close";
"${ssm} Return" = "spawn foot";
# Window focus
"${main} J" = "focus-view next";
"${main} K" = "focus-view previous";
# Swap windows
"${ssm} J" = "swap next";
"${ssm} K" = "swap previous";
"${main} Return" = "zoom";
# Main ratio
"${main} H" = "send-layout-cmd ${layout} 'main-ratio -0.05'";
"${main} L" = "send-layout-cmd ${layout} 'main-ratio +0.05'";
# Main count
"${ssm} H" = "send-layout-cmd ${layout} 'main-count +1'";
"${ssm} L" = "send-layout-cmd ${layout} 'main-count -1'";
# Move floating windows
"${sam} H" = "move left 100";
"${sam} J" = "move down 100";
"${sam} K" = "move up 100";
"${sam} L" = "move right 100";
# Resize floating windows
"${sas} H" = "resize horizontal -100";
"${sas} J" = "resize vertical 100";
"${sas} K" = "resize vertical -100";
"${sas} L" = "resize horizontal 100";
# Toggle modes
"${main} Space" = "toggle-float";
"${main} F" = "toggle-fullscreen";
};
normal =
{
"${main} Q" = "close";
"${ssm} E" = "exit";
# Basic utilities
"${ssm} E" = "exit";
"${main} X " = "spawn \"waylock -fork-on-lock ${waylockOptions}\"";
"${ssm} Return" = "spawn foot";
"${main} P" = "spawn \"rofi -show drun\"";
"${ssm} P" = "spawn rofi-rbw";
"${main} S" =
"spawn \"grim -g \\\"\\\$(slurp)\\\" ~/Images/Screenshots/\\\$(date +'%s_grim.png')\"";
# Window focus
"${main} J" = "focus-view next";
"${main} K" = "focus-view previous";
# Swap windows
"${ssm} J" = "swap next";
"${ssm} K" = "swap previous";
"${main} Return" = "zoom";
# Main ratio
"${main} H" = "send-layout-cmd ${layout} 'main-ratio -0.05'";
"${main} L" = "send-layout-cmd ${layout} 'main-ratio +0.05'";
# Main count
"${ssm} H" = "send-layout-cmd ${layout} 'main-count +1'";
"${ssm} L" = "send-layout-cmd ${layout} 'main-count -1'";
# Tags
"${main} 0" = "set-focused-tags ${toString (pow2 32 - 1)}";
"${ssm} 0" = "set-view-tags ${toString (pow2 32 - 1)}";
@ -159,27 +177,11 @@ in
"${main} Down" = "send-layout-cmd ${layout} \"main-location bottom\"";
"${main} Left" = "send-layout-cmd ${layout} \"main-location left\"";
# Move floating windows
"${sam} H" = "move left 100";
"${sam} J" = "move down 100";
"${sam} K" = "move up 100";
"${sam} L" = "move right 100";
# Snap floating windows
"${scam} H" = "snap left";
"${scam} J" = "snap down";
"${scam} K" = "snap up";
"${scam} L" = "snap right";
# Resize floating windows
"${sas} H" = "resize horizontal -100";
"${sas} J" = "resize vertical 100";
"${sas} K" = "resize vertical -100";
"${sas} L" = "resize horizontal 100";
# Toggle modes
"${main} Space" = "toggle-float";
"${main} F" = "toggle-fullscreen";
}
// builtins.listToAttrs (
builtins.concatLists (

View File

@ -41,7 +41,7 @@
theming.enable = true;
# Window manager
i3.enable = true;
i3.enable = false;
river.enable = true;
waylock.enable = true;
waybar.enable = true;