Compare commits

...

3 Commits

Author SHA1 Message Date
e690f58b9a xd 2026-02-23 19:51:37 +01:00
e55ae7e6c1 update: modules/cli/fish.nix 2026-02-23 16:35:34 +01:00
7dee04d6e7 hyprtoolkit colors 2026-02-23 13:13:37 +01:00
9 changed files with 172 additions and 107 deletions

25
flake.lock generated
View File

@@ -46,11 +46,11 @@
]
},
"locked": {
"lastModified": 1771683283,
"narHash": "sha256-WxAEkAbo8dP7qiyPM6VN4ZGAxfuBVlNBNPkrqkrXVEc=",
"lastModified": 1771851181,
"narHash": "sha256-gFgE6mGUftwseV3DUENMb0k0EiHd739lZexPo5O/sdQ=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c6ed3eab64d23520bcbb858aa53fe2b533725d4a",
"rev": "9a4b494b1aa1b93d8edf167f46dc8e0c0011280c",
"type": "github"
},
"original": {
@@ -118,7 +118,8 @@
"catppuccin": "catppuccin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2",
"nixvim": "nixvim"
"nixvim": "nixvim",
"wallpapers": "wallpapers"
}
},
"systems": {
@@ -135,6 +136,22 @@
"repo": "default",
"type": "github"
}
},
"wallpapers": {
"flake": false,
"locked": {
"lastModified": 1762937381,
"narHash": "sha256-N+MZHSRcwOldS5Ai8B3YfKquKs9oeUW/GkV1iKM5+i8=",
"owner": "orangci",
"repo": "walls-catppuccin-mocha",
"rev": "7bfdf10d16ad3a689f9f0cf3a0930da3d1a245a8",
"type": "github"
},
"original": {
"owner": "orangci",
"repo": "walls-catppuccin-mocha",
"type": "github"
}
}
},
"root": "root",

View File

@@ -7,7 +7,13 @@
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin.url = "github:catppuccin/nix";
wallpapers = {
url = "github:orangci/walls-catppuccin-mocha";
flake = false;
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
@@ -20,21 +26,31 @@
home-manager,
catppuccin,
nixvim,
wallpapers,
...
}:
}@inputs:
let
username = "szymon";
# for git
email = "szymon_jozef@proton.me";
full_name = "Szymon P";
userConfig = {
username = "szymon";
# for git
email = "szymon_jozef@proton.me";
fullName = "Szymon P";
};
pathConfig = {
wallpaper = "Obrazy/tapety/catppuccin";
};
in
{
homeConfigurations = {
"arch" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { system = "x86_64-linux"; };
extraSpecialArgs = {
inherit username email full_name;
inherit
inputs
userConfig
pathConfig
;
isNixOS = false;
};
modules = [
@@ -47,13 +63,17 @@
"nixos" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs { system = "x86_64-linux"; };
extraSpecialArgs = {
inherit username email full_name;
inherit
inputs
userConfig
pathConfig
;
isNixOS = true;
};
modules = [
./home.nix
catppuccin.homeModules.catppuccin
nixvim.homeManagerModules.nixvim
nixvim.homeModules.nixvim
];
};
};

View File

@@ -1,12 +1,14 @@
{
pkgs,
username,
inputs,
userConfig,
pathConfig,
...
}:
{
home.username = username;
home.homeDirectory = "/home/${username}";
home.username = userConfig.username;
home.homeDirectory = "/home/${userConfig.username}";
nix = {
package = pkgs.nix;
@@ -28,6 +30,7 @@
./modules/packages.nix
./modules/xdg.nix
./modules/desktop.nix
./modules/gtk.nix
# cli tools
./modules/cli/fish.nix
./modules/cli/nixvim.nix
@@ -53,21 +56,13 @@
./modules/hypr/hypridle.nix
./modules/hypr/hyprlock.nix
./modules/hypr/hyprsunset.nix
./modules/hypr/hyprtoolkit.nix
];
# === SCRIPTS IMPORT ===
home.file = {
".local/bin".source = ./scripts;
};
gtk.enable = true;
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
${pathConfig.wallpaper}.source = inputs.wallpapers;
};
# === VARS ===

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
if test -n "$file"
set -l md5_before (md5sum $file)
pushd $config_dir
nvim $file
nvim $file
if test "$md5_before" != (md5sum $file)
echo "Changes made. Preparing commit..."
if test "$md5_before" != (md5sum $file)
echo "Changes made. Preparing commit..."
set -l rel_file (realpath --relative-to=$config_dir $file)
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 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,8 +13,8 @@
enable = true;
settings = {
user = {
name = full_name;
email = email;
name = userConfig.fullName;
email = userConfig.email;
};
init.defaultBranch = "master";
push.autoSetupRemote = true;
@@ -23,7 +22,7 @@
};
signing = {
key = email;
key = userConfig.email;
signByDefault = 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";
};

13
modules/gtk.nix Normal file
View File

@@ -0,0 +1,13 @@
{ ... }:
{
gtk.enable = true;
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
}

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

@@ -0,0 +1,14 @@
{ ... }:
{
# TO BE CHANGED WHEN NIX CONFIG OF THIS FILE WILL RELEASE!!!!
xdg.configFile."hypr/hyprtoolkit.conf".text = ''
background=0xff11111b
base=0xff1e1e2e
alternate_base=0xff181825
text=0xffcdd6f4
bright_text=0xffbac2de
accent=0xffcba6f7
accent_secondary=0xffb4befe
'';
}