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

View File

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

View File

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

View File

@@ -1,6 +1,5 @@
# Git configuration
{ config, ... }:
let
{config, ...}: let
username = config.var.git.username;
email = config.var.git.email;
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'';
llog = ''
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 =
"!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
edit-unmerged = "!f() { git ls-files --unmerged | cut -f2 | sort -u ; }; hx `f`";
};
};
}

View File

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

View File

@@ -1,6 +1,9 @@
# Lazygit is a simple terminal UI for git commands.
{ config, lib, ... }:
let
{
config,
lib,
...
}: let
accent = "#${config.lib.stylix.colors.base0D}";
muted = "#${config.lib.stylix.colors.base03}";
in {

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.
# This is the client, check /server-modules/nextcloud.nix for the server module.
{
services.nextcloud-client = {
enable = true;

View File

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

View File

@@ -1,7 +1,11 @@
# Qutebrowser is a keyboard-focused browser with a minimal GUI.
# My homepage is generated using https://github.com/anotherhadi/homepage
{ pkgs, config, ... }:
let
# Legacy
{
pkgs,
config,
...
}: let
accent = "#${config.lib.stylix.colors.base0D}";
background = "#${config.lib.stylix.colors.base00}";
foreground = "#${config.lib.stylix.colors.base05}";
@@ -77,9 +81,7 @@ let
homepage = "https://github.com/anotherhadi/homepage";
};
};
in {
imports = [../duckduckgo-colorscheme];
programs.qutebrowser = {
@@ -124,8 +126,7 @@ in {
};
colors = {
webpage.preferred_color_scheme =
"dark"; # Enable dark mode for websites that support it
webpage.preferred_color_scheme = "dark"; # Enable dark mode for websites that support it
};
statusbar.show = "in-mode";

View File

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

View File

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

View File

@@ -1,6 +1,9 @@
# starship is a minimal, fast, and extremely customizable prompt for any shell!
{ config, lib, ... }:
let
{
config,
lib,
...
}: let
accent = "#${config.lib.stylix.colors.base0D}";
background-alt = "#${config.lib.stylix.colors.base01}";
in {
@@ -38,8 +41,7 @@ in {
};
git_status = {
format =
"[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218)($ahead_behind$stashed)]($style)";
style = "cyan";
conflicted = "";
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,10 +1,15 @@
# 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 {
home.packages = with pkgs; [bat ripgrep tldr sesh rmtrash trash-cli];
# Add go binaries to the PATH
home.sessionPath = ["$HOME/go/bin"];
programs.zsh = {
@@ -43,18 +48,15 @@ in {
sl = "ls";
open = "${pkgs.xdg-utils}/bin/xdg-open";
icat = "${pkgs.kitty}/bin/kitty +kitten icat";
cat =
"bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain";
cat = "bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain";
mkdir = "mkdir -p";
rm = "${pkgs.rmtrash}/bin/rmtrash";
rmdir = "${pkgs.rmtrash}/bin/rmdirtrash";
obsidian-no-gpu =
"env ELECTRON_OZONE_PLATFORM_HINT=auto obsidian --ozone-platform=x11";
obsidian-no-gpu = "env ELECTRON_OZONE_PLATFORM_HINT=auto obsidian --ozone-platform=x11";
wireguard-import = "nmcli connection import type wireguard file";
notes =
"nvim ~/nextcloud/notes/index.md --cmd 'cd ~/nextcloud/notes' -c ':lua Snacks.picker.smart()'";
notes = "nvim ~/nextcloud/notes/index.md --cmd 'cd ~/nextcloud/notes' -c ':lua Snacks.picker.smart()'";
note = "notes";
tmp = "nvim /tmp/$(date | sed 's/ //g;s/\\.//g').md";
@@ -79,17 +81,19 @@ in {
gcm = "git commit -m";
};
initContent = # bash
initContent =
# bash
''
bindkey -e
${if fetch == "neofetch" then
pkgs.neofetch + "/bin/neofetch"
else if fetch == "nerdfetch" then
"nerdfetch"
else if fetch == "pfetch" then
"echo; ${pkgs.pfetch}/bin/pfetch"
else
""}
${
if fetch == "neofetch"
then pkgs.neofetch + "/bin/neofetch"
else if fetch == "nerdfetch"
then "nerdfetch"
else if fetch == "pfetch"
then "echo; ${pkgs.pfetch}/bin/pfetch"
else ""
}
function sesh-sessions() {
session=$(sesh list -t -c | fzf --height 70% --reverse)

View File

@@ -1,6 +1,11 @@
# Spicetify is a spotify client customizer
{ pkgs, config, lib, inputs, ... }:
let
{
pkgs,
config,
lib,
inputs,
...
}: let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
accent = "${config.lib.stylix.colors.base0D}";
background = "${config.lib.stylix.colors.base00}";

View File

@@ -3,6 +3,5 @@
{pkgs, ...}: {
home.packages = with pkgs; [tailscale tailscale-systray];
wayland.windowManager.hyprland.settings.exec-once =
[ "${pkgs.tailscale-systray}/bin/tailscale-systray" ];
wayland.windowManager.hyprland.settings.exec-once = ["${pkgs.tailscale-systray}/bin/tailscale-systray"];
}

View File

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

View File

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

View File

@@ -6,10 +6,7 @@
#- - `brightness-down` decreases the brightness by 5%.
#- - `brightness-set [value]` sets the brightness to the given value.
#- - `brightness-change [up|down] [value]` increases or decreases the brightness by the given value.
{ pkgs, ... }:
let
{pkgs, ...}: let
increments = "5";
brightness-change = pkgs.writeShellScriptBin "brightness-change" ''
@@ -28,7 +25,6 @@ let
brightness-down = pkgs.writeShellScriptBin "brightness-down" ''
brightness-change down ${increments}
'';
in {
home.packages = [
pkgs.brightnessctl

View File

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

View File

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

View File

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

View File

@@ -6,8 +6,7 @@
#- - `hyprpanel-show` - Show hyprpanel.
#- - `hyprpanel-hide` - Hide hyprpanel.
#- - `hyprpanel-reload` - Reload hyprpanel.
{ pkgs, ... }:
let
{pkgs, ...}: let
hyprpanel-toggle = pkgs.writeShellScriptBin "hyprpanel-toggle" ''
hyprpanel toggleWindow bar-0
hyprpanel toggleWindow bar-1
@@ -42,6 +41,5 @@ let
hyprctl dispatch exec hyprpanel
'';
in {
home.packages =
[ hyprpanel-toggle hyprpanel-reload hyprpanel-hide hyprpanel-show ];
home.packages = [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.
#-
#- - `nerdfont-fzf` - Search for Nerd Fonts icons using fzf.
{ pkgs, config, ... }:
let
{
pkgs,
config,
...
}: let
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}')
fzf_result=$(echo "$icons" | ${pkgs.fzf}/bin/fzf --ansi --border none | awk '{print $1}')
@@ -21,8 +24,7 @@ in {
xdg.configFile."nerdfont_glyphnames.json" = {
source = pkgs.fetchurl {
url =
"https://raw.githubusercontent.com/ryanoasis/nerd-fonts/384b1825ea0037b0314f7f9c660a80c1ecdb219a/glyphnames.json";
url = "https://raw.githubusercontent.com/ryanoasis/nerd-fonts/384b1825ea0037b0314f7f9c660a80c1ecdb219a/glyphnames.json";
hash = "sha256-Ps0dyFcMs51RMTthBOVSOf/lafPV/53JxuNSKlmZ7cc=";
};
};

View File

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

View File

@@ -5,13 +5,16 @@
#- - `nixy` - UI wizard to manage the system.
#- - `nixy rebuild` - Rebuild the system.
#- - `nixy ...` - ... see the script for more commands.
{ pkgs, config, inputs, ... }:
let
{
pkgs,
config,
...
}: let
configDirectory = config.var.configDirectory;
hostname = config.var.hostname;
nixy = pkgs.writeShellScriptBin "nixy"
nixy =
pkgs.writeShellScriptBin "nixy"
# bash
''
function exec() {
@@ -68,5 +71,4 @@ let
echo "Unknown argument"
fi
'';
in {home.packages = [nixy];}

View File

@@ -1,6 +1,12 @@
{ pkgs, ... }:
let
notif = pkgs.writeShellScriptBin "notif" # bash
# - ## Notif
#-
# 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
# Usage: notif "sender_id" "message" ["description"]
@@ -22,5 +28,4 @@ let
"$description" \
> "$NOTIF_FOLDER/$sender_id"
'';
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`.
#-
#- - `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, ... }:
let
{pkgs, ...}: let
screenshot = pkgs.writeShellScriptBin "screenshot" ''
if [[ $2 == "swappy" ]];then
folder="/tmp"
@@ -29,6 +28,5 @@ let
fi
'';
in {
home.packages =
[ pkgs.hyprshot screenshot pkgs.slurp pkgs.grim pkgs.grimblast ];
home.packages = [pkgs.hyprshot screenshot pkgs.slurp pkgs.grim pkgs.grimblast];
}

View File

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

View File

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

View File

@@ -1,6 +1,5 @@
# Clipman allows you to save and retrieve clipboard history.
{ pkgs, ... }:
let
{pkgs, ...}: let
clipboard-clear = pkgs.writeShellScriptBin "clipboard-clear" ''
clipman clear --all
'';
@@ -8,10 +7,8 @@ let
clipboard = pkgs.writeShellScriptBin "clipboard" ''
clipman pick --tool=wofi
'';
in {
wayland.windowManager.hyprland.settings.exec-once =
[ "${clipboard-clear}" "wl-paste -t text --watch clipman store" ];
wayland.windowManager.hyprland.settings.exec-once = ["${clipboard-clear}" "wl-paste -t text --watch clipman store"];
home.packages = with pkgs; [clipman clipboard clipboard-clear];
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.
{ pkgs, lib, ... }: {
{
pkgs,
lib,
...
}: {
services.hypridle = {
enable = true;
settings = {
general = {
ignore_dbus_inhibit = false;
lock_cmd = "pidof hyprlock || ${pkgs.hyprlock}/bin/hyprlock";

View File

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

View File

@@ -1,6 +1,7 @@
{pkgs, ...}: {
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,B, exec, uwsm app -- zen-beta" # Zen Browser
@@ -34,12 +35,14 @@
"$shiftMod,E, exec, ${pkgs.wofi-emoji}/bin/wofi-emoji" # Emoji picker with wofi
"$mod,F2, 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
ws = i + 1;
in [
"$mod,code:1${toString i}, workspace, ${toString ws}"
"$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}"
]) 9));
])
9));
bindm = [
"$mod,mouse:272, movewindow" # Move Window (mouse)
@@ -60,6 +63,5 @@
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
];
};
}

View File

@@ -1,6 +1,10 @@
# So best window tiling manager
{ pkgs, config, inputs, lib, ... }:
let
# Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
{
pkgs,
config,
lib,
...
}: let
border-size = config.theme.border-size;
gaps-in = config.theme.gaps-in;
gaps-out = config.theme.gaps-out;
@@ -11,12 +15,11 @@ let
keyboardLayout = config.var.keyboardLayout;
background = "rgb(" + config.lib.stylix.colors.base00 + ")";
in {
imports = [
./animations.nix
./bindings.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
];
@@ -122,7 +125,10 @@ in {
render_power = 3;
};
blur = {
enabled = if blur then "true" else "false";
enabled =
if blur
then "true"
else "false";
size = 18;
};
};
@@ -195,7 +201,6 @@ in {
clickfinger_behavior = true;
};
};
};
};
}

View File

@@ -1,5 +1,9 @@
# 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 = {
plugins = [inputs.hyprspace.packages.${pkgs.system}.Hyprspace];
settings = {

View File

@@ -1,6 +1,10 @@
# Turn the keyboard red/off when the battery is low
{ pkgs, config, ... }:
let
# Include this one only if you have a omen laptop with RGB keyboard
{
pkgs,
config,
...
}: let
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
function set_keyboard_backlight {
local color=$1

View File

@@ -2,6 +2,5 @@
{pkgs, ...}: {
home.packages = with pkgs; [hyprpolkitagent];
wayland.windowManager.hyprland.settings.exec-once =
[ "systemctl --user start hyprpolkitagent" ];
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
}

View File

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

View File

@@ -1,6 +1,6 @@
{ pkgs, lib, ... }:
with lib;
let
# Mime type associations for the system.
{lib, ...}:
with lib; let
defaultApps = {
browser = ["zen-beta.desktop"];
text = ["org.gnome.TextEditor.desktop"];

View File

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

View File

@@ -1,11 +1,14 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
config,
lib,
modulesPath,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "uas" "usbhid" "sd_mod"];
@@ -13,13 +16,13 @@
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6320d3c6-0231-45ec-817a-c6f0e39aab73";
fileSystems."/" = {
device = "/dev/disk/by-uuid/6320d3c6-0231-45ec-817a-c6f0e39aab73";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/5251-9B85";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5251-9B85";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};

View File

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