Compare commits
15 Commits
e2e97ac31e
...
8b988dcd8c
Author | SHA1 | Date |
---|---|---|
Oystein Kristoffer Tveit | 8b988dcd8c | |
Oystein Kristoffer Tveit | 17f019cbc0 | |
Oystein Kristoffer Tveit | db82ee3419 | |
Oystein Kristoffer Tveit | b3e782d716 | |
Oystein Kristoffer Tveit | 40d5a8af88 | |
Oystein Kristoffer Tveit | 9115c0c5c2 | |
Oystein Kristoffer Tveit | 1d8c2752f5 | |
Oystein Kristoffer Tveit | 7500197568 | |
Oystein Kristoffer Tveit | 0ea394dbf9 | |
Oystein Kristoffer Tveit | f7030546a5 | |
Oystein Kristoffer Tveit | 7d80f6941f | |
Oystein Kristoffer Tveit | ea541f2f2b | |
Oystein Kristoffer Tveit | 7d7d0868ce | |
Oystein Kristoffer Tveit | d47f1102e6 | |
Oystein Kristoffer Tveit | bd1cbe53b9 |
13
flake.nix
13
flake.nix
|
@ -95,12 +95,23 @@
|
||||||
nonrecursive-unstable-pkgs = import nixpkgs-unstable {
|
nonrecursive-unstable-pkgs = import nixpkgs-unstable {
|
||||||
inherit system;
|
inherit system;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
config.segger-jlink.acceptLicense = true;
|
||||||
|
config.permittedInsecurePackages = [
|
||||||
|
"segger-jlink-qt4-794s"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
in [
|
in [
|
||||||
(self: super: {
|
(self: super: {
|
||||||
inherit (nonrecursive-unstable-pkgs) atuin wstunnel;
|
inherit (nonrecursive-unstable-pkgs)
|
||||||
|
atuin
|
||||||
|
wstunnel
|
||||||
|
nrf-udev
|
||||||
|
nrfutil
|
||||||
|
;
|
||||||
})
|
})
|
||||||
|
|
||||||
|
(import ./overlays/wayland-ime-integration.nix)
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/pull/251706
|
# https://github.com/NixOS/nixpkgs/pull/251706
|
||||||
(self: super: {
|
(self: super: {
|
||||||
mozc = self.qt6Packages.callPackage ./package-overrides/mozc.nix { };
|
mozc = self.qt6Packages.callPackage ./package-overrides/mozc.nix { };
|
||||||
|
|
|
@ -95,7 +95,7 @@ let
|
||||||
vscode = "code.desktop";
|
vscode = "code.desktop";
|
||||||
mpv = "mpv.desktop";
|
mpv = "mpv.desktop";
|
||||||
zathura = "org.pwmt.zathura.desktop";
|
zathura = "org.pwmt.zathura.desktop";
|
||||||
sxiv = "sxiv.desktop";
|
nsxiv = "nsxiv.desktop";
|
||||||
font-viewer = "org.gnome.font-viewer.desktop";
|
font-viewer = "org.gnome.font-viewer.desktop";
|
||||||
in {
|
in {
|
||||||
xdg.configFile."mimeapps.list".force = true;
|
xdg.configFile."mimeapps.list".force = true;
|
||||||
|
@ -104,7 +104,7 @@ in {
|
||||||
# associations.added = {};
|
# associations.added = {};
|
||||||
# associations.removed = {};
|
# associations.removed = {};
|
||||||
defaultApplications =
|
defaultApplications =
|
||||||
(lib.mapAttrs' (_: v: lib.nameValuePair v sxiv) mime.image)
|
(lib.mapAttrs' (_: v: lib.nameValuePair v nsxiv) mime.image)
|
||||||
// (lib.mapAttrs' (_: v: lib.nameValuePair v mpv) mime.audio)
|
// (lib.mapAttrs' (_: v: lib.nameValuePair v mpv) mime.audio)
|
||||||
// (lib.mapAttrs' (_: v: lib.nameValuePair v mpv) mime.video)
|
// (lib.mapAttrs' (_: v: lib.nameValuePair v mpv) mime.video)
|
||||||
// (lib.mapAttrs' (_: v: lib.nameValuePair v font-viewer) mime.font)
|
// (lib.mapAttrs' (_: v: lib.nameValuePair v font-viewer) mime.font)
|
||||||
|
|
|
@ -10,17 +10,21 @@ in {
|
||||||
|
|
||||||
./programs/aria2.nix
|
./programs/aria2.nix
|
||||||
./programs/atuin.nix
|
./programs/atuin.nix
|
||||||
|
./programs/beets.nix
|
||||||
./programs/comma.nix
|
./programs/comma.nix
|
||||||
./programs/direnv
|
./programs/direnv
|
||||||
./programs/gdb.nix
|
./programs/gdb.nix
|
||||||
./programs/gh.nix
|
./programs/gh.nix
|
||||||
|
./programs/gh-dash.nix
|
||||||
./programs/git
|
./programs/git
|
||||||
./programs/gpg
|
./programs/gpg
|
||||||
|
./programs/jq.nix
|
||||||
./programs/less.nix
|
./programs/less.nix
|
||||||
./programs/neovim
|
./programs/neovim
|
||||||
./programs/nix-index
|
./programs/nix-index
|
||||||
./programs/ssh
|
./programs/ssh
|
||||||
./programs/tealdeer
|
./programs/tealdeer
|
||||||
|
./programs/thunderbird.nix
|
||||||
./programs/tmux.nix
|
./programs/tmux.nix
|
||||||
./programs/zsh
|
./programs/zsh
|
||||||
|
|
||||||
|
@ -35,12 +39,14 @@ in {
|
||||||
./programs/alacritty.nix
|
./programs/alacritty.nix
|
||||||
./programs/emacs
|
./programs/emacs
|
||||||
./programs/firefox.nix
|
./programs/firefox.nix
|
||||||
|
./programs/hyprland.nix
|
||||||
./programs/ncmpcpp.nix
|
./programs/ncmpcpp.nix
|
||||||
./programs/newsboat
|
./programs/newsboat
|
||||||
./programs/qutebrowser.nix
|
./programs/qutebrowser.nix
|
||||||
./programs/rofi.nix
|
./programs/rofi.nix
|
||||||
./programs/taskwarrior.nix
|
./programs/taskwarrior.nix
|
||||||
./programs/vscode
|
./programs/vscode
|
||||||
|
./programs/waybar.nix
|
||||||
# ./programs/xmobar
|
# ./programs/xmobar
|
||||||
./programs/xmonad
|
./programs/xmonad
|
||||||
./programs/zathura.nix
|
./programs/zathura.nix
|
||||||
|
@ -50,11 +56,11 @@ in {
|
||||||
./services/dunst.nix
|
./services/dunst.nix
|
||||||
./services/fcitx5.nix
|
./services/fcitx5.nix
|
||||||
./services/mpd.nix
|
./services/mpd.nix
|
||||||
./services/picom.nix
|
# ./services/picom.nix
|
||||||
./services/polybar.nix
|
# ./services/polybar.nix
|
||||||
./services/screen-locker.nix
|
# ./services/screen-locker.nix
|
||||||
# ./services/stalonetray.nix
|
# ./services/stalonetray.nix
|
||||||
./services/sxhkd.nix
|
# ./services/sxhkd.nix
|
||||||
./services/tumblerd.nix
|
./services/tumblerd.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -101,6 +107,13 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xsession = {
|
||||||
|
enable = true;
|
||||||
|
# TODO: declare using xdg config home
|
||||||
|
scriptPath = ".config/X11/xsession";
|
||||||
|
profilePath = ".config/X11/xprofile";
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"ghc/ghci.conf".text = ''
|
"ghc/ghci.conf".text = ''
|
||||||
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} "
|
:set prompt "${extendedLib.termColors.front.magenta "[GHCi]λ"} "
|
||||||
|
@ -174,10 +187,7 @@ in {
|
||||||
|
|
||||||
qt = mkIf graphics {
|
qt = mkIf graphics {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme.name = "gtk";
|
platformTheme.name = "adwaita";
|
||||||
style = {
|
style.name = "adwaita-dark";
|
||||||
name = "adwaita-dark";
|
|
||||||
package = pkgs.adwaita-qt;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{ pkgs, config, machineVars, ... }:
|
{ pkgs, config, machineVars, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
beets
|
|
||||||
binutils
|
binutils
|
||||||
cloc
|
cloc
|
||||||
cyme
|
cyme
|
||||||
|
@ -12,7 +11,6 @@
|
||||||
duff
|
duff
|
||||||
ffmpeg
|
ffmpeg
|
||||||
file
|
file
|
||||||
gh-dash
|
|
||||||
glances
|
glances
|
||||||
gpg-tui
|
gpg-tui
|
||||||
gping
|
gping
|
||||||
|
@ -20,7 +18,6 @@
|
||||||
hexyl
|
hexyl
|
||||||
httpie
|
httpie
|
||||||
imagemagick
|
imagemagick
|
||||||
jq
|
|
||||||
kepubify
|
kepubify
|
||||||
# keybase
|
# keybase
|
||||||
keymapviz
|
keymapviz
|
||||||
|
@ -35,7 +32,6 @@
|
||||||
mtr
|
mtr
|
||||||
neofetch
|
neofetch
|
||||||
nix-diff
|
nix-diff
|
||||||
nix-index
|
|
||||||
nix-output-monitor
|
nix-output-monitor
|
||||||
nix-tree
|
nix-tree
|
||||||
nix-update
|
nix-update
|
||||||
|
@ -85,7 +81,6 @@
|
||||||
alsa-utils
|
alsa-utils
|
||||||
anki
|
anki
|
||||||
ark
|
ark
|
||||||
birdtray
|
|
||||||
calibre
|
calibre
|
||||||
cool-retro-term
|
cool-retro-term
|
||||||
darktable
|
darktable
|
||||||
|
@ -114,6 +109,7 @@
|
||||||
mopidy-youtube
|
mopidy-youtube
|
||||||
mpc_cli
|
mpc_cli
|
||||||
naps2
|
naps2
|
||||||
|
nsxiv
|
||||||
nyxt
|
nyxt
|
||||||
obsidian
|
obsidian
|
||||||
# pcloud
|
# pcloud
|
||||||
|
@ -124,11 +120,9 @@
|
||||||
slack
|
slack
|
||||||
# sublime3
|
# sublime3
|
||||||
# swiPrologWithGui
|
# swiPrologWithGui
|
||||||
sxiv
|
|
||||||
tagainijisho
|
tagainijisho
|
||||||
|
|
||||||
tenacity
|
tenacity
|
||||||
thunderbird
|
|
||||||
# transcribe
|
# transcribe
|
||||||
wireshark
|
wireshark
|
||||||
xcalib
|
xcalib
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.beets.enable = true;
|
||||||
|
}
|
|
@ -9,7 +9,7 @@ in [
|
||||||
(link "GitHub" "http://github.com")
|
(link "GitHub" "http://github.com")
|
||||||
(short "/u/" "danger/u/" "https://dangeru.us/")
|
(short "/u/" "danger/u/" "https://dangeru.us/")
|
||||||
(link "PVV" "https://www.pvv.ntnu.no/")
|
(link "PVV" "https://www.pvv.ntnu.no/")
|
||||||
(short "PVVM" "PVV Mail" "https://webmail2.pvv.ntnu.no/roundcube/")
|
(short "PVVM" "PVV Mail" "https://webmail.pvv.ntnu.no/roundcube/")
|
||||||
(short "ΩV" "Omega Verksted" "https://omegav.no/")
|
(short "ΩV" "Omega Verksted" "https://omegav.no/")
|
||||||
|
|
||||||
(dir "Nix" [
|
(dir "Nix" [
|
||||||
|
@ -31,21 +31,34 @@ in [
|
||||||
])
|
])
|
||||||
|
|
||||||
(dir "CTF" [
|
(dir "CTF" [
|
||||||
(link "HackTheBox" "https://www.hackthebox.eu/")
|
(link "Revshells" "https://revshells.com/")
|
||||||
(link "TryHackMe" "https://tryhackme.com/dashboard")
|
|
||||||
(link "OverTheWire" "https://overthewire.org/wargames/")
|
|
||||||
(link "NetGarage" "https://io.netgarage.org/")
|
|
||||||
(link "Exploit Education" "http://exploit.education/")
|
(link "Exploit Education" "http://exploit.education/")
|
||||||
|
(link "Webhook" "https://webhook.site")
|
||||||
|
(link "CyberChef" "https://gchq.github.io/CyberChef/")
|
||||||
|
(link "Aperisolve" "https://www.aperisolve.com/")
|
||||||
|
(link "how2heap" "https://github.com/shellphish/how2heap")
|
||||||
|
(link "Heap Search" "https://kissprogramming.com/heap/heap-search")
|
||||||
|
(link "CrackStation" "https://crackstation.net/")
|
||||||
|
(link "FactorDB" "http://factordb.com/")
|
||||||
|
(link "Syscalls" "https://syscalls.w3challs.com/")
|
||||||
|
(link "DogBolt" "https://dogbolt.org/")
|
||||||
|
(link "HackTricks" "https://book.hacktricks.xyz/")
|
||||||
|
(dir "Practise" [
|
||||||
|
(link "S2G" "https://s2gctf.ncr.ntnu.no")
|
||||||
|
(link "Pico CTF" "https://play.picoctf.org/practice")
|
||||||
|
(link "Pwn college" "https://pwn.college/")
|
||||||
|
(link "HackTheBox" "https://www.hackthebox.eu")
|
||||||
|
(link "Crackmes" "https://crackmes.one")
|
||||||
|
(link "Nightmare" "https://guyinatuxedo.github.io/")
|
||||||
|
])
|
||||||
])
|
])
|
||||||
|
|
||||||
(dir "Misc & Tools" [
|
(dir "Misc & Tools" [
|
||||||
(link "ASCIIFlow" "https://asciiflow.com/#/")
|
(link "ASCIIFlow" "https://asciiflow.com/#/")
|
||||||
(link "CopyChar" "https://copychar.cc/")
|
(link "CopyChar" "https://copychar.cc/")
|
||||||
(link "CyberChef" "https://gchq.github.io/CyberChef/")
|
|
||||||
(link "Device Info" "https://www.deviceinfo.me/")
|
(link "Device Info" "https://www.deviceinfo.me/")
|
||||||
(link "Diagrams" "https://app.diagrams.net/")
|
(link "Diagrams" "https://app.diagrams.net/")
|
||||||
(link "FakeMail" "http://www.fakemailgenerator.com/")
|
(link "FakeMail" "http://www.fakemailgenerator.com/")
|
||||||
(link "FilePizza" "https://file.pizza/")
|
|
||||||
(link "IPLeak" "https://ipleak.net/")
|
(link "IPLeak" "https://ipleak.net/")
|
||||||
(link "LaTeX" "https://www.codecogs.com/latex/eqneditor.php")
|
(link "LaTeX" "https://www.codecogs.com/latex/eqneditor.php")
|
||||||
(link "ManualsLib" "https://www.manualslib.com/")
|
(link "ManualsLib" "https://www.manualslib.com/")
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.gh-dash.enable = true;
|
||||||
|
}
|
|
@ -53,6 +53,7 @@ in
|
||||||
forcepush = "push --force-with-lease --force-if-includes";
|
forcepush = "push --force-with-lease --force-if-includes";
|
||||||
authors = "shortlog --summary --numbered --email";
|
authors = "shortlog --summary --numbered --email";
|
||||||
si = "switch-interactive";
|
si = "switch-interactive";
|
||||||
|
subs = "submodule update --init --recursive";
|
||||||
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
|
rebase-author = "rebase -i -x \"git commit --amend --reset-author -CHEAD\"";
|
||||||
git = "!git";
|
git = "!git";
|
||||||
};
|
};
|
||||||
|
@ -128,6 +129,8 @@ in
|
||||||
submodule = "log";
|
submodule = "log";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pager.show = lib.getExe pkgs.bat;
|
||||||
|
|
||||||
status = {
|
status = {
|
||||||
showUntrackedFiles = "all";
|
showUntrackedFiles = "all";
|
||||||
relativePaths = true;
|
relativePaths = true;
|
||||||
|
@ -259,6 +262,14 @@ in
|
||||||
runtimeInputs = with pkgs; [ cfg.package coreutils ];
|
runtimeInputs = with pkgs; [ cfg.package coreutils ];
|
||||||
text = lib.fileContents ./scripts/git-tcommit.sh;
|
text = lib.fileContents ./scripts/git-tcommit.sh;
|
||||||
})
|
})
|
||||||
|
(pkgs.writeShellApplication {
|
||||||
|
name = "git-tmcommit";
|
||||||
|
runtimeInputs = with pkgs; [ cfg.package coreutils ];
|
||||||
|
text = lib.pipe ./scripts/git-tcommit.sh [
|
||||||
|
lib.fileContents
|
||||||
|
(builtins.replaceStrings ["hours" "tcommit"] ["minutes" "tmcommit"])
|
||||||
|
];
|
||||||
|
})
|
||||||
(pkgs.writeShellApplication {
|
(pkgs.writeShellApplication {
|
||||||
name = "git-switch-interactive";
|
name = "git-switch-interactive";
|
||||||
runtimeInputs = with pkgs; [ cfg.package fzf gnused coreutils ];
|
runtimeInputs = with pkgs; [ cfg.package fzf gnused coreutils ];
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
if [[ $# -lt 1 ]]; then
|
||||||
|
echo "Usage: git tcommit [-]<hours>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
HOUR_SHIFT="$1"
|
HOUR_SHIFT="$1"
|
||||||
shift
|
shift
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,323 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.wayland.windowManager.hyprland;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home.sessionVariables = {
|
||||||
|
WLR_NO_HARDWARE_CURSORS = "1";
|
||||||
|
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||||
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_DESKTOP = "Hyprland";
|
||||||
|
XDG_SESSION_TYPE = "wayland";
|
||||||
|
GDK_BACKEND = "wayland,x11,*";
|
||||||
|
QT_QPA_PLATFORM = "wayland;xcb";
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
MOZ_ENABLE_WAYLAND = "1";
|
||||||
|
SDL_VIDEODRIVER = "wayland";
|
||||||
|
OZONE_PLATFORM = "wayland";
|
||||||
|
CLUTTER_BACKEND = "wayland";
|
||||||
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
|
# QT_QPA_PLATFORMTHEME = "qt6ct";
|
||||||
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||||
|
|
||||||
|
LIBVA_DRIVER_NAME = "nvidia";
|
||||||
|
GBM_BACKEND = "nvidia-drm";
|
||||||
|
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
wl-clipboard-rs
|
||||||
|
];
|
||||||
|
|
||||||
|
programs.hyprlock = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
disable_loading_bar = true;
|
||||||
|
grace = 300;
|
||||||
|
hide_cursor = true;
|
||||||
|
no_fade_in = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
background = [
|
||||||
|
{
|
||||||
|
path = "screenshot";
|
||||||
|
blur_passes = 3;
|
||||||
|
blur_size = 8;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
input-field = [
|
||||||
|
{
|
||||||
|
size = "200, 50";
|
||||||
|
position = "0, -80";
|
||||||
|
monitor = "";
|
||||||
|
dots_center = true;
|
||||||
|
fade_on_empty = false;
|
||||||
|
font_color = "rgb(202, 211, 245)";
|
||||||
|
inner_color = "rgb(91, 96, 120)";
|
||||||
|
outer_color = "rgb(24, 25, 38)";
|
||||||
|
outline_thickness = 5;
|
||||||
|
placeholder_text = ''Password...'';
|
||||||
|
shadow_passes = 2;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
ignore_dbus_inhibit = false;
|
||||||
|
lock_cmd = "pidof hyprlock || hyprlock";
|
||||||
|
before_sleep_cmd = "loginctl lock-session";
|
||||||
|
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||||
|
};
|
||||||
|
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = 900;
|
||||||
|
on-timeout = "hyprlock";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
timeout = 1200;
|
||||||
|
on-timeout = "hyprctl dispatch dpms off";
|
||||||
|
on-resume = "hyprctl dispatch dpms on";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wayland.windowManager.hyprland = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = let
|
||||||
|
scratchpads = [
|
||||||
|
(rec {
|
||||||
|
title = "Floating terminal";
|
||||||
|
class = "floatingTerminal";
|
||||||
|
command = "alacritty --class ${class} -e tmux new-session -A -s f";
|
||||||
|
size = { h = 90; w = 95; };
|
||||||
|
keys = [
|
||||||
|
"$mod, RETURN"
|
||||||
|
"$mod, SPACE"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
(rec {
|
||||||
|
title = "Ncmpcpp";
|
||||||
|
class = "floatingNcmpcpp";
|
||||||
|
command = "alacritty --class ${class} -e ncmpcpp";
|
||||||
|
size = { h = 95; w = 95; };
|
||||||
|
keys = [ "$mod, Q" ];
|
||||||
|
})
|
||||||
|
# "$mod, W, emacs"
|
||||||
|
# "$mod, E, filebrowser"
|
||||||
|
# "$mod, X, taskwarriortui"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
"$mod" = "SUPER";
|
||||||
|
|
||||||
|
# https://github.com/xkbcommon/libxkbcommon/blob/master/include/xkbcommon/xkbcommon-keysyms.h
|
||||||
|
bind = [
|
||||||
|
"$mod SHIFT, Q, exit"
|
||||||
|
"$mod, R, exec, ${pkgs.rofi}/bin/rofi -show drun"
|
||||||
|
"$mod, T, togglefloating"
|
||||||
|
|
||||||
|
# TODO: fix this for upcoming releases
|
||||||
|
"$mod, F, fullscreen, 2"
|
||||||
|
"$mod, C, exec, hyprctl reload"
|
||||||
|
|
||||||
|
"$mod, BACKSPACE, killactive"
|
||||||
|
|
||||||
|
"$mod SHIFT, RETURN, exec, alacritty --class termTerminal -e tmux new-session -A -s term"
|
||||||
|
"$mod SHIFT, SPACE, exec, alacritty --class termTerminal -e tmux new-session -A -s term"
|
||||||
|
|
||||||
|
"$mod, j, layoutmsg,cyclenext"
|
||||||
|
"$mod, k, layoutmsg,cycleprev"
|
||||||
|
"$mod SHIFT, j, layoutmsg, swapnext"
|
||||||
|
"$mod SHIFT, k, layoutmsg, swapprev"
|
||||||
|
|
||||||
|
"$mod, 1, focusworkspaceoncurrentmonitor, 1"
|
||||||
|
"$mod, 2, focusworkspaceoncurrentmonitor, 2"
|
||||||
|
"$mod, 3, focusworkspaceoncurrentmonitor, 3"
|
||||||
|
"$mod, 4, focusworkspaceoncurrentmonitor, 4"
|
||||||
|
"$mod, 5, focusworkspaceoncurrentmonitor, 5"
|
||||||
|
"$mod, 6, focusworkspaceoncurrentmonitor, 6"
|
||||||
|
"$mod, 7, focusworkspaceoncurrentmonitor, 7"
|
||||||
|
"$mod, 8, focusworkspaceoncurrentmonitor, 8"
|
||||||
|
"$mod, 9, focusworkspaceoncurrentmonitor, 9"
|
||||||
|
|
||||||
|
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||||
|
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||||
|
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||||
|
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||||
|
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||||
|
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||||
|
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||||
|
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||||
|
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||||
|
|
||||||
|
"$mod, b, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s mozc"
|
||||||
|
"$mod, n, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-no"
|
||||||
|
"$mod, m, exec, ${pkgs.fcitx5}/bin/fcitx5-remote -s keyboard-us"
|
||||||
|
|
||||||
|
# TODO: ensure exists in environment
|
||||||
|
"$mod, l, exec, loginctl lock-session"
|
||||||
|
|
||||||
|
# TODO: fix
|
||||||
|
# "super + minus" = "${pkgs.xcalib}/bin/xcalib -invert -alter"
|
||||||
|
|
||||||
|
# TODO: fix
|
||||||
|
", Print, exec, ${lib.getExe pkgs.grimblast} copy area"
|
||||||
|
|
||||||
|
# "SHIFT, Print, exec, ${lib.getExe pkgs.grimblast} copy area"
|
||||||
|
# "shift + @Print" = "${pkgs.maim}/bin/maim --hidecursor --nokeyboard $SCREENSHOT_DIR/$(date +%s).png"
|
||||||
|
|
||||||
|
# TODO: Add boomer as package
|
||||||
|
# "super + @Print" = "boomer"
|
||||||
|
]
|
||||||
|
++
|
||||||
|
(lib.pipe scratchpads [
|
||||||
|
(map ({ keys, command, class, ... }:
|
||||||
|
(map (key: let
|
||||||
|
# TODO: rewrite this to take arguments instead of creating n copies
|
||||||
|
invokeIfNotRunningAndToggleWorkspace = pkgs.writeShellApplication {
|
||||||
|
name = "hyprland-toggle-scratchpad-${class}";
|
||||||
|
runtimeInputs = [ cfg.package pkgs.jq ];
|
||||||
|
text = ''
|
||||||
|
SCRATCHPAD_PROGRAM_EXISTS=$(hyprctl clients -j | jq -r '[.[].class]|any(. == "${class}")')
|
||||||
|
CURRENT_WORKSPACE_ID=$(hyprctl activeworkspace -j | jq -r '.id')
|
||||||
|
|
||||||
|
if [ "$SCRATCHPAD_PROGRAM_EXISTS" != "true" ]; then
|
||||||
|
${command} &
|
||||||
|
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
|
||||||
|
hyprctl dispatch focuswindow "class:${class}"
|
||||||
|
else
|
||||||
|
SCRATCHPAD_PROGRAM_WORKSPACE_ID=$(hyprctl clients -j | jq '.[] | select( .class == "${class}") | .workspace.id')
|
||||||
|
if [ "$SCRATCHPAD_PROGRAM_WORKSPACE_ID" != "$CURRENT_WORKSPACE_ID" ]; then
|
||||||
|
hyprctl dispatch movetoworkspacesilent "''${CURRENT_WORKSPACE_ID},class:${class}"
|
||||||
|
hyprctl dispatch focuswindow "class:${class}"
|
||||||
|
else
|
||||||
|
hyprctl dispatch movetoworkspacesilent "special:${class}Ws,class:${class}"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in "${key}, exec, ${lib.getExe invokeIfNotRunningAndToggleWorkspace}"
|
||||||
|
) keys)
|
||||||
|
))
|
||||||
|
lib.flatten
|
||||||
|
]);
|
||||||
|
|
||||||
|
bindl = [
|
||||||
|
"$mod, p, exec, ${pkgs.mpc_cli}/bin/mpc toggle"
|
||||||
|
",XF86AudioPlay, exec, ${pkgs.mpc_cli}/bin/mpc toggle"
|
||||||
|
",XF86AudioPrev, exec, ${pkgs.mpc_cli}/bin/mpc prev"
|
||||||
|
",XF86AudioNext, exec, ${pkgs.mpc_cli}/bin/mpc next"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindle = [
|
||||||
|
",XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} s +5%"
|
||||||
|
",XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} s 5%-"
|
||||||
|
",XF86AudioLowerVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
||||||
|
",XF86AudioRaiseVolume, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
|
||||||
|
"$mod ,F7, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%-"
|
||||||
|
"$mod ,F8, exec, ${pkgs.wireplumber}/bin/wpctl set-volume @DEFAULT_AUDIO_SINK@ 2%+"
|
||||||
|
];
|
||||||
|
|
||||||
|
windowrulev2 = [
|
||||||
|
"float,class:(Rofi)"
|
||||||
|
|
||||||
|
"workspace 2,class:(firefox)"
|
||||||
|
"workspace 2,class:(google-chrome)"
|
||||||
|
|
||||||
|
"workspace 3,class:(Emacs)"
|
||||||
|
"workspace 3,class:(Code)"
|
||||||
|
"workspace 3,class:(code-url-handler)"
|
||||||
|
|
||||||
|
"workspace 5,class:(discord)"
|
||||||
|
"workspace 5,class:(Element)"
|
||||||
|
]
|
||||||
|
++
|
||||||
|
(lib.pipe scratchpads [
|
||||||
|
(map ({ class, size, ... }: [
|
||||||
|
"workspace special:${class}Ws, class:^${class}$"
|
||||||
|
"float, class:^${class}$"
|
||||||
|
"size ${toString size.w}% ${toString size.h}%, class:^${class}$"
|
||||||
|
"move ${toString ((100 - size.w) / 2)}% ${toString ((100 - size.h) / 2)}%, class:^${class}$"
|
||||||
|
]))
|
||||||
|
lib.flatten
|
||||||
|
]);
|
||||||
|
|
||||||
|
monitor = [
|
||||||
|
"DP-2, 1920x1080@144.00Hz, 0x0, 1"
|
||||||
|
"DVI-D-1, 1920x1080@144.00Hz, 1920x0, 1"
|
||||||
|
",preferred,auto,1"
|
||||||
|
];
|
||||||
|
|
||||||
|
general = {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 15;
|
||||||
|
|
||||||
|
border_size = 2;
|
||||||
|
|
||||||
|
"col.active_border" = "rgba(33ccffee) rgba(00ff99ee) 45deg";
|
||||||
|
"col.inactive_border" = "rgba(595959aa)";
|
||||||
|
|
||||||
|
resize_on_border = false;
|
||||||
|
allow_tearing = false;
|
||||||
|
layout = "master";
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 10;
|
||||||
|
|
||||||
|
# Change transparency of focused and unfocused windows
|
||||||
|
active_opacity = 1.0;
|
||||||
|
inactive_opacity = 1.0;
|
||||||
|
|
||||||
|
drop_shadow = true;
|
||||||
|
shadow_range = 4;
|
||||||
|
shadow_render_power = 3;
|
||||||
|
"col.shadow" = "rgba(1a1a1aee)";
|
||||||
|
|
||||||
|
# https://wiki.hyprland.org/Configuring/Variables/#blur
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 3;
|
||||||
|
passes = 1;
|
||||||
|
|
||||||
|
vibrancy = 0.1696;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
animations.enabled = false;
|
||||||
|
|
||||||
|
master = {
|
||||||
|
new_status = "slave";
|
||||||
|
};
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||||
|
disable_hyprland_logo = false; # If true disables the random hyprland logo / anime girl background. :(
|
||||||
|
};
|
||||||
|
|
||||||
|
input ={
|
||||||
|
kb_layout = "us";
|
||||||
|
kb_variant = "";
|
||||||
|
kb_model = "";
|
||||||
|
kb_options = "";
|
||||||
|
kb_rules = "";
|
||||||
|
|
||||||
|
follow_mouse = 1;
|
||||||
|
|
||||||
|
sensitivity = 0; # -1.0 - 1.0, 0 means no modification.
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.jq.enable = true;
|
||||||
|
}
|
|
@ -21,6 +21,7 @@
|
||||||
vim-surround
|
vim-surround
|
||||||
vim-fugitive
|
vim-fugitive
|
||||||
vim-css-color
|
vim-css-color
|
||||||
|
vim-wayland-clipboard
|
||||||
semshi
|
semshi
|
||||||
{
|
{
|
||||||
plugin = goyo-vim;
|
plugin = goyo-vim;
|
||||||
|
|
|
@ -3,40 +3,45 @@ let
|
||||||
mkSource = tags: url: { inherit tags url; };
|
mkSource = tags: url: { inherit tags url; };
|
||||||
in {
|
in {
|
||||||
programs.newsboat.urls = [
|
programs.newsboat.urls = [
|
||||||
(mkSource [ "tech" "linux" ] "https://lukesmith.xyz/rss.xml")
|
|
||||||
(mkSource [ "tech" "vim" "old" ] "https://castel.dev/rss.xml")
|
|
||||||
(mkSource [ "tech" "linux" "nixos" ] "https://christine.website/blog.rss")
|
|
||||||
(mkSource [ "japanese" "language" "old" ] "http://feeds.feedburner.com/LocalizingJapan")
|
|
||||||
(mkSource [ "tech" "linux" ] "http://xahlee.info/comp/blog.xml")
|
|
||||||
(mkSource [ "japanese" "language" ] "https://www.outlier-linguistics.com/blogs/japanese.atom")
|
|
||||||
(mkSource [ "tech" "linux" ] "https://archlinux.org/feeds/news/")
|
(mkSource [ "tech" "linux" ] "https://archlinux.org/feeds/news/")
|
||||||
(mkSource [ "tech" "linux" ] "https://bartoszmilewski.com/feed/")
|
(mkSource [ "tech" "linux" "nixos" ] "https://nixos.org/blog/announcements-rss.xml")
|
||||||
(mkSource [ "tech" "linux" "nixos" ] "https://nixos.org//blog/announcements-rss.xml")
|
|
||||||
(mkSource [ "tech" "linux" ] "https://www.digitalneanderthal.com/index.xml")
|
|
||||||
(mkSource [ "tech" "ntnu" ] "https://omegav.no/newsrss")
|
(mkSource [ "tech" "ntnu" ] "https://omegav.no/newsrss")
|
||||||
(mkSource [ "tech" ] "https://code.visualstudio.com/feed.xml")
|
(mkSource [ "ntnu" ] "https://varsel.it.ntnu.no/subscribe/rss/")
|
||||||
|
(mkSource [ "tech" ] "https://blog.hackeriet.no/feed.xml")
|
||||||
|
(mkSource [ "tech" ] "https://fribyte.no/rss.xml")
|
||||||
|
(mkSource [ "tech" ] "https://existentialtype.wordpress.com/feed/")
|
||||||
|
(mkSource [ "tech" "linux" "ntnu" ] "https://wiki.pvv.ntnu.no/w/api.php?hidebots=1&urlversion=1&days=90&limit=50&action=feedrecentchanges&format=xml")
|
||||||
|
(mkSource [ "tech" "linux" "nixos" ] "https://dandellion.xyz/atom.xml")
|
||||||
|
(mkSource [ "tech" "linux" ] "http://xahlee.info/comp/blog.xml")
|
||||||
|
(mkSource [ "tech" ] "https://branchfree.org/feed/")
|
||||||
|
(mkSource [ "tech" ] "https://search.marginalia.nu/news.xml")
|
||||||
|
(mkSource [ "tech" "linux" ] "https://bartoszmilewski.com/feed/")
|
||||||
|
(mkSource [ "tech" "linux" "nixos" ] "https://myme.no/atom-feed.xml")
|
||||||
(mkSource [ "tech" "linux" "nixos" ] "https://blog.ysndr.de/atom.xml")
|
(mkSource [ "tech" "linux" "nixos" ] "https://blog.ysndr.de/atom.xml")
|
||||||
(mkSource [ "tech" "linux" "nixos" ] "https://kaushikc.org/atom.xml")
|
(mkSource [ "tech" "linux" "nixos" ] "https://kaushikc.org/atom.xml")
|
||||||
(mkSource [ "tech" "linux" "nixos" ] "https://ianthehenry.com/feed.xml")
|
(mkSource [ "tech" "linux" "nixos" ] "https://ianthehenry.com/feed.xml")
|
||||||
(mkSource [ "tech" "linux" "ntnu" ] "https://www.pvv.ntnu.no/w/api.php?hidebots=1&urlversion=1&days=7&limit=50&action=feedrecentchanges&feedformat=atom")
|
|
||||||
(mkSource [ "ntnu" ] "https://varsel.it.ntnu.no/subscribe/rss/")
|
|
||||||
(mkSource [ "tech" "linux" "japanese" ] "https://www.ncaq.net/feed.atom")
|
(mkSource [ "tech" "linux" "japanese" ] "https://www.ncaq.net/feed.atom")
|
||||||
(mkSource [ "tech" "linux" "haskell" "nixos" "functional-programming" ] "https://www.haskellforall.com/feeds/posts/default")
|
(mkSource [ "tech" "linux" "nixos" "emacs" "japanese" ] "https://apribase.net/program/feed")
|
||||||
(mkSource [ "tech" "haskell" "functional-programming" ] "https://williamyaoh.com/feed.atom")
|
(mkSource [ "tech" "linux" "nixos" "functional-programming" ] "https://www.haskellforall.com/feeds/posts/default")
|
||||||
(mkSource [ "tech" "haskell" "functional-programming" ] "https://www.parsonsmatt.org/feed.xml")
|
(mkSource [ "tech" "linux" "nixos" ] "https://christine.website/blog.rss")
|
||||||
(mkSource [ "tech" "haskell" "functional-programming" "python" ] "http://blog.ezyang.com/feed/")
|
(mkSource [ "tech" "functional-programming" "nixos" ] "https://markkarpov.com/feed.atom")
|
||||||
(mkSource [ "tech" "haskell" "functional-programming" ] "https://lexi-lambda.github.io/feeds/all.rss.xml")
|
(mkSource [ "tech" "functional-programming" ] "https://williamyaoh.com/feed.atom")
|
||||||
(mkSource [ "tech" "haskell" "functional-programming" ] "https://www.stephendiehl.com/feed.rss")
|
(mkSource [ "tech" "functional-programming" ] "https://www.parsonsmatt.org/feed.xml")
|
||||||
(mkSource [ "tech" "haskell" "functional-programming" "emacs" ] "https://chrisdone.com/rss.xml")
|
(mkSource [ "tech" "functional-programming" "python" ] "http://blog.ezyang.com/feed/")
|
||||||
(mkSource [ "tech" "haskell" "functional-programming" "nixos" ] "https://markkarpov.com/feed.atom")
|
(mkSource [ "tech" "functional-programming" ] "https://lexi-lambda.github.io/feeds/all.rss.xml")
|
||||||
(mkSource [ "tech" "flutter" ] "https://resocoder.com/feed/")
|
(mkSource [ "tech" "functional-programming" ] "https://www.stephendiehl.com/feed.rss")
|
||||||
(mkSource [ "tech" "compilers" ] "https://existentialtype.wordpress.com/feed/")
|
(mkSource [ "tech" "functional-programming" "emacs" ] "https://chrisdone.com/rss.xml")
|
||||||
(mkSource [ "tech" "compilers" "haskell" "functional-programming" "old" ] "https://skilpat.tumblr.com/rss")
|
(mkSource [ "tech" ] "https://go.dev/blog/feed.atom")
|
||||||
|
(mkSource [ "tech" "linux" ] "https://jfx.ac/blog/index.xml")
|
||||||
|
(mkSource [ "tech" "linux" ] "https://lukesmith.xyz/rss.xml")
|
||||||
|
(mkSource [ "japanese" "language" ] "https://www.outlier-linguistics.com/blogs/japanese.atom")
|
||||||
(mkSource [ "language" ] "https://feeds.feedburner.com/blogspot/Ckyi")
|
(mkSource [ "language" ] "https://feeds.feedburner.com/blogspot/Ckyi")
|
||||||
(mkSource [ "tech" "compilers" ] "https://go.dev/blog/feed.atom")
|
(mkSource [ "japanese" "language" "old" ] "http://feeds.feedburner.com/LocalizingJapan")
|
||||||
(mkSource [ "tech" "linux" "nixos" ] "https://myme.no/feed.xml")
|
(mkSource [ "tech" "vim" "old" ] "https://castel.dev/rss.xml")
|
||||||
(mkSource [ "tech" "linux" "nixos" "compilers" ] "https://flyx.org/feed.xml")
|
(mkSource [ "tech" "functional-programming" "old" ] "https://skilpat.tumblr.com/rss")
|
||||||
(mkSource [ "tech" "linux" ] "https://blog.jfx.ac/feed.xml")
|
(mkSource [ "tech" ] "https://resocoder.com/feed/")
|
||||||
(mkSource [ "tech" "linux" "nixos" ] "https://dandellion.xyz/atom.xml")
|
|
||||||
|
# Broken?
|
||||||
|
(mkSource [ "tech" "linux" "nixos" ] "https://flyx.org/feed.xml")
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, extendedLib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
adminUser = "root";
|
adminUser = "root";
|
||||||
normalUser = "oysteikt";
|
normalUser = "oysteikt";
|
||||||
|
@ -88,16 +88,17 @@ let
|
||||||
machines: pipe machines pipeline;
|
machines: pipe machines pipeline;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.ssh.matchBlocks = (extendedLib.attrsets.concatAttrs [
|
programs.ssh.matchBlocks = lib.mergeAttrsList [
|
||||||
(convertMachinesWith convertNormalMachine normalMachines)
|
(convertMachinesWith convertNormalMachine normalMachines)
|
||||||
(convertMachinesWith convertAdminMachine rootMachines)
|
(convertMachinesWith convertAdminMachine rootMachines)
|
||||||
]) // {
|
{
|
||||||
"pvv-git git.pvv.ntnu.no" = {
|
"pvv-git git.pvv.ntnu.no" = {
|
||||||
hostname = "git.pvv.ntnu.no";
|
hostname = "git.pvv.ntnu.no";
|
||||||
user = "gitea";
|
user = "gitea";
|
||||||
addressFamily = "inet";
|
addressFamily = "inet";
|
||||||
port = 2222;
|
port = 2222;
|
||||||
proxyJump = "pvv";
|
proxyJump = "pvv";
|
||||||
};
|
};
|
||||||
};
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ config, pkgs, lib, machineVars, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.programs.thunderbird;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.thunderbird = {
|
||||||
|
enable = !machineVars.headless;
|
||||||
|
profiles.h7x4 = {
|
||||||
|
isDefault = true;
|
||||||
|
withExternalGnupg = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
home.packages = lib.mkIf cfg.enable (with pkgs; [
|
||||||
|
birdtray
|
||||||
|
]);
|
||||||
|
}
|
|
@ -0,0 +1,239 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
cfg = config.programs.waybar;
|
||||||
|
cfgs = cfg.settings.mainBar;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
programs.waybar = {
|
||||||
|
enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
mainBar = {
|
||||||
|
layer = "top";
|
||||||
|
position = "top";
|
||||||
|
height = 30;
|
||||||
|
|
||||||
|
# TODO: configure this per machine
|
||||||
|
output = [ "DP-2" ];
|
||||||
|
|
||||||
|
modules-left = [ "hyprland/workspaces" ];
|
||||||
|
modules-center = [ "clock" ];
|
||||||
|
modules-right = [ "mpd" "cpu" "memory" "wireplumber" "pulseaudio/slider" "tray" ];
|
||||||
|
|
||||||
|
"hyprland/workspaces" = {
|
||||||
|
all-outputs = true;
|
||||||
|
disable-scroll = true;
|
||||||
|
persistent-workspaces = {
|
||||||
|
${lib.head cfgs.output} = [ 1 2 3 4 5 6 7 8 ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
"mpd" = {
|
||||||
|
format = "{filename}";
|
||||||
|
};
|
||||||
|
|
||||||
|
"cpu" = {
|
||||||
|
format = "[#] {usage}%";
|
||||||
|
};
|
||||||
|
|
||||||
|
"memory" = {
|
||||||
|
format = "{used}/{total}Gb";
|
||||||
|
};
|
||||||
|
|
||||||
|
"wireplumber" = {
|
||||||
|
format = "{volume}% {icon}";
|
||||||
|
format-muted = "[M]";
|
||||||
|
};
|
||||||
|
|
||||||
|
"pulseaudio/slider" = {
|
||||||
|
orientation = "horizontal";
|
||||||
|
};
|
||||||
|
|
||||||
|
"tray" = {
|
||||||
|
icon-size = 20;
|
||||||
|
spacing = 8;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
style = let
|
||||||
|
c = config.colors.defaultColorSet;
|
||||||
|
in ''
|
||||||
|
* {
|
||||||
|
font-family: FiraCode, FontAwesome, Roboto, Helvetica, Arial, sans-serif;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
window#waybar {
|
||||||
|
background-color: ${c.background};
|
||||||
|
color: ${c.foreground};
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio-slider trough {
|
||||||
|
min-height: 10px;
|
||||||
|
min-width: 100px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**** DEFAULT ****/
|
||||||
|
|
||||||
|
window#waybar.hidden {
|
||||||
|
opacity: 0.2;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
/* Use box-shadow instead of border so the text isn't offset */
|
||||||
|
box-shadow: inset 0 -3px transparent;
|
||||||
|
/* Avoid rounded borders under each button name */
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
|
||||||
|
button:hover {
|
||||||
|
background: inherit;
|
||||||
|
box-shadow: inset 0 -3px #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#workspaces button.empty {
|
||||||
|
color: ${c.yellow};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button {
|
||||||
|
padding: 0 5px;
|
||||||
|
color: ${c.magenta};
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.visible {
|
||||||
|
color: ${c.green};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button.urgent {
|
||||||
|
background-color: ${c.red};
|
||||||
|
}
|
||||||
|
|
||||||
|
#workspaces button:hover {
|
||||||
|
background: rgba(0, 0, 0, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
#mode {
|
||||||
|
background-color: #64727D;
|
||||||
|
box-shadow: inset 0 -3px #ffffff;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock,
|
||||||
|
#battery,
|
||||||
|
#cpu,
|
||||||
|
#memory,
|
||||||
|
#disk,
|
||||||
|
#temperature,
|
||||||
|
#backlight,
|
||||||
|
#network,
|
||||||
|
#pulseaudio,
|
||||||
|
#wireplumber,
|
||||||
|
#custom-media,
|
||||||
|
#tray,
|
||||||
|
#mode,
|
||||||
|
#idle_inhibitor,
|
||||||
|
#scratchpad,
|
||||||
|
#power-profiles-daemon,
|
||||||
|
#mpd {
|
||||||
|
padding: 0 10px;
|
||||||
|
color: ${c.foreground};
|
||||||
|
}
|
||||||
|
|
||||||
|
#window,
|
||||||
|
#workspaces {
|
||||||
|
margin: 0 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the leftmost module, omit left margin */
|
||||||
|
.modules-left > widget:first-child > #workspaces {
|
||||||
|
margin-left: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* If workspaces is the rightmost module, omit right margin */
|
||||||
|
.modules-right > widget:last-child > #workspaces {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#clock {
|
||||||
|
background-color: #64727D;
|
||||||
|
}
|
||||||
|
|
||||||
|
#cpu {
|
||||||
|
background-color: ${c.cyan};
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#memory {
|
||||||
|
background-color: ${c.yellow};
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network {
|
||||||
|
background-color: #2980b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#network.disconnected {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio {
|
||||||
|
background-color: #f1c40f;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#pulseaudio.muted {
|
||||||
|
background-color: #90b1b1;
|
||||||
|
color: #2a5c45;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wireplumber {
|
||||||
|
background-color: #fff0f5;
|
||||||
|
color: #000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
#wireplumber.muted {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray {
|
||||||
|
background-color: #2980b9;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .passive {
|
||||||
|
-gtk-icon-effect: dim;
|
||||||
|
}
|
||||||
|
|
||||||
|
#tray > .needs-attention {
|
||||||
|
-gtk-icon-effect: highlight;
|
||||||
|
background-color: #eb4d4b;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd {
|
||||||
|
background-color: #66cc99;
|
||||||
|
color: #2a5c45;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd.disconnected {
|
||||||
|
background-color: #f53c3c;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd.stopped {
|
||||||
|
background-color: #90b1b1;
|
||||||
|
}
|
||||||
|
|
||||||
|
#mpd.paused {
|
||||||
|
background-color: #51a37a;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
# background-color: rgba(0,0,0,0);
|
||||||
|
# border-bottom: 3px solid rgba(100, 114, 125, 0.5);
|
||||||
|
|
||||||
|
#style = ''
|
||||||
|
#'';
|
||||||
|
};
|
||||||
|
}
|
|
@ -89,7 +89,7 @@ myScratchpads = [ NS "ncmpcpp" spawnNC findNC layoutA
|
||||||
-- spawnMX = "element"
|
-- spawnMX = "element"
|
||||||
spawnFB = "thunar --class=floatingThunar"
|
spawnFB = "thunar --class=floatingThunar"
|
||||||
spawnEX = "emacs --name=floatingEmacs"
|
spawnEX = "emacs --name=floatingEmacs"
|
||||||
spawnSC = "sxiv -N floatingSchedule ~/uni/schedule.png"
|
spawnSC = "nsxiv -N floatingSchedule ~/uni/schedule.png"
|
||||||
spawnHP = "echo \"" ++ help ++ "\" | xmessage -file -"
|
spawnHP = "echo \"" ++ help ++ "\" | xmessage -file -"
|
||||||
|
|
||||||
findNC = title =? "ncmpcppScratchpad"
|
findNC = title =? "ncmpcppScratchpad"
|
||||||
|
|
|
@ -13,9 +13,9 @@
|
||||||
class = "Dunst";
|
class = "Dunst";
|
||||||
browser = "${pkgs.xdg-utils}/bin/xdg-open";
|
browser = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||||
|
|
||||||
offset = let
|
# offset = let
|
||||||
status-bar-height = config.services.polybar.settings."bar/top".height;
|
# status-bar-height = config.services.polybar.settings."bar/top".height;
|
||||||
in "15x${toString (status-bar-height + 10)}";
|
# in "15x${toString (status-bar-height + 10)}";
|
||||||
|
|
||||||
corner_radius = 0;
|
corner_radius = 0;
|
||||||
font = "Droid Sans 9";
|
font = "Droid Sans 9";
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, unstable-pkgs, lib, extendedLib, config, inputs, secrets, ... }:
|
{ config, pkgs, lib, extendedLib, ... }:
|
||||||
let
|
let
|
||||||
inherit (config) machineVars;
|
inherit (config) machineVars;
|
||||||
in {
|
in {
|
||||||
|
@ -132,8 +132,6 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
irqbalance.enable = true;
|
irqbalance.enable = true;
|
||||||
|
|
||||||
displayManager.defaultSession = "none+xmonad";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
@ -141,6 +139,7 @@ in {
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
tmux.enable = true;
|
tmux.enable = true;
|
||||||
zsh.enable = true;
|
zsh.enable = true;
|
||||||
|
hyprland.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
system.extraDependencies =
|
system.extraDependencies =
|
||||||
|
|
|
@ -1,5 +1,14 @@
|
||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
|
services.displayManager = {
|
||||||
|
enable = true;
|
||||||
|
defaultSession = "none+xmonad";
|
||||||
|
sddm = {
|
||||||
|
enable = !config.machineVars.headless;
|
||||||
|
wayland.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = !config.machineVars.headless;
|
enable = !config.machineVars.headless;
|
||||||
|
|
||||||
|
@ -13,13 +22,15 @@
|
||||||
# xfce.enable = !config.machineVars.headless;
|
# xfce.enable = !config.machineVars.headless;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
displayManager.lightdm.enable = !config.machineVars.headless;
|
# displayManager.lightdm.enable = !config.machineVars.headless;
|
||||||
|
|
||||||
windowManager.xmonad = {
|
windowManager.xmonad = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableContribAndExtras = true;
|
enableContribAndExtras = true;
|
||||||
enableConfiguredRecompile = true;
|
enableConfiguredRecompile = true;
|
||||||
extraPackages = hPkgs: with hPkgs; [ dbus ];
|
extraPackages = hPkgs: with hPkgs; [
|
||||||
|
dbus
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
./programs/nrfutil.nix
|
||||||
|
|
||||||
./services/avahi.nix
|
./services/avahi.nix
|
||||||
./services/docker.nix
|
./services/docker.nix
|
||||||
./services/jenkins.nix
|
./services/jenkins.nix
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nrfutil
|
||||||
|
nrfconnect
|
||||||
|
nrf-command-line-tools
|
||||||
|
];
|
||||||
|
|
||||||
|
services.udev.packages = with pkgs; [
|
||||||
|
nrf-udev
|
||||||
|
segger-jlink
|
||||||
|
];
|
||||||
|
}
|
|
@ -11,12 +11,18 @@
|
||||||
./services/tailscale.nix
|
./services/tailscale.nix
|
||||||
./services/keybase.nix
|
./services/keybase.nix
|
||||||
|
|
||||||
|
./nspawn-containers/arch.nix
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = "22.05";
|
system.stateVersion = "22.05";
|
||||||
|
|
||||||
|
security.pam.services.hyprlock = {};
|
||||||
|
|
||||||
boot.binfmt.emulatedSystems = [
|
boot.binfmt.emulatedSystems = [
|
||||||
"x86_64-windows"
|
"x86_64-windows"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
"armv7l-linux"
|
"armv7l-linux"
|
||||||
|
"i686-linux"
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.system-features = [
|
nix.settings.system-features = [
|
||||||
|
@ -74,7 +80,7 @@
|
||||||
services = {
|
services = {
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.X11Forwarding = true;
|
# settings.X11Forwarding = true;
|
||||||
};
|
};
|
||||||
xserver.videoDrivers = [ "amdgpu" ];
|
xserver.videoDrivers = [ "amdgpu" ];
|
||||||
tailscale.enable = true;
|
tailscale.enable = true;
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
systemd.targets.machines.enable = true;
|
||||||
|
|
||||||
|
systemd.nspawn."arch" = {
|
||||||
|
enable = true;
|
||||||
|
execConfig.Boot = true;
|
||||||
|
|
||||||
|
filesConfig = {
|
||||||
|
BindReadOnly = [
|
||||||
|
"/nix/store"
|
||||||
|
# "/etc/resolv.conf:/etc/resolv.conf"
|
||||||
|
];
|
||||||
|
Bind = [
|
||||||
|
"/home/h7x4/git"
|
||||||
|
"/home/h7x4/pico"
|
||||||
|
"/home/h7x4/Downloads"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
networkConfig.Private = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services."systemd-nspawn@arch" = {
|
||||||
|
enable = true;
|
||||||
|
requiredBy = [ "machines.target" ];
|
||||||
|
overrideStrategy = "asDropin";
|
||||||
|
};
|
||||||
|
}
|
|
@ -7,9 +7,6 @@ in rec {
|
||||||
mapToAttrsWithConst = constant: items:
|
mapToAttrsWithConst = constant: items:
|
||||||
listToAttrs (map (name: nameValuePair name constant) items);
|
listToAttrs (map (name: nameValuePair name constant) items);
|
||||||
|
|
||||||
# [AttrSet] -> AttrSet
|
|
||||||
concatAttrs = foldr (a: b: a // b) {};
|
|
||||||
|
|
||||||
# (Int -> String -> a -> a) -> AttrSet -> AttrSet
|
# (Int -> String -> a -> a) -> AttrSet -> AttrSet
|
||||||
imap0Attrs = f: set:
|
imap0Attrs = f: set:
|
||||||
listToAttrs (imap0 (i: attr: nameValuePair attr (f i attr set.${attr})) (attrNames set));
|
listToAttrs (imap0 (i: attr: nameValuePair attr (f i attr set.${attr})) (attrNames set));
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
final: prev: let
|
||||||
|
inherit (prev) lib;
|
||||||
|
|
||||||
|
wrapWithWaylandIMEFlag = pkg: let
|
||||||
|
binaryName = lib.removePrefix "${lib.getBin pkg}/bin/" (lib.getExe pkg);
|
||||||
|
in pkg.overrideAttrs (prev': {
|
||||||
|
postInstall = (prev'.postInstall or "") + ''
|
||||||
|
wrapProgram "$out/bin/${binaryName}" \
|
||||||
|
--add-flags "--enable-wayland-ime"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
|
||||||
|
programList = [
|
||||||
|
"element-desktop"
|
||||||
|
"vscode"
|
||||||
|
"chromium"
|
||||||
|
"discord"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
lib.genAttrs programList (name: wrapWithWaylandIMEFlag prev.${name})
|
Loading…
Reference in New Issue