feat: introduce treefmt and fmt all
This commit is contained in:
parent
80250b0179
commit
27c6c4f9fa
237 changed files with 5440 additions and 5214 deletions
|
@ -5,13 +5,14 @@
|
|||
# these come in via home-manager.extraSpecialArgs and are specific to each node
|
||||
nodeFlake,
|
||||
repoFlake,
|
||||
packages',
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
pkgsUnstable =
|
||||
pkgs.pkgsUnstable
|
||||
or (import nodeFlake.inputs.nixpkgs-unstable {inherit (pkgs) system config overlays;});
|
||||
in {
|
||||
or (import nodeFlake.inputs.nixpkgs-unstable { inherit (pkgs) system config overlays; });
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../profiles/common.nix
|
||||
# ../profiles/dotfiles.nix
|
||||
|
@ -34,18 +35,18 @@ in {
|
|||
../programs/libreoffice.nix
|
||||
../programs/neovim.nix
|
||||
../programs/vscode
|
||||
{
|
||||
home.packages = [
|
||||
pkgsUnstable.markdown-oxide
|
||||
];
|
||||
}
|
||||
{ home.packages = [ pkgsUnstable.markdown-oxide ]; }
|
||||
];
|
||||
|
||||
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.allowInsecurePredicate = pkg:
|
||||
nixpkgs.config.allowInsecurePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"electron-28.3.3"
|
||||
"electron-27.3.11"
|
||||
|
@ -68,8 +69,7 @@ in {
|
|||
# ];
|
||||
|
||||
home.packages =
|
||||
[]
|
||||
++ (with pkgs; [
|
||||
(with pkgs; [
|
||||
# Authentication
|
||||
# cacert
|
||||
# fprintd
|
||||
|
@ -246,19 +246,15 @@ in {
|
|||
# libretro.snes9x2010
|
||||
# retroarchFull
|
||||
|
||||
(
|
||||
pkgs.logseq.overrideAttrs (
|
||||
attrs:
|
||||
lib.attrsets.recursiveUpdate
|
||||
attrs
|
||||
(
|
||||
lib.attrsets.optionalAttrs pkgs.stdenv.isAarch64 {
|
||||
src = repoFlake.inputs.logseq_0_10_9_aarch64_appimage;
|
||||
meta.platforms = ["aarch64-linux"];
|
||||
}
|
||||
)
|
||||
(pkgs.logseq.overrideAttrs (
|
||||
attrs:
|
||||
lib.attrsets.recursiveUpdate attrs (
|
||||
lib.attrsets.optionalAttrs pkgs.stdenv.isAarch64 {
|
||||
src = repoFlake.inputs.logseq_0_10_9_aarch64_appimage;
|
||||
meta.platforms = [ "aarch64-linux" ];
|
||||
}
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
# (
|
||||
# pkgsUnstable.callPackage (repoFlake + "/nix/pkgs/logseq")
|
||||
|
@ -267,8 +263,7 @@ in {
|
|||
# })
|
||||
# )
|
||||
])
|
||||
++ (lib.lists.optionals (!pkgs.stdenv.targetPlatform.isAarch64) [
|
||||
])
|
||||
++ (lib.lists.optionals (!pkgs.stdenv.targetPlatform.isAarch64) [ ])
|
||||
++ (lib.lists.optionals (!pkgs.stdenv.targetPlatform.isAarch64) [
|
||||
pkgsUnstable.ledger-live-desktop
|
||||
|
||||
|
|
|
@ -1,13 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages =
|
||||
[]
|
||||
++ (with pkgs; [
|
||||
gnome.gnome-tweaks
|
||||
gnome.gnome-keyring
|
||||
gnome.seahorse
|
||||
]);
|
||||
home.packages = with pkgs; [
|
||||
gnome.gnome-tweaks
|
||||
gnome.gnome-keyring
|
||||
gnome.seahorse
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
../profiles/common.nix
|
||||
../profiles/qtile-desktop.nix
|
||||
|
@ -16,89 +13,87 @@
|
|||
../programs/pass.nix
|
||||
];
|
||||
|
||||
home.packages =
|
||||
[]
|
||||
++ (with pkgs; [
|
||||
# Nix package related tools
|
||||
patchelf
|
||||
nix-index
|
||||
nix-prefetch-scripts
|
||||
home.packages = with pkgs; [
|
||||
# Nix package related tools
|
||||
patchelf
|
||||
nix-index
|
||||
nix-prefetch-scripts
|
||||
|
||||
# Version Control Systems
|
||||
gitless
|
||||
# Version Control Systems
|
||||
gitless
|
||||
|
||||
# Process/System Administration
|
||||
htop
|
||||
gnome.gnome-tweaks
|
||||
xorg.xhost
|
||||
dmidecode
|
||||
evtest
|
||||
# Process/System Administration
|
||||
htop
|
||||
gnome.gnome-tweaks
|
||||
xorg.xhost
|
||||
dmidecode
|
||||
evtest
|
||||
|
||||
# Archive Managers
|
||||
sshfs-fuse
|
||||
xarchive
|
||||
p7zip
|
||||
zip
|
||||
unzip
|
||||
gzip
|
||||
lzop
|
||||
# Archive Managers
|
||||
sshfs-fuse
|
||||
xarchive
|
||||
p7zip
|
||||
zip
|
||||
unzip
|
||||
gzip
|
||||
lzop
|
||||
|
||||
# Password Management
|
||||
gnome.gnome-keyring
|
||||
gnome.seahorse
|
||||
# Password Management
|
||||
gnome.gnome-keyring
|
||||
gnome.seahorse
|
||||
|
||||
# Remote Control Tools
|
||||
remmina
|
||||
freerdp
|
||||
# Remote Control Tools
|
||||
remmina
|
||||
freerdp
|
||||
|
||||
# Network Tools
|
||||
openvpn
|
||||
tcpdump
|
||||
iftop
|
||||
iperf
|
||||
bind
|
||||
socat
|
||||
# Network Tools
|
||||
openvpn
|
||||
tcpdump
|
||||
iftop
|
||||
iperf
|
||||
bind
|
||||
socat
|
||||
|
||||
# samba
|
||||
iptables
|
||||
nftables
|
||||
wireshark
|
||||
# samba
|
||||
iptables
|
||||
nftables
|
||||
wireshark
|
||||
|
||||
# Code Editors
|
||||
xclip
|
||||
xsel
|
||||
# Code Editors
|
||||
xclip
|
||||
xsel
|
||||
|
||||
# Image/Graphic/Design Tools
|
||||
gnome.eog
|
||||
gimp
|
||||
inkscape
|
||||
# Image/Graphic/Design Tools
|
||||
gnome.eog
|
||||
gimp
|
||||
inkscape
|
||||
|
||||
# Misc Development Tools
|
||||
qrcode
|
||||
jq
|
||||
cdrtools
|
||||
# Misc Development Tools
|
||||
qrcode
|
||||
jq
|
||||
cdrtools
|
||||
|
||||
# Document Processing and Management
|
||||
zathura
|
||||
# Document Processing and Management
|
||||
zathura
|
||||
|
||||
# File Synchronzation
|
||||
rsync
|
||||
# File Synchronzation
|
||||
rsync
|
||||
|
||||
# Filesystem Tools
|
||||
ntfs3g
|
||||
ddrescue
|
||||
ncdu
|
||||
woeusb
|
||||
unetbootin
|
||||
pcmanfm
|
||||
hdparm
|
||||
testdisk
|
||||
binwalk
|
||||
gptfdisk
|
||||
# Filesystem Tools
|
||||
ntfs3g
|
||||
ddrescue
|
||||
ncdu
|
||||
woeusb
|
||||
unetbootin
|
||||
pcmanfm
|
||||
hdparm
|
||||
testdisk
|
||||
binwalk
|
||||
gptfdisk
|
||||
|
||||
packages'.myPython
|
||||
packages'.myPython
|
||||
|
||||
# Virtualization
|
||||
virtmanager
|
||||
]);
|
||||
# Virtualization
|
||||
virtmanager
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
{}: let
|
||||
in {
|
||||
mkSimpleTrayService = {execStart}: {
|
||||
Unit = {
|
||||
Description = "";
|
||||
After = ["graphical-session-pre.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
_: {
|
||||
mkSimpleTrayService =
|
||||
{ execStart }:
|
||||
{
|
||||
Unit = {
|
||||
Description = "";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = execStart;
|
||||
};
|
||||
};
|
||||
|
||||
Install = {WantedBy = ["graphical-session.target"];};
|
||||
|
||||
Service = {ExecStart = execStart;};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home.stateVersion = lib.mkDefault "23.11";
|
||||
|
||||
# TODO: re-enable this with the appropriate version?
|
||||
|
@ -15,7 +12,8 @@
|
|||
allowUnfree = true;
|
||||
allowUnsupportedSystem = true;
|
||||
|
||||
allowInsecurePredicate = pkg:
|
||||
allowInsecurePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"electron-28.3.3"
|
||||
"electron-27.3.11"
|
||||
|
@ -28,7 +26,8 @@
|
|||
"electron"
|
||||
];
|
||||
|
||||
allowUnfreePredicate = pkg:
|
||||
allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (lib.getName pkg) [
|
||||
"obsidian"
|
||||
"vivaldi"
|
||||
|
@ -56,47 +55,45 @@
|
|||
programs.command-not-found.enable = true;
|
||||
programs.fzf.enable = true;
|
||||
|
||||
home.packages =
|
||||
[]
|
||||
++ (with pkgs; [
|
||||
coreutils
|
||||
home.packages = with pkgs; [
|
||||
coreutils
|
||||
|
||||
vcsh
|
||||
vcsh
|
||||
|
||||
htop
|
||||
iperf3
|
||||
nethogs
|
||||
htop
|
||||
iperf3
|
||||
nethogs
|
||||
|
||||
# Authentication
|
||||
cacert
|
||||
openssl
|
||||
mkpasswd
|
||||
# Authentication
|
||||
cacert
|
||||
openssl
|
||||
mkpasswd
|
||||
|
||||
just
|
||||
ripgrep
|
||||
du-dust
|
||||
just
|
||||
ripgrep
|
||||
du-dust
|
||||
|
||||
elfutils
|
||||
exfat
|
||||
file
|
||||
tree
|
||||
pwgen
|
||||
proot
|
||||
elfutils
|
||||
exfat
|
||||
file
|
||||
tree
|
||||
pwgen
|
||||
proot
|
||||
|
||||
parted
|
||||
pv
|
||||
tmux
|
||||
wget
|
||||
curl
|
||||
parted
|
||||
pv
|
||||
tmux
|
||||
wget
|
||||
curl
|
||||
|
||||
# git helpers
|
||||
git-crypt
|
||||
gitFull
|
||||
pastebinit
|
||||
gist
|
||||
mr
|
||||
# git helpers
|
||||
git-crypt
|
||||
gitFull
|
||||
pastebinit
|
||||
gist
|
||||
mr
|
||||
|
||||
usbutils
|
||||
pciutils
|
||||
]);
|
||||
usbutils
|
||||
pciutils
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,45 +1,4 @@
|
|||
{
|
||||
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";
|
||||
} ''
|
||||
(
|
||||
set -xe
|
||||
export GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
${pkgs.git}/bin/git clone --mirror ${repoHttps} $out
|
||||
)
|
||||
'';
|
||||
vcshActivationScript = pkgs.writeScript "activation-script" ''
|
||||
export HOST=$(hostname -s)
|
||||
|
||||
function set_remotes {
|
||||
${pkgs.vcsh}/bin/vcsh dotfiles remote set-url origin $1
|
||||
${pkgs.vcsh}/bin/vcsh dotfiles remote set-url --push origin $2
|
||||
}
|
||||
|
||||
if ! test -d $HOME/.config/vcsh/repo.d/dotfiles.git; then
|
||||
echo Cloning dotfiles for $HOST...
|
||||
${pkgs.vcsh}/bin/vcsh clone -b $HOST ${repoBareLocal} dotfiles
|
||||
set_remotes ${repoHttps} ${repoSsh}
|
||||
else
|
||||
set_remotes ${repoBareLocal} ${repoSsh}
|
||||
echo Updating dotfiles for $HOST...
|
||||
${pkgs.vcsh}/bin/vcsh pull $HOST || true
|
||||
set_remotes ${repoHttps} ${repoSsh}
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
_: {
|
||||
# TODO: fix the dotfiles
|
||||
# home.activation.vcsh = config.lib.dag.entryAfter["linkGeneration"] ''
|
||||
# $DRY_RUN_CMD ${vcshActivationScript}
|
||||
|
|
|
@ -3,38 +3,40 @@
|
|||
repoHttps ? "https://gitlab.com/steveeJ/dotfiles.git",
|
||||
repoSsh ? "git@gitlab.com:/steveeJ/dotfiles.git",
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
repoBareLocal =
|
||||
pkgs.runCommand "fetchbare"
|
||||
{
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "0000000000000000000000000000000000000000000000000000";
|
||||
} ''
|
||||
(
|
||||
set -xe
|
||||
export GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
${pkgs.git}/bin/git clone --mirror ${repoHttps} $out
|
||||
)
|
||||
'';
|
||||
{
|
||||
outputHashMode = "recursive";
|
||||
outputHashAlgo = "sha256";
|
||||
outputHash = "0000000000000000000000000000000000000000000000000000";
|
||||
}
|
||||
''
|
||||
(
|
||||
set -xe
|
||||
export GIT_SSL_CAINFO=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
export SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt
|
||||
${pkgs.git}/bin/git clone --mirror ${repoHttps} $out
|
||||
)
|
||||
'';
|
||||
in
|
||||
pkgs.writeScript "activation-script" ''
|
||||
export HOST=$(hostname -s)
|
||||
pkgs.writeScript "activation-script" ''
|
||||
export HOST=$(hostname -s)
|
||||
|
||||
function set_remotes {
|
||||
${pkgs.vcsh}/bin/vcsh dotfiles remote set-url origin $1
|
||||
${pkgs.vcsh}/bin/vcsh dotfiles remote set-url --push origin $2
|
||||
}
|
||||
function set_remotes {
|
||||
${pkgs.vcsh}/bin/vcsh dotfiles remote set-url origin $1
|
||||
${pkgs.vcsh}/bin/vcsh dotfiles remote set-url --push origin $2
|
||||
}
|
||||
|
||||
if ! test -d $HOME/.config/vcsh/repo.d/dotfiles.git; then
|
||||
echo Cloning dotfiles for $HOST...
|
||||
${pkgs.vcsh}/bin/vcsh clone -b $HOST ${repoBareLocal} dotfiles
|
||||
set_remotes ${repoHttps} ${repoSsh}
|
||||
else
|
||||
set_remotes ${repoBareLocal} ${repoSsh}
|
||||
echo Updating dotfiles for $HOST...
|
||||
${pkgs.vcsh}/bin/vcsh pull $HOST || true
|
||||
set_remotes ${repoHttps} ${repoSsh}
|
||||
fi
|
||||
''
|
||||
if ! test -d $HOME/.config/vcsh/repo.d/dotfiles.git; then
|
||||
echo Cloning dotfiles for $HOST...
|
||||
${pkgs.vcsh}/bin/vcsh clone -b $HOST ${repoBareLocal} dotfiles
|
||||
set_remotes ${repoHttps} ${repoSsh}
|
||||
else
|
||||
set_remotes ${repoBareLocal} ${repoSsh}
|
||||
echo Updating dotfiles for $HOST...
|
||||
${pkgs.vcsh}/bin/vcsh pull $HOST || true
|
||||
set_remotes ${repoHttps} ${repoSsh}
|
||||
fi
|
||||
''
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
{ packages', ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
nodeFlake,
|
||||
packages',
|
||||
...
|
||||
}: let
|
||||
pkgsUnstable = pkgs.callPackage nodeFlake.inputs.nixpkgs-unstable.outPath {};
|
||||
in {
|
||||
imports = [
|
||||
../profiles/wayland-desktop.nix
|
||||
];
|
||||
imports = [ ../profiles/wayland-desktop.nix ];
|
||||
|
||||
home.packages = [
|
||||
# experimental WMs
|
||||
|
|
|
@ -1,13 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
imports = [
|
||||
../profiles/wayland-desktop.nix
|
||||
];
|
||||
imports = [ ../profiles/wayland-desktop.nix ];
|
||||
|
||||
services = {
|
||||
gnome-keyring.enable = false;
|
||||
|
@ -25,85 +18,83 @@ in {
|
|||
|
||||
services.gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||
|
||||
dconf.settings = let
|
||||
manualKeybindings = [
|
||||
{
|
||||
binding = "Print";
|
||||
command = "flameshot gui";
|
||||
name = "flameshot";
|
||||
}
|
||||
dconf.settings =
|
||||
let
|
||||
manualKeybindings = [
|
||||
{
|
||||
binding = "Print";
|
||||
command = "flameshot gui";
|
||||
name = "flameshot";
|
||||
}
|
||||
|
||||
{
|
||||
binding = "<Super>t";
|
||||
command = "alacritty";
|
||||
name = "alacritty";
|
||||
}
|
||||
];
|
||||
{
|
||||
binding = "<Super>t";
|
||||
command = "alacritty";
|
||||
name = "alacritty";
|
||||
}
|
||||
];
|
||||
|
||||
numWorkspaces = 10;
|
||||
customKeybindingBaseName = "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom";
|
||||
customKeybindingsNames =
|
||||
builtins.genList (i: "/${customKeybindingBaseName}${toString i}/")
|
||||
(
|
||||
(builtins.length manualKeybindings)
|
||||
+ numWorkspaces # for sending to the workspace
|
||||
numWorkspaces = 10;
|
||||
customKeybindingBaseName = "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom";
|
||||
customKeybindingsNames = builtins.genList (i: "/${customKeybindingBaseName}${toString i}/") (
|
||||
(builtins.length manualKeybindings) + numWorkspaces # for sending to the workspace
|
||||
);
|
||||
|
||||
workspacesKeyBindingsOffset = builtins.length manualKeybindings;
|
||||
workspacesKeyBindingsOffset = builtins.length manualKeybindings;
|
||||
|
||||
# with this we can make use of all number keys [0-9]
|
||||
mapToNumber = i:
|
||||
if i < 10
|
||||
then i
|
||||
else if i == 10
|
||||
then 0
|
||||
else throw "i exceeds 10: ${i}";
|
||||
in
|
||||
# with this we can make use of all number keys [0-9]
|
||||
mapToNumber =
|
||||
i:
|
||||
if i < 10 then
|
||||
i
|
||||
else if i == 10 then
|
||||
0
|
||||
else
|
||||
throw "i exceeds 10: ${i}";
|
||||
in
|
||||
{
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = customKeybindingsNames;
|
||||
screenreader = "@as []";
|
||||
screensaver = ["<Alt><Super>l"];
|
||||
screensaver = [ "<Alt><Super>l" ];
|
||||
};
|
||||
|
||||
# disable the builtin <Super>[1-9] functionality
|
||||
"org/gnome/shell/keybindings" = builtins.listToAttrs ((builtins.genList
|
||||
(i: {
|
||||
name = "switch-to-application-${toString (i + 1)}";
|
||||
value = [];
|
||||
})
|
||||
numWorkspaces)
|
||||
"org/gnome/shell/keybindings" = builtins.listToAttrs (
|
||||
(builtins.genList (i: {
|
||||
name = "switch-to-application-${toString (i + 1)}";
|
||||
value = [ ];
|
||||
}) numWorkspaces)
|
||||
++ [
|
||||
{
|
||||
name = "toggle-overview";
|
||||
value = [];
|
||||
value = [ ];
|
||||
}
|
||||
]);
|
||||
]
|
||||
);
|
||||
|
||||
# remap it to switching to the workspaces
|
||||
"org/gnome/desktop/wm/keybindings" = builtins.listToAttrs (builtins.genList
|
||||
(i: {
|
||||
"org/gnome/desktop/wm/keybindings" = builtins.listToAttrs (
|
||||
builtins.genList (i: {
|
||||
name = "switch-to-workspace-${toString (i + 1)}";
|
||||
value = [
|
||||
"<Super>${toString (mapToNumber (i + 1))}"
|
||||
];
|
||||
})
|
||||
numWorkspaces);
|
||||
value = [ "<Super>${toString (mapToNumber (i + 1))}" ];
|
||||
}) numWorkspaces
|
||||
);
|
||||
}
|
||||
// builtins.listToAttrs (builtins.genList
|
||||
(i: {
|
||||
// builtins.listToAttrs (
|
||||
builtins.genList (i: {
|
||||
name = "${customKeybindingBaseName}${toString i}";
|
||||
value = builtins.elemAt manualKeybindings i;
|
||||
})
|
||||
(builtins.length manualKeybindings))
|
||||
// builtins.listToAttrs (builtins.genList
|
||||
(i: {
|
||||
}) (builtins.length manualKeybindings)
|
||||
)
|
||||
// builtins.listToAttrs (
|
||||
builtins.genList (i: {
|
||||
name = "${customKeybindingBaseName}${toString (workspacesKeyBindingsOffset + i)}";
|
||||
value = {
|
||||
binding = "<Control><Super>${toString (mapToNumber (i + 1))}";
|
||||
command = "wmctrl -r :ACTIVE: -t ${toString i}";
|
||||
name = "Send to workspace ${toString (i + 1)}";
|
||||
};
|
||||
})
|
||||
numWorkspaces);
|
||||
}) numWorkspaces
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,28 +1,22 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
home.file.".nix-channels".text = "";
|
||||
|
||||
home.activation.removeExistingNixChannels = config.lib.dag.entryBefore ["checkLinkTargets"] ''
|
||||
$DRY_RUN_CMD ${
|
||||
pkgs.writeScript "activation-script" ''
|
||||
set -ex
|
||||
if test -f $HOME/.nix-channels; then
|
||||
echo Uninstalling available channels...
|
||||
if test -f $HOME/.nix-channel; then
|
||||
while read url channel; do
|
||||
nix-channel --remove $channel
|
||||
done < $HOME/.nix-channel
|
||||
fi
|
||||
echo Moving existing file away...
|
||||
touch $HOME/.nix-channels.dummy
|
||||
mv --backup=numbered $HOME/.nix-channels.dummy $HOME/.nix-channels
|
||||
rm $HOME/.nix-channels
|
||||
home.activation.removeExistingNixChannels = config.lib.dag.entryBefore [ "checkLinkTargets" ] ''
|
||||
$DRY_RUN_CMD ${pkgs.writeScript "activation-script" ''
|
||||
set -ex
|
||||
if test -f $HOME/.nix-channels; then
|
||||
echo Uninstalling available channels...
|
||||
if test -f $HOME/.nix-channel; then
|
||||
while read url channel; do
|
||||
nix-channel --remove $channel
|
||||
done < $HOME/.nix-channel
|
||||
fi
|
||||
''
|
||||
};
|
||||
echo Moving existing file away...
|
||||
touch $HOME/.nix-channels.dummy
|
||||
mv --backup=numbered $HOME/.nix-channels.dummy $HOME/.nix-channels
|
||||
rm $HOME/.nix-channels
|
||||
fi
|
||||
''};
|
||||
'';
|
||||
}
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib.nix {}) mkSimpleTrayService;
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
|
||||
audio = pkgs.writeShellScript "audio" ''
|
||||
export PATH=${
|
||||
with pkgs;
|
||||
lib.makeBinPath [pulseaudio findutils gnugrep]
|
||||
lib.makeBinPath [
|
||||
pulseaudio
|
||||
findutils
|
||||
gnugrep
|
||||
]
|
||||
}:$PATH
|
||||
|
||||
export MUTEFILE=''${TEMPDIR:-/tmp}/.qtilemute
|
||||
|
@ -33,7 +33,7 @@
|
|||
terminalCommand = "${pkgs.alacritty}/bin/alacritty";
|
||||
|
||||
dpmsScript = pkgs.writeShellScript "dpmsScript" ''
|
||||
export PATH=${with pkgs; lib.makeBinPath [xorg.xset]}:$PATH
|
||||
export PATH=${with pkgs; lib.makeBinPath [ xorg.xset ]}:$PATH
|
||||
|
||||
set -xe
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
|||
'';
|
||||
|
||||
screenLockCommand = pkgs.writeShellScript "screenLock" ''
|
||||
export PATH=${with pkgs; lib.makeBinPath [i3lock]}:$PATH
|
||||
export PATH=${with pkgs; lib.makeBinPath [ i3lock ]}:$PATH
|
||||
|
||||
revert() {
|
||||
${dpmsScript} default
|
||||
|
@ -251,7 +251,8 @@
|
|||
def print_new_window(window):
|
||||
print("new window: ", window)
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
services = {
|
||||
gnome-keyring.enable = true;
|
||||
blueman-applet.enable = true;
|
||||
|
|
|
@ -1,35 +1,35 @@
|
|||
/*
|
||||
TODO: create helper scripts for sharing of a screen portion
|
||||
```
|
||||
TODO: create helper scripts for sharing of a screen portion
|
||||
```
|
||||
|
||||
# this will create a new output named HEADLESS-<n>. <n> increments by 1 with each invocation even if the output is `unplug`ged.
|
||||
swaymsg create_output
|
||||
# this will create a new output named HEADLESS-<n>. <n> increments by 1 with each invocation even if the output is `unplug`ged.
|
||||
swaymsg create_output
|
||||
|
||||
# find the name and the workspace number
|
||||
swaymsg -t get_outputs | jq '.[] | select(.name | test("HEADLESS-.*")) | (.name, .current_workspace)'
|
||||
# find the name and the workspace number
|
||||
swaymsg -t get_outputs | jq '.[] | select(.name | test("HEADLESS-.*")) | (.name, .current_workspace)'
|
||||
|
||||
swaymsg output HEADLESS-1 mode 1920@108060Hz
|
||||
swaymsg output HEADLESS-1 mode 1920@108060Hz
|
||||
|
||||
# mirror the headless workspace on the current one
|
||||
nix run nixpkgs\#wl-mirror -- HEADLESS-1
|
||||
# mirror the headless workspace on the current one
|
||||
nix run nixpkgs\#wl-mirror -- HEADLESS-1
|
||||
|
||||
# shift windows to the workspace and switch the focus to it
|
||||
# shift windows to the workspace and switch the focus to it
|
||||
*/
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
# packages',
|
||||
repoFlakeInputs',
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib.nix {}) mkSimpleTrayService;
|
||||
}:
|
||||
let
|
||||
|
||||
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
|
||||
|
@ -98,112 +98,121 @@ in {
|
|||
systemd.enable = true;
|
||||
xwayland = false;
|
||||
|
||||
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;
|
||||
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";
|
||||
};
|
||||
|
||||
"type:touchpad" = {
|
||||
natural_scroll = "enabled";
|
||||
# alternatively run this command
|
||||
# swaymsg input "1386:914:Wacom_Intuos_Pro_S_Pen" tool_mode "* relative"
|
||||
# and then switch to a different VT (alt+ctrl+f2) and back
|
||||
"1386:914:Wacom_Intuos_Pro_S_Pen" = {
|
||||
tool_mode = "* relative";
|
||||
};
|
||||
};
|
||||
|
||||
# alternatively run this command
|
||||
# swaymsg input "1386:914:Wacom_Intuos_Pro_S_Pen" tool_mode "* relative"
|
||||
# and then switch to a different VT (alt+ctrl+f2) and back
|
||||
"1386:914:Wacom_Intuos_Pro_S_Pen" = {
|
||||
tool_mode = "* relative";
|
||||
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";
|
||||
|
||||
# TODO: i've been hitting this one accidentally way too often. find a better place.
|
||||
# "${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";
|
||||
|
||||
# TODO: i've been hitting this one accidentally way too often. find a better place.
|
||||
# "${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,16 +1,14 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
repoFlake,
|
||||
nodeFlake,
|
||||
...
|
||||
}: let
|
||||
inherit (import ../lib.nix {}) mkSimpleTrayService;
|
||||
}:
|
||||
let
|
||||
|
||||
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;
|
||||
|
@ -26,11 +24,12 @@ 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;
|
||||
home.packages =
|
||||
with pkgs;
|
||||
[
|
||||
# required by network-manager-applet
|
||||
networkmanagerapplet
|
||||
|
@ -62,11 +61,9 @@ in {
|
|||
|
||||
waypipe
|
||||
]
|
||||
++ (
|
||||
lib.lists.optionals (!pkgs.stdenv.isAarch64)
|
||||
++ (lib.lists.optionals (!pkgs.stdenv.isAarch64)
|
||||
# TODO: broken on aarch64
|
||||
[
|
||||
]
|
||||
[ ]
|
||||
);
|
||||
|
||||
home.sessionVariables = {
|
||||
|
|
|
@ -3,14 +3,15 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
extensions =
|
||||
[
|
||||
#undetectable adblocker
|
||||
{id = "gcfcpohokifjldeandkfjoboemihipmb";}
|
||||
{ id = "gcfcpohokifjldeandkfjoboemihipmb"; }
|
||||
|
||||
# ublock origin
|
||||
{id = "cjpalhdlnbpafiamejdnhcphjbkeiagm";}
|
||||
{ id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; }
|
||||
|
||||
# # YT ad block
|
||||
# {id = "cmedhionkhpnakcndndgjdbohmhepckk";}
|
||||
|
@ -19,15 +20,15 @@
|
|||
# {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,31 +39,32 @@
|
|||
}
|
||||
|
||||
# cookie autodelete
|
||||
{id = "fhcgjolkccmbidfldomjliifgaodjagh";}
|
||||
{ id = "fhcgjolkccmbidfldomjliifgaodjagh"; }
|
||||
|
||||
# unhook
|
||||
{id = "khncfooichmfjbepaaaebmommgaepoid";}
|
||||
{ id = "khncfooichmfjbepaaaebmommgaepoid"; }
|
||||
]
|
||||
++ (lib.lists.optionals ((builtins.match "^steveej.*" name) != null) [
|
||||
# polkadotjs
|
||||
{id = "mopnmbcafieddcagagdcbnhejhlodfdd";}
|
||||
{ id = "mopnmbcafieddcagagdcbnhejhlodfdd"; }
|
||||
|
||||
# rabby wallet
|
||||
{id = "acmacodkjbdgmoleebolmdjonilkdbch";}
|
||||
{ id = "acmacodkjbdgmoleebolmdjonilkdbch"; }
|
||||
|
||||
# phantom wallet
|
||||
{id = "bfnaelmomeimhlpmgjnjophhpkkoljpa";}
|
||||
{ id = "bfnaelmomeimhlpmgjnjophhpkkoljpa"; }
|
||||
|
||||
# Vimium C
|
||||
{id = "hfjbmagddngcpeloejdejnfgbamkjaeg";}
|
||||
{ id = "hfjbmagddngcpeloejdejnfgbamkjaeg"; }
|
||||
|
||||
# always right
|
||||
{id = "npjpaghfnndnnmjiliibnkmdfgbojokj";}
|
||||
{ id = "npjpaghfnndnnmjiliibnkmdfgbojokj"; }
|
||||
|
||||
# shazam music
|
||||
{id = "mmioliijnhnoblpgimnlajmefafdfilb";}
|
||||
{ id = "mmioliijnhnoblpgimnlajmefafdfilb"; }
|
||||
]);
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
inherit extensions;
|
||||
|
@ -72,9 +74,7 @@ in {
|
|||
|
||||
programs.brave = {
|
||||
# TODO: enable this on aarch64-linux
|
||||
enable =
|
||||
true
|
||||
&& !pkgs.stdenv.targetPlatform.isAarch64;
|
||||
enable = true && !pkgs.stdenv.targetPlatform.isAarch64;
|
||||
inherit extensions;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
repoFlake,
|
||||
...
|
||||
}: {
|
||||
services.espanso = {
|
||||
package = pkgs.espanso-wayland;
|
||||
# package = pkgs.espanso-wayland.overrideAttrs (_: {
|
||||
|
@ -24,64 +21,62 @@
|
|||
# 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,5 +1,8 @@
|
|||
{pkgs, ...}: {
|
||||
programs.librewolf = {enable = false;};
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.librewolf = {
|
||||
enable = false;
|
||||
};
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.firefox-esr-128;
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages = [
|
||||
pkgs.gcr
|
||||
];
|
||||
home.packages = [ pkgs.gcr ];
|
||||
|
||||
programs.gpg.enable = true;
|
||||
services.gpg-agent = {
|
||||
|
|
|
@ -1,32 +1,25 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
# TODO: clean up the impurity in here
|
||||
in {
|
||||
home.sessionVariables.HOMESHICK_DIR = "${pkgs.homeshick}";
|
||||
|
||||
home.activation.bootstrapRepos = config.lib.dag.entryAfter ["writeBoundary"] ''
|
||||
$DRY_RUN_CMD ${
|
||||
pkgs.writeScript "activation-script" ''
|
||||
set -e
|
||||
echo home-manager path is ${config.home.path}
|
||||
echo home is $HOME
|
||||
home.activation.bootstrapRepos = config.lib.dag.entryAfter [ "writeBoundary" ] ''
|
||||
$DRY_RUN_CMD ${pkgs.writeScript "activation-script" ''
|
||||
set -e
|
||||
echo home-manager path is ${config.home.path}
|
||||
echo home is $HOME
|
||||
|
||||
source ${pkgs.homeshick}/homeshick.sh
|
||||
type homeshick
|
||||
source ${pkgs.homeshick}/homeshick.sh
|
||||
type homeshick
|
||||
|
||||
# echo Updating homeshick
|
||||
# ln -sfT ${pkgs.homeshick} "$HOMESICK_REPOS"/.homeshick
|
||||
# mv -Tf "$HOMESICK_REPOS"/{.,}homeshick
|
||||
''
|
||||
};
|
||||
# echo Updating homeshick
|
||||
# ln -sfT ${pkgs.homeshick} "$HOMESICK_REPOS"/.homeshick
|
||||
# mv -Tf "$HOMESICK_REPOS"/{.,}homeshick
|
||||
''};
|
||||
'';
|
||||
|
||||
nixpkgs.config = {
|
||||
packageOverrides = pkgs:
|
||||
with pkgs; {
|
||||
packageOverrides =
|
||||
pkgs: with pkgs; {
|
||||
homeshick = builtins.fetchGit {
|
||||
url = "https://github.com/andsens/homeshick.git";
|
||||
ref = "master";
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [pkgs.libreoffice];
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = [ pkgs.libreoffice ];
|
||||
}
|
||||
|
|
|
@ -1,12 +1,6 @@
|
|||
{ repoFlake, pkgs, ... }:
|
||||
{
|
||||
repoFlake,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
repoFlake.inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
imports = [ repoFlake.inputs.nixvim.homeManagerModules.nixvim ];
|
||||
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
|
@ -14,7 +8,7 @@
|
|||
vimdiffAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
extraPython3Packages = ps: with ps; [];
|
||||
extraPython3Packages = ps: with ps; [ ];
|
||||
|
||||
# extraConfigVim = builtins.readFile ./neovim/vimrc;
|
||||
|
||||
|
|
|
@ -1,21 +1,25 @@
|
|||
{ pkgs, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins =
|
||||
builtins.map (plugin: (plugin.overrideAttrs (attrs: {
|
||||
meta = lib.mkMerge [
|
||||
{inherit (attrs) meta;}
|
||||
{meta.platforms = [pkgs.stdenv.system];}
|
||||
];
|
||||
})))
|
||||
(with pkgs.obs-studio-plugins; [
|
||||
# wlrobs
|
||||
obs-backgroundremoval
|
||||
obs-pipewire-audio-capture
|
||||
]);
|
||||
builtins.map
|
||||
(
|
||||
plugin:
|
||||
(plugin.overrideAttrs (attrs: {
|
||||
meta = lib.mkMerge [
|
||||
{ inherit (attrs) meta; }
|
||||
{ meta.platforms = [ pkgs.stdenv.system ]; }
|
||||
];
|
||||
}))
|
||||
)
|
||||
(
|
||||
with pkgs.obs-studio-plugins;
|
||||
[
|
||||
# wlrobs
|
||||
obs-backgroundremoval
|
||||
obs-pipewire-audio-capture
|
||||
]
|
||||
);
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,12 +1,8 @@
|
|||
{ pkgs, repoFlake, ... }:
|
||||
let
|
||||
pkgsVscodium = import repoFlake.inputs.nixpkgs-vscodium { inherit (pkgs) system config; };
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
nodeFlake,
|
||||
repoFlake,
|
||||
...
|
||||
}: let
|
||||
pkgsUnstable = import nodeFlake.inputs.nixpkgs-unstable {inherit (pkgs) system config;};
|
||||
pkgsVscodium = import repoFlake.inputs.nixpkgs-vscodium {inherit (pkgs) system config;};
|
||||
in {
|
||||
home.packages = [
|
||||
pkgs.nil
|
||||
pkgs.nixd
|
||||
|
@ -20,20 +16,22 @@ in {
|
|||
# 3. link the binary. this relies on the client-side setting `"remote.SSH.experimental.serverBinaryName": "openvscode-server"` : ln -s $(which openvscode-server) /home/steveej/.vscodium-server/bin/c8ce3ba4bc6b30b3b10edc61481cb85b1d2396bc/bin/
|
||||
|
||||
/*
|
||||
e.g.:
|
||||
```
|
||||
(
|
||||
set -e
|
||||
export COMMIT=$(codium --version | rg '^[0-9a-f]{40}$')
|
||||
ssh bm-hostkey0 "pkill -9 openvscode; rm -rf /home/steveej/.vscodium-server/bin/$COMMIT; mkdir -p /home/steveej/.vscodium-server/bin/$COMMIT/bin/; ln -s \$(which openvscode-server) /home/steveej/.vscodium-server/bin/$COMMIT/bin/"
|
||||
)
|
||||
```
|
||||
e.g.:
|
||||
```
|
||||
(
|
||||
set -e
|
||||
export COMMIT=$(codium --version | rg '^[0-9a-f]{40}$')
|
||||
ssh bm-hostkey0 "pkill -9 openvscode; rm -rf /home/steveej/.vscodium-server/bin/$COMMIT; mkdir -p /home/steveej/.vscodium-server/bin/$COMMIT/bin/; ln -s \$(which openvscode-server) /home/steveej/.vscodium-server/bin/$COMMIT/bin/"
|
||||
)
|
||||
```
|
||||
*/
|
||||
|
||||
(pkgsVscodium.openvscode-server.overrideAttrs (attrs: {
|
||||
src = repoFlake.inputs.openvscode-server;
|
||||
version = "1.94.2";
|
||||
yarnCache = attrs.yarnCache.overrideAttrs (_: {outputHash = "sha256-89c6GYLT2RzHqwxBKegYqB6g5rEJ6/nH53cnfV7b0Tt=";});
|
||||
yarnCache = attrs.yarnCache.overrideAttrs (_: {
|
||||
outputHash = "sha256-89c6GYLT2RzHqwxBKegYqB6g5rEJ6/nH53cnfV7b0Tt=";
|
||||
});
|
||||
}))
|
||||
|
||||
pkgs.waypipe
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
{ 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";
|
||||
|
|
|
@ -4,7 +4,8 @@
|
|||
pkgs,
|
||||
osConfig,
|
||||
...
|
||||
}: let
|
||||
}:
|
||||
let
|
||||
libdecsync = pkgs.python3Packages.buildPythonPackage rec {
|
||||
pname = "libdecsync";
|
||||
version = "2.2.1";
|
||||
|
@ -38,50 +39,51 @@
|
|||
# pkgs.libxcrypt
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [libdecsync pkgs.python3Packages.setuptools];
|
||||
propagatedBuildInputs = [
|
||||
libdecsync
|
||||
pkgs.python3Packages.setuptools
|
||||
];
|
||||
};
|
||||
radicale-decsync = pkgs.radicale.overrideAttrs (old: {
|
||||
propagatedBuildInputs =
|
||||
old.propagatedBuildInputs
|
||||
++ [radicale-storage-decsync];
|
||||
propagatedBuildInputs = old.propagatedBuildInputs ++ [ 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";
|
||||
[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" ];
|
||||
};
|
||||
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,10 +1,8 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
_:
|
||||
let
|
||||
passwords = import ../../variables/passwords.crypt.nix;
|
||||
in {
|
||||
in
|
||||
{
|
||||
services.gammastep = {
|
||||
enable = true;
|
||||
provider = "manual";
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
packages',
|
||||
...
|
||||
}:
|
||||
{ pkgs, packages', ... }:
|
||||
# useful testing command:
|
||||
# for i in `seq 0 10`; do nix shell nixpkgs#libnotify --command notify-send notifiiiiiii "$i"; sleep 1; done
|
||||
let
|
||||
inherit (import ../lib.nix {}) mkSimpleTrayService;
|
||||
in {
|
||||
home.packages = [
|
||||
packages'.salut
|
||||
];
|
||||
inherit (import ../lib.nix { }) mkSimpleTrayService;
|
||||
in
|
||||
{
|
||||
home.packages = [ packages'.salut ];
|
||||
|
||||
xdg.configFile."salut/config.ini" = {
|
||||
enable = true;
|
||||
|
@ -34,7 +27,5 @@ in {
|
|||
onChange = "${pkgs.systemd}/bin/systemctl --user restart salut";
|
||||
};
|
||||
|
||||
systemd.user.services.salut = mkSimpleTrayService {
|
||||
execStart = "${packages'.salut}/bin/salut";
|
||||
};
|
||||
systemd.user.services.salut = mkSimpleTrayService { execStart = "${packages'.salut}/bin/salut"; };
|
||||
}
|
||||
|
|
|
@ -1,24 +1,14 @@
|
|||
{ pkgs, repoFlake, ... }:
|
||||
let
|
||||
pkgsVscodium = import repoFlake.inputs.nixpkgs-vscodium { inherit (pkgs) system config; };
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
nodeFlake,
|
||||
repoFlake,
|
||||
...
|
||||
}: let
|
||||
pkgsVscodium = import repoFlake.inputs.nixpkgs-vscodium {inherit (pkgs) system config;};
|
||||
in {
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgsVscodium.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 pkgsVscodium.vscode-extensions;
|
||||
(
|
||||
with pkgsVscodium.vscode-extensions;
|
||||
[
|
||||
eamodio.gitlens
|
||||
mkhl.direnv
|
||||
|
@ -43,11 +33,13 @@ in {
|
|||
# TODO: not compatible with vscodium
|
||||
# ms-vscode-remote.remote-ssh
|
||||
]
|
||||
++ (let
|
||||
extensions = repoFlake.inputs.nix-vscode-extensions.extensions.${pkgs.system};
|
||||
in (
|
||||
++ (
|
||||
let
|
||||
extensions = repoFlake.inputs.nix-vscode-extensions.extensions.${pkgs.system};
|
||||
in
|
||||
with extensions.vscode-marketplace;
|
||||
with extensions.vscode-marketplace-release; [
|
||||
with extensions.vscode-marketplace-release;
|
||||
[
|
||||
tamasfe.even-better-toml
|
||||
|
||||
serayuzgur.crates
|
||||
|
@ -59,15 +51,15 @@ in {
|
|||
|
||||
ibecker.treefmt-vscode
|
||||
]
|
||||
)))
|
||||
)
|
||||
)
|
||||
++ [
|
||||
(pkgsVscodium.vscode-utils.extensionFromVscodeMarketplace
|
||||
{
|
||||
name = "markdown-oxide";
|
||||
publisher = "felixzeller";
|
||||
version = "1.1.0";
|
||||
sha256 = "07l37hkg106m3nl9530l7i39iw1kibckv1zi4n23gbp7srdrwbs3";
|
||||
})
|
||||
(pkgsVscodium.vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "markdown-oxide";
|
||||
publisher = "felixzeller";
|
||||
version = "1.1.0";
|
||||
sha256 = "07l37hkg106m3nl9530l7i39iw1kibckv1zi4n23gbp7srdrwbs3";
|
||||
})
|
||||
];
|
||||
mutableExtensionsDir = true;
|
||||
};
|
||||
|
@ -151,4 +143,3 @@ in {
|
|||
# xyz.plsql-language
|
||||
# yzane.markdown-pdf
|
||||
# zxh404.vscode-proto3
|
||||
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
}: let
|
||||
inherit (pkgs.stdenv) isDarwin isLinux isi686 isx86_64 isAarch32 isAarch64;
|
||||
vscode-utils = pkgs.vscode-utils;
|
||||
{ pkgs, lib }:
|
||||
let
|
||||
inherit (pkgs.stdenv)
|
||||
isDarwin
|
||||
isLinux
|
||||
isi686
|
||||
isx86_64
|
||||
isAarch32
|
||||
isAarch64
|
||||
;
|
||||
inherit (pkgs) vscode-utils;
|
||||
merge = lib.attrsets.recursiveUpdate;
|
||||
in
|
||||
merge
|
||||
merge
|
||||
(merge
|
||||
(merge
|
||||
(merge
|
||||
|
@ -18,39 +23,50 @@ in
|
|||
sha256 = "07l37hkg106m3nl9530l7i39iw1kibckv1zi4n23gbp7srdrwbs3";
|
||||
};
|
||||
}
|
||||
(lib.attrsets.optionalAttrs (isLinux && (isi686 || isx86_64)) {
|
||||
(
|
||||
lib.attrsets.optionalAttrs (isLinux && (isi686 || isx86_64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "1r17wjpw8xiha5r9h3146facxghpcp416zf8551sw93cmam9ky6j";
|
||||
arch = "linux-x64";
|
||||
};
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
lib.attrsets.optionalAttrs (isLinux && (isAarch32 || isAarch64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "1r17wjpw8xiha5r9h3146facxghpcp416zf8551sw93cmam9ky6j";
|
||||
arch = "linux-x64";
|
||||
sha256 = "0swvl7fkjcwp43grnrhnmy60a5m3hfwawk204byi8hhbczy131li";
|
||||
arch = "linux-arm64";
|
||||
};
|
||||
}))
|
||||
(lib.attrsets.optionalAttrs (isLinux && (isAarch32 || isAarch64)) {
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
lib.attrsets.optionalAttrs (isDarwin && (isi686 || isx86_64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "0swvl7fkjcwp43grnrhnmy60a5m3hfwawk204byi8hhbczy131li";
|
||||
arch = "linux-arm64";
|
||||
sha256 = "1swq9hy6a9nzkrn07j21g59pyk2m7aqsfi1pphl9l9y8p4zwiaqm";
|
||||
arch = "darwin-x64";
|
||||
};
|
||||
}))
|
||||
(lib.attrsets.optionalAttrs (isDarwin && (isi686 || isx86_64)) {
|
||||
}
|
||||
)
|
||||
)
|
||||
(
|
||||
lib.attrsets.optionalAttrs (isDarwin && (isAarch32 || isAarch64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "1swq9hy6a9nzkrn07j21g59pyk2m7aqsfi1pphl9l9y8p4zwiaqm";
|
||||
arch = "darwin-x64";
|
||||
sha256 = "1xg3wnn3f1kvsz5a09l0cjpzfm3l9va73cahbvl14mx3n6734r2m";
|
||||
arch = "darwin-arm64";
|
||||
};
|
||||
}))
|
||||
(lib.attrsets.optionalAttrs (isDarwin && (isAarch32 || isAarch64)) {
|
||||
"ibecker"."treefmt-vscode" = vscode-utils.extensionFromVscodeMarketplace {
|
||||
name = "treefmt-vscode";
|
||||
publisher = "ibecker";
|
||||
version = "2.1.0";
|
||||
sha256 = "1xg3wnn3f1kvsz5a09l0cjpzfm3l9va73cahbvl14mx3n6734r2m";
|
||||
arch = "darwin-arm64";
|
||||
};
|
||||
})
|
||||
}
|
||||
)
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
|
||||
#custom-cputemp {
|
||||
padding: 0 10px;
|
||||
background-color: #f0932b;
|
||||
color: #ffffff;
|
||||
padding: 0 10px;
|
||||
background-color: #f0932b;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
{ pkgs, repoFlake, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
repoFlake,
|
||||
...
|
||||
}: {
|
||||
home.packages = [
|
||||
# required by any bar that has a tray plugin
|
||||
pkgs.libappindicator-gtk3
|
||||
|
@ -12,10 +8,9 @@
|
|||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = repoFlake.inputs.nixpkgs-wayland.outputs.packages.${pkgs.stdenv.hostPlatform.system}.waybar;
|
||||
style =
|
||||
pkgs.lib.readFile "${pkgs.waybar.src}/resources/style.css"
|
||||
+ pkgs.lib.readFile ./waybar.css;
|
||||
package =
|
||||
repoFlake.inputs.nixpkgs-wayland.outputs.packages.${pkgs.stdenv.hostPlatform.system}.waybar;
|
||||
style = pkgs.lib.readFile "${pkgs.waybar.src}/resources/style.css" + pkgs.lib.readFile ./waybar.css;
|
||||
systemd.enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
|
@ -24,12 +19,7 @@
|
|||
height = 30;
|
||||
output =
|
||||
# hide the bar on HEADDLESS displays as i use them only for screensharing
|
||||
(
|
||||
builtins.genList (i: "!HEADLESS-${builtins.toString i}") 99
|
||||
)
|
||||
++ [
|
||||
"*"
|
||||
];
|
||||
(builtins.genList (i: "!HEADLESS-${builtins.toString i}") 99) ++ [ "*" ];
|
||||
# output = [
|
||||
# "eDP-1"
|
||||
# "DP-*"
|
||||
|
|
|
@ -3,27 +3,29 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
just-plugin = let
|
||||
plugin_file = pkgs.writeText "_just" ''
|
||||
#compdef just
|
||||
#autload
|
||||
}:
|
||||
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";
|
||||
|
@ -35,7 +37,8 @@
|
|||
chmod --recursive a-w $out
|
||||
'';
|
||||
};
|
||||
in {
|
||||
in
|
||||
{
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
|
||||
|
@ -46,56 +49,59 @@ 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 = [
|
||||
{
|
||||
|
@ -128,7 +134,10 @@ 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