nix fmt
This commit is contained in:
parent
a9218a80e6
commit
7137e93805
49 changed files with 2034 additions and 2002 deletions
|
@ -1,16 +1,15 @@
|
|||
{ pkgs
|
||||
, lib
|
||||
, config
|
||||
, # these come in via home-manager.extraSpecialArgs and are specific to each node
|
||||
nodeFlake
|
||||
, packages'
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
# pkgsMaster = nodeFlake.inputs.nixpkgs-master.legacyPackages.${pkgs.system};
|
||||
pkgsUnstableSmall = import nodeFlake.inputs.nixpkgs-unstable-small { inherit (pkgs) system config; };
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
# these come in via home-manager.extraSpecialArgs and are specific to each node
|
||||
nodeFlake,
|
||||
packages',
|
||||
...
|
||||
}: let
|
||||
# pkgsMaster = nodeFlake.inputs.nixpkgs-master.legacyPackages.${pkgs.system};
|
||||
pkgsUnstableSmall = import nodeFlake.inputs.nixpkgs-unstable-small {inherit (pkgs) system config;};
|
||||
in {
|
||||
imports = [
|
||||
../profiles/common.nix
|
||||
# ../profiles/dotfiles.nix
|
||||
|
@ -37,7 +36,7 @@ in
|
|||
|
||||
home.sessionVariables.HM_CONFIG = "graphical-fullblown";
|
||||
home.sessionVariables.GOPATH = "$HOME/src/go";
|
||||
home.sessionVariables.PATH = pkgs.lib.concatStringsSep ":" [ "$HOME/.local/bin" "$PATH" ];
|
||||
home.sessionVariables.PATH = pkgs.lib.concatStringsSep ":" ["$HOME/.local/bin" "$PATH"];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"electron-24.8.6"
|
||||
|
@ -45,7 +44,7 @@ in
|
|||
];
|
||||
|
||||
home.packages =
|
||||
[ ]
|
||||
[]
|
||||
++ (with pkgs; [
|
||||
# Authentication
|
||||
# cacert
|
||||
|
@ -114,26 +113,24 @@ in
|
|||
let
|
||||
version = "6.44.0";
|
||||
in
|
||||
pkgsUnstableSmall.signal-desktop.overrideAttrs (old:
|
||||
lib.attrsets.optionalAttrs pkgs.stdenv.isAarch64 {
|
||||
inherit version;
|
||||
src = builtins.fetchurl
|
||||
{
|
||||
url = "https://github.com/0mniteck/Signal-Desktop-Mobian/raw/master/builds/release/signal-desktop_${version}_arm64.deb";
|
||||
sha256 =
|
||||
# lib.fakeSha256
|
||||
"sha256:0svb5vz08n3j4lx4kdjmx5lw9619kvvxg981rs6chh83qz5y519k"
|
||||
;
|
||||
}
|
||||
;
|
||||
})
|
||||
pkgsUnstableSmall.signal-desktop.overrideAttrs (old:
|
||||
lib.attrsets.optionalAttrs pkgs.stdenv.isAarch64 {
|
||||
inherit version;
|
||||
src =
|
||||
builtins.fetchurl
|
||||
{
|
||||
url = "https://github.com/0mniteck/Signal-Desktop-Mobian/raw/master/builds/release/signal-desktop_${version}_arm64.deb";
|
||||
sha256 =
|
||||
# lib.fakeSha256
|
||||
"sha256:0svb5vz08n3j4lx4kdjmx5lw9619kvvxg981rs6chh83qz5y519k";
|
||||
};
|
||||
})
|
||||
)
|
||||
|
||||
thunderbird
|
||||
|
||||
# gnome.cheese
|
||||
|
||||
|
||||
# Virtualization
|
||||
# virtmanager
|
||||
|
||||
|
@ -141,8 +138,6 @@ in
|
|||
remmina
|
||||
# freerdp
|
||||
|
||||
|
||||
|
||||
# Audio/Video Players
|
||||
ffmpeg
|
||||
vlc
|
||||
|
@ -193,7 +188,6 @@ in
|
|||
# mendeley
|
||||
evince
|
||||
|
||||
|
||||
# File Synchronzation
|
||||
maestral
|
||||
rsync
|
||||
|
@ -208,7 +202,6 @@ in
|
|||
# gparted
|
||||
# smartmontools
|
||||
|
||||
|
||||
## Python
|
||||
# packages'.myPython
|
||||
|
||||
|
@ -257,9 +250,10 @@ in
|
|||
# '')
|
||||
])
|
||||
++ (lib.lists.optionals (!pkgs.stdenv.targetPlatform.isAarch64) [
|
||||
])
|
||||
])
|
||||
++ (lib.lists.optionals (!pkgs.stdenv.targetPlatform.isAarch64) [
|
||||
(pkgs.banana-accounting.overrideDerivation
|
||||
(
|
||||
pkgs.banana-accounting.overrideDerivation
|
||||
(attrs:
|
||||
with nodeFlake.inputs'.nixpkgs-2211.legacyPackages; {
|
||||
# dontWrapGApps = true;
|
||||
|
@ -300,8 +294,7 @@ in
|
|||
pkgs.discord
|
||||
pkgsUnstableSmall.session-desktop
|
||||
pkgsUnstableSmall.rustdesk
|
||||
])
|
||||
;
|
||||
]);
|
||||
|
||||
systemd.user.startServices = true;
|
||||
services.syncthing.enable = true;
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{ pkgs, lib, ... }: {
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
# TODO: re-enable this with the appropriate version?
|
||||
# programs.home-manager.enable = true;
|
||||
# programs.home-manager.path = https://github.com/rycee/home-manager/archive/445c0b1482c38172a9f8294ee16a7ca7462388e5.tar.gz;
|
||||
|
@ -8,7 +12,7 @@
|
|||
allowBroken = false;
|
||||
allowUnfree = true;
|
||||
|
||||
permittedInsecurePackages = [ ];
|
||||
permittedInsecurePackages = [];
|
||||
};
|
||||
|
||||
home.keyboard = {
|
||||
|
@ -32,7 +36,7 @@
|
|||
programs.fzf.enable = true;
|
||||
|
||||
home.packages =
|
||||
[ ]
|
||||
[]
|
||||
++ (with pkgs; [
|
||||
coreutils
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
{ repoFlake
|
||||
, pkgs
|
||||
, config
|
||||
, repoHttps ? "https://gitlab.com/steveeJ/dotfiles.git"
|
||||
, repoSsh ? "git@gitlab.com:/steveeJ/dotfiles.git"
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
{
|
||||
repoFlake,
|
||||
pkgs,
|
||||
config,
|
||||
repoHttps ? "https://gitlab.com/steveeJ/dotfiles.git",
|
||||
repoSsh ? "git@gitlab.com:/steveeJ/dotfiles.git",
|
||||
...
|
||||
}: let
|
||||
repoBareLocal =
|
||||
pkgs.runCommand "fetchbare"
|
||||
{
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "0000000000000000000000000000000000000000000000000000";
|
||||
} ''
|
||||
{
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "0000000000000000000000000000000000000000000000000000";
|
||||
} ''
|
||||
(
|
||||
set -xe
|
||||
export GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
|
@ -39,9 +39,7 @@ let
|
|||
set_remotes ${repoHttps} ${repoSsh}
|
||||
fi
|
||||
'';
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
# TODO: fix the dotfiles
|
||||
# home.activation.vcsh = config.lib.dag.entryAfter["linkGeneration"] ''
|
||||
# $DRY_RUN_CMD ${vcshActivationScript}
|
||||
|
|
|
@ -1,19 +1,18 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, # packages',
|
||||
repoFlakeInputs'
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (import ../lib.nix { }) mkSimpleTrayService;
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
# packages',
|
||||
repoFlakeInputs',
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib.nix {}) mkSimpleTrayService;
|
||||
|
||||
lockCmd = "${pkgs.swaylock}/bin/swaylock -efF --color '#000000'";
|
||||
displayOffCmd = "${pkgs.sway}/bin/swaymsg 'output * power off'";
|
||||
displayOnCmd = "${pkgs.sway}/bin/swaymsg 'output * power on'";
|
||||
swapOutputWorkspaces = ../../../scripts/sway-swapoutputworkspaces.sh;
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [
|
||||
../profiles/wayland-desktop.nix
|
||||
../programs/waybar.nix
|
||||
|
@ -86,106 +85,104 @@ in
|
|||
systemd.enable = true;
|
||||
xwayland = true;
|
||||
|
||||
config =
|
||||
let
|
||||
modifier = "Mod4";
|
||||
inherit (config.wayland.windowManager.sway.config) left right up down;
|
||||
in
|
||||
{
|
||||
inherit modifier;
|
||||
bars = [ ];
|
||||
config = let
|
||||
modifier = "Mod4";
|
||||
inherit (config.wayland.windowManager.sway.config) left right up down;
|
||||
in {
|
||||
inherit modifier;
|
||||
bars = [];
|
||||
|
||||
input = {
|
||||
"type:keyboard" =
|
||||
{
|
||||
xkb_layout = config.home.keyboard.layout;
|
||||
xkb_variant = config.home.keyboard.variant;
|
||||
}
|
||||
// lib.attrsets.optionalAttrs (builtins.length (config.home.keyboard.options or [ ]) > 0) {
|
||||
xkb_options = builtins.concatStringsSep "," config.home.keyboard.options;
|
||||
};
|
||||
|
||||
"type:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
input = {
|
||||
"type:keyboard" =
|
||||
{
|
||||
xkb_layout = config.home.keyboard.layout;
|
||||
xkb_variant = config.home.keyboard.variant;
|
||||
}
|
||||
// lib.attrsets.optionalAttrs (builtins.length (config.home.keyboard.options or []) > 0) {
|
||||
xkb_options = builtins.concatStringsSep "," config.home.keyboard.options;
|
||||
};
|
||||
|
||||
"type:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
};
|
||||
|
||||
keybindings = lib.mkOptionDefault {
|
||||
# as of 2023-05-21 the `!!` arg parsing mode was broken for me on yofi
|
||||
# "${modifier}+d" = "exec ${packages'.yofi}/bin/yofi binapps";
|
||||
"${modifier}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel --show-actions";
|
||||
|
||||
# only 1-9 exist on the default config
|
||||
"${modifier}+0" = "workspace number 0";
|
||||
"${modifier}+Shift+0" = "move container to workspace number 0";
|
||||
|
||||
# disable splitting for now as i sometimes trigger it accidentally and then get stuck with it
|
||||
"${modifier}+b" = "nop";
|
||||
"${modifier}+v" = "nop";
|
||||
|
||||
# move workspace to output
|
||||
"${modifier}+Control+Shift+${left}" = "move workspace to output left";
|
||||
"${modifier}+Control+Shift+${right}" = "move workspace to output right";
|
||||
"${modifier}+Control+Shift+${up}" = "move workspace to output up";
|
||||
"${modifier}+Control+Shift+${down}" = "move workspace to output down";
|
||||
# move workspace to output with arrow keys
|
||||
"${modifier}+Control+Shift+Left" = "move workspace to output left";
|
||||
"${modifier}+Control+Shift+Right" = "move workspace to output right";
|
||||
"${modifier}+Control+Shift+Up" = "move workspace to output up";
|
||||
"${modifier}+Control+Shift+Down" = "move workspace to output down";
|
||||
|
||||
"${modifier}+Shift+e" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+Shift+q" = "exec ${pkgs.sway}/bin/swaymsg -t get_tree | ${pkgs.jq}/bin/jq 'recurse(.nodes[], .floating_nodes[]) | select(.focused).pid' | ${pkgs.findutils}/bin/xargs -L1 kill -9";
|
||||
|
||||
"${modifier}+x" = "exec ${swapOutputWorkspaces}";
|
||||
|
||||
"${modifier}+Ctrl+l" = "exec ${lockCmd}";
|
||||
|
||||
"--locked XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5";
|
||||
"--locked XF86AudioMute" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute";
|
||||
|
||||
"Print" = "exec ${pkgs.shotman}/bin/shotman --capture region";
|
||||
};
|
||||
|
||||
terminal = "alacritty";
|
||||
startup =
|
||||
[
|
||||
{
|
||||
command = builtins.toString (pkgs.writeShellScript "ensure-graphical-session" ''
|
||||
(
|
||||
${pkgs.coreutils}/bin/sleep 0.2
|
||||
${pkgs.systemd}/bin/systemctl --user restart graphical-session.target
|
||||
) &
|
||||
'');
|
||||
}
|
||||
]
|
||||
++ lib.optionals config.services.swayidle.enable [
|
||||
{
|
||||
command = builtins.toString (pkgs.writeShellScript "ensure-graphical-session" ''
|
||||
(
|
||||
${pkgs.coreutils}/bin/sleep 0.2
|
||||
${pkgs.systemd}/bin/systemctl --user restart swayidle
|
||||
) &
|
||||
'');
|
||||
}
|
||||
];
|
||||
|
||||
colors.focused = lib.mkOptionDefault {
|
||||
childBorder = lib.mkForce "#ffa500";
|
||||
};
|
||||
|
||||
window.titlebar = false;
|
||||
window.border = 4;
|
||||
|
||||
# this maps to focus_on_window_activation
|
||||
focus.newWindow = "urgent";
|
||||
};
|
||||
|
||||
keybindings = lib.mkOptionDefault {
|
||||
# as of 2023-05-21 the `!!` arg parsing mode was broken for me on yofi
|
||||
# "${modifier}+d" = "exec ${packages'.yofi}/bin/yofi binapps";
|
||||
"${modifier}+d" = "exec ${pkgs.fuzzel}/bin/fuzzel --show-actions";
|
||||
|
||||
# only 1-9 exist on the default config
|
||||
"${modifier}+0" = "workspace number 0";
|
||||
"${modifier}+Shift+0" = "move container to workspace number 0";
|
||||
|
||||
# disable splitting for now as i sometimes trigger it accidentally and then get stuck with it
|
||||
"${modifier}+b" = "nop";
|
||||
"${modifier}+v" = "nop";
|
||||
|
||||
# move workspace to output
|
||||
"${modifier}+Control+Shift+${left}" = "move workspace to output left";
|
||||
"${modifier}+Control+Shift+${right}" = "move workspace to output right";
|
||||
"${modifier}+Control+Shift+${up}" = "move workspace to output up";
|
||||
"${modifier}+Control+Shift+${down}" = "move workspace to output down";
|
||||
# move workspace to output with arrow keys
|
||||
"${modifier}+Control+Shift+Left" = "move workspace to output left";
|
||||
"${modifier}+Control+Shift+Right" = "move workspace to output right";
|
||||
"${modifier}+Control+Shift+Up" = "move workspace to output up";
|
||||
"${modifier}+Control+Shift+Down" = "move workspace to output down";
|
||||
|
||||
"${modifier}+Shift+e" = "exec ${pkgs.sway}/bin/swaymsg exit";
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+Shift+q" = "exec ${pkgs.sway}/bin/swaymsg -t get_tree | ${pkgs.jq}/bin/jq 'recurse(.nodes[], .floating_nodes[]) | select(.focused).pid' | ${pkgs.findutils}/bin/xargs -L1 kill -9";
|
||||
|
||||
"${modifier}+x" = "exec ${swapOutputWorkspaces}";
|
||||
|
||||
"${modifier}+Ctrl+l" = "exec ${lockCmd}";
|
||||
|
||||
"--locked XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||
|
||||
"XF86AudioRaiseVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume +5";
|
||||
"XF86AudioLowerVolume" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --change-volume -5";
|
||||
"--locked XF86AudioMute" = "exec ${pkgs.pulsemixer}/bin/pulsemixer --toggle-mute";
|
||||
|
||||
"Print" = "exec ${pkgs.shotman}/bin/shotman --capture region";
|
||||
};
|
||||
|
||||
terminal = "alacritty";
|
||||
startup =
|
||||
[
|
||||
{
|
||||
command = builtins.toString (pkgs.writeShellScript "ensure-graphical-session" ''
|
||||
(
|
||||
${pkgs.coreutils}/bin/sleep 0.2
|
||||
${pkgs.systemd}/bin/systemctl --user restart graphical-session.target
|
||||
) &
|
||||
'');
|
||||
}
|
||||
]
|
||||
++ lib.optionals config.services.swayidle.enable [
|
||||
{
|
||||
command = builtins.toString (pkgs.writeShellScript "ensure-graphical-session" ''
|
||||
(
|
||||
${pkgs.coreutils}/bin/sleep 0.2
|
||||
${pkgs.systemd}/bin/systemctl --user restart swayidle
|
||||
) &
|
||||
'');
|
||||
}
|
||||
];
|
||||
|
||||
colors.focused = lib.mkOptionDefault {
|
||||
childBorder = lib.mkForce "#ffa500";
|
||||
};
|
||||
|
||||
window.titlebar = false;
|
||||
window.border = 4;
|
||||
|
||||
# this maps to focus_on_window_activation
|
||||
focus.newWindow = "urgent";
|
||||
};
|
||||
};
|
||||
|
||||
services.swayidle = {
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
{ pkgs
|
||||
, config
|
||||
, lib
|
||||
, repoFlake
|
||||
, nodeFlake
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
inherit (import ../lib.nix { }) mkSimpleTrayService;
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
repoFlake,
|
||||
nodeFlake,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib.nix {}) mkSimpleTrayService;
|
||||
|
||||
nixpkgs-wayland' = repoFlake.inputs.nixpkgs-wayland.packages.${pkgs.system};
|
||||
wayprompt = nixpkgs-wayland'.wayprompt;
|
||||
in
|
||||
{
|
||||
in {
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
# services.gpg-agent.pinentryFlavor = lib.mkForce null;
|
||||
|
@ -27,43 +26,46 @@ in
|
|||
systemd.user.targets.tray = {
|
||||
Unit = {
|
||||
Description = "Home Manager System Tray";
|
||||
Requires = [ "graphical-session-pre.target" ];
|
||||
Requires = ["graphical-session-pre.target"];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# required by network-manager-applet
|
||||
pkgs.networkmanagerapplet
|
||||
|
||||
wlr-randr
|
||||
wayout
|
||||
wl-clipboard
|
||||
wmctrl
|
||||
|
||||
nixpkgs-wayland'.shotman
|
||||
|
||||
# identifies key input syms
|
||||
wev
|
||||
|
||||
# TODO: whwat's this for?
|
||||
# wltype
|
||||
|
||||
pavucontrol
|
||||
playerctl
|
||||
pasystray
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
# libsForQt5.qt5.qtwayland
|
||||
# libsForQt6.qt6.qtwayland
|
||||
|
||||
# probably required by flameshot
|
||||
# xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
# grim
|
||||
] ++ (lib.lists.optionals (!pkgs.stdenv.isAarch64)
|
||||
# TODO: broken on aarch64
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
# required by network-manager-applet
|
||||
pkgs.networkmanagerapplet
|
||||
|
||||
wlr-randr
|
||||
wayout
|
||||
wl-clipboard
|
||||
wmctrl
|
||||
|
||||
nixpkgs-wayland'.shotman
|
||||
|
||||
# identifies key input syms
|
||||
wev
|
||||
|
||||
# TODO: whwat's this for?
|
||||
# wltype
|
||||
|
||||
pavucontrol
|
||||
playerctl
|
||||
pasystray
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
# libsForQt5.qt5.qtwayland
|
||||
# libsForQt6.qt6.qtwayland
|
||||
|
||||
# probably required by flameshot
|
||||
# xdg-desktop-portal xdg-desktop-portal-wlr
|
||||
# grim
|
||||
]
|
||||
);
|
||||
++ (
|
||||
lib.lists.optionals (!pkgs.stdenv.isAarch64)
|
||||
# TODO: broken on aarch64
|
||||
[
|
||||
]
|
||||
);
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_SESSION_TYPE = "wayland";
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
{ name
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
{
|
||||
name,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
extensions =
|
||||
[
|
||||
#undetectable adblocker
|
||||
{ id = "gcfcpohokifjldeandkfjoboemihipmb"; }
|
||||
{id = "gcfcpohokifjldeandkfjoboemihipmb";}
|
||||
|
||||
# ublock origin
|
||||
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; }
|
||||
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";}
|
||||
|
||||
# # YT ad block
|
||||
# {id = "cmedhionkhpnakcndndgjdbohmhepckk";}
|
||||
|
@ -19,15 +19,15 @@ let
|
|||
# {id = "cfhdojbkjhnklbpkdaibdccddilifddb";}
|
||||
|
||||
# Cookie Notice Blocker
|
||||
{ id = "odhmfmnoejhihkmfebnolljiibpnednn"; }
|
||||
{id = "odhmfmnoejhihkmfebnolljiibpnednn";}
|
||||
# i don't care about cookies
|
||||
{ id = "fihnjjcciajhdojfnbdddfaoknhalnja"; }
|
||||
{id = "fihnjjcciajhdojfnbdddfaoknhalnja";}
|
||||
|
||||
# NopeCHA
|
||||
{ id = "dknlfmjaanfblgfdfebhijalfmhmjjjo"; }
|
||||
{id = "dknlfmjaanfblgfdfebhijalfmhmjjjo";}
|
||||
|
||||
# h264ify
|
||||
{ id = "aleakchihdccplidncghkekgioiakgal"; }
|
||||
{id = "aleakchihdccplidncghkekgioiakgal";}
|
||||
|
||||
# clippy
|
||||
# {id = "honbeilkanbghjimjoniipnnehlmhggk"}
|
||||
|
@ -38,20 +38,19 @@ let
|
|||
}
|
||||
|
||||
# cookie autodelete
|
||||
{ id = "fhcgjolkccmbidfldomjliifgaodjagh"; }
|
||||
{id = "fhcgjolkccmbidfldomjliifgaodjagh";}
|
||||
|
||||
# unhook
|
||||
{ id = "khncfooichmfjbepaaaebmommgaepoid"; }
|
||||
{id = "khncfooichmfjbepaaaebmommgaepoid";}
|
||||
]
|
||||
++ (lib.lists.optionals ((builtins.match "^steveej.*" name) != null) [
|
||||
# Vimium C
|
||||
{ id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; }
|
||||
{id = "hfjbmagddngcpeloejdejnfgbamkjaeg";}
|
||||
|
||||
# always right
|
||||
{ id = "npjpaghfnndnnmjiliibnkmdfgbojokj"; }
|
||||
{id = "npjpaghfnndnnmjiliibnkmdfgbojokj";}
|
||||
]);
|
||||
in
|
||||
{
|
||||
in {
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
inherit extensions;
|
||||
|
@ -63,5 +62,5 @@ in
|
|||
inherit extensions;
|
||||
};
|
||||
|
||||
programs.browserpass = { browsers = [ "chromium" "brave" ]; };
|
||||
programs.browserpass = {browsers = ["chromium" "brave"];};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
{pkgs, ...}: {
|
||||
services.espanso = {
|
||||
# package = pkgs.espanso.overrideAttrs(_: {
|
||||
# # src =
|
||||
|
@ -10,66 +10,64 @@
|
|||
# backend = "Clipboard";
|
||||
};
|
||||
};
|
||||
matches =
|
||||
let
|
||||
playerctl = ''
|
||||
${pkgs.coreutils}/bin/env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(${pkgs.coreutils}/bin/id -u)/bus" ${pkgs.playerctl}/bin/playerctl'';
|
||||
in
|
||||
{
|
||||
default = {
|
||||
matches = [
|
||||
{
|
||||
trigger = ":vpos";
|
||||
replace = "{{output}}";
|
||||
vars = [
|
||||
{
|
||||
name = "output";
|
||||
type = "script";
|
||||
params = {
|
||||
args = [
|
||||
(pkgs.writeScript "espanso" ''
|
||||
#! ${pkgs.python3}/bin/python
|
||||
import subprocess, os, math, datetime
|
||||
matches = let
|
||||
playerctl = ''
|
||||
${pkgs.coreutils}/bin/env DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/$(${pkgs.coreutils}/bin/id -u)/bus" ${pkgs.playerctl}/bin/playerctl'';
|
||||
in {
|
||||
default = {
|
||||
matches = [
|
||||
{
|
||||
trigger = ":vpos";
|
||||
replace = "{{output}}";
|
||||
vars = [
|
||||
{
|
||||
name = "output";
|
||||
type = "script";
|
||||
params = {
|
||||
args = [
|
||||
(pkgs.writeScript "espanso" ''
|
||||
#! ${pkgs.python3}/bin/python
|
||||
import subprocess, os, math, datetime
|
||||
|
||||
id=str(os.getuid())
|
||||
result=subprocess.run(args=["${pkgs.playerctl}/bin/playerctl", "position"], env={"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/"+id+"/bus"},capture_output=True)
|
||||
result.check_returncode()
|
||||
id=str(os.getuid())
|
||||
result=subprocess.run(args=["${pkgs.playerctl}/bin/playerctl", "position"], env={"DBUS_SESSION_BUS_ADDRESS": "unix:path=/run/user/"+id+"/bus"},capture_output=True)
|
||||
result.check_returncode()
|
||||
|
||||
position_secs = math.trunc(float(result.stdout))
|
||||
position_human = datetime.timedelta(seconds=position_secs)
|
||||
print("%s - %s" % (position_human, position_secs))
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
trigger = ":vtit";
|
||||
replace = "{{output}}";
|
||||
vars = [
|
||||
{
|
||||
name = "output";
|
||||
type = "script";
|
||||
params = {
|
||||
args = [
|
||||
(pkgs.writeShellScript "espanso"
|
||||
"${playerctl} metadata title")
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
trigger = ":dunno";
|
||||
replace = "¯\\_(ツ)_/¯";
|
||||
}
|
||||
{
|
||||
trigger = ":shrug";
|
||||
replace = "¯\\_(ツ)_/¯";
|
||||
}
|
||||
];
|
||||
};
|
||||
position_secs = math.trunc(float(result.stdout))
|
||||
position_human = datetime.timedelta(seconds=position_secs)
|
||||
print("%s - %s" % (position_human, position_secs))
|
||||
'')
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
trigger = ":vtit";
|
||||
replace = "{{output}}";
|
||||
vars = [
|
||||
{
|
||||
name = "output";
|
||||
type = "script";
|
||||
params = {
|
||||
args = [
|
||||
(pkgs.writeShellScript "espanso"
|
||||
"${playerctl} metadata title")
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
trigger = ":dunno";
|
||||
replace = "¯\\_(ツ)_/¯";
|
||||
}
|
||||
{
|
||||
trigger = ":shrug";
|
||||
replace = "¯\\_(ツ)_/¯";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
{repoFlake, pkgs, ...}: {
|
||||
{
|
||||
repoFlake,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# required by pass-otp
|
||||
# home.sessionVariables.PASSWORD_STORE_EXTENSIONS_DIR = "$HOME/.nix-profile/lib/password-store/extensions";
|
||||
# home.sessionVariables.PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, osConfig
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
libdecsync = pkgs.python3Packages.buildPythonPackage rec {
|
||||
pname = "libdecsync";
|
||||
version = "2.2.1";
|
||||
|
@ -38,53 +38,50 @@ let
|
|||
# pkgs.libxcrypt
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [ libdecsync pkgs.python3Packages.setuptools ];
|
||||
propagatedBuildInputs = [libdecsync pkgs.python3Packages.setuptools];
|
||||
};
|
||||
radicale-decsync = pkgs.radicale.overrideAttrs (old: {
|
||||
propagatedBuildInputs =
|
||||
old.propagatedBuildInputs
|
||||
++ [ radicale-storage-decsync ];
|
||||
++ [radicale-storage-decsync];
|
||||
});
|
||||
|
||||
mkRadicaleService =
|
||||
{ suffix
|
||||
, port
|
||||
,
|
||||
}:
|
||||
let
|
||||
radicale-config = pkgs.writeText "radicale-config-${suffix}" ''
|
||||
[server]
|
||||
hosts = localhost:${builtins.toString port}
|
||||
mkRadicaleService = {
|
||||
suffix,
|
||||
port,
|
||||
}: let
|
||||
radicale-config = pkgs.writeText "radicale-config-${suffix}" ''
|
||||
[server]
|
||||
hosts = localhost:${builtins.toString port}
|
||||
|
||||
[auth]
|
||||
type = htpasswd
|
||||
htpasswd_filename = ${osConfig.sops.secrets.radicale_htpasswd.path}
|
||||
htpasswd_encryption = bcrypt
|
||||
[auth]
|
||||
type = htpasswd
|
||||
htpasswd_filename = ${osConfig.sops.secrets.radicale_htpasswd.path}
|
||||
htpasswd_encryption = bcrypt
|
||||
|
||||
[storage]
|
||||
type = radicale_storage_decsync
|
||||
filesystem_folder = ${config.xdg.dataHome}/radicale/radicale-${suffix}
|
||||
decsync_dir = ${config.xdg.dataHome}/decsync/decsync-${suffix}
|
||||
'';
|
||||
in
|
||||
{
|
||||
systemd.user.services."radicale-${suffix}" = {
|
||||
Unit.Description = "Radicale with DecSync (${suffix})";
|
||||
Service = {
|
||||
ExecStart = "${radicale-decsync}/bin/radicale -C ${radicale-config}";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = [ "default.target" ];
|
||||
[storage]
|
||||
type = radicale_storage_decsync
|
||||
filesystem_folder = ${config.xdg.dataHome}/radicale/radicale-${suffix}
|
||||
decsync_dir = ${config.xdg.dataHome}/decsync/decsync-${suffix}
|
||||
'';
|
||||
in {
|
||||
systemd.user.services."radicale-${suffix}" = {
|
||||
Unit.Description = "Radicale with DecSync (${suffix})";
|
||||
Service = {
|
||||
ExecStart = "${radicale-decsync}/bin/radicale -C ${radicale-config}";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
Install.WantedBy = ["default.target"];
|
||||
};
|
||||
};
|
||||
in
|
||||
builtins.foldl' (sum: cur: lib.recursiveUpdate sum (mkRadicaleService cur)) { } [
|
||||
{
|
||||
suffix = "personal";
|
||||
port = 5232;
|
||||
}
|
||||
{
|
||||
suffix = "family";
|
||||
port = 5233;
|
||||
}
|
||||
]
|
||||
builtins.foldl' (sum: cur: lib.recursiveUpdate sum (mkRadicaleService cur)) {} [
|
||||
{
|
||||
suffix = "personal";
|
||||
port = 5232;
|
||||
}
|
||||
{
|
||||
suffix = "family";
|
||||
port = 5233;
|
||||
}
|
||||
]
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
{ pkgs, nodeFlake, ... }:
|
||||
{
|
||||
pkgs,
|
||||
nodeFlake,
|
||||
...
|
||||
}: {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
extensions = [
|
||||
# TODO: how can i install (this) vsix(s) directly?
|
||||
# (builtins.fetchurl {
|
||||
# # https://open-vsx.org/extension/jeanp413/open-remote-ssh
|
||||
# url = "https://open-vsx.org/api/jeanp413/open-remote-ssh/0.0.45/file/jeanp413.open-remote-ssh-0.0.45.vsix";
|
||||
# sha256 = "1qc1qsahfx1nvznq4adplx63w5d94xhafngv76vnqjjbzhv991v2";
|
||||
# })
|
||||
] ++ (with pkgs.vscode-extensions;
|
||||
extensions =
|
||||
[
|
||||
# TODO: how can i install (this) vsix(s) directly?
|
||||
# (builtins.fetchurl {
|
||||
# # https://open-vsx.org/extension/jeanp413/open-remote-ssh
|
||||
# url = "https://open-vsx.org/api/jeanp413/open-remote-ssh/0.0.45/file/jeanp413.open-remote-ssh-0.0.45.vsix";
|
||||
# sha256 = "1qc1qsahfx1nvznq4adplx63w5d94xhafngv76vnqjjbzhv991v2";
|
||||
# })
|
||||
]
|
||||
++ (with pkgs.vscode-extensions; [
|
||||
bbenoist.nix
|
||||
eamodio.gitlens
|
||||
mkhl.direnv
|
||||
|
@ -34,7 +38,7 @@
|
|||
mutableExtensionsDir = true;
|
||||
};
|
||||
|
||||
home.packages = [ pkgs.nixpkgs-fmt pkgs.alejandra ];
|
||||
home.packages = [pkgs.nixpkgs-fmt pkgs.alejandra];
|
||||
}
|
||||
# TODO: automate
|
||||
### original list:
|
||||
|
|
|
@ -1,30 +1,29 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
just-plugin =
|
||||
let
|
||||
plugin_file = pkgs.writeText "_just" ''
|
||||
#compdef just
|
||||
#autload
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
just-plugin = let
|
||||
plugin_file = pkgs.writeText "_just" ''
|
||||
#compdef just
|
||||
#autload
|
||||
|
||||
alias justl="\just --list"
|
||||
alias juste="\just --evaluate"
|
||||
alias justl="\just --list"
|
||||
alias juste="\just --evaluate"
|
||||
|
||||
local subcmds=()
|
||||
local subcmds=()
|
||||
|
||||
while read -r line ; do
|
||||
if [[ ! $line == Available* ]] ;
|
||||
then
|
||||
subcmds+=(''${line/[[:space:]]*\#/:})
|
||||
fi
|
||||
done < <(just --list)
|
||||
while read -r line ; do
|
||||
if [[ ! $line == Available* ]] ;
|
||||
then
|
||||
subcmds+=(''${line/[[:space:]]*\#/:})
|
||||
fi
|
||||
done < <(just --list)
|
||||
|
||||
_describe 'command' subcmds
|
||||
'';
|
||||
in
|
||||
_describe 'command' subcmds
|
||||
'';
|
||||
in
|
||||
pkgs.stdenv.mkDerivation {
|
||||
name = "just-completions";
|
||||
version = "0.1.0";
|
||||
|
@ -36,8 +35,7 @@ let
|
|||
chmod --recursive a-w $out
|
||||
'';
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
|
@ -48,58 +46,56 @@ in
|
|||
# will be called again by oh-my-zsh
|
||||
enableCompletion = false;
|
||||
enableAutosuggestions = true;
|
||||
initExtra =
|
||||
let
|
||||
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
|
||||
in
|
||||
''
|
||||
if test ! -n "$TMPDIR" -a -z "$TMPDIR"; then
|
||||
unset TMPDIR
|
||||
fi
|
||||
initExtra = let
|
||||
inNixShell = ''$([[ -n "$IN_NIX_SHELL" ]] && printf " 🐚")'';
|
||||
in ''
|
||||
if test ! -n "$TMPDIR" -a -z "$TMPDIR"; then
|
||||
unset TMPDIR
|
||||
fi
|
||||
|
||||
if test ! -n "$TMP" -a -z "$TMP"; then
|
||||
unset TMP
|
||||
fi
|
||||
if test ! -n "$TMP" -a -z "$TMP"; then
|
||||
unset TMP
|
||||
fi
|
||||
|
||||
|
||||
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||
RPROMPT=""
|
||||
PROMPT='%F{%(!.red.green)}%n%f@%m %(?.%F{green}✓%f.%F{red}✗ ($?%))%f %F{blue}%~%f${inNixShell}%F{magenta}$(git_prompt_info)%f$prompt_newline%_%F{%(!.red.green)}$(prompt_char)%f '
|
||||
RPROMPT=""
|
||||
|
||||
# Automatic rehash
|
||||
zstyle ':completion:*' rehash true
|
||||
# Automatic rehash
|
||||
zstyle ':completion:*' rehash true
|
||||
|
||||
if [ -f $HOME/.shrc.d/sh_aliases ]; then
|
||||
. $HOME/.shrc.d/sh_aliases
|
||||
fi
|
||||
if [ -f $HOME/.shrc.d/sh_aliases ]; then
|
||||
. $HOME/.shrc.d/sh_aliases
|
||||
fi
|
||||
|
||||
${
|
||||
if builtins.hasAttr "homeshick" pkgs
|
||||
then ''
|
||||
source ${pkgs.homeshick}/homeshick.sh
|
||||
fpath=(${pkgs.homeshick}/completions $fpath)
|
||||
''
|
||||
else ""
|
||||
}
|
||||
${
|
||||
if builtins.hasAttr "homeshick" pkgs
|
||||
then ''
|
||||
source ${pkgs.homeshick}/homeshick.sh
|
||||
fpath=(${pkgs.homeshick}/completions $fpath)
|
||||
''
|
||||
else ""
|
||||
}
|
||||
|
||||
# Disable intercepting of ctrl-s and ctrl-q as flow control.
|
||||
stty stop ''' -ixoff -ixon
|
||||
# Disable intercepting of ctrl-s and ctrl-q as flow control.
|
||||
stty stop ''' -ixoff -ixon
|
||||
|
||||
# don't cd into directories when executed
|
||||
unsetopt AUTO_CD
|
||||
# don't cd into directories when executed
|
||||
unsetopt AUTO_CD
|
||||
|
||||
# print lines without termination
|
||||
setopt PROMPT_CR
|
||||
setopt PROMPT_SP
|
||||
export PROMPT_EOL_MARK=""
|
||||
# print lines without termination
|
||||
setopt PROMPT_CR
|
||||
setopt PROMPT_SP
|
||||
export PROMPT_EOL_MARK=""
|
||||
|
||||
${lib.optionalString config.services.gpg-agent.enable ''
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"
|
||||
''}
|
||||
${lib.optionalString config.services.gpg-agent.enable ''
|
||||
export SSH_AUTH_SOCK="$XDG_RUNTIME_DIR/gnupg/S.gpg-agent.ssh"
|
||||
''}
|
||||
|
||||
${lib.optionalString config.programs.neovim.enable ''
|
||||
export EDITOR="nvim"
|
||||
''}
|
||||
'';
|
||||
${lib.optionalString config.programs.neovim.enable ''
|
||||
export EDITOR="nvim"
|
||||
''}
|
||||
'';
|
||||
|
||||
plugins = [
|
||||
{
|
||||
|
@ -132,7 +128,7 @@ in
|
|||
oh-my-zsh = {
|
||||
enable = true;
|
||||
theme = "tjkirch";
|
||||
plugins = [ "git" "sudo" ];
|
||||
plugins = ["git" "sudo"];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue