This commit is contained in:
2026-02-24 23:39:07 +01:00
14 changed files with 254 additions and 104 deletions

View File

@@ -1,4 +1,10 @@
{ lib, isNixOS, ... }:
{
lib,
isNixOS,
userConfig,
pkgs,
...
}:
{
programs.ashell = {
@@ -6,7 +12,7 @@
package = lib.mkIf (!isNixOS) null;
settings = {
outputs = {
Targets = [ "DP-1" ];
Targets = [ userConfig.mainMonitor ];
};
position = "Bottom";
modules = {
@@ -21,12 +27,46 @@
"MediaPlayer"
"SystemInfo"
[
"CustomNotifications"
"Tray"
"Settings"
]
];
};
CustomModule = [
{
name = "CustomNotifications";
icon = "";
command = "${pkgs.writeShellScript "dnd-toggle" ''
if makoctl mode | grep -q do-not-disturb; then
makoctl mode -r do-not-disturb > /dev/null
else
makoctl mode -a do-not-disturb > /dev/null
fi
pkill -USR1 -f dnd-check
''}";
listen_cmd = "${pkgs.writeShellScript "dnd-check" ''
print_state() {
if makoctl mode | grep -q do-not-disturb; then
echo '{"alt":"dnd"}'
else
echo '{"alt":"none"}'
fi
}
trap print_state USR1
print_state
while true; do
sleep infinity & wait $!
done
''}";
icons.dnd = "";
}
];
clock = {
format = "%H:%M | %e.%m ";
};

View File

@@ -1,6 +1,7 @@
{
pkgs,
isNixOS,
userConfig,
...
}:
@@ -22,9 +23,7 @@
reload_style_on_change = true;
width = 70;
output = [
"DP-1"
"eDP-1"
"LVDS-1"
userConfig.mainMonitor
];
modules-left = [

View File

@@ -3,105 +3,112 @@
{
programs.fish = {
enable = true;
loginShellInit = ''
fish_add_path --move --prepend --path "$HOME/.nix-profile/bin" /nix/var/nix/profiles/default/bin /run/current-system/sw/bin
'';
loginShellInit = # fish
''
fish_add_path --move --prepend --path "$HOME/.nix-profile/bin" /nix/var/nix/profiles/default/bin /run/current-system/sw/bin
'';
interactiveShellInit = ''
# no dum greeting
set fish_greeting ""
interactiveShellInit = # fish
''
# no dum greeting
set fish_greeting ""
set -gx GPG_TTY (tty)
set -gx GPG_TTY (tty)
fish_vi_key_bindings
fish_vi_key_bindings
fastfetch --config ~/.config/fastfetch/startup.jsonc
'';
fastfetch --config ~/.config/fastfetch/startup.jsonc
'';
functions = {
edit_dotfile = {
description = "Edit config file, reload, commit and push";
body = ''
set -l config_dir "$HOME/.config/home-manager"
set -l file
body = # fish
''
set -l config_dir "$HOME/.config/home-manager"
set -l file
if test (count $argv) -gt 0
set file $argv[1]
else
set file (fd . $config_dir --type f --exclude ".git" | fzf)
end
if test (count $argv) -gt 0
set file $argv[1]
else
set file (fd . $config_dir --type f --exclude ".git" | fzf)
end
if test -n "$file"
set -l md5_before (md5sum $file)
pushd $config_dir
nvim $file
if test -n "$file"
set -l md5_before (md5sum $file)
pushd $config_dir
nvim $file
if test "$md5_before" != (md5sum $file)
echo "Changes made. Preparing commit..."
set -l rel_file (realpath --relative-to=$config_dir $file)
if home-manager switch --flake "$config_dir#${
if isNixOS then "nixos" else "arch"
}" -b backup
git add -A
set commit_msg "update: $rel_file"
git commit -m "$commit_msg"
git push
end
else
echo "No changes made"
end
popd
end
'';
if test "$md5_before" != (md5sum $file)
echo "Changes made. Preparing commit..."
set -l rel_file (realpath --relative-to=$config_dir $file)
if home-manager switch --flake "$config_dir#${
if isNixOS then "nixos" else "arch"
}" -b backup
git add -A
set commit_msg "update: $rel_file"
git commit -m "$commit_msg"
git push
end
else
echo "No changes made"
end
popd
end
'';
};
ls = {
body = "eza --long --icons --group-directories-first --git $argv";
body = # fish
"eza --long --icons --group-directories-first --git $argv";
};
lst = {
body = "eza --long --icons --color --git --tree $argv";
body = # fish
"eza --long --icons --color --git --tree $argv";
};
cp_mail = {
body = "pandoc $argv -t html |wl-copy -t text/html";
body = # fish
"pandoc $argv -t html |wl-copy -t text/html";
};
update = {
body = ''
echo "===System update==="
body = # fish
''
echo "===System update==="
if not type -q yay
echo "Yay not found Is this Arch? If yes, then please consider installing it!"
else
yay
end
if not type -q yay
echo "Yay not found Is this Arch? If yes, then please consider installing it!"
else
yay
end
if type -q pacman
echo "===Remove orphans==="
set orphans (pacman -Qtdq)
if test (count $orphans) -gt 0
sudo pacman -Rns $orphans
end
end
if type -q pacman
echo "===Remove orphans==="
set orphans (pacman -Qtdq)
if test (count $orphans) -gt 0
sudo pacman -Rns $orphans
end
end
if type -q flatpak
echo "===Flatpak update==="
flatpak update --noninteractive
echo "===Flatpak remove unused==="
flatpak uninstall --unused
end
if type -q flatpak
echo "===Flatpak update==="
flatpak update --noninteractive
echo "===Flatpak remove unused==="
flatpak uninstall --unused
end
if type -q nix-channel
echo "===Nix update==="
nix-channel --update
echo "===Nix garbage collection==="
home-manager expire-generations "-7 days"
end
'';
if type -q nix-channel
echo "===Nix update==="
nix-channel --update
echo "===Nix garbage collection==="
home-manager expire-generations "-7 days"
end
'';
};
rm = {

View File

@@ -1,7 +1,6 @@
{
pkgs,
full_name,
email,
userConfig,
...
}:
@@ -14,17 +13,30 @@
enable = true;
settings = {
user = {
name = full_name;
email = email;
name = userConfig.fullName;
email = userConfig.email;
};
init.defaultBranch = "master";
push.autoSetupRemote = true;
core.editor = "nvim";
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
pull.rebase = false;
merge.tool = "nvimdiff";
mergetool.prompt = false;
mergetool.keepBackup = false;
};
signing = {
<<<<<<< HEAD
key = email;
signByDefault = false;
=======
key = userConfig.signingKey;
signByDefault = true;
format = "ssh";
>>>>>>> c77553344515b404d765c04e1e472dac1cf4bb94
};
ignores = [
@@ -38,6 +50,15 @@
};
programs.gh = {
enable = true;
settings.git_protocol = "ssh";
};
home.file.".ssh/allowed_signers".text = ''
${userConfig.email} ${userConfig.signingKey}
'';
programs.delta = {
enable = true;
enableGitIntegration = true;

View File

@@ -0,0 +1,8 @@
{ ... }:
{
services.kdeconnect = {
enable = true;
indicator = true;
};
}

View File

@@ -1,4 +1,4 @@
{ username, ... }:
{ userConfig, ... }:
{
services.ssh-agent.enable = true;
@@ -10,13 +10,13 @@
matchBlocks = {
"dmowski" = {
hostname = "192.168.0.30";
user = username;
user = userConfig.username;
port = 22;
identityFile = "~/.ssh/dmowski";
};
"aur.archlinux.org" = {
user = username;
user = userConfig.username;
identityFile = "~/.ssh/aur";
};

8
modules/gui/browsers.nix Normal file
View File

@@ -0,0 +1,8 @@
{ isNixOS, lib, ... }:
{
programs.chromium = {
enable = true;
package = lib.mkIf (!isNixOS) null;
};
}

View File

@@ -1,7 +1,7 @@
{
lib,
isNixOS,
username,
userConfig,
...
}:
@@ -14,7 +14,7 @@
fullscreen = true;
early-exit = true;
initial-tool = "crop";
output-filename = "/home/${username}/Obrazy/zrzuty/%d-%m-%Y_%H:%M:%S.png";
output-filename = "/home/${userConfig.username}/Obrazy/zrzuty/%d-%m-%Y_%H:%M:%S.png";
save-after-copy = true;
copy-command = "wl-copy";
disable-notifications = false;

View File

@@ -1,8 +1,14 @@
{
<<<<<<< HEAD
inputs,
pkgs,
isNixOS,
lib,
=======
isNixOS,
lib,
userConfig,
>>>>>>> c77553344515b404d765c04e1e472dac1cf4bb94
...
}:
@@ -151,8 +157,7 @@
"exec-once" = [
"wl-paste --type text --watch cliphist store"
"wl-paste --type image --watch cliphist store"
"uwsm app -- kdeconnect-indicator"
"uwsm app -- ashell"
"uwsm app -- ${userConfig.statusBar}"
"swww-daemon"
"openrgb -c $openrgb_color"
];

View File

@@ -22,7 +22,7 @@
identity = true;
}
{
time = "21:00";
time = "21:30";
identity = false;
temperature = 4500;
gamma = 0.8;