added an overlay, the foot terminal and hypr stuff

This commit is contained in:
Charlie Root 2024-04-12 19:22:28 +02:00
commit 509b1f4aa9
15 changed files with 744 additions and 4 deletions

View file

@ -8,5 +8,7 @@ _: {
./schizofox.nix
./zathura.nix
./obs.nix
./foot.nix
# ./vivado.nix
];
}

121
modules/gui/foot.nix Normal file
View file

@ -0,0 +1,121 @@
{
config,
inputs,
lib,
pkgs,
...
}: with lib; let
cfg = config.myOptions.programs.foot;
username = config.myOptions.other.system.username;
in {
options.myOptions.programs.foot = {
enable = mkEnableOption "foot";
server = mkEnableOption "foot server mode";
};
config = mkIf cfg.enable {
environment.sessionVariables = {
TERM = "foot";
};
home-manager.users.${username} = {
programs.foot = {
enable = true;
package = inputs.nixpkgs-wayland.packages.${pkgs.system}.foot;
server.enable = cfg.server;
settings = {
main = {
term = "foot";
app-id = "foot";
title = "foot";
locked-title = "no";
font = "JetBrains Mono Nerd Font:size=16";
line-height = 20;
letter-spacing = 0;
horizontal-letter-offset = 0;
vertical-letter-offset = -0.75;
box-drawings-uses-font-glyphs = "no";
dpi-aware = "no";
initial-window-size-chars = "104x36";
initial-window-mode = "windowed";
pad = "5x5 center";
resize-delay-ms = 100;
notify = "${pkgs.libnotify}/bin/notify-send -a \${app-id} -i \${app-id} \${title} \${body}";
bold-text-in-bright = "no";
word-delimiters = ",`|:\"'()[]{}<>";
selection-target = "primary";
};
bell = {
urgent = "yes";
notify = "yes";
command = "notify-send bell";
command-focused = "no";
};
scrollback = {
lines = 100000;
multiplier = 10.0;
indicator-position = "relative";
indicator-format = "line";
};
url = {
launch = "${pkgs.xdg-utils}/bin/xdg-open \${url}";
label-letters = "sadfjklewcmpgh";
osc8-underline = "always";
protocols = "http, https, ftp, ftps, file, gemini, gopher, irc, ircs";
uri-characters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.,~:;/?#@!$&%*+=\"'()[]";
};
cursor = {
style = "block";
blink = "no";
};
mouse = {
hide-when-typing = "yes";
alternate-scroll-mode = "yes";
};
colors = {
alpha = 0.85;
foreground = "cdd6f4"; # Text
background = "1e1e2e"; # Base
regular0 = "45475a"; # Surface 1
regular1 = "f38ba8"; # red
regular2 = "a6e3a1"; # green
regular3 = "f9e2af"; # yellow
regular4 = "89b4fa"; # blue
regular5 = "f5c2e7"; # pink
regular6 = "94e2d5"; # teal
regular7 = "bac2de"; # Subtext 1
bright0 = "585b70"; # Surface 2
bright1 = "f38ba8"; # red
bright2 = "a6e3a1"; # green
bright3 = "f9e2af"; # yellow
bright4 = "89b4fa"; # blue
bright5 = "f5c2e7"; # pink
bright6 = "94e2d5"; # teal
bright7 = "a6adc8"; # Subtext 0
};
csd = {
preferred = "server";
};
key-bindings = {
show-urls-launch = "Control+Shift+u";
unicode-input = "Control+Shift+i";
};
mouse-bindings = {
selection-override-modifiers = "Shift";
primary-paste = "BTN_MIDDLE";
select-begin = "BTN_LEFT";
select-begin-block = "Control+BTN_LEFT";
select-extend = "BTN_RIGHT";
select-extend-character-wise = "Control+BTN_RIGHT";
select-word = "BTN_LEFT-2";
select-word-whitespace = "Control+BTN_LEFT-2";
#select-row = "BTN_LEFT-3";
};
};
};
};
};
}

52
modules/gui/vivado.nix Normal file
View file

@ -0,0 +1,52 @@
{ pkgs, nur, ...}:
let
vivado-desktop-symbol = pkgs.makeDesktopItem {
name = "vivado-2022_2";
desktopName = "Vivado";
exec = "${pkgs.nur.repos.lschuermann.vivado-2022_2}/bin/vivado";
};
in
{
environment.systemPackages = with pkgs; [
# this propietary software is huge, but I need it for
# university
pkgs.nur.repos.lschuermann.vivado-2022_2
vivado-desktop-symbol
];
# Create udev rules. Reference: https://blog.kotatsu.dev/posts/2021-09-14-vivado-on-nixos/
services.udev.packages = [
(pkgs.writeTextFile {
name = "xilinx-dilligent-usb-udev";
destination = "/etc/udev/rules.d/52-xilinx-digilent-usb.rules";
text = ''
ATTR{idVendor}=="1443", MODE:="666"
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Digilent", MODE:="666"
'';
})
(pkgs.writeTextFile {
name = "xilinx-pcusb-udev";
destination = "/etc/udev/rules.d/52-xilinx-pcusb.rules";
text = ''
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0008", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0007", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0009", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="000d", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="000f", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0013", MODE="666"
ATTR{idVendor}=="03fd", ATTR{idProduct}=="0015", MODE="666"
'';
})
(pkgs.writeTextFile {
name = "xilinx-ftdi-usb-udev";
destination = "/etc/udev/rules.d/52-xilinx-ftdi-usb.rules";
text = ''
ACTION=="add", ATTR{idVendor}=="0403", ATTR{manufacturer}=="Xilinx", MODE:="666"
'';
})
];
}

View file

@ -6,3 +6,4 @@ _: {
./displaymanager.nix
];
}