mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
update laptop configuration
Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com>
This commit is contained in:
699
flake.lock
generated
699
flake.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -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: ">"
|
||||
)
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,9 @@
|
||||
# Discord is a popular chat application.
|
||||
{ inputs, ... }: {
|
||||
imports = [ inputs.nixcord.homeModules.nixcord ];
|
||||
{inputs, ...}: {
|
||||
imports = [inputs.nixcord.homeModules.nixcord];
|
||||
|
||||
programs.nixcord = {
|
||||
enable = true;
|
||||
config = { frameless = true; };
|
||||
config = {frameless = true;};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1 +1,2 @@
|
||||
{ imports = [ ./neofetch ./nerdfetch ]; }
|
||||
# Import all fetch scripts
|
||||
{imports = [./neofetch ./nerdfetch];}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Legacy
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ neofetch ];
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [neofetch];
|
||||
|
||||
xdg.configFile."neofetch/ascii.txt".text = ''
|
||||
''${c6}
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
xdg.configFile."neofetch/config.conf".text = ''
|
||||
# From: https://github.com/Chick2D/neofetch-themes/
|
||||
# Made by https://github.com/Dan1jel
|
||||
# Made by https://github.com/Dan1jel
|
||||
|
||||
print_info() {
|
||||
prin "\n"
|
||||
|
||||
@@ -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)" ;;
|
||||
@@ -358,7 +355,7 @@ let
|
||||
## OUTPUT
|
||||
|
||||
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} (''${c2}<> ''${c0}| ''${lc}''${ki} ''${ic}''${kernel}''${reset}
|
||||
''${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}
|
||||
"""
|
||||
'';
|
||||
|
||||
in { home.packages = [ nerdfetch ]; }
|
||||
in {home.packages = [nerdfetch];}
|
||||
|
||||
@@ -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`";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 {
|
||||
@@ -17,8 +20,8 @@ in {
|
||||
};
|
||||
gui = {
|
||||
theme = {
|
||||
activeBorderColor = [ accent "bold" ];
|
||||
inactiveBorderColor = [ muted ];
|
||||
activeBorderColor = [accent "bold"];
|
||||
inactiveBorderColor = [muted];
|
||||
};
|
||||
showListFooter = false;
|
||||
showRandomTip = false;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
# NVF is a Neovim configuration that provides a minimal setup with essential plugins and configurations.
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
|
||||
@@ -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,10 +81,8 @@ let
|
||||
homepage = "https://github.com/anotherhadi/homepage";
|
||||
};
|
||||
};
|
||||
|
||||
in {
|
||||
|
||||
imports = [ ../duckduckgo-colorscheme ];
|
||||
imports = [../duckduckgo-colorscheme];
|
||||
|
||||
programs.qutebrowser = {
|
||||
enable = true;
|
||||
@@ -120,19 +122,18 @@ in {
|
||||
settings = {
|
||||
url = {
|
||||
default_page = "${homepage}/build/index.html";
|
||||
start_pages = [ "${homepage}/build/index.html" ];
|
||||
start_pages = ["${homepage}/build/index.html"];
|
||||
};
|
||||
|
||||
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";
|
||||
|
||||
completion = {
|
||||
height = "30%";
|
||||
open_categories = [ "history" ];
|
||||
open_categories = ["history"];
|
||||
scrollbar = {
|
||||
padding = 0;
|
||||
width = 0;
|
||||
@@ -156,7 +157,7 @@ in {
|
||||
remove_finished = 0;
|
||||
};
|
||||
|
||||
hints = { radius = 1; };
|
||||
hints = {radius = 1;};
|
||||
|
||||
scrolling = {
|
||||
bar = "never";
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
@@ -17,7 +20,7 @@ in {
|
||||
"$git_status"
|
||||
"$character"
|
||||
];
|
||||
directory = { style = accent; };
|
||||
directory = {style = accent;};
|
||||
|
||||
character = {
|
||||
success_symbol = "[❯](${accent})";
|
||||
@@ -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 = "";
|
||||
|
||||
@@ -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 ];
|
||||
}
|
||||
@@ -1,11 +1,16 @@
|
||||
# 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];
|
||||
|
||||
home.packages = with pkgs; [ bat ripgrep tldr sesh rmtrash trash-cli ];
|
||||
|
||||
home.sessionPath = [ "$HOME/go/bin" ];
|
||||
# Add go binaries to the PATH
|
||||
home.sessionPath = ["$HOME/go/bin"];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
@@ -13,7 +18,7 @@ in {
|
||||
autosuggestion.enable = true;
|
||||
syntaxHighlighting = {
|
||||
enable = true;
|
||||
highlighters = [ "main" "brackets" "pattern" "regexp" "root" "line" ];
|
||||
highlighters = ["main" "brackets" "pattern" "regexp" "root" "line"];
|
||||
};
|
||||
historySubstringSearch.enable = true;
|
||||
|
||||
@@ -23,7 +28,7 @@ in {
|
||||
size = 10000;
|
||||
};
|
||||
|
||||
profileExtra = lib.optionalString (config.home.sessionPath != [ ]) ''
|
||||
profileExtra = lib.optionalString (config.home.sessionPath != []) ''
|
||||
export PATH="$PATH''${PATH:+:}${
|
||||
lib.concatStringsSep ":" config.home.sessionPath
|
||||
}"
|
||||
@@ -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)
|
||||
|
||||
@@ -1,11 +1,16 @@
|
||||
# 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}";
|
||||
in {
|
||||
imports = [ inputs.spicetify-nix.homeManagerModules.default ];
|
||||
imports = [inputs.spicetify-nix.homeManagerModules.default];
|
||||
|
||||
stylix.targets.spicetify.enable = false;
|
||||
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
# Tailscale is a VPN service that works on top of WireGuard.
|
||||
# It allows me to access my servers and devices from anywhere.
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ tailscale tailscale-systray ];
|
||||
{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"];
|
||||
}
|
||||
|
||||
@@ -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; [
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
# Zen is a minimalistic web browser.
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
inputs.zen-browser.homeModules.beta
|
||||
];
|
||||
|
||||
@@ -1,15 +1,12 @@
|
||||
# - ## Brightness
|
||||
#-
|
||||
#-
|
||||
#- This module provides a set of scripts to control the brightness of the screen.
|
||||
#-
|
||||
#- - `brightness-up` increases the brightness by 5%.
|
||||
#- - `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
|
||||
|
||||
@@ -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 ]; }
|
||||
in {home.packages = [caffeine-status caffeine caffeine-status-icon];}
|
||||
|
||||
@@ -11,6 +11,5 @@
|
||||
./nerdfont-fzf
|
||||
./notification
|
||||
./system
|
||||
./openvpn
|
||||
];
|
||||
}
|
||||
|
||||
@@ -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,8 +36,9 @@ let
|
||||
rm /tmp/hyprfocus
|
||||
'';
|
||||
|
||||
hyprfocus-toggle = pkgs.writeShellScriptBin "hyprfocus-toggle"
|
||||
# bash
|
||||
hyprfocus-toggle =
|
||||
pkgs.writeShellScriptBin "hyprfocus-toggle"
|
||||
# bash
|
||||
''
|
||||
if [ -f /tmp/hyprfocus ]; then
|
||||
hyprfocus-off
|
||||
@@ -44,4 +46,4 @@ let
|
||||
hyprfocus-on
|
||||
fi
|
||||
'';
|
||||
in { home.packages = [ hyprfocus-on hyprfocus-off hyprfocus-toggle ]; }
|
||||
in {home.packages = [hyprfocus-on hyprfocus-off hyprfocus-toggle];}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
# - ## Hyprpanel
|
||||
#-
|
||||
#-
|
||||
#- Quick scripts to toggle, reload, hide & show hyprpanel.
|
||||
#-
|
||||
#- - `hyprpanel-toggle` - Toggle hyprpanel (hide/show).
|
||||
#- - `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];
|
||||
}
|
||||
|
||||
@@ -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}')
|
||||
@@ -17,12 +20,11 @@ let
|
||||
${pkgs.wl-clipboard}/bin/wl-copy "$fzf_result"
|
||||
'';
|
||||
in {
|
||||
home.packages = [ nerdfont-fzf ];
|
||||
home.packages = [nerdfont-fzf];
|
||||
|
||||
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=";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
#- - `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"
|
||||
# bash
|
||||
night-shift-on =
|
||||
pkgs.writeShellScriptBin "night-shift-on"
|
||||
# bash
|
||||
''
|
||||
${pkgs.hyprsunset}/bin/hyprsunset -t ${value} &
|
||||
title=" Night-Shift Activated"
|
||||
@@ -22,8 +22,9 @@ let
|
||||
notif "night-shift" "$title" "$description"
|
||||
'';
|
||||
|
||||
night-shift-off = pkgs.writeShellScriptBin "night-shift-off"
|
||||
# bash
|
||||
night-shift-off =
|
||||
pkgs.writeShellScriptBin "night-shift-off"
|
||||
# bash
|
||||
''
|
||||
pkill hyprsunset
|
||||
title=" Night-Shift Deactivated"
|
||||
@@ -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
|
||||
|
||||
@@ -1,17 +1,20 @@
|
||||
# - ## 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 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 ]; }
|
||||
in {home.packages = [nixy];}
|
||||
|
||||
@@ -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 ]; }
|
||||
in {home.packages = [pkgs.libnotify notif];}
|
||||
|
||||
@@ -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 ]; }
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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" ''
|
||||
@@ -34,5 +32,5 @@ let
|
||||
sound-change mute
|
||||
'';
|
||||
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];
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
# - ## System
|
||||
#-
|
||||
#-
|
||||
#- Usefull quick scripts
|
||||
#-
|
||||
#- - `menu` - Open wofi with drun mode. (wofi)
|
||||
#- - `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 ]; }
|
||||
in {home.packages = [menu powermenu lock quickmenu];}
|
||||
|
||||
@@ -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" ];
|
||||
home.packages = with pkgs; [ clipman clipboard clipboard-clear ];
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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 = {
|
||||
|
||||
@@ -1,45 +1,48 @@
|
||||
{ pkgs, ... }: {
|
||||
{pkgs, ...}: {
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
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
|
||||
"$mod,K, exec, uwsm app -- ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
|
||||
"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
|
||||
"$mod,X, exec, powermenu" # Powermenu
|
||||
"$mod,SPACE, exec, menu" # Launcher
|
||||
"$mod,C, exec, quickmenu" # Quickmenu
|
||||
"$shiftMod,SPACE, exec, hyprfocus-toggle" # Toggle HyprFocus
|
||||
# "$mod,P, exec, uwsm app -- ${pkgs.planify}/bin/io.github.alainm23.planify" # Planify
|
||||
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
|
||||
"$mod,K, exec, uwsm app -- ${pkgs.bitwarden}/bin/bitwarden" # Bitwarden
|
||||
"$mod,L, exec, uwsm app -- ${pkgs.hyprlock}/bin/hyprlock" # Lock
|
||||
"$mod,X, exec, powermenu" # Powermenu
|
||||
"$mod,SPACE, exec, menu" # Launcher
|
||||
"$mod,C, exec, quickmenu" # Quickmenu
|
||||
"$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,T, togglefloating," # Toggle Floating
|
||||
"$mod,F, fullscreen" # Toggle Fullscreen
|
||||
"$mod,left, movefocus, l" # Move focus left
|
||||
"$mod,right, movefocus, r" # Move focus Right
|
||||
"$mod,up, movefocus, u" # Move focus Up
|
||||
"$mod,down, movefocus, d" # Move focus Down
|
||||
"$shiftMod,up, focusmonitor, -1" # Focus previous monitor
|
||||
"$shiftMod,down, focusmonitor, 1" # Focus next monitor
|
||||
"$shiftMod,left, layoutmsg, addmaster" # Add to master
|
||||
"$shiftMod,right, layoutmsg, removemaster" # Remove from master
|
||||
"$mod,Q, killactive," # Close window
|
||||
"$mod,T, togglefloating," # Toggle Floating
|
||||
"$mod,F, fullscreen" # Toggle Fullscreen
|
||||
"$mod,left, movefocus, l" # Move focus left
|
||||
"$mod,right, movefocus, r" # Move focus Right
|
||||
"$mod,up, movefocus, u" # Move focus Up
|
||||
"$mod,down, movefocus, d" # Move focus Down
|
||||
"$shiftMod,up, focusmonitor, -1" # Focus previous monitor
|
||||
"$shiftMod,down, focusmonitor, 1" # Focus next monitor
|
||||
"$shiftMod,left, layoutmsg, addmaster" # Add to master
|
||||
"$shiftMod,right, layoutmsg, removemaster" # Remove from master
|
||||
|
||||
"$mod,PRINT, exec, screenshot region" # Screenshot region
|
||||
",PRINT, exec, screenshot monitor" # Screenshot monitor
|
||||
"$shiftMod,PRINT, exec, screenshot window" # Screenshot window
|
||||
"ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit
|
||||
"$mod,PRINT, exec, screenshot region" # Screenshot region
|
||||
",PRINT, exec, screenshot monitor" # Screenshot monitor
|
||||
"$shiftMod,PRINT, exec, screenshot window" # Screenshot window
|
||||
"ALT,PRINT, exec, screenshot region swappy" # Screenshot region then edit
|
||||
|
||||
"$shiftMod,T, exec, hyprpanel-toggle" # Toggle hyprpanel
|
||||
"$shiftMod,C, exec, clipboard" # Clipboard 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,F3, exec, night-shift" # Toggle night shift
|
||||
] ++ (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));
|
||||
"$shiftMod,T, exec, hyprpanel-toggle" # Toggle hyprpanel
|
||||
"$shiftMod,C, exec, clipboard" # Clipboard 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,F3, exec, night-shift" # Toggle night shift
|
||||
]
|
||||
++ (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));
|
||||
|
||||
bindm = [
|
||||
"$mod,mouse:272, movewindow" # Move Window (mouse)
|
||||
@@ -60,6 +63,5 @@
|
||||
",XF86MonBrightnessUp, exec, brightness-up" # Brightness Up
|
||||
",XF86MonBrightnessDown, exec, brightness-down" # Brightness Down
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
};
|
||||
@@ -133,7 +139,7 @@ in {
|
||||
mfact = 0.5;
|
||||
};
|
||||
|
||||
gestures = { workspace_swipe = true; };
|
||||
gestures = {workspace_swipe = true;};
|
||||
|
||||
misc = {
|
||||
vfr = true;
|
||||
@@ -178,7 +184,7 @@ in {
|
||||
"size 640 400, class:^(.*jetbrains.*)$, title:^(splash)$"
|
||||
];
|
||||
|
||||
layerrule = [ "noanim, launcher" "noanim, ^ags-.*" ];
|
||||
layerrule = ["noanim, launcher" "noanim, ^ags-.*"];
|
||||
|
||||
input = {
|
||||
kb_layout = keyboardLayout;
|
||||
@@ -195,7 +201,6 @@ in {
|
||||
clickfinger_behavior = true;
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -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).
|
||||
{ inputs, pkgs, ... }: {
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
wayland.windowManager.hyprland = {
|
||||
plugins = [ inputs.hyprspace.packages.${pkgs.system}.Hyprspace ];
|
||||
plugins = [inputs.hyprspace.packages.${pkgs.system}.Hyprspace];
|
||||
settings = {
|
||||
plugin = {
|
||||
overview = {
|
||||
|
||||
@@ -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
|
||||
@@ -31,4 +35,4 @@ let
|
||||
'';
|
||||
|
||||
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
|
||||
in { wayland.windowManager.hyprland.settings.exec-once = [ command ]; }
|
||||
in {wayland.windowManager.hyprland.settings.exec-once = [command];}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
# HyprPolkitAgent is a simple polkit agent for wayland compositors
|
||||
{ pkgs, ... }: {
|
||||
home.packages = with pkgs; [ hyprpolkitagent ];
|
||||
{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"];
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Hyprpaper is used to set the wallpaper on the system
|
||||
{ lib, ... }: {
|
||||
{lib, ...}: {
|
||||
# The wallpaper is set by stylix
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
{ 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" ];
|
||||
image = [ "imv-dir.desktop" ];
|
||||
audio = [ "mpv.desktop" ];
|
||||
video = [ "mpv.desktop" ];
|
||||
directory = [ "thunar.desktop" ];
|
||||
office = [ "libreoffice.desktop" ];
|
||||
pdf = [ "zathura.desktop" ];
|
||||
terminal = [ "kitty.desktop" ];
|
||||
discord = [ "discord.desktop" ];
|
||||
archive = [ "xarchiver.desktop" ];
|
||||
browser = ["zen-beta.desktop"];
|
||||
text = ["org.gnome.TextEditor.desktop"];
|
||||
image = ["imv-dir.desktop"];
|
||||
audio = ["mpv.desktop"];
|
||||
video = ["mpv.desktop"];
|
||||
directory = ["thunar.desktop"];
|
||||
office = ["libreoffice.desktop"];
|
||||
pdf = ["zathura.desktop"];
|
||||
terminal = ["kitty.desktop"];
|
||||
discord = ["discord.desktop"];
|
||||
archive = ["xarchiver.desktop"];
|
||||
};
|
||||
|
||||
mimeMap = {
|
||||
text = [ "text/plain" ];
|
||||
text = ["text/plain"];
|
||||
image = [
|
||||
"image/bmp"
|
||||
"image/gif"
|
||||
@@ -47,7 +47,7 @@ let
|
||||
"video/x-matroska"
|
||||
"video/x-msvideo"
|
||||
];
|
||||
directory = [ "inode/directory" ];
|
||||
directory = ["inode/directory"];
|
||||
browser = [
|
||||
"text/html"
|
||||
"x-scheme-handler/about"
|
||||
@@ -67,15 +67,15 @@ let
|
||||
"application/vnd.ms-powerpoint"
|
||||
"application/rtf"
|
||||
];
|
||||
pdf = [ "application/pdf" ];
|
||||
terminal = [ "terminal" ];
|
||||
pdf = ["application/pdf"];
|
||||
terminal = ["terminal"];
|
||||
archive = [
|
||||
"application/zip"
|
||||
"application/rar"
|
||||
"application/7z"
|
||||
"application/*tar"
|
||||
];
|
||||
discord = [ "x-scheme-handler/discord" ];
|
||||
discord = ["x-scheme-handler/discord"];
|
||||
};
|
||||
|
||||
associations = with lists;
|
||||
|
||||
@@ -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,8 +13,7 @@ let
|
||||
rounding = config.theme.rounding;
|
||||
font-size = config.stylix.fonts.sizes.popups;
|
||||
in {
|
||||
|
||||
home.packages = with pkgs; [ wofi-emoji ];
|
||||
home.packages = with pkgs; [wofi-emoji];
|
||||
|
||||
programs.wofi = {
|
||||
enable = true;
|
||||
@@ -42,7 +45,8 @@ in {
|
||||
key_exit = "Escape";
|
||||
};
|
||||
|
||||
style = lib.mkForce
|
||||
style =
|
||||
lib.mkForce
|
||||
# css
|
||||
''
|
||||
* {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, ... }: {
|
||||
{config, ...}: {
|
||||
imports = [
|
||||
# Mostly system related configuration
|
||||
../../nixos/nvidia.nix # CHANGEME: Remove this line if you don't have an Nvidia GPU
|
||||
|
||||
@@ -1,30 +1,33 @@
|
||||
# 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" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "uas" "usbhid" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/6320d3c6-0231-45ec-817a-c6f0e39aab73";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/6320d3c6-0231-45ec-817a-c6f0e39aab73";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/5251-9B85";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/5251-9B85";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
swapDevices = [];
|
||||
|
||||
# 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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user