update laptop configuration

Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
Hadi
2025-07-16 20:14:43 +02:00
parent 72e4be86eb
commit 59ae3d5f9d
50 changed files with 479 additions and 1009 deletions

699
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,87 +0,0 @@
{ pkgs, inputs, ... }: {
programs.anyrun = {
enable = true;
config = {
plugins = with inputs.anyrun.packages.${pkgs.system}; [
applications
shell
randr
rink
symbols
translate
];
width.fraction = 0.25;
y.fraction = 0.3;
hidePluginInfo = true;
closeOnClick = true;
};
extraCss = ''
* {
all: unset;
font-size: 1.2rem;
}
#window,
#match,
#entry,
#plugin,
#main {
background: transparent;
}
#match.activatable {
border-radius: 8px;
margin: 4px 0;
padding: 4px;
/* transition: 100ms ease-out; */
}
#match.activatable:first-child {
margin-top: 12px;
}
#match.activatable:last-child {
margin-bottom: 0;
}
#match:hover {
background: rgba(255, 255, 255, 0.05);
}
#match:selected {
background: rgba(255, 255, 255, 0.1);
}
#entry {
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
padding: 4px 8px;
}
box#main {
background: rgba(0, 0, 0, 0.5);
box-shadow:
inset 0 0 0 1px rgba(255, 255, 255, 0.1),
0 30px 30px 15px rgba(0, 0, 0, 0.5);
border-radius: 20px;
padding: 12px;
}
'';
extraConfigFiles = {
"applications.ron".text = ''
Config(
desktop_actions: false,
max_entries: 5,
terminal: Some("foot"),
)
'';
"shell.ron".text = ''
Config(
prefix: ">"
)
'';
};
};
}

View File

@@ -1,9 +1,9 @@
# Discord is a popular chat application. # Discord is a popular chat application.
{ inputs, ... }: { {inputs, ...}: {
imports = [ inputs.nixcord.homeModules.nixcord ]; imports = [inputs.nixcord.homeModules.nixcord];
programs.nixcord = { programs.nixcord = {
enable = true; enable = true;
config = { frameless = true; }; config = {frameless = true;};
}; };
} }

View File

@@ -1,6 +1,5 @@
# A duckduckgo colorscheme generated for the Stylix theme used. # A duckduckgo colorscheme generated for the Stylix theme used.
{ config, ... }: {config, ...}: let
let
accent = config.lib.stylix.colors.base0D; accent = config.lib.stylix.colors.base0D;
background = config.lib.stylix.colors.base00; background = config.lib.stylix.colors.base00;
foreground = config.lib.stylix.colors.base05; foreground = config.lib.stylix.colors.base05;

View File

@@ -1 +1,2 @@
{ imports = [ ./neofetch ./nerdfetch ]; } # Import all fetch scripts
{imports = [./neofetch ./nerdfetch];}

View File

@@ -1,6 +1,6 @@
# Legacy # Legacy
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = with pkgs; [ neofetch ]; home.packages = with pkgs; [neofetch];
xdg.configFile."neofetch/ascii.txt".text = '' xdg.configFile."neofetch/ascii.txt".text = ''
''${c6} ''${c6}
@@ -28,7 +28,7 @@
xdg.configFile."neofetch/config.conf".text = '' xdg.configFile."neofetch/config.conf".text = ''
# From: https://github.com/Chick2D/neofetch-themes/ # From: https://github.com/Chick2D/neofetch-themes/
# Made by https://github.com/Dan1jel # Made by https://github.com/Dan1jel
print_info() { print_info() {
prin "\n" prin "\n"

View File

@@ -1,7 +1,6 @@
# Nerdfetch, a simple system info script written in bash # Nerdfetch, a simple system info script written in bash
# Source: https://github.com/ThatOneCalculator/NerdFetch # Source: https://github.com/ThatOneCalculator/NerdFetch
{ pkgs, ... }: {pkgs, ...}: let
let
nerdfetch = pkgs.writeShellScriptBin "nerdfetch" '' nerdfetch = pkgs.writeShellScriptBin "nerdfetch" ''
ostype="$(uname)" ostype="$(uname)"
@@ -197,9 +196,7 @@ let
flatpak) packages="$(flatpak list --app | wc -l)" ;; flatpak) packages="$(flatpak list --app | wc -l)" ;;
brew) packages="$(printf '%s\n' "$(brew --cellar)/"* | wc -l)" ;; brew) packages="$(printf '%s\n' "$(brew --cellar)/"* | wc -l)" ;;
port) packages="$(port installed | wc -l)" ;; port) packages="$(port installed | wc -l)" ;;
dpkg-query) packages="$(dpkg-query -f '${ dpkg-query) packages="$(dpkg-query -f '${"binary:Package"}\n' -W | wc -l)" ;;
"binary:Package"
}\n' -W | wc -l)" ;;
rpm) packages="$(rpm -qa --last | wc -l)" ;; rpm) packages="$(rpm -qa --last | wc -l)" ;;
yum) packages="$(yum list installed | wc -l)" ;; yum) packages="$(yum list installed | wc -l)" ;;
dnf) packages="$(dnf list installed | wc -l)" ;; dnf) packages="$(dnf list installed | wc -l)" ;;
@@ -358,7 +355,7 @@ let
## OUTPUT ## OUTPUT
echo """ echo """
''${c0} ___ ''${nc}''${USER}''${grey}@''${reset}''${hn}''${host}''${reset} ''${c0} ___ ''${nc}''${USER}''${grey}@''${reset}''${hn}''${host}''${reset}
''${c0} (''${c1}.. ''${c0}\ ''${lc}''${osi} ''${ic}''${os}''${reset} ''${c0} (''${c1}.. ''${c0}\ ''${lc}''${osi} ''${ic}''${os}''${reset}
''${c0} (''${c2}<> ''${c0}| ''${lc}''${ki} ''${ic}''${kernel}''${reset} ''${c0} (''${c2}<> ''${c0}| ''${lc}''${ki} ''${ic}''${kernel}''${reset}
''${c0} /''${c1}/ \\ ''${c0}\\ ''${lc}''${ri} ''${ic}''${RAM}''${memstat} ''${mempercent} ''${c0} /''${c1}/ \\ ''${c0}\\ ''${lc}''${ri} ''${ic}''${RAM}''${memstat} ''${mempercent}
@@ -367,5 +364,4 @@ let
''${c2} \/''${c0}-____''${c2}\/''${reset} ''${lc}''${ci} ''${red}''${green}''${yellow}''${blue}''${magenta}''${cyan}''${reset} ''${c2} \/''${c0}-____''${c2}\/''${reset} ''${lc}''${ci} ''${red}''${green}''${yellow}''${blue}''${magenta}''${cyan}''${reset}
""" """
''; '';
in {home.packages = [nerdfetch];}
in { home.packages = [ nerdfetch ]; }

View File

@@ -1,6 +1,5 @@
# Git configuration # Git configuration
{ config, ... }: {config, ...}: let
let
username = config.var.git.username; username = config.var.git.username;
email = config.var.git.email; email = config.var.git.email;
in { in {
@@ -50,8 +49,7 @@ in {
log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all''; log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
llog = '' llog = ''
log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative''; log --graph --name-status --pretty=format:"%C(red)%h %C(reset)(%cd) %C(green)%an %Creset%s %C(yellow)%d%Creset" --date=relative'';
edit-unmerged = edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
"!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
}; };
}; };
} }

View File

@@ -1,6 +1,8 @@
_: { # This file is used to sign git commits using an SSH key.
home.file.".ssh/allowed_signers".text = {
"* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL"; # Obviously, change this to your own SSH key.
home.file.".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL";
programs.git.extraConfig = { programs.git.extraConfig = {
commit.gpgsign = true; commit.gpgsign = true;
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers"; gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";

View File

@@ -1,6 +1,9 @@
# Lazygit is a simple terminal UI for git commands. # Lazygit is a simple terminal UI for git commands.
{ config, lib, ... }: {
let config,
lib,
...
}: let
accent = "#${config.lib.stylix.colors.base0D}"; accent = "#${config.lib.stylix.colors.base0D}";
muted = "#${config.lib.stylix.colors.base03}"; muted = "#${config.lib.stylix.colors.base03}";
in { in {
@@ -17,8 +20,8 @@ in {
}; };
gui = { gui = {
theme = { theme = {
activeBorderColor = [ accent "bold" ]; activeBorderColor = [accent "bold"];
inactiveBorderColor = [ muted ]; inactiveBorderColor = [muted];
}; };
showListFooter = false; showListFooter = false;
showRandomTip = false; showRandomTip = false;

View File

@@ -1,4 +1,5 @@
# Nextcloud is a suite of client-server software for creating file hosting services and using them. It is functionally similar to Dropbox, although Nextcloud is free and open-source, allowing anyone to install and operate it on a private server. In contrast to proprietary services, Nextcloud can be hosted on a private server, without additional cost. # Nextcloud is a suite of client-server software for creating file hosting services and using them. It is functionally similar to Dropbox, although Nextcloud is free and open-source, allowing anyone to install and operate it on a private server. In contrast to proprietary services, Nextcloud can be hosted on a private server, without additional cost.
# This is the client, check /server-modules/nextcloud.nix for the server module.
{ {
services.nextcloud-client = { services.nextcloud-client = {
enable = true; enable = true;

View File

@@ -1,3 +1,4 @@
# NVF is a Neovim configuration that provides a minimal setup with essential plugins and configurations.
{ {
inputs, inputs,
pkgs, pkgs,

View File

@@ -1,7 +1,11 @@
# Qutebrowser is a keyboard-focused browser with a minimal GUI. # Qutebrowser is a keyboard-focused browser with a minimal GUI.
# My homepage is generated using https://github.com/anotherhadi/homepage # My homepage is generated using https://github.com/anotherhadi/homepage
{ pkgs, config, ... }: # Legacy
let {
pkgs,
config,
...
}: let
accent = "#${config.lib.stylix.colors.base0D}"; accent = "#${config.lib.stylix.colors.base0D}";
background = "#${config.lib.stylix.colors.base00}"; background = "#${config.lib.stylix.colors.base00}";
foreground = "#${config.lib.stylix.colors.base05}"; foreground = "#${config.lib.stylix.colors.base05}";
@@ -77,10 +81,8 @@ let
homepage = "https://github.com/anotherhadi/homepage"; homepage = "https://github.com/anotherhadi/homepage";
}; };
}; };
in { in {
imports = [../duckduckgo-colorscheme];
imports = [ ../duckduckgo-colorscheme ];
programs.qutebrowser = { programs.qutebrowser = {
enable = true; enable = true;
@@ -120,19 +122,18 @@ in {
settings = { settings = {
url = { url = {
default_page = "${homepage}/build/index.html"; default_page = "${homepage}/build/index.html";
start_pages = [ "${homepage}/build/index.html" ]; start_pages = ["${homepage}/build/index.html"];
}; };
colors = { colors = {
webpage.preferred_color_scheme = webpage.preferred_color_scheme = "dark"; # Enable dark mode for websites that support it
"dark"; # Enable dark mode for websites that support it
}; };
statusbar.show = "in-mode"; statusbar.show = "in-mode";
completion = { completion = {
height = "30%"; height = "30%";
open_categories = [ "history" ]; open_categories = ["history"];
scrollbar = { scrollbar = {
padding = 0; padding = 0;
width = 0; width = 0;
@@ -156,7 +157,7 @@ in {
remove_finished = 0; remove_finished = 0;
}; };
hints = { radius = 1; }; hints = {radius = 1;};
scrolling = { scrolling = {
bar = "never"; bar = "never";

View File

@@ -1,4 +1,4 @@
# Import all shell configurations
{ {
imports = imports = [./fzf.nix ./zsh.nix ./starship.nix ./zoxide.nix ./eza.nix];
[ ./fzf.nix ./zsh.nix ./starship.nix ./zoxide.nix ./tmux.nix ./eza.nix ];
} }

View File

@@ -1,6 +1,9 @@
# Fzf is a general-purpose command-line fuzzy finder. # Fzf is a general-purpose command-line fuzzy finder.
{ config, lib, ... }: {
let config,
lib,
...
}: let
accent = "#" + config.lib.stylix.colors.base0D; accent = "#" + config.lib.stylix.colors.base0D;
foreground = "#" + config.lib.stylix.colors.base05; foreground = "#" + config.lib.stylix.colors.base05;
muted = "#" + config.lib.stylix.colors.base03; muted = "#" + config.lib.stylix.colors.base03;

View File

@@ -1,6 +1,9 @@
# starship is a minimal, fast, and extremely customizable prompt for any shell! # starship is a minimal, fast, and extremely customizable prompt for any shell!
{ config, lib, ... }: {
let config,
lib,
...
}: let
accent = "#${config.lib.stylix.colors.base0D}"; accent = "#${config.lib.stylix.colors.base0D}";
background-alt = "#${config.lib.stylix.colors.base01}"; background-alt = "#${config.lib.stylix.colors.base01}";
in { in {
@@ -17,7 +20,7 @@ in {
"$git_status" "$git_status"
"$character" "$character"
]; ];
directory = { style = accent; }; directory = {style = accent;};
character = { character = {
success_symbol = "[](${accent})"; success_symbol = "[](${accent})";
@@ -38,8 +41,7 @@ in {
}; };
git_status = { git_status = {
format = format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
"[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
style = "cyan"; style = "cyan";
conflicted = ""; conflicted = "";
renamed = ""; renamed = "";

View File

@@ -1,58 +0,0 @@
# Tmux is a terminal multiplexer that allows you to run multiple terminal sessions in a single window.
{ pkgs, ... }:
let
Config = pkgs.writeShellScriptBin "Config" ''
SESSION="Nixy Config"
tmux has-session -t "$SESSION" 2>/dev/null
if [ $? == 0 ]; then
tmux attach -t "$SESSION"
exit 0
fi
tmux new-session -d -s "$SESSION"
tmux send-keys -t "$SESSION" "sleep 0.2 && clear && cd ~/.config/nixos/ && vim" C-m
tmux new-window -t "$SESSION" -n "nixy"
tmux send-keys -t "$SESSION":1 "sleep 0.2 && clear && cd ~/.config/nixos/ && nixy loop" C-m
tmux new-window -t "$SESSION" -n "lazygit"
tmux send-keys -t "$SESSION":2 "sleep 0.2 && clear && cd ~/.config/nixos/ && lazygit" C-m
tmux select-window -t "$SESSION":0
tmux select-pane -t 0
tmux attach -t "$SESSION"
'';
in {
programs.tmux = {
enable = true;
mouse = true;
shell = "${pkgs.zsh}/bin/zsh";
prefix = "C-s";
terminal = "kitty";
keyMode = "vi";
extraConfig = ''
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
set -gq allow-passthrough on
bind-key x kill-pane # skip "kill-pane 1? (y/n)" prompt
bind-key -n C-Tab next-window
bind-key -n C-S-Tab previous-window
bind-key -n M-Tab new-window
'';
plugins = with pkgs; [
tmuxPlugins.vim-tmux-navigator
# tmuxPlugins.resurrect
tmuxPlugins.sensible
tmuxPlugins.tokyo-night-tmux
];
};
home.packages = [ Config ];
}

View File

@@ -1,11 +1,16 @@
# My shell configuration # My shell configuration
{ pkgs, lib, config, ... }: {
let fetch = config.theme.fetch; # neofetch, nerdfetch, pfetch pkgs,
lib,
config,
...
}: let
fetch = config.theme.fetch; # neofetch, nerdfetch, pfetch
in { in {
home.packages = with pkgs; [bat ripgrep tldr sesh rmtrash trash-cli];
home.packages = with pkgs; [ bat ripgrep tldr sesh rmtrash trash-cli ]; # Add go binaries to the PATH
home.sessionPath = ["$HOME/go/bin"];
home.sessionPath = [ "$HOME/go/bin" ];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
@@ -13,7 +18,7 @@ in {
autosuggestion.enable = true; autosuggestion.enable = true;
syntaxHighlighting = { syntaxHighlighting = {
enable = true; enable = true;
highlighters = [ "main" "brackets" "pattern" "regexp" "root" "line" ]; highlighters = ["main" "brackets" "pattern" "regexp" "root" "line"];
}; };
historySubstringSearch.enable = true; historySubstringSearch.enable = true;
@@ -23,7 +28,7 @@ in {
size = 10000; size = 10000;
}; };
profileExtra = lib.optionalString (config.home.sessionPath != [ ]) '' profileExtra = lib.optionalString (config.home.sessionPath != []) ''
export PATH="$PATH''${PATH:+:}${ export PATH="$PATH''${PATH:+:}${
lib.concatStringsSep ":" config.home.sessionPath lib.concatStringsSep ":" config.home.sessionPath
}" }"
@@ -43,18 +48,15 @@ in {
sl = "ls"; sl = "ls";
open = "${pkgs.xdg-utils}/bin/xdg-open"; open = "${pkgs.xdg-utils}/bin/xdg-open";
icat = "${pkgs.kitty}/bin/kitty +kitten icat"; icat = "${pkgs.kitty}/bin/kitty +kitten icat";
cat = cat = "bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain";
"bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain";
mkdir = "mkdir -p"; mkdir = "mkdir -p";
rm = "${pkgs.rmtrash}/bin/rmtrash"; rm = "${pkgs.rmtrash}/bin/rmtrash";
rmdir = "${pkgs.rmtrash}/bin/rmdirtrash"; rmdir = "${pkgs.rmtrash}/bin/rmdirtrash";
obsidian-no-gpu = obsidian-no-gpu = "env ELECTRON_OZONE_PLATFORM_HINT=auto obsidian --ozone-platform=x11";
"env ELECTRON_OZONE_PLATFORM_HINT=auto obsidian --ozone-platform=x11";
wireguard-import = "nmcli connection import type wireguard file"; wireguard-import = "nmcli connection import type wireguard file";
notes = notes = "nvim ~/nextcloud/notes/index.md --cmd 'cd ~/nextcloud/notes' -c ':lua Snacks.picker.smart()'";
"nvim ~/nextcloud/notes/index.md --cmd 'cd ~/nextcloud/notes' -c ':lua Snacks.picker.smart()'";
note = "notes"; note = "notes";
tmp = "nvim /tmp/$(date | sed 's/ //g;s/\\.//g').md"; tmp = "nvim /tmp/$(date | sed 's/ //g;s/\\.//g').md";
@@ -79,17 +81,19 @@ in {
gcm = "git commit -m"; gcm = "git commit -m";
}; };
initContent = # bash initContent =
# bash
'' ''
bindkey -e bindkey -e
${if fetch == "neofetch" then ${
pkgs.neofetch + "/bin/neofetch" if fetch == "neofetch"
else if fetch == "nerdfetch" then then pkgs.neofetch + "/bin/neofetch"
"nerdfetch" else if fetch == "nerdfetch"
else if fetch == "pfetch" then then "nerdfetch"
"echo; ${pkgs.pfetch}/bin/pfetch" else if fetch == "pfetch"
else then "echo; ${pkgs.pfetch}/bin/pfetch"
""} else ""
}
function sesh-sessions() { function sesh-sessions() {
session=$(sesh list -t -c | fzf --height 70% --reverse) session=$(sesh list -t -c | fzf --height 70% --reverse)

View File

@@ -1,11 +1,16 @@
# Spicetify is a spotify client customizer # Spicetify is a spotify client customizer
{ pkgs, config, lib, inputs, ... }: {
let pkgs,
config,
lib,
inputs,
...
}: let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
accent = "${config.lib.stylix.colors.base0D}"; accent = "${config.lib.stylix.colors.base0D}";
background = "${config.lib.stylix.colors.base00}"; background = "${config.lib.stylix.colors.base00}";
in { in {
imports = [ inputs.spicetify-nix.homeManagerModules.default ]; imports = [inputs.spicetify-nix.homeManagerModules.default];
stylix.targets.spicetify.enable = false; stylix.targets.spicetify.enable = false;

View File

@@ -1,8 +1,7 @@
# Tailscale is a VPN service that works on top of WireGuard. # Tailscale is a VPN service that works on top of WireGuard.
# It allows me to access my servers and devices from anywhere. # It allows me to access my servers and devices from anywhere.
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = with pkgs; [ tailscale tailscale-systray ]; home.packages = with pkgs; [tailscale tailscale-systray];
wayland.windowManager.hyprland.settings.exec-once = wayland.windowManager.hyprland.settings.exec-once = ["${pkgs.tailscale-systray}/bin/tailscale-systray"];
[ "${pkgs.tailscale-systray}/bin/tailscale-systray" ];
} }

View File

@@ -1,6 +1,10 @@
# Thunar is a file explorer # Thunar is a file explorer
{ pkgs, config, ... }: {
let user = config.var.username; pkgs,
config,
...
}: let
user = config.var.username;
in { in {
# ctrl + m to toggle the menubar # ctrl + m to toggle the menubar
home.packages = with pkgs; [ home.packages = with pkgs; [

View File

@@ -1,9 +1,5 @@
# Zen is a minimalistic web browser. # Zen is a minimalistic web browser.
{ {inputs, ...}: {
pkgs,
inputs,
...
}: {
imports = [ imports = [
inputs.zen-browser.homeModules.beta inputs.zen-browser.homeModules.beta
]; ];

View File

@@ -1,15 +1,12 @@
# - ## Brightness # - ## Brightness
#- #-
#- This module provides a set of scripts to control the brightness of the screen. #- This module provides a set of scripts to control the brightness of the screen.
#- #-
#- - `brightness-up` increases the brightness by 5%. #- - `brightness-up` increases the brightness by 5%.
#- - `brightness-down` decreases the brightness by 5%. #- - `brightness-down` decreases the brightness by 5%.
#- - `brightness-set [value]` sets the brightness to the given value. #- - `brightness-set [value]` sets the brightness to the given value.
#- - `brightness-change [up|down] [value]` increases or decreases the brightness by the given value. #- - `brightness-change [up|down] [value]` increases or decreases the brightness by the given value.
{pkgs, ...}: let
{ pkgs, ... }:
let
increments = "5"; increments = "5";
brightness-change = pkgs.writeShellScriptBin "brightness-change" '' brightness-change = pkgs.writeShellScriptBin "brightness-change" ''
@@ -28,7 +25,6 @@ let
brightness-down = pkgs.writeShellScriptBin "brightness-down" '' brightness-down = pkgs.writeShellScriptBin "brightness-down" ''
brightness-change down ${increments} brightness-change down ${increments}
''; '';
in { in {
home.packages = [ home.packages = [
pkgs.brightnessctl pkgs.brightnessctl

View File

@@ -5,9 +5,7 @@
#- - `caffeine-status` - Check if hypridle is running. (0/1) #- - `caffeine-status` - Check if hypridle is running. (0/1)
#- - `caffeine-status-icon` - Check if hypridle is running. (icon) #- - `caffeine-status-icon` - Check if hypridle is running. (icon)
#- - `caffeine` - Toggle hypridle. #- - `caffeine` - Toggle hypridle.
{pkgs, ...}: let
{ pkgs, ... }:
let
caffeine-status = pkgs.writeShellScriptBin "caffeine-status" '' caffeine-status = pkgs.writeShellScriptBin "caffeine-status" ''
[[ $(pidof "hypridle") ]] && echo "0" || echo "1" [[ $(pidof "hypridle") ]] && echo "0" || echo "1"
''; '';
@@ -29,5 +27,4 @@ let
notif "caffeine" "$title" "$description" notif "caffeine" "$title" "$description"
''; '';
in {home.packages = [caffeine-status caffeine caffeine-status-icon];}
in { home.packages = [ caffeine-status caffeine caffeine-status-icon ]; }

View File

@@ -11,6 +11,5 @@
./nerdfont-fzf ./nerdfont-fzf
./notification ./notification
./system ./system
./openvpn
]; ];
} }

View File

@@ -6,9 +6,9 @@
#- - `hyprfocus-on` - Enable hyprfocus. #- - `hyprfocus-on` - Enable hyprfocus.
#- - `hyprfocus-off` - Disable hyprfocus. #- - `hyprfocus-off` - Disable hyprfocus.
#- - `hyprfocus-toggle` - Toggle hyprfocus. #- - `hyprfocus-toggle` - Toggle hyprfocus.
{ pkgs, ... }: {pkgs, ...}: let
let hyprfocus-on =
hyprfocus-on = pkgs.writeShellScriptBin "hyprfocus-on" pkgs.writeShellScriptBin "hyprfocus-on"
# bash # bash
'' ''
hyprpanel-hide hyprpanel-hide
@@ -27,7 +27,8 @@ let
echo "1" > /tmp/hyprfocus echo "1" > /tmp/hyprfocus
''; '';
hyprfocus-off = pkgs.writeShellScriptBin "hyprfocus-off" hyprfocus-off =
pkgs.writeShellScriptBin "hyprfocus-off"
# bash # bash
'' ''
hyprctl reload hyprctl reload
@@ -35,8 +36,9 @@ let
rm /tmp/hyprfocus rm /tmp/hyprfocus
''; '';
hyprfocus-toggle = pkgs.writeShellScriptBin "hyprfocus-toggle" hyprfocus-toggle =
# bash pkgs.writeShellScriptBin "hyprfocus-toggle"
# bash
'' ''
if [ -f /tmp/hyprfocus ]; then if [ -f /tmp/hyprfocus ]; then
hyprfocus-off hyprfocus-off
@@ -44,4 +46,4 @@ let
hyprfocus-on hyprfocus-on
fi fi
''; '';
in { home.packages = [ hyprfocus-on hyprfocus-off hyprfocus-toggle ]; } in {home.packages = [hyprfocus-on hyprfocus-off hyprfocus-toggle];}

View File

@@ -1,13 +1,12 @@
# - ## Hyprpanel # - ## Hyprpanel
#- #-
#- Quick scripts to toggle, reload, hide & show hyprpanel. #- Quick scripts to toggle, reload, hide & show hyprpanel.
#- #-
#- - `hyprpanel-toggle` - Toggle hyprpanel (hide/show). #- - `hyprpanel-toggle` - Toggle hyprpanel (hide/show).
#- - `hyprpanel-show` - Show hyprpanel. #- - `hyprpanel-show` - Show hyprpanel.
#- - `hyprpanel-hide` - Hide hyprpanel. #- - `hyprpanel-hide` - Hide hyprpanel.
#- - `hyprpanel-reload` - Reload hyprpanel. #- - `hyprpanel-reload` - Reload hyprpanel.
{ pkgs, ... }: {pkgs, ...}: let
let
hyprpanel-toggle = pkgs.writeShellScriptBin "hyprpanel-toggle" '' hyprpanel-toggle = pkgs.writeShellScriptBin "hyprpanel-toggle" ''
hyprpanel toggleWindow bar-0 hyprpanel toggleWindow bar-0
hyprpanel toggleWindow bar-1 hyprpanel toggleWindow bar-1
@@ -42,6 +41,5 @@ let
hyprctl dispatch exec hyprpanel hyprctl dispatch exec hyprpanel
''; '';
in { in {
home.packages = home.packages = [hyprpanel-toggle hyprpanel-reload hyprpanel-hide hyprpanel-show];
[ hyprpanel-toggle hyprpanel-reload hyprpanel-hide hyprpanel-show ];
} }

View File

@@ -3,8 +3,11 @@
#- This module provides a script to search for Nerd Fonts icons using fzf. #- This module provides a script to search for Nerd Fonts icons using fzf.
#- #-
#- - `nerdfont-fzf` - Search for Nerd Fonts icons using fzf. #- - `nerdfont-fzf` - Search for Nerd Fonts icons using fzf.
{ pkgs, config, ... }: {
let pkgs,
config,
...
}: let
nerdfont-fzf = pkgs.writeShellScriptBin "nerdfont-fzf" '' nerdfont-fzf = pkgs.writeShellScriptBin "nerdfont-fzf" ''
icons=$(${pkgs.jq}/bin/jq -r 'to_entries[] | "\(.key):\(.value.char)"' "/home/${config.var.username}/.config/nerdfont_glyphnames.json" | awk -F: '{print "\033[95m "$2" \033[0m "$1}') icons=$(${pkgs.jq}/bin/jq -r 'to_entries[] | "\(.key):\(.value.char)"' "/home/${config.var.username}/.config/nerdfont_glyphnames.json" | awk -F: '{print "\033[95m "$2" \033[0m "$1}')
fzf_result=$(echo "$icons" | ${pkgs.fzf}/bin/fzf --ansi --border none | awk '{print $1}') fzf_result=$(echo "$icons" | ${pkgs.fzf}/bin/fzf --ansi --border none | awk '{print $1}')
@@ -17,12 +20,11 @@ let
${pkgs.wl-clipboard}/bin/wl-copy "$fzf_result" ${pkgs.wl-clipboard}/bin/wl-copy "$fzf_result"
''; '';
in { in {
home.packages = [ nerdfont-fzf ]; home.packages = [nerdfont-fzf];
xdg.configFile."nerdfont_glyphnames.json" = { xdg.configFile."nerdfont_glyphnames.json" = {
source = pkgs.fetchurl { source = pkgs.fetchurl {
url = url = "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/384b1825ea0037b0314f7f9c660a80c1ecdb219a/glyphnames.json";
"https://raw.githubusercontent.com/ryanoasis/nerd-fonts/384b1825ea0037b0314f7f9c660a80c1ecdb219a/glyphnames.json";
hash = "sha256-Ps0dyFcMs51RMTthBOVSOf/lafPV/53JxuNSKlmZ7cc="; hash = "sha256-Ps0dyFcMs51RMTthBOVSOf/lafPV/53JxuNSKlmZ7cc=";
}; };
}; };

View File

@@ -8,12 +8,12 @@
#- - `night-shift` toggles Night-Shift. #- - `night-shift` toggles Night-Shift.
#- - `night-shift-status` checks if Night-Shift is active. (0/1) #- - `night-shift-status` checks if Night-Shift is active. (0/1)
#- - `night-shift-status-icon` checks if Night-Shift is active. (icon) #- - `night-shift-status-icon` checks if Night-Shift is active. (icon)
{ pkgs, ... }: {pkgs, ...}: let
let
value = "4500"; # Default value for night-shift temperature value = "4500"; # Default value for night-shift temperature
night-shift-on = pkgs.writeShellScriptBin "night-shift-on" night-shift-on =
# bash pkgs.writeShellScriptBin "night-shift-on"
# bash
'' ''
${pkgs.hyprsunset}/bin/hyprsunset -t ${value} & ${pkgs.hyprsunset}/bin/hyprsunset -t ${value} &
title="󰖔 Night-Shift Activated" title="󰖔 Night-Shift Activated"
@@ -22,8 +22,9 @@ let
notif "night-shift" "$title" "$description" notif "night-shift" "$title" "$description"
''; '';
night-shift-off = pkgs.writeShellScriptBin "night-shift-off" night-shift-off =
# bash pkgs.writeShellScriptBin "night-shift-off"
# bash
'' ''
pkill hyprsunset pkill hyprsunset
title="󰖕 Night-Shift Deactivated" title="󰖕 Night-Shift Deactivated"
@@ -32,7 +33,8 @@ let
notif "night-shift" "$title" "$description" notif "night-shift" "$title" "$description"
''; '';
night-shift = pkgs.writeShellScriptBin "night-shift" night-shift =
pkgs.writeShellScriptBin "night-shift"
# bash # bash
'' ''
if pidof "hyprsunset"; then if pidof "hyprsunset"; then
@@ -42,7 +44,8 @@ let
fi fi
''; '';
night-shift-status = pkgs.writeShellScriptBin "night-shift-status" night-shift-status =
pkgs.writeShellScriptBin "night-shift-status"
# bash # bash
'' ''
if pidof "hyprsunset"; then if pidof "hyprsunset"; then
@@ -52,7 +55,8 @@ let
fi fi
''; '';
night-shift-status-icon = pkgs.writeShellScriptBin "night-shift-status-icon" night-shift-status-icon =
pkgs.writeShellScriptBin "night-shift-status-icon"
# bash # bash
'' ''
if pidof "hyprsunset"; then if pidof "hyprsunset"; then

View File

@@ -1,17 +1,20 @@
# - ## Nixy # - ## Nixy
#- #-
#- Nixy is a simple script that I use to manage my NixOS system. It's a simple script that provides a menu to rebuild, upgrade, update, collect garbage, clean boot menu, etc. #- Nixy is a simple script that I use to manage my NixOS system. It's a simple script that provides a menu to rebuild, upgrade, update, collect garbage, clean boot menu, etc.
#- #-
#- - `nixy` - UI wizard to manage the system. #- - `nixy` - UI wizard to manage the system.
#- - `nixy rebuild` - Rebuild the system. #- - `nixy rebuild` - Rebuild the system.
#- - `nixy ...` - ... see the script for more commands. #- - `nixy ...` - ... see the script for more commands.
{ pkgs, config, inputs, ... }: {
let pkgs,
config,
...
}: let
configDirectory = config.var.configDirectory; configDirectory = config.var.configDirectory;
hostname = config.var.hostname; hostname = config.var.hostname;
nixy = pkgs.writeShellScriptBin "nixy" nixy =
pkgs.writeShellScriptBin "nixy"
# bash # bash
'' ''
function exec() { function exec() {
@@ -68,5 +71,4 @@ let
echo "Unknown argument" echo "Unknown argument"
fi fi
''; '';
in {home.packages = [nixy];}
in { home.packages = [ nixy ]; }

View File

@@ -1,6 +1,12 @@
{ pkgs, ... }: # - ## Notif
let #-
notif = pkgs.writeShellScriptBin "notif" # bash # This file provides a script to send custom notifications using `notify-send`.
#-
#- - `notif {id} {title} {description}` - Sends a notification
{pkgs, ...}: let
notif =
pkgs.writeShellScriptBin "notif" # bash
'' ''
# Shell script to send custom notifications # Shell script to send custom notifications
# Usage: notif "sender_id" "message" ["description"] # Usage: notif "sender_id" "message" ["description"]
@@ -22,5 +28,4 @@ let
"$description" \ "$description" \
> "$NOTIF_FOLDER/$sender_id" > "$NOTIF_FOLDER/$sender_id"
''; '';
in {home.packages = [pkgs.libnotify notif];}
in { home.packages = [ pkgs.libnotify notif ]; }

View File

@@ -1,37 +0,0 @@
# - ## OpenVPN
#-
#- OpenVPN allows you to connect/disconnect quickly to a openVPN server
#-
#- - `openvpn-up` turn on the vpn
#- - `openvpn-down` turn down the vpn
#- - `openvpn-toggle` toggle the vpn
{ pkgs, ... }:
let
id = "home"; # ID of the connection
password-file = "/home/hadi/.config/vpn-password";
openvpn-up = pkgs.writeShellScriptBin "openvpn-up"
# bash
''
nmcli con up id ${id} passwd-file ${password-file}
notif "VPN" "VPN activated" "The OpenVPN connection to ${id} has been activated"
'';
openvpn-down = pkgs.writeShellScriptBin "openvpn-down"
# bash
''
nmcli con down id ${id}
notif "VPN" "VPN deactivated" "The OpenVPN connection to ${id} has been deactivated"
'';
openvpn-toggle = pkgs.writeShellScriptBin "openvpn-toggle"
# bash
''
if nmcli connection show --active | grep -q "${id}"; then
openvpn-down
else
openvpn-up
fi
'';
in { home.packages = [ openvpn-up openvpn-down openvpn-toggle ]; }

View File

@@ -3,8 +3,7 @@
#- This module provides a script to take screenshots using `grimblast` and `swappy`. #- This module provides a script to take screenshots using `grimblast` and `swappy`.
#- #-
#- - `screenshot [region|window|monitor] [swappy]` - Take a screenshot of the region, window, or monitor. Optionally, use `swappy` to copy the screenshot to the clipboard. #- - `screenshot [region|window|monitor] [swappy]` - Take a screenshot of the region, window, or monitor. Optionally, use `swappy` to copy the screenshot to the clipboard.
{ pkgs, ... }: {pkgs, ...}: let
let
screenshot = pkgs.writeShellScriptBin "screenshot" '' screenshot = pkgs.writeShellScriptBin "screenshot" ''
if [[ $2 == "swappy" ]];then if [[ $2 == "swappy" ]];then
folder="/tmp" folder="/tmp"
@@ -29,6 +28,5 @@ let
fi fi
''; '';
in { in {
home.packages = home.packages = [pkgs.hyprshot screenshot pkgs.slurp pkgs.grim pkgs.grimblast];
[ pkgs.hyprshot screenshot pkgs.slurp pkgs.grim pkgs.grimblast ];
} }

View File

@@ -6,9 +6,7 @@
#- - `sound-down` decreases the volume by 5%. #- - `sound-down` decreases the volume by 5%.
#- - `sound-set [value]` sets the volume to the given value. #- - `sound-set [value]` sets the volume to the given value.
#- - `sound-toggle` toggles the mute state of the default audio sink. #- - `sound-toggle` toggles the mute state of the default audio sink.
{ pkgs, ... }: {pkgs, ...}: let
let
increments = "5"; increments = "5";
sound-change = pkgs.writeShellScriptBin "sound-change" '' sound-change = pkgs.writeShellScriptBin "sound-change" ''
@@ -34,5 +32,5 @@ let
sound-change mute sound-change mute
''; '';
in { in {
home.packages = [ sound-change sound-up sound-down sound-toggle sound-set ]; home.packages = [sound-change sound-up sound-down sound-toggle sound-set];
} }

View File

@@ -1,15 +1,14 @@
# - ## System # - ## System
#- #-
#- Usefull quick scripts #- Usefull quick scripts
#- #-
#- - `menu` - Open wofi with drun mode. (wofi) #- - `menu` - Open wofi with drun mode. (wofi)
#- - `powermenu` - Open power dropdown menu. (wofi) #- - `powermenu` - Open power dropdown menu. (wofi)
#- - `quickmenu` - Open a dropdown menu with shortcuts and scripts. (wofi) #- - `quickmenu` - Open a dropdown menu with shortcuts and scripts. (wofi)
#- - `lock` - Lock the screen. (hyprlock) #- - `lock` - Lock the screen. (hyprlock)
{ pkgs, ... }: {pkgs, ...}: let
menu =
let pkgs.writeShellScriptBin "menu"
menu = pkgs.writeShellScriptBin "menu"
# bash # bash
'' ''
if pgrep wofi; then if pgrep wofi; then
@@ -29,7 +28,8 @@ let
fi fi
''; '';
powermenu = pkgs.writeShellScriptBin "powermenu" powermenu =
pkgs.writeShellScriptBin "powermenu"
# bash # bash
'' ''
if pgrep wofi; then if pgrep wofi; then
@@ -69,7 +69,8 @@ let
fi fi
''; '';
quickmenu = pkgs.writeShellScriptBin "quickmenu" quickmenu =
pkgs.writeShellScriptBin "quickmenu"
# bash # bash
'' ''
if pgrep wofi; then if pgrep wofi; then
@@ -109,10 +110,10 @@ let
fi fi
''; '';
lock = pkgs.writeShellScriptBin "lock" lock =
pkgs.writeShellScriptBin "lock"
# bash # bash
'' ''
${pkgs.hyprlock}/bin/hyprlock ${pkgs.hyprlock}/bin/hyprlock
''; '';
in {home.packages = [menu powermenu lock quickmenu];}
in { home.packages = [ menu powermenu lock quickmenu ]; }

View File

@@ -1,6 +1,5 @@
# Clipman allows you to save and retrieve clipboard history. # Clipman allows you to save and retrieve clipboard history.
{ pkgs, ... }: {pkgs, ...}: let
let
clipboard-clear = pkgs.writeShellScriptBin "clipboard-clear" '' clipboard-clear = pkgs.writeShellScriptBin "clipboard-clear" ''
clipman clear --all clipman clear --all
''; '';
@@ -8,10 +7,8 @@ let
clipboard = pkgs.writeShellScriptBin "clipboard" '' clipboard = pkgs.writeShellScriptBin "clipboard" ''
clipman pick --tool=wofi clipman pick --tool=wofi
''; '';
in { in {
wayland.windowManager.hyprland.settings.exec-once = wayland.windowManager.hyprland.settings.exec-once = ["${clipboard-clear}" "wl-paste -t text --watch clipman store"];
[ "${clipboard-clear}" "wl-paste -t text --watch clipman store" ]; home.packages = with pkgs; [clipman clipboard clipboard-clear];
home.packages = with pkgs; [ clipman clipboard clipboard-clear ];
services.clipman.enable = true; services.clipman.enable = true;
} }

View File

@@ -1,9 +1,12 @@
# Hypridle is a daemon that listens for user activity and runs commands when the user is idle. # Hypridle is a daemon that listens for user activity and runs commands when the user is idle.
{ pkgs, lib, ... }: { {
pkgs,
lib,
...
}: {
services.hypridle = { services.hypridle = {
enable = true; enable = true;
settings = { settings = {
general = { general = {
ignore_dbus_inhibit = false; ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock"; lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";

View File

@@ -1,19 +1,18 @@
{ config, ... }: {config, ...}: let
let
animationSpeed = config.theme.animation-speed; animationSpeed = config.theme.animation-speed;
animationDuration = if animationSpeed == "slow" then animationDuration =
"4" if animationSpeed == "slow"
else if animationSpeed == "medium" then then "4"
"2.5" else if animationSpeed == "medium"
else then "2.5"
"1.5"; else "1.5";
borderDuration = if animationSpeed == "slow" then borderDuration =
"10" if animationSpeed == "slow"
else if animationSpeed == "medium" then then "10"
"6" else if animationSpeed == "medium"
else then "6"
"3"; else "3";
in { in {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
animations = { animations = {

View File

@@ -1,45 +1,48 @@
{ pkgs, ... }: { {pkgs, ...}: {
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
bind = [ bind =
"$mod,RETURN, exec, uwsm app -- ${pkgs.kitty}/bin/kitty" # Kitty [
"$mod,E, exec, uwsm app -- ${pkgs.xfce.thunar}/bin/thunar" # Thunar "$mod,RETURN, exec, uwsm app -- ${pkgs.kitty}/bin/kitty" # Kitty
"$mod,B, exec, uwsm app -- zen-beta" # Zen Browser "$mod,E, exec, uwsm app -- ${pkgs.xfce.thunar}/bin/thunar" # Thunar
"$mod,K, exec, uwsm app -- ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden "$mod,B, exec, uwsm app -- zen-beta" # Zen Browser
"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock "$mod,K, exec, uwsm app -- ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
"$mod,X, exec, powermenu" # Powermenu "$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
"$mod,SPACE, exec, menu" # Launcher "$mod,X, exec, powermenu" # Powermenu
"$mod,C, exec, quickmenu" # Quickmenu "$mod,SPACE, exec, menu" # Launcher
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus "$mod,C, exec, quickmenu" # Quickmenu
# "$mod,P, exec, uwsm app -- ${pkgs.planify}/bin/io.github.alainm23.planify" # Planify "$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
# "$mod,P, exec, uwsm app -- ${pkgs.planify}/bin/io.github.alainm23.planify" # Planify
"$mod,Q, killactive," # Close window "$mod,Q, killactive," # Close window
"$mod,T, togglefloating," # Toggle Floating "$mod,T, togglefloating," # Toggle Floating
"$mod,F, fullscreen" # Toggle Fullscreen "$mod,F, fullscreen" # Toggle Fullscreen
"$mod,left, movefocus, l" # Move focus left "$mod,left, movefocus, l" # Move focus left
"$mod,right, movefocus, r" # Move focus Right "$mod,right, movefocus, r" # Move focus Right
"$mod,up, movefocus, u" # Move focus Up "$mod,up, movefocus, u" # Move focus Up
"$mod,down, movefocus, d" # Move focus Down "$mod,down, movefocus, d" # Move focus Down
"$shiftMod,up, focusmonitor, -1" # Focus previous monitor "$shiftMod,up, focusmonitor, -1" # Focus previous monitor
"$shiftMod,down, focusmonitor, 1" # Focus next monitor "$shiftMod,down, focusmonitor, 1" # Focus next monitor
"$shiftMod,left, layoutmsg, addmaster" # Add to master "$shiftMod,left, layoutmsg, addmaster" # Add to master
"$shiftMod,right, layoutmsg, removemaster" # Remove from master "$shiftMod,right, layoutmsg, removemaster" # Remove from master
"$mod,PRINT, exec, screenshot region" # Screenshot region "$mod,PRINT, exec, screenshot region" # Screenshot region
",PRINT, exec, screenshot monitor" # Screenshot monitor ",PRINT, exec, screenshot monitor" # Screenshot monitor
"$shiftMod,PRINT, exec, screenshot window" # Screenshot window "$shiftMod,PRINT, exec, screenshot window" # Screenshot window
"ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit "ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit
"$shiftMod,T, exec, hyprpanel-toggle" # Toggle hyprpanel "$shiftMod,T, exec, hyprpanel-toggle" # Toggle hyprpanel
"$shiftMod,C, exec, clipboard" # Clipboard picker with wofi "$shiftMod,C, exec, clipboard" # Clipboard picker with wofi
"$shiftMod,E, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" # Emoji picker with wofi "$shiftMod,E, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" # Emoji picker with wofi
"$mod,F2, exec, night-shift" # Toggle night shift "$mod,F2, exec, night-shift" # Toggle night shift
"$mod,F3, exec, night-shift" # Toggle night shift "$mod,F3, exec, night-shift" # Toggle night shift
] ++ (builtins.concatLists (builtins.genList (i: ]
let ws = i + 1; ++ (builtins.concatLists (builtins.genList (i: let
in [ ws = i + 1;
"$mod,code:1${toString i}, workspace, ${toString ws}" in [
"$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}" "$mod,code:1${toString i}, workspace, ${toString ws}"
]) 9)); "$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}"
])
9));
bindm = [ bindm = [
"$mod,mouse:272, movewindow" # Move Window (mouse) "$mod,mouse:272, movewindow" # Move Window (mouse)
@@ -60,6 +63,5 @@
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up ",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down ",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
]; ];
}; };
} }

View File

@@ -1,6 +1,10 @@
# So best window tiling manager # Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
{ pkgs, config, inputs, lib, ... }: {
let pkgs,
config,
lib,
...
}: let
border-size = config.theme.border-size; border-size = config.theme.border-size;
gaps-in = config.theme.gaps-in; gaps-in = config.theme.gaps-in;
gaps-out = config.theme.gaps-out; gaps-out = config.theme.gaps-out;
@@ -11,12 +15,11 @@ let
keyboardLayout = config.var.keyboardLayout; keyboardLayout = config.var.keyboardLayout;
background = "rgb(" + config.lib.stylix.colors.base00 + ")"; background = "rgb(" + config.lib.stylix.colors.base00 + ")";
in { in {
imports = [ imports = [
./animations.nix ./animations.nix
./bindings.nix ./bindings.nix
./polkitagent.nix ./polkitagent.nix
./keyboard-backlight.nix # CHANGEME: This is for my laptop only ./keyboard-backlight.nix # CHANGEME: This is for omen laptop only
./hyprspace.nix ./hyprspace.nix
]; ];
@@ -122,7 +125,10 @@ in {
render_power = 3; render_power = 3;
}; };
blur = { blur = {
enabled = if blur then "true" else "false"; enabled =
if blur
then "true"
else "false";
size = 18; size = 18;
}; };
}; };
@@ -133,7 +139,7 @@ in {
mfact = 0.5; mfact = 0.5;
}; };
gestures = { workspace_swipe = true; }; gestures = {workspace_swipe = true;};
misc = { misc = {
vfr = true; vfr = true;
@@ -178,7 +184,7 @@ in {
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$" "size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$"
]; ];
layerrule = [ "noanim, launcher" "noanim, ^ags-.*" ]; layerrule = ["noanim, launcher" "noanim, ^ags-.*"];
input = { input = {
kb_layout = keyboardLayout; kb_layout = keyboardLayout;
@@ -195,7 +201,6 @@ in {
clickfinger_behavior = true; clickfinger_behavior = true;
}; };
}; };
}; };
}; };
} }

View File

@@ -1,7 +1,11 @@
# Hyprspace is a hyprland plugin that provides a workspaces overview (three-finger swipe up) and a workspace switcher (three-finger down). # Hyprspace is a hyprland plugin that provides a workspaces overview (three-finger swipe up) and a workspace switcher (three-finger down).
{ inputs, pkgs, ... }: { {
inputs,
pkgs,
...
}: {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
plugins = [ inputs.hyprspace.packages.${pkgs.system}.Hyprspace ]; plugins = [inputs.hyprspace.packages.${pkgs.system}.Hyprspace];
settings = { settings = {
plugin = { plugin = {
overview = { overview = {

View File

@@ -1,6 +1,10 @@
# Turn the keyboard red/off when the battery is low # Turn the keyboard red/off when the battery is low
{ pkgs, config, ... }: # Include this one only if you have a omen laptop with RGB keyboard
let {
pkgs,
config,
...
}: let
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" '' keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
function set_keyboard_backlight { function set_keyboard_backlight {
local color=$1 local color=$1
@@ -31,4 +35,4 @@ let
''; '';
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &"; command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
in { wayland.windowManager.hyprland.settings.exec-once = [ command ]; } in {wayland.windowManager.hyprland.settings.exec-once = [command];}

View File

@@ -1,7 +1,6 @@
# HyprPolkitAgent is a simple polkit agent for wayland compositors # HyprPolkitAgent is a simple polkit agent for wayland compositors
{ pkgs, ... }: { {pkgs, ...}: {
home.packages = with pkgs; [ hyprpolkitagent ]; home.packages = with pkgs; [hyprpolkitagent];
wayland.windowManager.hyprland.settings.exec-once = wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
[ "systemctl --user start hyprpolkitagent" ];
} }

View File

@@ -1,6 +1,9 @@
# Hyprlock is a lockscreen for Hyprland # Hyprlock is a lockscreen for Hyprland
{ config, lib, ... }: {
let config,
lib,
...
}: let
foreground = "rgba(${config.theme.textColorOnWallpaper}ee)"; foreground = "rgba(${config.theme.textColorOnWallpaper}ee)";
font = config.stylix.fonts.serif.name; font = config.stylix.fonts.serif.name;
in { in {
@@ -13,7 +16,6 @@ in {
disable_loading_bar = false; disable_loading_bar = false;
}; };
# BACKGROUND
background = { background = {
monitor = ""; monitor = "";
blur_passes = 0; blur_passes = 0;

View File

@@ -1,5 +1,5 @@
# Hyprpaper is used to set the wallpaper on the system # Hyprpaper is used to set the wallpaper on the system
{ lib, ... }: { {lib, ...}: {
# The wallpaper is set by stylix # The wallpaper is set by stylix
services.hyprpaper = { services.hyprpaper = {
enable = true; enable = true;

View File

@@ -1,22 +1,22 @@
{ pkgs, lib, ... }: # Mime type associations for the system.
with lib; {lib, ...}:
let with lib; let
defaultApps = { defaultApps = {
browser = [ "zen-beta.desktop" ]; browser = ["zen-beta.desktop"];
text = [ "org.gnome.TextEditor.desktop" ]; text = ["org.gnome.TextEditor.desktop"];
image = [ "imv-dir.desktop" ]; image = ["imv-dir.desktop"];
audio = [ "mpv.desktop" ]; audio = ["mpv.desktop"];
video = [ "mpv.desktop" ]; video = ["mpv.desktop"];
directory = [ "thunar.desktop" ]; directory = ["thunar.desktop"];
office = [ "libreoffice.desktop" ]; office = ["libreoffice.desktop"];
pdf = [ "zathura.desktop" ]; pdf = ["zathura.desktop"];
terminal = [ "kitty.desktop" ]; terminal = ["kitty.desktop"];
discord = [ "discord.desktop" ]; discord = ["discord.desktop"];
archive = [ "xarchiver.desktop" ]; archive = ["xarchiver.desktop"];
}; };
mimeMap = { mimeMap = {
text = [ "text/plain" ]; text = ["text/plain"];
image = [ image = [
"image/bmp" "image/bmp"
"image/gif" "image/gif"
@@ -47,7 +47,7 @@ let
"video/x-matroska" "video/x-matroska"
"video/x-msvideo" "video/x-msvideo"
]; ];
directory = [ "inode/directory" ]; directory = ["inode/directory"];
browser = [ browser = [
"text/html" "text/html"
"x-scheme-handler/about" "x-scheme-handler/about"
@@ -67,15 +67,15 @@ let
"application/vnd.ms-powerpoint" "application/vnd.ms-powerpoint"
"application/rtf" "application/rtf"
]; ];
pdf = [ "application/pdf" ]; pdf = ["application/pdf"];
terminal = [ "terminal" ]; terminal = ["terminal"];
archive = [ archive = [
"application/zip" "application/zip"
"application/rar" "application/rar"
"application/7z" "application/7z"
"application/*tar" "application/*tar"
]; ];
discord = [ "x-scheme-handler/discord" ]; discord = ["x-scheme-handler/discord"];
}; };
associations = with lists; associations = with lists;

View File

@@ -1,6 +1,10 @@
# Wofi is a launcher for Wayland, inspired by rofi. # Wofi is a launcher for Wayland, inspired by rofi.
{ config, pkgs, lib, ... }: {
let config,
pkgs,
lib,
...
}: let
accent = "#${config.lib.stylix.colors.base0D}"; accent = "#${config.lib.stylix.colors.base0D}";
background = "#${config.lib.stylix.colors.base00}"; background = "#${config.lib.stylix.colors.base00}";
background-alt = "#${config.lib.stylix.colors.base01}"; background-alt = "#${config.lib.stylix.colors.base01}";
@@ -9,8 +13,7 @@ let
rounding = config.theme.rounding; rounding = config.theme.rounding;
font-size = config.stylix.fonts.sizes.popups; font-size = config.stylix.fonts.sizes.popups;
in { in {
home.packages = with pkgs; [wofi-emoji];
home.packages = with pkgs; [ wofi-emoji ];
programs.wofi = { programs.wofi = {
enable = true; enable = true;
@@ -42,7 +45,8 @@ in {
key_exit = "Escape"; key_exit = "Escape";
}; };
style = lib.mkForce style =
lib.mkForce
# css # css
'' ''
* { * {

View File

@@ -1,4 +1,4 @@
{ config, ... }: { {config, ...}: {
imports = [ imports = [
# Mostly system related configuration # Mostly system related configuration
../../nixos/nvidia.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU ../../nixos/nvidia.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU

View File

@@ -1,30 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{ {
imports = config,
[ (modulesPath + "/installer/scan/not-detected.nix") lib,
]; modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "uas" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "uas" "usbhid" "sd_mod"];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/6320d3c6-0231-45ec-817a-c6f0e39aab73"; device = "/dev/disk/by-uuid/6320d3c6-0231-45ec-817a-c6f0e39aab73";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/5251-9B85"; device = "/dev/disk/by-uuid/5251-9B85";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ]; options = ["fmask=0077" "dmask=0077"];
}; };
swapDevices = [ ]; swapDevices = [];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View File

@@ -22,7 +22,6 @@
../../home/programs/duckduckgo-colorscheme ../../home/programs/duckduckgo-colorscheme
../../home/programs/discord ../../home/programs/discord
../../home/programs/tailscale ../../home/programs/tailscale
../../home/programs/anyrun
# Scripts # Scripts
../../home/scripts # All scripts ../../home/scripts # All scripts
@@ -52,15 +51,14 @@
vlc # Video player vlc # Video player
blanket # White-noise app blanket # White-noise app
obsidian # Note taking app obsidian # Note taking app
# planify # Todolists planify # Todolists
gnome-calendar # Calendar gnome-calendar # Calendar
textpieces # Manipulate texts textpieces # Manipulate texts
curtail # Compress images curtail # Compress images
resources resources # Ressource monitor
gnome-clocks gnome-clocks # Clocks app
gnome-text-editor gnome-text-editor # Basic graphic text editor
mpv # Video player mpv # Video player
figma-linux
# Dev # Dev
go go