mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-07-06 16:12:33 +02:00
It's moving
This commit is contained in:
Generated
+110
-820
File diff suppressed because it is too large
Load Diff
@@ -7,16 +7,13 @@
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
stylix.url = "github:danth/stylix";
|
||||
sops-nix.url = "github:Mic92/sops-nix";
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-26.05";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
nvf.url = "github:notashelf/nvf";
|
||||
notashelf-tuigreet.url = "github:NotAShelf/tuigreet";
|
||||
helium-browser.url = "github:oxcl/nix-flake-helium-browser";
|
||||
nur-anotherhadi.url = "github:anotherhadi/nur-packages";
|
||||
|
||||
nur = {
|
||||
url = "github:nix-community/nur";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nix-index-database = {
|
||||
url = "github:nix-community/nix-index-database";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
@@ -25,12 +22,20 @@
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
caelestia-shell = {
|
||||
url = "github:caelestia-dots/shell";
|
||||
stylix = {
|
||||
url = "github:nix-community/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
caelestia-cli = {
|
||||
url = "github:caelestia-dots/cli";
|
||||
sops-nix = {
|
||||
url = "github:Mic92/sops-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
notashelf-tuigreet = {
|
||||
url = "github:NotAShelf/tuigreet";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
helium-browser = {
|
||||
url = "github:oxcl/nix-flake-helium-browser";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
@@ -57,7 +62,6 @@
|
||||
pkgs
|
||||
;
|
||||
pkgs-stable = nixpkgs-stable.legacyPackages.${system};
|
||||
pkgs-nur-hadi = inputs.nur-anotherhadi.packages.${system};
|
||||
};
|
||||
merge = nixpkgs.lib.foldl nixpkgs.lib.recursiveUpdate {};
|
||||
in
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
{pkgs, ...}: let
|
||||
waybar-toggle = pkgs.writeShellScriptBin "waybar-toggle" ''
|
||||
if pidof waybar > /dev/null; then
|
||||
pkill waybar
|
||||
else
|
||||
hyprctl dispatch exec waybar
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
home.packages = [waybar-toggle];
|
||||
|
||||
xdg.desktopEntries = {
|
||||
focus-toggle = {
|
||||
name = "Focus Mode";
|
||||
exec = "focus-toggle";
|
||||
icon = "do-not-disturb-symbolic";
|
||||
comment = "Toggle focus mode";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
|
||||
nightshift-toggle = {
|
||||
name = "Night Shift";
|
||||
exec = "nightshift-toggle";
|
||||
icon = "night-light-symbolic";
|
||||
comment = "Toggle night shift";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
|
||||
mic-mute = {
|
||||
name = "Mute Microphone";
|
||||
exec = "swayosd-client --input-volume mute-toggle";
|
||||
icon = "microphone-sensitivity-muted-symbolic";
|
||||
comment = "Toggle microphone mute";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
|
||||
lock = {
|
||||
name = "Lock";
|
||||
exec = "hyprlock";
|
||||
icon = "system-lock-screen-symbolic";
|
||||
comment = "Lock the screen";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
|
||||
reboot = {
|
||||
name = "Reboot";
|
||||
exec = "systemctl reboot";
|
||||
icon = "system-restart-symbolic";
|
||||
comment = "Restart the system";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
|
||||
shutdown = {
|
||||
name = "Shutdown";
|
||||
exec = "systemctl poweroff";
|
||||
icon = "system-shutdown-symbolic";
|
||||
comment = "Power off the system";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
|
||||
hibernate = {
|
||||
name = "Hibernate";
|
||||
exec = "systemctl hibernate";
|
||||
icon = "drive-harddisk-symbolic";
|
||||
comment = "Hibernate the system";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
|
||||
waybar-toggle = {
|
||||
name = "Toggle Waybar";
|
||||
exec = "waybar-toggle";
|
||||
icon = "panel-applets-symbolic";
|
||||
comment = "Show or hide the status bar";
|
||||
categories = ["System"];
|
||||
terminal = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
{pkgs, ...}: let
|
||||
focus-toggle =
|
||||
pkgs.writeShellScriptBin "focus-toggle"
|
||||
# bash
|
||||
''
|
||||
if test -f /tmp/hypr-focus-mode; then
|
||||
rm /tmp/hypr-focus-mode
|
||||
hyprctl reload
|
||||
hyprctl dispatch exec waybar
|
||||
swayosd-client --custom-message "Focus Mode Off" --custom-icon "do-not-disturb-symbolic"
|
||||
else
|
||||
touch /tmp/hypr-focus-mode
|
||||
pkill waybar || true
|
||||
hyprctl keyword animations:enabled false
|
||||
hyprctl keyword general:gaps_in 0
|
||||
hyprctl keyword general:gaps_out 0
|
||||
hyprctl keyword decoration:active_opacity 1
|
||||
hyprctl keyword decoration:inactive_opacity 1
|
||||
hyprctl keyword decoration:rounding 0
|
||||
swayosd-client --custom-message "Focus Mode On" --custom-icon "do-not-disturb-symbolic"
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
home.packages = [focus-toggle];
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
pkgs-nur-hadi,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs-stable; [
|
||||
@@ -20,7 +19,6 @@
|
||||
|
||||
# I love TUIs
|
||||
caligula # User-friendly, lightweight TUI for disk imaging (ISO, USB BOOT)
|
||||
browsh # A modern text-based browser that renders anything that a modern browser can. It runs in a terminal and can be used remotely over SSH
|
||||
dysk # A terminal-based disk usage analyzer
|
||||
wikiman # Offline search engine for manual pages (arch wiki, tldr)
|
||||
tealdeer # Fast tldr client
|
||||
@@ -28,9 +26,11 @@
|
||||
wiremix # Simple TUI mixer for PipeWire
|
||||
slides # A terminal-based presentation tool that allows you to create and deliver presentations directly from the command line
|
||||
pom # Pomodoro timer in your terminal
|
||||
tabiew # A terminal-based CSV viewer and manipulator
|
||||
jless # A pager for JSON
|
||||
pkgs.wifitui # TUI for managing wifi
|
||||
pkgs-nur-hadi.usbguard-tui # TUI for managing USBGuard rules
|
||||
pkgs-nur-hadi.sheets # Terminal based spreadsheet tool
|
||||
pkgs.nur.repos.anotherhadi.usbguard-tui # TUI for managing USBGuard rules
|
||||
pkgs.nur.repos.anotherhadi.sheets # Terminal based spreadsheet tool
|
||||
|
||||
# I love CLIs
|
||||
httpie # Command-line HTTP client, a user-friendly cURL replacement
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
pkgs-nur-hadi,
|
||||
}:
|
||||
(with pkgs-stable; [
|
||||
# Web
|
||||
@@ -25,7 +24,6 @@
|
||||
# Network
|
||||
inetutils
|
||||
termshark # wireshark in TUI
|
||||
dnsrecon
|
||||
whois
|
||||
dig
|
||||
nmap
|
||||
@@ -42,7 +40,8 @@
|
||||
# Forensics
|
||||
binwalk
|
||||
])
|
||||
++ (with pkgs-nur-hadi; [
|
||||
++ [ pkgs.dnsrecon ]
|
||||
++ (with pkgs.nur.repos.anotherhadi; [
|
||||
spilltea
|
||||
jwt-tui
|
||||
])
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
pkgs-nur-hadi,
|
||||
...
|
||||
}: {
|
||||
home.packages = import ./cybersecurity-packages.nix {
|
||||
inherit pkgs pkgs-stable pkgs-nur-hadi;
|
||||
inherit pkgs pkgs-stable;
|
||||
};
|
||||
|
||||
systemd.user.tmpfiles.rules = [
|
||||
|
||||
@@ -2,12 +2,11 @@
|
||||
inputs,
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
pkgs-nur-hadi,
|
||||
system,
|
||||
...
|
||||
}: let
|
||||
devPackages = import ./dev-packages.nix {inherit pkgs pkgs-stable;};
|
||||
cyberPackages = import ./cybersecurity-packages.nix {inherit pkgs pkgs-stable pkgs-nur-hadi;};
|
||||
cyberPackages = import ./cybersecurity-packages.nix {inherit pkgs pkgs-stable;};
|
||||
in {
|
||||
packages.${system} = {
|
||||
dev = pkgs.buildEnv {
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
pkgs-stable,
|
||||
pkgs-nur-hadi,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
{pkgs-stable, ...}: {
|
||||
home.packages = with pkgs-stable; [
|
||||
tty-solitaire
|
||||
bastet
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
pkgs.writeShellScriptBin "nightshift-toggle"
|
||||
# bash
|
||||
''
|
||||
if pidof "hyprsunset"; then
|
||||
if pidof "hyprsunset" > /dev/null; then
|
||||
pkill hyprsunset
|
||||
${pkgs.libnotify}/bin/notify-send "Night Shift Disabled" "Returning to full spectrum light. Filter disabled."
|
||||
swayosd-client --custom-message "Night Shift Off" --custom-icon "night-light-symbolic"
|
||||
else
|
||||
${pkgs.hyprsunset}/bin/hyprsunset -t 4500 &
|
||||
${pkgs.libnotify}/bin/notify-send "Night Shift Activated" "Welcome to the warm side. Blue light filtering is now active."
|
||||
swayosd-client --custom-message "Night Shift On" --custom-icon "night-light-symbolic"
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
c = config.lib.stylix.colors;
|
||||
in {
|
||||
imports = [inputs.nvf.homeManagerModules.default];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
programs.nvf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
desc = "Smart Find Files";
|
||||
}
|
||||
{
|
||||
key = "<leader>E";
|
||||
key = "<leader>e";
|
||||
mode = "n";
|
||||
silent = true;
|
||||
action = "<cmd>lua Snacks.explorer()<cr>";
|
||||
|
||||
@@ -5,15 +5,7 @@
|
||||
vim.keymap.del("n", "<leader>tdt")
|
||||
'';
|
||||
undoFile.enable = true;
|
||||
utility.yazi-nvim = {
|
||||
enable = true;
|
||||
mappings.openYazi = "<leader>e";
|
||||
};
|
||||
notes.todo-comments.enable = true;
|
||||
assistant.copilot = {
|
||||
enable = true;
|
||||
cmp.enable = true;
|
||||
};
|
||||
|
||||
autocomplete = {
|
||||
nvim-cmp = {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"protonvpn-app --start-minimized &"
|
||||
"protonvpn-app --start-minimized"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
home.packages = with pkgs-stable; [
|
||||
proton-vpn
|
||||
proton-pass
|
||||
proton-authenticator
|
||||
@@ -13,7 +13,7 @@
|
||||
xdg.desktopEntries = {
|
||||
"Proton Authenticator" = {
|
||||
name = "Proton Authenticator";
|
||||
exec = "env WEBKIT_DISABLE_COMPOSITING_MODE=1 ${pkgs.proton-authenticator}/bin/proton-authenticator";
|
||||
exec = "env WEBKIT_DISABLE_COMPOSITING_MODE=1 ${pkgs-stable.proton-authenticator}/bin/proton-authenticator";
|
||||
icon = "proton-authenticator";
|
||||
type = "Application";
|
||||
categories = ["Utility"];
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{
|
||||
{pkgs-stable, ...}: {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
package = pkgs-stable.direnv;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
package = pkgs-stable.nix-direnv;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Eza is a ls replacement
|
||||
{
|
||||
{pkgs-stable, ...}: {
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
package = pkgs-stable.eza;
|
||||
icons = "auto";
|
||||
|
||||
extraOptions = [
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# Fzf is a general-purpose command-line fuzzy finder.
|
||||
{
|
||||
pkgs-stable,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
@@ -10,6 +11,7 @@
|
||||
in {
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
package = pkgs-stable.fzf;
|
||||
enableZshIntegration = true;
|
||||
colors = lib.mkForce {
|
||||
"fg+" = accent;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
# starship is a minimal, fast, and extremely customizable prompt for any shell!
|
||||
{
|
||||
pkgs-stable,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
@@ -9,6 +10,7 @@
|
||||
in {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
package = pkgs-stable.starship;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
format = lib.concatStrings [
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
# Zoxide is a cd replacement
|
||||
{
|
||||
{pkgs-stable, ...}: {
|
||||
programs.zoxide = {
|
||||
enable = true;
|
||||
package = pkgs-stable.zoxide;
|
||||
enableZshIntegration = true;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
# My shell configuration
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
home.packages = with pkgs-stable; [
|
||||
bat
|
||||
ripgrep
|
||||
];
|
||||
|
||||
# Add go binaries to the PATH
|
||||
home.sessionPath = ["$HOME/go/bin"];
|
||||
|
||||
home.sessionVariables = {
|
||||
home = {
|
||||
sessionPath = ["$HOME/go/bin"];
|
||||
sessionVariables = {
|
||||
COLORTERM = "truecolor";
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
@@ -59,7 +59,7 @@
|
||||
v = "nvim";
|
||||
c = "clear";
|
||||
e = "exit";
|
||||
open = "${pkgs.xdg-utils}/bin/xdg-open";
|
||||
open = "${pkgs-stable.xdg-utils}/bin/xdg-open";
|
||||
|
||||
notes = "nvim ~/notes/index.md --cmd 'cd ~/notes' -c ':lua Snacks.picker.smart()'";
|
||||
nix-shell = "nix-shell --command zsh";
|
||||
@@ -99,7 +99,9 @@
|
||||
bindkey '^X' edit-command-line
|
||||
|
||||
# Suffix Aliases
|
||||
alias -s {nix,md,txt,json,yml,yaml,go}=nvim
|
||||
alias -s {nix,md,txt,yml,yaml,go}=nvim
|
||||
alias -s {json,jsonl}=jless
|
||||
alias -s {csv,tsv,parquet,pqt,arrow,db,sqlite,xls,xlsx,xlsm,xlsb,fwf}=tw
|
||||
alias -s {png,jpg,jpeg,gif,pdf}=xdg-open
|
||||
|
||||
# 3. Global Aliases (Remplacés n'importe où dans la commande, pas seulement au début)
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
# Spotatui is a terminal user interface for Spotify, written in Rust. It allows you to control your Spotify playback and manage your playlists directly from the terminal.
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
...
|
||||
}: let
|
||||
c = config.lib.stylix.colors;
|
||||
rgb = base: "${c."${base}-rgb-r"}, ${c."${base}-rgb-g"}, ${c."${base}-rgb-b"}";
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
home.packages = with pkgs-stable; [
|
||||
spotatui
|
||||
];
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
# Thunar is a file explorer
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
config,
|
||||
lib,
|
||||
@@ -11,17 +10,16 @@ in {
|
||||
# ctrl + m to toggle the menubar
|
||||
home.packages =
|
||||
(with pkgs-stable; [
|
||||
xfce.thunar
|
||||
xfce.xfconf
|
||||
xfce.tumbler
|
||||
xfce.thunar-archive-plugin
|
||||
xfce.thunar-volman
|
||||
xfce.thunar-media-tags-plugin
|
||||
thunar
|
||||
xfconf
|
||||
tumbler
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
thunar-media-tags-plugin
|
||||
p7zip
|
||||
xarchiver
|
||||
])
|
||||
++ (with pkgs; [
|
||||
# Icon themes: keep on global pkgs to avoid conflicts with other modules
|
||||
++ (with pkgs-stable; [
|
||||
papirus-icon-theme
|
||||
material-icons
|
||||
material-design-icons
|
||||
@@ -32,7 +30,7 @@ in {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
package = pkgs-stable.papirus-icon-theme;
|
||||
};
|
||||
|
||||
# bookmarks for the side pane
|
||||
@@ -47,7 +45,7 @@ in {
|
||||
qt.enable = true;
|
||||
|
||||
home.sessionVariables = {
|
||||
XDG_ICON_DIR = "${pkgs.papirus-icon-theme}/share/icons/Papirus";
|
||||
XDG_ICON_DIR = "${pkgs-stable.papirus-icon-theme}/share/icons/Papirus";
|
||||
QS_ICON_THEME = "Papirus";
|
||||
QT_STYLE_OVERRIDE = lib.mkForce "Fusion";
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{pkgs, ...}: {
|
||||
{pkgs, pkgs-stable, ...}: {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
shellWrapperName = "y";
|
||||
@@ -108,7 +108,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [glow ouch hexyl exiftool fzf wl-clipboard];
|
||||
home.packages = with pkgs-stable; [glow ouch hexyl exiftool wl-clipboard];
|
||||
|
||||
xdg.configFile."yazi/plugins/toggle-parent.yazi/main.lua".text = ''
|
||||
--- @sync entry
|
||||
|
||||
@@ -1,186 +0,0 @@
|
||||
{ config, pkgs, ... }: let
|
||||
c = config.lib.stylix.colors;
|
||||
font = config.stylix.fonts.sansSerif.name;
|
||||
theme = pkgs.writeText "launcher.rasi" ''
|
||||
configuration {
|
||||
modi: "drun,run,window";
|
||||
case-sensitive: false;
|
||||
cycle: true;
|
||||
normalize-match: true;
|
||||
show-icons: true;
|
||||
matching: "normal";
|
||||
tokenize: true;
|
||||
kb-cancel: "Escape,MousePrimary";
|
||||
drun-match-fields: "name,exec,generic,comment";
|
||||
drun-display-format: "{name} \n[<span size='small'><i>{comment}</i></span>]";
|
||||
drun-url-launcher: "xdg-open";
|
||||
drun-show-actions: false;
|
||||
disable-history: false;
|
||||
sorting-method: "normal";
|
||||
terminal: "ghostty";
|
||||
hover-select: true;
|
||||
me-select-entry: "";
|
||||
me-accept-entry: [ "MousePrimary" ];
|
||||
timeout {
|
||||
action: "kb-cancel";
|
||||
delay: 0;
|
||||
}
|
||||
}
|
||||
|
||||
* {
|
||||
background: #${c.base00}e5;
|
||||
background-alt: #${c.base01}ff;
|
||||
background-sec: #${c.base03}ff;
|
||||
foreground: #${c.base05}ff;
|
||||
selected: #${c.base05}ff;
|
||||
active: #${c.base0B}ff;
|
||||
urgent: #${c.base08}ff;
|
||||
highlight: #${c.base03}28;
|
||||
font: "${font}, bold 12";
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
location: west;
|
||||
anchor: west;
|
||||
padding: 0;
|
||||
margin: 5px;
|
||||
border-radius: 15px;
|
||||
width: 450px;
|
||||
height: 100%;
|
||||
background-color: @background;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
border-radius: 0;
|
||||
margin: 0;
|
||||
spacing: 10px;
|
||||
padding: 10px;
|
||||
background-color: transparent;
|
||||
children: [ "inputbar", "message", "listview", "mode-switcher" ];
|
||||
}
|
||||
|
||||
inputbar {
|
||||
spacing: 10px;
|
||||
margin: 0px;
|
||||
padding: 10px 15px;
|
||||
border-radius: 16px;
|
||||
background-color: @background-alt;
|
||||
color: @foreground;
|
||||
children: [ "entry" ];
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: inherit;
|
||||
color: inherit;
|
||||
placeholder-color: inherit;
|
||||
placeholder: "Search...";
|
||||
}
|
||||
|
||||
listview {
|
||||
columns: 1;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
reverse: false;
|
||||
fixed-height: true;
|
||||
fixed-columns: true;
|
||||
spacing: 5px;
|
||||
margin: 0px;
|
||||
padding: 10px 8px;
|
||||
border-radius: 16px;
|
||||
background-color: @background-alt;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
element {
|
||||
enabled: true;
|
||||
spacing: 8px;
|
||||
margin: 0px;
|
||||
padding: 3px 10px;
|
||||
border-radius: 16px;
|
||||
background-color: transparent;
|
||||
color: @foreground;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @highlight;
|
||||
}
|
||||
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
size: 26px;
|
||||
margin: 0 5px 0 0;
|
||||
color: inherit;
|
||||
cursor: inherit;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
cursor: inherit;
|
||||
padding: 10px 0;
|
||||
vertical-align: 0.5;
|
||||
}
|
||||
|
||||
mode-switcher {
|
||||
enabled: true;
|
||||
spacing: 8px;
|
||||
margin: 0px;
|
||||
border-radius: 16px;
|
||||
padding: 8px 18px;
|
||||
background-color: @background-alt;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 10px;
|
||||
margin: 0;
|
||||
border: 0px solid;
|
||||
border-radius: 16px;
|
||||
background-color: @highlight;
|
||||
color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
button selected {
|
||||
background-color: @foreground;
|
||||
color: @background;
|
||||
}
|
||||
|
||||
message {
|
||||
enabled: true;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border-radius: 0px;
|
||||
background-color: transparent;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
textbox {
|
||||
padding: 8px;
|
||||
border-radius: 4px;
|
||||
background-color: @background-alt;
|
||||
color: @foreground;
|
||||
placeholder-color: @foreground;
|
||||
vertical-align: 0.5;
|
||||
blink: true;
|
||||
markup: true;
|
||||
}
|
||||
|
||||
error-message {
|
||||
padding: 10px;
|
||||
border-radius: 0px;
|
||||
background-color: @background;
|
||||
color: @foreground;
|
||||
}
|
||||
'';
|
||||
in {
|
||||
stylix.targets.rofi.enable = false;
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "${theme}";
|
||||
};
|
||||
}
|
||||
@@ -1,50 +0,0 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (config.theme) bar-rounding bar-thickness;
|
||||
inherit (config.stylix) fonts;
|
||||
in {
|
||||
home.packages = with pkgs; [
|
||||
papirus-icon-theme
|
||||
];
|
||||
|
||||
programs.caelestia.settings = {
|
||||
paths.sessionGif = ./session-gif-hacker-cat.gif;
|
||||
background.enabled = false;
|
||||
appearance = {
|
||||
transparency = {
|
||||
enabled = true;
|
||||
base = config.theme.active-opacity;
|
||||
layers = config.theme.inactive-opacity;
|
||||
};
|
||||
font.family = {
|
||||
material = "Material Symbols Rounded";
|
||||
mono = fonts.monospace.name;
|
||||
sans = fonts.sansSerif.name;
|
||||
};
|
||||
};
|
||||
utilities = {
|
||||
enabled = true;
|
||||
maxToasts = 4;
|
||||
toasts = {
|
||||
audioInputChanged = false;
|
||||
audioOutputChanged = false;
|
||||
capsLockChanged = false;
|
||||
chargingChanged = true;
|
||||
configLoaded = false;
|
||||
dndChanged = true;
|
||||
gameModeChanged = true;
|
||||
numLockChanged = false;
|
||||
nowPlaying = false;
|
||||
kbLayoutChanged = false;
|
||||
};
|
||||
};
|
||||
dashboard.showOnHover = false;
|
||||
border = {
|
||||
rounding = bar-rounding;
|
||||
thickness = bar-thickness;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,68 +0,0 @@
|
||||
{
|
||||
programs.caelestia.settings.bar = {
|
||||
clock.showIcon = false;
|
||||
popouts.activeWindow = false;
|
||||
persistent = true;
|
||||
status = {
|
||||
showBattery = true;
|
||||
showMicrophone = false;
|
||||
showLockStatus = false;
|
||||
showBluetooth = true;
|
||||
showAudio = true;
|
||||
showKbLayout = false;
|
||||
showNetwork = true;
|
||||
};
|
||||
workspaces = {
|
||||
activeIndicator = true;
|
||||
activeLabel = " ";
|
||||
activeTrail = false;
|
||||
label = " ";
|
||||
occupiedBg = true;
|
||||
occupiedLabel = " ";
|
||||
showWindows = false;
|
||||
shown = 5;
|
||||
};
|
||||
entries = [
|
||||
{
|
||||
id = "logo";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "workspaces";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "spacer";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "activeWindow";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "spacer";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "tray";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "clock";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "statusIcons";
|
||||
enabled = true;
|
||||
}
|
||||
{
|
||||
id = "power";
|
||||
enabled = true;
|
||||
}
|
||||
];
|
||||
tray = {
|
||||
background = false;
|
||||
recolour = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,80 +0,0 @@
|
||||
# Caelestia Shell Home Manager Configuration
|
||||
# See https://github.com/caelestia-dots/shell
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
inputs.caelestia-shell.homeManagerModules.default
|
||||
./bar.nix
|
||||
./launcher.nix
|
||||
./appearance.nix
|
||||
./scheme.nix
|
||||
./swappy.nix
|
||||
];
|
||||
|
||||
programs.caelestia = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
settings = {
|
||||
services.weatherLocation = "Paris";
|
||||
general = {
|
||||
apps = {
|
||||
terminal = ["ghostty"];
|
||||
audio = ["pavucontrol"];
|
||||
explorer = ["thunar"];
|
||||
};
|
||||
idle = {
|
||||
timeouts = [];
|
||||
};
|
||||
};
|
||||
};
|
||||
cli = {
|
||||
enable = true;
|
||||
settings.theme = {
|
||||
enableTerm = false;
|
||||
enableDiscord = false;
|
||||
enableSpicetify = false;
|
||||
enableBtop = false;
|
||||
enableCava = false;
|
||||
enableHypr = false;
|
||||
enableGtk = false;
|
||||
enableQt = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
gpu-screen-recorder
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"uwsm app -- caelestia resizer -d"
|
||||
"uwsm app -- caelestia shell -d"
|
||||
"caelestia scheme set -n onedark"
|
||||
"caelestia scheme set -n custom"
|
||||
];
|
||||
|
||||
# shell.json is managed by home-manager (read-only symlink) but caelestia
|
||||
# needs to write to it at runtime: replace the symlink with a mutable copy.
|
||||
# The stale .hm-backup must be removed before linkGeneration so HM can
|
||||
# back up the runtime-modified shell.json without hitting a conflict.
|
||||
home.activation.caelestiaCleanBackup = lib.hm.dag.entryBefore ["linkGeneration"] ''
|
||||
$DRY_RUN_CMD rm -f "$HOME/.config/caelestia/shell.json.hm-backup"
|
||||
'';
|
||||
|
||||
home.activation.caelestiaWritableShellConfig = lib.hm.dag.entryAfter ["linkGeneration"] ''
|
||||
if [ -L "$HOME/.config/caelestia/shell.json" ]; then
|
||||
$DRY_RUN_CMD cp --remove-destination \
|
||||
"$(readlink -f "$HOME/.config/caelestia/shell.json")" \
|
||||
"$HOME/.config/caelestia/shell.json"
|
||||
fi
|
||||
'';
|
||||
|
||||
services.cliphist = {
|
||||
enable = true;
|
||||
allowImages = true;
|
||||
};
|
||||
}
|
||||
@@ -1,188 +0,0 @@
|
||||
{
|
||||
programs.caelestia.settings = {
|
||||
session.commands = {
|
||||
shutdown = [
|
||||
"systemctl"
|
||||
"poweroff"
|
||||
];
|
||||
logout = [
|
||||
"loginctl"
|
||||
"lock-session"
|
||||
];
|
||||
hibernate = [
|
||||
"systemctl"
|
||||
"hibernate"
|
||||
];
|
||||
reboot = [
|
||||
"systemctl"
|
||||
"reboot"
|
||||
];
|
||||
};
|
||||
launcher = {
|
||||
actionPrefix = "/";
|
||||
actions = [
|
||||
{
|
||||
name = "Calculator";
|
||||
icon = "calculate";
|
||||
description = "Do simple math equations (powered by Qalc)";
|
||||
command = [
|
||||
"autocomplete"
|
||||
"calc"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Shutdown";
|
||||
icon = "power_settings_new";
|
||||
description = "Shutdown the system";
|
||||
command = [
|
||||
"systemctl"
|
||||
"poweroff"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Reboot";
|
||||
icon = "cached";
|
||||
description = "Reboot the system";
|
||||
command = [
|
||||
"systemctl"
|
||||
"reboot"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Logout";
|
||||
icon = "exit_to_app";
|
||||
description = "Log out of the current session";
|
||||
command = [
|
||||
"loginctl"
|
||||
"terminate-user"
|
||||
""
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = true;
|
||||
}
|
||||
{
|
||||
name = "Lock";
|
||||
icon = "lock";
|
||||
description = "Lock the current session";
|
||||
command = [
|
||||
"loginctl"
|
||||
"lock-session"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Sleep";
|
||||
icon = "bedtime";
|
||||
description = "Suspend then hibernate";
|
||||
command = [
|
||||
"systemctl"
|
||||
"suspend-then-hibernate"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Restart caelestia";
|
||||
icon = "cached";
|
||||
description = "Restart caelestia";
|
||||
command = [
|
||||
"hyprctl"
|
||||
"dispatch"
|
||||
"exec"
|
||||
"caelestia-shell kill | sleep 1 | caelestia-shell"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Emoji Picker";
|
||||
icon = "mood";
|
||||
description = "Toggle the emoji picker";
|
||||
command = [
|
||||
"caelestia"
|
||||
"emoji"
|
||||
"-p"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Clipboard History";
|
||||
icon = "content_paste";
|
||||
description = "Toggle the clipboard history";
|
||||
command = [
|
||||
"caelestia"
|
||||
"clipboard"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Delete from Clipboard History";
|
||||
icon = "content_paste_off";
|
||||
description = "Delete a line from the clipboard history";
|
||||
command = [
|
||||
"caelestia"
|
||||
"clipboard"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Night Shift";
|
||||
icon = "moon_stars";
|
||||
description = "Toggle Night Shift, the blue light filter";
|
||||
command = ["nightshift-toggle"];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Hyprpicker";
|
||||
icon = "colorize";
|
||||
description = "Pick an hex color";
|
||||
command = [
|
||||
"hyprpicker"
|
||||
"-a"
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
{
|
||||
name = "Run in background";
|
||||
icon = "play_circle";
|
||||
description = "Type and run any shell command in the background";
|
||||
command = [
|
||||
"ghostty"
|
||||
"--title=run-bg"
|
||||
"-e"
|
||||
"bash"
|
||||
"-c"
|
||||
"printf 'Run: '; read -r cmd; [ -n \"$cmd\" ] && hyprctl dispatch exec \"$cmd\""
|
||||
];
|
||||
enabled = true;
|
||||
dangerous = false;
|
||||
}
|
||||
];
|
||||
dragThreshold = 50;
|
||||
enableDangerousActions = false;
|
||||
maxShown = 7;
|
||||
specialPrefix = "@";
|
||||
useFuzzy = {
|
||||
apps = false;
|
||||
actions = false;
|
||||
schemes = false;
|
||||
variants = false;
|
||||
wallpapers = false;
|
||||
};
|
||||
showOnHover = false;
|
||||
hiddenApps = [];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,137 +0,0 @@
|
||||
# This Nix module customizes the color scheme of the Caelestia CLI application using the Stylix base16 color palette.
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
colors = config.lib.stylix.colors;
|
||||
|
||||
customSchemeFile = pkgs.writeText "custom-dark.txt" ''
|
||||
primary_paletteKeyColor ${colors.base0D}
|
||||
secondary_paletteKeyColor ${colors.base04}
|
||||
tertiary_paletteKeyColor ${colors.base08}
|
||||
neutral_paletteKeyColor ${colors.base03}
|
||||
neutral_variant_paletteKeyColor ${colors.base03}
|
||||
background ${colors.base00}
|
||||
onBackground ${colors.base05}
|
||||
surface ${colors.base00}
|
||||
surfaceDim ${colors.base00}
|
||||
surfaceBright ${colors.base02}
|
||||
surfaceContainerLowest ${colors.base01}
|
||||
surfaceContainerLow ${colors.base01}
|
||||
surfaceContainer ${colors.base01}
|
||||
surfaceContainerHigh ${colors.base02}
|
||||
surfaceContainerHighest ${colors.base02}
|
||||
onSurface ${colors.base05}
|
||||
surfaceVariant ${colors.base02}
|
||||
onSurfaceVariant ${colors.base04}
|
||||
inverseSurface ${colors.base05}
|
||||
inverseOnSurface ${colors.base00}
|
||||
outline ${colors.base03}
|
||||
outlineVariant ${colors.base02}
|
||||
shadow ${colors.base00}
|
||||
scrim ${colors.base00}
|
||||
surfaceTint ${colors.base0D}
|
||||
primary ${colors.base0D}
|
||||
onPrimary ${colors.base00}
|
||||
primaryContainer ${colors.base0D}
|
||||
onPrimaryContainer ${colors.base05}
|
||||
inversePrimary ${colors.base0D}
|
||||
secondary ${colors.base0C}
|
||||
onSecondary ${colors.base00}
|
||||
secondaryContainer ${colors.base02}
|
||||
onSecondaryContainer ${colors.base0C}
|
||||
tertiary ${colors.base08}
|
||||
onTertiary ${colors.base00}
|
||||
tertiaryContainer ${colors.base08}
|
||||
onTertiaryContainer ${colors.base00}
|
||||
error ${colors.base08}
|
||||
onError ${colors.base00}
|
||||
errorContainer ${colors.base08}
|
||||
onErrorContainer ${colors.base05}
|
||||
primaryFixed ${colors.base0D}
|
||||
primaryFixedDim ${colors.base0D}
|
||||
onPrimaryFixed ${colors.base00}
|
||||
onPrimaryFixedVariant ${colors.base00}
|
||||
secondaryFixed ${colors.base0C}
|
||||
secondaryFixedDim ${colors.base0C}
|
||||
onSecondaryFixed ${colors.base00}
|
||||
onSecondaryFixedVariant ${colors.base02}
|
||||
tertiaryFixed ${colors.base08}
|
||||
tertiaryFixedDim ${colors.base08}
|
||||
onTertiaryFixed ${colors.base00}
|
||||
onTertiaryFixedVariant ${colors.base00}
|
||||
term0 ${colors.base00}
|
||||
term1 ${colors.base08}
|
||||
term2 ${colors.base0B}
|
||||
term3 ${colors.base0A}
|
||||
term4 ${colors.base0D}
|
||||
term5 ${colors.base0E}
|
||||
term6 ${colors.base0C}
|
||||
term7 ${colors.base05}
|
||||
term8 ${colors.base03}
|
||||
term9 ${colors.base08}
|
||||
term10 ${colors.base0B}
|
||||
term11 ${colors.base0A}
|
||||
term12 ${colors.base0D}
|
||||
term13 ${colors.base0E}
|
||||
term14 ${colors.base0C}
|
||||
term15 ${colors.base07}
|
||||
rosewater ${colors.base06}
|
||||
flamingo ${colors.base0F}
|
||||
pink ${colors.base0E}
|
||||
mauve ${colors.base0D}
|
||||
red ${colors.base08}
|
||||
maroon ${colors.base08}
|
||||
peach ${colors.base09}
|
||||
yellow ${colors.base0A}
|
||||
green ${colors.base0B}
|
||||
teal ${colors.base0C}
|
||||
sky ${colors.base0C}
|
||||
sapphire ${colors.base0C}
|
||||
blue ${colors.base0D}
|
||||
lavender ${colors.base0D}
|
||||
klink ${colors.base0D}
|
||||
klinkSelection ${colors.base0D}
|
||||
kvisited ${colors.base0E}
|
||||
kvisitedSelection ${colors.base0E}
|
||||
knegative ${colors.base08}
|
||||
knegativeSelection ${colors.base08}
|
||||
kneutral ${colors.base0A}
|
||||
kneutralSelection ${colors.base0A}
|
||||
kpositive ${colors.base0B}
|
||||
kpositiveSelection ${colors.base0B}
|
||||
text ${colors.base05}
|
||||
subtext1 ${colors.base04}
|
||||
subtext0 ${colors.base03}
|
||||
overlay2 ${colors.base03}
|
||||
overlay1 ${colors.base03}
|
||||
overlay0 ${colors.base02}
|
||||
surface2 ${colors.base02}
|
||||
surface1 ${colors.base01}
|
||||
surface0 ${colors.base01}
|
||||
base ${colors.base00}
|
||||
mantle ${colors.base00}
|
||||
crust ${colors.base00}
|
||||
success ${colors.base0B}
|
||||
onSuccess ${colors.base00}
|
||||
successContainer ${colors.base0B}
|
||||
onSuccessContainer ${colors.base05}
|
||||
'';
|
||||
|
||||
colorsHash = builtins.hashString "sha256" (builtins.toJSON colors);
|
||||
|
||||
customCli =
|
||||
inputs.caelestia-cli.packages.${pkgs.stdenv.hostPlatform.system}.default.overrideAttrs
|
||||
(oldAttrs: {
|
||||
name = "${oldAttrs.name or "caelestia-cli"}-themed-${colorsHash}";
|
||||
postUnpack = ''
|
||||
mkdir -p $sourceRoot/src/caelestia/data/schemes/custom/main
|
||||
cp ${customSchemeFile} $sourceRoot/src/caelestia/data/schemes/custom/main/dark.txt
|
||||
echo "Custom scheme added to source"
|
||||
'';
|
||||
});
|
||||
in {
|
||||
programs.caelestia.cli.package = customCli;
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 51 KiB |
@@ -1,11 +0,0 @@
|
||||
{
|
||||
xdg.configFile."swappy/config".text = ''
|
||||
[Default]
|
||||
save_dir=~/Pictures/Screenshots
|
||||
save_filename_format=screenshot-%Y%m%d-%H%M%S.png
|
||||
show_panel=false
|
||||
line_size=5
|
||||
text_size=20
|
||||
text_font=sans-serif
|
||||
'';
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
@@ -63,17 +64,17 @@ in {
|
||||
{
|
||||
key = "o";
|
||||
desc = "Obsidian";
|
||||
cmd = "${pkgs.obsidian}/bin/obsidian";
|
||||
cmd = "${pkgs-stable.obsidian}/bin/obsidian";
|
||||
}
|
||||
{
|
||||
key = "s";
|
||||
desc = "Signal";
|
||||
cmd = "${pkgs.signal-desktop}/bin/signal-desktop";
|
||||
cmd = "${pkgs-stable.signal-desktop}/bin/signal-desktop";
|
||||
}
|
||||
{
|
||||
key = "t";
|
||||
desc = "TickTick";
|
||||
cmd = "${pkgs.ticktick}/bin/ticktick";
|
||||
cmd = "${pkgs-stable.ticktick}/bin/ticktick";
|
||||
}
|
||||
{
|
||||
key = "b";
|
||||
@@ -124,7 +125,7 @@ in {
|
||||
|
||||
# Quick launch
|
||||
"$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal)
|
||||
"$mod,E, exec, uwsm app -- ${pkgs.thunar}/bin/thunar" # Thunar
|
||||
"$mod,E, exec, uwsm app -- ${pkgs-stable.thunar}/bin/thunar" # Thunar
|
||||
"$mod, SPACE, exec, rofi -show drun" # Launcher
|
||||
"$mod, N, exec, swaync-client -t" # Notification center
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# Hyprland is a dynamic tiling Wayland compositor that is highly customizable and performant.
|
||||
{
|
||||
pkgs,
|
||||
pkgs-stable,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
@@ -19,17 +20,20 @@ in {
|
||||
./animations.nix
|
||||
./bindings.nix
|
||||
./polkitagent.nix
|
||||
./keyboard-backlight.nix # CHANGEME: This is for omen laptop only
|
||||
./hyprpaper.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
qt5.qtwayland
|
||||
qt6.qtwayland
|
||||
libsForQt5.qt5ct
|
||||
qt6Packages.qt6ct
|
||||
hyprland-qtutils
|
||||
])
|
||||
++ (with pkgs-stable; [
|
||||
xcb-util-cursor
|
||||
libxcb
|
||||
hyprland-qtutils
|
||||
adw-gtk3
|
||||
hyprshot
|
||||
hyprpicker
|
||||
@@ -42,26 +46,17 @@ in {
|
||||
dconf
|
||||
wayland-utils
|
||||
wayland-protocols
|
||||
];
|
||||
]);
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
configType = "hyprlang";
|
||||
xwayland.enable = true;
|
||||
systemd = {
|
||||
enable = false;
|
||||
variables = [
|
||||
"--all"
|
||||
]; # https://wiki.hyprland.org/Nix/Hyprland-on-Home-Manager/#programs-dont-work-in-systemd-services-but-do-on-the-terminal
|
||||
};
|
||||
systemd.enable = false;
|
||||
package = null;
|
||||
portalPackage = null;
|
||||
|
||||
settings = {
|
||||
exec-once = [
|
||||
"dbus-update-activation-environment --systemd --all &"
|
||||
];
|
||||
|
||||
monitor = [
|
||||
",prefered,auto,1" # default
|
||||
];
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
# Hyprpaper is used to set the wallpaper on the system
|
||||
{lib, ...}: {
|
||||
{pkgs-stable, lib, ...}: {
|
||||
# The wallpaper is set by stylix
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
package = pkgs-stable.hyprpaper;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
@@ -1,44 +0,0 @@
|
||||
# Turn the keyboard red/off when the battery is low
|
||||
# Include this one only if you have a omen laptop with RGB keyboard
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
alert-when-low-battery = false;
|
||||
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
|
||||
function set_keyboard_backlight {
|
||||
local color=$1
|
||||
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone00
|
||||
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone01
|
||||
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone02
|
||||
echo $color > /sys/devices/platform/hp-wmi/rgb_zones/zone03
|
||||
}
|
||||
state="white"
|
||||
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
|
||||
if [ "${toString alert-when-low-battery}" = "false" ]; then
|
||||
exit 0
|
||||
fi
|
||||
while true; do
|
||||
BATTERY_LEVEL=$(cat /sys/class/power_supply/BAT*/capacity)
|
||||
IS_CHARGING=$(cat /sys/class/power_supply/BAT*/status)
|
||||
if [[ $BATTERY_LEVEL -le 10 && $IS_CHARGING != "Charging" ]]; then
|
||||
if [[ $state == "red" ]];then
|
||||
state="white"
|
||||
set_keyboard_backlight "000000"
|
||||
else
|
||||
state="red"
|
||||
set_keyboard_backlight "FF0000"
|
||||
fi
|
||||
else
|
||||
state="white"
|
||||
set_keyboard_backlight ${config.lib.stylix.colors.base0D}
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
'';
|
||||
|
||||
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
|
||||
in {
|
||||
wayland.windowManager.hyprland.settings.exec-once = [command];
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
# HyprPolkitAgent is a simple polkit agent for wayland compositors
|
||||
{pkgs, ...}: {
|
||||
home.packages = with pkgs; [hyprpolkitagent];
|
||||
{pkgs-stable, ...}: {
|
||||
home.packages = with pkgs-stable; [hyprpolkitagent];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
{config, ...}: let
|
||||
c = config.lib.stylix.colors;
|
||||
in {
|
||||
stylix.targets.hyprlock.enable = false;
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = [
|
||||
{
|
||||
monitor = "";
|
||||
color = "rgba(${c.base00}FF)";
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:0] echo "[$USER@$(hostname) ~]"'';
|
||||
color = "rgb(${c.base0D})";
|
||||
font_size = 13;
|
||||
font_family = "Maple Mono NF";
|
||||
position = "48, -48";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:1000] echo "$(date +'%H:%M:%S')"'';
|
||||
color = "rgb(${c.base05})";
|
||||
font_size = 13;
|
||||
font_family = "Maple Mono NF";
|
||||
position = "48, -70";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:60000] echo "$(date +'%A %d %B %Y')"'';
|
||||
color = "rgb(${c.base04})";
|
||||
font_size = 13;
|
||||
font_family = "Maple Mono NF";
|
||||
position = "48, -92";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
{
|
||||
monitor = "";
|
||||
text = "passwd:";
|
||||
color = "rgb(${c.base0D})";
|
||||
font_size = 13;
|
||||
font_family = "Maple Mono NF";
|
||||
position = "48, -141";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
];
|
||||
|
||||
"input-field" = [
|
||||
{
|
||||
monitor = "";
|
||||
size = "200, 20";
|
||||
outline_thickness = 0;
|
||||
dots_size = 0.3;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = false;
|
||||
outer_color = "rgba(00000000)";
|
||||
inner_color = "rgba(00000000)";
|
||||
font_color = "rgb(${c.base05})";
|
||||
fade_on_empty = false;
|
||||
placeholder_text = "";
|
||||
hide_input = true;
|
||||
rounding = 0;
|
||||
check_color = "rgb(${c.base0B})";
|
||||
fail_color = "rgb(${c.base08})";
|
||||
fail_text = ''<span font_desc="Maple Mono NF 13">auth failed</span>'';
|
||||
capslock_color = "rgb(${c.base0A})";
|
||||
position = "116, -138";
|
||||
halign = "left";
|
||||
valign = "top";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,24 +1,17 @@
|
||||
# Mime type associations for the system.
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
}: let
|
||||
defaultApps = {
|
||||
# check desktop files here: `ls $(echo $XDG_DATA_DIRS| sed "s/:/ /g")`
|
||||
text = [
|
||||
# "org.gnome.TextEditor.desktop"
|
||||
"nvim-ghostty.desktop"
|
||||
];
|
||||
text = ["nvim-ghostty.desktop"];
|
||||
code = ["nvim-ghostty.desktop"];
|
||||
image = ["imv-dir.desktop"];
|
||||
audio = ["mpv.desktop"];
|
||||
video = ["mpv.desktop"];
|
||||
audio = ["vlc.desktop"];
|
||||
video = ["vlc.desktop"];
|
||||
directory = ["thunar.desktop"];
|
||||
office = ["libreoffice.desktop"];
|
||||
pdf = ["zathura.desktop"];
|
||||
terminal = ["ghostty.desktop"];
|
||||
office = ["onlyoffice-desktopeditors.desktop"];
|
||||
pdf = ["onlyoffice-desktopeditors.desktop"];
|
||||
archive = ["xarchiver.desktop"];
|
||||
browser = ["helium.desktop"];
|
||||
};
|
||||
@@ -34,7 +27,6 @@ with lib; let
|
||||
"text/x-go"
|
||||
"text/x-java"
|
||||
"text/x-csharp"
|
||||
|
||||
"text/x-python"
|
||||
"application/x-shellscript"
|
||||
"text/javascript"
|
||||
@@ -42,7 +34,6 @@ with lib; let
|
||||
"text/css"
|
||||
"text/x-php"
|
||||
"text/x-ruby"
|
||||
|
||||
"application/json"
|
||||
"application/xml"
|
||||
"text/xml"
|
||||
@@ -51,11 +42,8 @@ with lib; let
|
||||
"application/toml"
|
||||
"text/x-nix"
|
||||
"text/markdown"
|
||||
|
||||
"text/x-dockerfile"
|
||||
"application/x-yaml"
|
||||
"text/x-terraform"
|
||||
|
||||
"application/x-perl"
|
||||
"text/x-lua"
|
||||
"text/x-haskell"
|
||||
@@ -104,12 +92,17 @@ with lib; let
|
||||
"application/rtf"
|
||||
];
|
||||
pdf = ["application/pdf"];
|
||||
terminal = ["terminal"];
|
||||
archive = [
|
||||
"application/zip"
|
||||
"application/rar"
|
||||
"application/7z"
|
||||
"application/*tar"
|
||||
"application/x-rar-compressed"
|
||||
"application/vnd.rar"
|
||||
"application/x-7z-compressed"
|
||||
"application/x-tar"
|
||||
"application/gzip"
|
||||
"application/x-bzip2"
|
||||
"application/x-xz"
|
||||
"application/x-zstd"
|
||||
"application/x-compressed-tar"
|
||||
];
|
||||
browser = [
|
||||
"text/html"
|
||||
@@ -125,16 +118,16 @@ with lib; let
|
||||
desktopName = "Neovim (Ghostty)";
|
||||
exec = ''ghostty --title="Neovim Editor" -e nvim %F'';
|
||||
terminal = false;
|
||||
categories = [
|
||||
"Development"
|
||||
"TextEditor"
|
||||
];
|
||||
categories = ["Development" "TextEditor"];
|
||||
mimeTypes = mimeMap.code ++ mimeMap.text;
|
||||
};
|
||||
|
||||
associations = with lists;
|
||||
listToAttrs (
|
||||
flatten (mapAttrsToList (key: map (type: attrsets.nameValuePair type defaultApps."${key}")) mimeMap)
|
||||
associations = lib.listToAttrs (
|
||||
lib.flatten (
|
||||
lib.mapAttrsToList
|
||||
(key: map (type: lib.nameValuePair type defaultApps.${key}))
|
||||
mimeMap
|
||||
)
|
||||
);
|
||||
in {
|
||||
home.packages = [nvim-ghostty];
|
||||
@@ -144,7 +137,7 @@ in {
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
associations.added = associations;
|
||||
defaultApplications = associations;
|
||||
defaultApplications = lib.mapAttrs (_: lib.mkForce) associations;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,136 @@
|
||||
{ config, pkgs, ... }: let
|
||||
c = config.lib.stylix.colors;
|
||||
font = config.stylix.fonts.sansSerif.name;
|
||||
fontSize = toString config.stylix.fonts.sizes.applications;
|
||||
gaps = toString config.theme.gaps-out;
|
||||
theme = pkgs.writeText "launcher.rasi" ''
|
||||
configuration {
|
||||
modi: "drun,run";
|
||||
case-sensitive: false;
|
||||
cycle: true;
|
||||
normalize-match: true;
|
||||
show-icons: false;
|
||||
matching: "normal";
|
||||
tokenize: true;
|
||||
kb-cancel: "Escape,MousePrimary";
|
||||
drun-match-fields: "name,exec,generic,comment";
|
||||
drun-display-format: "{name}";
|
||||
drun-url-launcher: "xdg-open";
|
||||
drun-show-actions: false;
|
||||
disable-history: false;
|
||||
sorting-method: "normal";
|
||||
terminal: "ghostty";
|
||||
hover-select: true;
|
||||
me-select-entry: "";
|
||||
me-accept-entry: [ "MousePrimary" ];
|
||||
}
|
||||
|
||||
* {
|
||||
background: transparent;
|
||||
background-alt: #${c.base01}ff;
|
||||
foreground: #${c.base05}ff;
|
||||
active: #${c.base0D}ff;
|
||||
inactive: #${c.base03}ff;
|
||||
selected-fg: #${c.base00}ff;
|
||||
font: "${font}, Bold ${fontSize}";
|
||||
}
|
||||
|
||||
window {
|
||||
transparency: "real";
|
||||
location: north;
|
||||
anchor: north;
|
||||
padding: ${gaps}px ${gaps}px 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
background-color: transparent;
|
||||
border: 0px;
|
||||
}
|
||||
|
||||
mainbox {
|
||||
orientation: horizontal;
|
||||
spacing: 0;
|
||||
padding: 6px 14px;
|
||||
border-radius: 100px;
|
||||
background-color: @background-alt;
|
||||
children: [ "inputbar", "listview" ];
|
||||
}
|
||||
|
||||
inputbar {
|
||||
expand: false;
|
||||
spacing: 8px;
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
color: @foreground;
|
||||
children: [ "prompt", "entry" ];
|
||||
}
|
||||
|
||||
prompt {
|
||||
background-color: transparent;
|
||||
color: @active;
|
||||
padding: 0 2px 0 0;
|
||||
vertical-align: 0.5;
|
||||
}
|
||||
|
||||
entry {
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
placeholder-color: @inactive;
|
||||
placeholder: "Search...";
|
||||
vertical-align: 0.5;
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
listview {
|
||||
layout: horizontal;
|
||||
lines: 1;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
spacing: 0;
|
||||
padding: 0 0 0 14px;
|
||||
background-color: transparent;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
element {
|
||||
enabled: true;
|
||||
spacing: 0;
|
||||
padding: 2px 10px;
|
||||
border-radius: 100px;
|
||||
background-color: transparent;
|
||||
color: @foreground;
|
||||
cursor: pointer;
|
||||
children: [ "element-text" ];
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @active;
|
||||
color: @selected-fg;
|
||||
}
|
||||
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
color: inherit;
|
||||
vertical-align: 0.5;
|
||||
}
|
||||
|
||||
message {
|
||||
padding: 0;
|
||||
background-color: transparent;
|
||||
color: @foreground;
|
||||
}
|
||||
|
||||
error-message {
|
||||
padding: 10px;
|
||||
border-radius: 100px;
|
||||
background-color: @background-alt;
|
||||
color: @foreground;
|
||||
}
|
||||
'';
|
||||
in {
|
||||
stylix.targets.rofi.enable = false;
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
theme = "${theme}";
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,17 @@
|
||||
{config, ...}: let
|
||||
c = config.lib.stylix.colors;
|
||||
font = config.stylix.fonts.sansSerif.name;
|
||||
monofont = config.stylix.fonts.monospace.name;
|
||||
rounding = config.theme.rounding;
|
||||
border-size = config.theme.border-size;
|
||||
gaps-in = config.theme.gaps-in;
|
||||
opacityToHex = opacity: let
|
||||
val = builtins.floor (opacity * 255);
|
||||
high = val / 16;
|
||||
low = val - high * 16;
|
||||
digits = "0123456789abcdef";
|
||||
in "${builtins.substring high 1 digits}${builtins.substring low 1 digits}";
|
||||
alphaHex = opacityToHex config.theme.inactive-opacity;
|
||||
in {
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
@@ -38,31 +49,29 @@ in {
|
||||
"buttons-grid" = {
|
||||
actions = [
|
||||
{
|
||||
label = "";
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "powerprofilesctl set power-saver";
|
||||
"update-command" = "powerprofilesctl get | grep -q power-saver && echo true || echo false";
|
||||
command = "nightshift-toggle";
|
||||
"update-command" = "pidof hyprsunset > /dev/null && echo true || echo false";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "wpctl set-mute @DEFAULT_SOURCE@ toggle";
|
||||
command = "focus-toggle";
|
||||
"update-command" = "test -f /tmp/hypr-focus-mode && echo true || echo false";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
type = "toggle";
|
||||
command = "swayosd-client --input-volume mute-toggle";
|
||||
"update-command" = "wpctl get-volume @DEFAULT_SOURCE@ | grep -q MUTED && echo true || echo false";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
command = "ghostty -- htop ; swaync-client -cp";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
command = "nwg-look ; swaync-client -cp";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
label = "";
|
||||
command = "swaync-client -cp ; hyprlock";
|
||||
}
|
||||
{
|
||||
label = "";
|
||||
label = "";
|
||||
command = "swaync-client -cp ; systemctl poweroff";
|
||||
}
|
||||
];
|
||||
@@ -71,10 +80,10 @@ in {
|
||||
};
|
||||
|
||||
style = ''
|
||||
@define-color center-bg #${c.base00}cc;
|
||||
@define-color notification-bg #${c.base00}e5;
|
||||
@define-color center-bg #${c.base00}${alphaHex};
|
||||
@define-color notification-bg #${c.base00}${alphaHex};
|
||||
@define-color center-notification-bg #${c.base01};
|
||||
@define-color background #${c.base00}e5;
|
||||
@define-color background #${c.base00}${alphaHex};
|
||||
@define-color background-alt #${c.base01};
|
||||
@define-color text #${c.base05};
|
||||
@define-color text-alt #${c.base03};
|
||||
@@ -83,36 +92,46 @@ in {
|
||||
@define-color urgent #${c.base08};
|
||||
|
||||
* {
|
||||
all: unset;
|
||||
font-family: "${font}";
|
||||
font-weight: 700;
|
||||
all: unset;
|
||||
--border-radius: 16px;
|
||||
--border-radius-s: 8px;
|
||||
--border-radius-xl: 18px;
|
||||
--border-radius: ${toString rounding}px;
|
||||
--border-radius-s: ${toString gaps-in}px;
|
||||
--border-radius-xl: ${toString (rounding - 2)}px;
|
||||
--shadow: 2px 4px 10px rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
.notification { padding: 5px; }
|
||||
|
||||
.notification-row { background: transparent; border: none; box-shadow: none; }
|
||||
|
||||
.control-center .notification { padding: 0; }
|
||||
|
||||
.notification-background {
|
||||
background: @notification-bg;
|
||||
border-radius: var(--border-radius);
|
||||
margin: 8px;
|
||||
border: ${toString border-size}px solid @selected;
|
||||
box-shadow: none;
|
||||
outline: none;
|
||||
margin: ${toString gaps-in}px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.notification-background .close-button {
|
||||
margin: 6px;
|
||||
padding: 2px;
|
||||
border-radius: 6px;
|
||||
border-radius: ${toString (gaps-in - 2)}px;
|
||||
background: transparent;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
.notification-background .close-button:hover { background: @hover; }
|
||||
|
||||
.notification.low,
|
||||
.notification.normal { border: none; }
|
||||
|
||||
.notification.critical {
|
||||
border: 2px solid @urgent;
|
||||
border: ${toString border-size}px solid @urgent;
|
||||
border-radius: var(--border-radius);
|
||||
}
|
||||
|
||||
@@ -120,6 +139,7 @@ in {
|
||||
color: @text;
|
||||
margin: 10px;
|
||||
font-weight: 700;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.notification-content .text-box { margin: 0 0 0 15px; }
|
||||
@@ -170,6 +190,7 @@ in {
|
||||
.control-center {
|
||||
background: @center-bg;
|
||||
border-radius: var(--border-radius);
|
||||
border: ${toString border-size}px solid @selected;
|
||||
margin: 5px;
|
||||
padding: 5px 5px 0 5px;
|
||||
}
|
||||
@@ -184,7 +205,7 @@ in {
|
||||
|
||||
.notification-group { transition: 200ms; }
|
||||
|
||||
.notification-group:not(.collapsed) { margin: 8px; }
|
||||
.notification-group:not(.collapsed) { margin: ${toString gaps-in}px; }
|
||||
|
||||
.notification-group-headers,
|
||||
.notification-group-buttons {
|
||||
@@ -306,14 +327,17 @@ in {
|
||||
padding: 10px;
|
||||
margin: 3px;
|
||||
min-width: 2rem;
|
||||
font-family: "${monofont}";
|
||||
background: @hover;
|
||||
border-radius: var(--border-radius);
|
||||
transition: 200ms;
|
||||
}
|
||||
|
||||
.widget-buttons-grid button > label {
|
||||
font-family: "Maple Mono NF";
|
||||
font-size: 16px;
|
||||
font-family: "${monofont}";
|
||||
font-size: 18px;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
color: @text;
|
||||
}
|
||||
|
||||
@@ -328,4 +352,6 @@ in {
|
||||
.blank-window { background: transparent; }
|
||||
'';
|
||||
};
|
||||
|
||||
stylix.targets.swaync.enable = false;
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
c = config.lib.stylix.colors;
|
||||
rounding = config.theme.rounding;
|
||||
border-size = config.theme.border-size;
|
||||
gaps-in = config.theme.gaps-in;
|
||||
opacityToHex = opacity: let
|
||||
val = builtins.floor (opacity * 255);
|
||||
high = val / 16;
|
||||
low = val - high * 16;
|
||||
digits = "0123456789abcdef";
|
||||
in "${builtins.substring high 1 digits}${builtins.substring low 1 digits}";
|
||||
alphaHex = opacityToHex config.theme.inactive-opacity;
|
||||
|
||||
style = pkgs.writeText "swayosd-style.css" ''
|
||||
window#osd {
|
||||
background: #${c.base00}${alphaHex};
|
||||
border-radius: ${toString rounding}px;
|
||||
border: ${toString border-size}px solid #${c.base03}66;
|
||||
}
|
||||
|
||||
window#osd #container {
|
||||
margin: ${toString gaps-in}px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
window#osd image,
|
||||
window#osd label {
|
||||
color: #${c.base05};
|
||||
}
|
||||
|
||||
window#osd progressbar,
|
||||
window#osd segmentedprogress {
|
||||
min-height: 6px;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
}
|
||||
|
||||
window#osd trough,
|
||||
window#osd segment {
|
||||
min-height: inherit;
|
||||
border-radius: inherit;
|
||||
border: none;
|
||||
background: #${c.base03}66;
|
||||
}
|
||||
|
||||
window#osd progress,
|
||||
window#osd segment.active {
|
||||
min-height: inherit;
|
||||
border-radius: inherit;
|
||||
border: none;
|
||||
background: #${c.base0D};
|
||||
}
|
||||
|
||||
window#osd segment { margin-left: 4px; }
|
||||
window#osd segment:first-child { margin-left: 0; }
|
||||
'';
|
||||
in {
|
||||
services.swayosd = {
|
||||
enable = true;
|
||||
stylePath = style;
|
||||
topMargin = 0.5;
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,28 @@
|
||||
{ pkgs, ... }: {
|
||||
{pkgs, ...}: let
|
||||
networkScript = pkgs.writeShellScript "waybar-network" ''
|
||||
for iface in $(${pkgs.iproute2}/bin/ip -br link show | awk '$2 == "UP" {print $1}' | grep -vE '^(lo|tun|proton|wg[0-9]|ppp|vpn|docker|br-|veth|virbr)'); do
|
||||
ip=$(${pkgs.iproute2}/bin/ip addr show "$iface" 2>/dev/null | grep 'inet ' | awk '{print $2}' | cut -d/ -f1 | head -1)
|
||||
if [ -n "$ip" ]; then
|
||||
if [[ "$iface" == wl* ]]; then
|
||||
ssid=$(${pkgs.iw}/bin/iw dev "$iface" link 2>/dev/null | grep SSID | sed 's/.*SSID: //')
|
||||
signal=$(${pkgs.iw}/bin/iw dev "$iface" link 2>/dev/null | grep signal | awk '{print $2}')
|
||||
printf '{"text": "", "class": "wifi", "tooltip": " %s\\n %s dBm"}\n' "$ssid" "$signal"
|
||||
else
|
||||
printf '{"text": "", "class": "ethernet", "tooltip": " %s\\n %s"}\n' "$iface" "$ip"
|
||||
fi
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
printf '{"text": "", "class": "disconnected", "tooltip": "Disconnected"}\n'
|
||||
'';
|
||||
in {
|
||||
imports = [
|
||||
./settings.nix
|
||||
./style.nix
|
||||
];
|
||||
|
||||
_module.args.networkScript = networkScript;
|
||||
|
||||
programs.waybar.enable = true;
|
||||
stylix.targets.waybar.enable = false;
|
||||
|
||||
@@ -11,11 +30,10 @@
|
||||
playerctl
|
||||
pavucontrol
|
||||
blueman
|
||||
swayosd
|
||||
iw
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"waybar"
|
||||
"swayosd-server"
|
||||
];
|
||||
}
|
||||
|
||||
+35
-122
@@ -1,60 +1,23 @@
|
||||
{ osConfig ? {}, lib, ... }: let
|
||||
hasBluetooth = osConfig.hardware.bluetooth.enable or false;
|
||||
{config, networkScript, ...}: let
|
||||
gaps-out = config.theme.gaps-out;
|
||||
c = config.lib.stylix.colors;
|
||||
in {
|
||||
programs.waybar.settings = [
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 25;
|
||||
margin = "5 0";
|
||||
margin = "${toString gaps-out} ${toString gaps-out} 0";
|
||||
modules-center = ["clock" "tray" "hyprland/workspaces" "custom/network" "bluetooth" "battery" "group/right-hidden"];
|
||||
|
||||
modules-left = [ "group/left-hidden-top" "group/left" ];
|
||||
modules-center = [ "clock" ];
|
||||
modules-right = [ "group/right" "group/right-hidden-top" ];
|
||||
|
||||
# ── Groups ────────────────────────────────────────────────────────
|
||||
|
||||
"group/left" = {
|
||||
orientation = "horizontal";
|
||||
modules = [ "hyprland/workspaces" "mpris" ];
|
||||
};
|
||||
|
||||
# power-profiles-daemon visible + hidden drawer (arrow → battery cpu load)
|
||||
"group/left-hidden-top" = {
|
||||
orientation = "horizontal";
|
||||
modules = [ "power-profiles-daemon" "group/left-hidden" ];
|
||||
};
|
||||
|
||||
"group/left-hidden" = {
|
||||
"group/right-hidden" = {
|
||||
orientation = "horizontal";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = false;
|
||||
click-to-reveal = true;
|
||||
};
|
||||
modules = [ "custom/arrow-right" "battery" "cpu" "load" ];
|
||||
};
|
||||
|
||||
# bluetooth volume network tray (visible)
|
||||
"group/right" = {
|
||||
orientation = "horizontal";
|
||||
modules = lib.optional hasBluetooth "bluetooth" ++ [ "group/group-volume" "network" "tray" ];
|
||||
};
|
||||
|
||||
# hidden drawer (arrow ← memory temp) + ctlcenter visible
|
||||
"group/right-hidden-top" = {
|
||||
orientation = "horizontal";
|
||||
modules = [ "group/right-hidden" "custom/ctlcenter" ];
|
||||
};
|
||||
|
||||
"group/right-hidden" = {
|
||||
orientation = "horizontal";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
click-to-reveal = true;
|
||||
};
|
||||
modules = [ "custom/arrow-left" "memory" "temperature" ];
|
||||
modules = ["custom/arrow-right" "power-profiles-daemon" "mpris" "group/group-volume"];
|
||||
};
|
||||
|
||||
"group/group-volume" = {
|
||||
@@ -70,59 +33,41 @@ in {
|
||||
# ── Modules ─────────────────────────────────────────────────────────
|
||||
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format = "{id}";
|
||||
on-scroll-down = "hyprctl dispatch workspace e+1";
|
||||
on-scroll-up = "hyprctl dispatch workspace e-1";
|
||||
persistent-workspaces."*" = 5;
|
||||
persistent-workspaces."*" = 4;
|
||||
cursor = true;
|
||||
format-icons = {
|
||||
active = "";
|
||||
persistent = "";
|
||||
empty = "";
|
||||
};
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "{artist} - {title}";
|
||||
tooltip-format = "{album}";
|
||||
format-paused = " {artist} - {title}";
|
||||
format = "";
|
||||
format-paused = "";
|
||||
tooltip-format = "{title}";
|
||||
tooltip-format-paused = "{title}";
|
||||
on-click = "playerctl play-pause";
|
||||
on-scroll-up = "playerctl previous";
|
||||
on-scroll-down = "playerctl next";
|
||||
max-length = 45;
|
||||
};
|
||||
|
||||
battery = {
|
||||
bat = "BAT1";
|
||||
interval = 20;
|
||||
full-at = 100;
|
||||
tooltip = true;
|
||||
format-full = "";
|
||||
format = "{icon} {capacity}%";
|
||||
format-time = "{H}:{M:02}";
|
||||
format-charging = " {capacity}% ({time})";
|
||||
format-icons = [ "" "" "" "" "" "" "" "" "" ];
|
||||
format = "{icon} ";
|
||||
format-charging = " {icon} ";
|
||||
format-icons = ["" "" "" "" ""];
|
||||
tooltip-format = "{capacity}% · {time}";
|
||||
tooltip-format-full = "Full\n{capacity}%";
|
||||
tooltip-format-charging = "Charging\n{capacity}% · {time}";
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 30;
|
||||
format = " {usage}%";
|
||||
cursor = true;
|
||||
states = {
|
||||
warning = 80;
|
||||
critical = 90;
|
||||
};
|
||||
};
|
||||
|
||||
load = {
|
||||
interval = 30;
|
||||
format = " {load1}%";
|
||||
cursor = true;
|
||||
};
|
||||
|
||||
"power-profiles-daemon" = {
|
||||
format = "{icon}";
|
||||
tooltip-format = "Power profile: {profile}";
|
||||
@@ -133,22 +78,6 @@ in {
|
||||
};
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 10;
|
||||
format = " {used:0.1f}G/{total:0.1f}G";
|
||||
states = {
|
||||
warning = 80;
|
||||
critical = 90;
|
||||
};
|
||||
};
|
||||
|
||||
temperature = {
|
||||
interval = 10;
|
||||
format = "{icon} {temperatureC}°";
|
||||
critical-threshold = 90;
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
|
||||
bluetooth = {
|
||||
format = "{}";
|
||||
format-on = "";
|
||||
@@ -156,7 +85,8 @@ in {
|
||||
format-disabled = "";
|
||||
format-connected = "{device_alias}";
|
||||
format-connected-battery = "{device_alias}";
|
||||
tooltip-format = "{device_enumerate}";
|
||||
tooltip-format = "Bluetooth {status}";
|
||||
tooltip-format-connected = "Bluetooth {status}\n{device_enumerate}";
|
||||
tooltip-format-enumerate-connected = " {device_alias}";
|
||||
tooltip-format-enumerate-connected-battery = " {device_alias} {device_battery_percentage}%";
|
||||
on-click-right = "blueman-manager &";
|
||||
@@ -178,9 +108,9 @@ in {
|
||||
portable = "";
|
||||
car = "";
|
||||
default = [
|
||||
"<span size='12pt'></span>"
|
||||
"<span size='12pt'></span>"
|
||||
"<span size='12pt'></span>"
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
};
|
||||
@@ -191,19 +121,11 @@ in {
|
||||
cursor = true;
|
||||
};
|
||||
|
||||
network = {
|
||||
"custom/network" = {
|
||||
exec = "${networkScript}";
|
||||
return-type = "json";
|
||||
interval = 10;
|
||||
format-disabled = "";
|
||||
format-disconnected = "";
|
||||
format-wifi = "";
|
||||
format-ethernet = "";
|
||||
tooltip-format = "{essid}
|
||||
|
||||
Frequency: {frequency}GHz
|
||||
Strength: {signalStrength}%
|
||||
|
||||
{bandwidthUpBytes} {bandwidthDownBytes}";
|
||||
on-click-right = "ghostty -e nmtui &";
|
||||
on-click-right = "ghostty -e wifitui &";
|
||||
};
|
||||
|
||||
tray = {
|
||||
@@ -213,30 +135,21 @@ Strength: {signalStrength}%
|
||||
};
|
||||
|
||||
clock = {
|
||||
timezone = "Europe/Paris";
|
||||
timezone = config.var.timeZone;
|
||||
tooltip-format = "<tt><small>{calendar}</small></tt>";
|
||||
format = "{:%H:%M}";
|
||||
format-alt = "{:%H:%M %d %B %Y}";
|
||||
calendar = {
|
||||
mode = "year";
|
||||
weeks-pos = "right";
|
||||
mode-mon-col = 3;
|
||||
mode = "month";
|
||||
format = {
|
||||
months = "<span color='#acb0d0'><b>{}</b></span>";
|
||||
weeks = "<span color='#7aa2f7'><b>W{}</b></span>";
|
||||
weekdays = "<span color='#e0af68'><b>{}</b></span>";
|
||||
days = "<span color='#acb0d0'><b>{}</b></span>";
|
||||
today = "<span color='#41a6b5'><b><u>{}</u></b></span>";
|
||||
months = "<span color='#${c.base04}'><b>{}</b></span>";
|
||||
weekdays = "<span color='#${c.base0A}'><b>{}</b></span>";
|
||||
days = "<span color='#${c.base05}'>{}</span>";
|
||||
today = "<span color='#${c.base0D}'><b><u>{}</u></b></span>";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
"custom/ctlcenter" = {
|
||||
format = "";
|
||||
tooltip = false;
|
||||
on-click = "swaync-client -t &";
|
||||
};
|
||||
|
||||
"custom/arrow-left" = {
|
||||
format = " ";
|
||||
tooltip = false;
|
||||
|
||||
@@ -7,12 +7,16 @@
|
||||
yellow = "#${c.base0A}";
|
||||
green = "#${c.base0B}";
|
||||
blue = "#${c.base0D}";
|
||||
cyan = "#${c.base0C}";
|
||||
mauve = "#${c.base0E}";
|
||||
inactive = "#${c.base03}";
|
||||
highlight = "#${c.base02}";
|
||||
font-size = "${toString config.stylix.fonts.sizes.applications}px";
|
||||
font-size-clock = "${toString (config.stylix.fonts.sizes.applications + 2)}px";
|
||||
in {
|
||||
programs.waybar.style = ''
|
||||
* {
|
||||
font-family: 'CaskaydiaCove Nerd Font Propo';
|
||||
font-family: '${config.stylix.fonts.sansSerif.name}';
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
min-height: 0;
|
||||
@@ -24,81 +28,78 @@ in {
|
||||
#waybar {
|
||||
font-weight: 700;
|
||||
background: transparent;
|
||||
font-size: 14px;
|
||||
font-size: ${font-size};
|
||||
color: ${fg};
|
||||
}
|
||||
|
||||
#temperature,
|
||||
.modules-center {
|
||||
background: ${module-bg};
|
||||
border-radius: 100px;
|
||||
padding: 6px 14px;
|
||||
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
#clock,
|
||||
#tray,
|
||||
#custom-network,
|
||||
#bluetooth,
|
||||
#battery,
|
||||
#memory,
|
||||
#mpris,
|
||||
#cpu,
|
||||
#load {
|
||||
padding: 1px 7px;
|
||||
min-width: 0;
|
||||
#mpris {
|
||||
padding: 1px 14px;
|
||||
}
|
||||
|
||||
#network,
|
||||
#tray {
|
||||
padding: 1px 6px;
|
||||
#clock {
|
||||
font-size: ${font-size-clock};
|
||||
}
|
||||
|
||||
#backlight,
|
||||
#pulseaudio {
|
||||
#workspaces {
|
||||
padding: 1px 8px;
|
||||
}
|
||||
|
||||
#pulseaudio {
|
||||
padding-left: 4px;
|
||||
padding: 1px 8px 1px 6px;
|
||||
}
|
||||
|
||||
#backlight-slider,
|
||||
#pulseaudio-slider {
|
||||
padding: 0 7px 0 2px;
|
||||
padding: 0 8px 0 2px;
|
||||
}
|
||||
|
||||
#workspaces,
|
||||
#bluetooth,
|
||||
#battery,
|
||||
#memory,
|
||||
#temperature,
|
||||
#cpu,
|
||||
#mpris,
|
||||
#load {
|
||||
margin: 0 3px;
|
||||
#workspaces button {
|
||||
color: ${fg};
|
||||
font-size: ${font-size};
|
||||
border-radius: 100px;
|
||||
padding: 0 5px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
#right,
|
||||
#left,
|
||||
#right-hidden-top,
|
||||
#left-hidden-top {
|
||||
padding: 2px 10px;
|
||||
border-radius: 15px;
|
||||
background: ${module-bg};
|
||||
#workspaces button.empty {
|
||||
color: ${inactive};
|
||||
}
|
||||
|
||||
#right-hidden-top,
|
||||
#left-hidden-top {
|
||||
#workspaces button:hover {
|
||||
background: transparent;
|
||||
color: ${fg};
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: ${module-bg};
|
||||
background: ${blue};
|
||||
border-radius: 60px;
|
||||
padding: 0 12px;
|
||||
margin: 0 1px;
|
||||
}
|
||||
|
||||
#right, #left {
|
||||
margin: 0 8px;
|
||||
#right-hidden {
|
||||
padding: 0 6px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
background: ${module-bg};
|
||||
padding: 1px 18px;
|
||||
border-radius: 15px;
|
||||
}
|
||||
|
||||
#custom-ctlcenter {
|
||||
margin-left: 7px;
|
||||
#custom-arrow-right {
|
||||
padding: 0 5px;
|
||||
font-size: ${toString (config.stylix.fonts.sizes.applications + 2)}px;
|
||||
}
|
||||
|
||||
#power-profiles-daemon {
|
||||
margin-right: 7px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
#network.disabled,
|
||||
@@ -108,42 +109,42 @@ in {
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
#cpu.critical,
|
||||
#memory.critical,
|
||||
#battery {
|
||||
color: ${green};
|
||||
}
|
||||
|
||||
#battery.charging,
|
||||
#battery.full {
|
||||
color: ${green};
|
||||
}
|
||||
|
||||
#network.ethernet,
|
||||
#network.wifi {
|
||||
color: ${cyan};
|
||||
}
|
||||
|
||||
#bluetooth.on,
|
||||
#bluetooth.connected,
|
||||
#bluetooth {
|
||||
color: ${blue};
|
||||
}
|
||||
|
||||
#battery.critical,
|
||||
#temperature.critical,
|
||||
#network.disconnected,
|
||||
#power-profiles-daemon.performance {
|
||||
color: ${red};
|
||||
}
|
||||
|
||||
#cpu.warning,
|
||||
#memory.warning,
|
||||
#battery.warning,
|
||||
#temperature.warning {
|
||||
#battery.warning {
|
||||
color: ${yellow};
|
||||
background: unset;
|
||||
}
|
||||
|
||||
#power-profiles-daemon.power-saver {
|
||||
color: ${green};
|
||||
}
|
||||
|
||||
#custom-start,
|
||||
#custom-ctlcenter {
|
||||
color: ${blue};
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: ${fg};
|
||||
font-size: 14px;
|
||||
border-radius: 100%;
|
||||
padding: 0 2px;
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
background: transparent;
|
||||
#mpris {
|
||||
color: ${mauve};
|
||||
}
|
||||
|
||||
#mpris.paused {
|
||||
|
||||
@@ -54,5 +54,5 @@
|
||||
home-manager.users."${config.var.username}" = import ./home.nix;
|
||||
|
||||
# Don't touch this
|
||||
system.stateVersion = "24.05";
|
||||
system.stateVersion = "26.05";
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
inputs.nur.overlays.default
|
||||
];
|
||||
_module.args = {inherit inputs;};
|
||||
}
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
../../home/programs/nix-utils
|
||||
../../home/programs/spotatui
|
||||
../../home/programs/yazi
|
||||
../../home/programs/desktop-actions # TODO:
|
||||
../../home/programs/focus-mode # TODO: Rename
|
||||
|
||||
../../home/programs/group/basic-apps.nix
|
||||
../../home/programs/group/cybersecurity.nix
|
||||
@@ -23,9 +25,12 @@
|
||||
../../home/programs/group/misc.nix
|
||||
|
||||
# System (Desktop environment like stuff)
|
||||
../../home/system/hyprlock
|
||||
../../home/system/hyprland
|
||||
../../home/system/caelestia-shell
|
||||
../../home/system/hyprpaper
|
||||
../../home/system/waybar
|
||||
../../home/system/swaync
|
||||
../../home/system/swayosd
|
||||
../../home/system/rofi
|
||||
../../home/system/mime
|
||||
../../home/system/udiskie
|
||||
|
||||
@@ -45,7 +50,7 @@
|
||||
};
|
||||
|
||||
# Don't touch this
|
||||
stateVersion = "24.05";
|
||||
stateVersion = "26.05";
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings.monitor = [
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
@@ -57,5 +58,7 @@ in {
|
||||
age
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start sops-nix"];
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"systemctl --user start sops-nix"
|
||||
];
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,8 +21,8 @@
|
||||
../../home/programs/group/misc.nix
|
||||
|
||||
# System (Desktop environment like stuff)
|
||||
../../home/system/hyprlock
|
||||
../../home/system/hyprland
|
||||
# ../../home/system/caelestia-shell
|
||||
../../home/system/waybar
|
||||
../../home/system/hyprpaper
|
||||
../../home/system/mime
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
@@ -54,5 +55,7 @@ in {
|
||||
age
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start sops-nix"];
|
||||
wayland.windowManager.hyprland.settings.exec-once = [
|
||||
"systemctl --user start sops-nix"
|
||||
];
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
# Support VA-API pour AMD
|
||||
libvdpau-va-gl
|
||||
libva-vdpau-driver
|
||||
];
|
||||
|
||||
+1
-13
@@ -1,23 +1,11 @@
|
||||
# Audio configuration for NixOS using PipeWire
|
||||
{
|
||||
security.rtkit.enable = true;
|
||||
services.pulseaudio.enable = false;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
wireplumber = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
"10-disable-camera" = {
|
||||
"wireplumber.profiles" = {
|
||||
main."monitor.libcamera" = "disabled";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
pkgs-nur-hadi = inputs.nur-anotherhadi.packages.${pkgs.stdenv.hostPlatform.system};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
+3
-8
@@ -1,14 +1,9 @@
|
||||
# Hyprland is a dynamic tiling Wayland compositor.
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{...}: {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
package = inputs.hyprland.packages."${pkgs.stdenv.hostPlatform.system}".hyprland;
|
||||
portalPackage =
|
||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
|
||||
security.pam.services.hyprlock = {};
|
||||
}
|
||||
|
||||
@@ -6,22 +6,6 @@
|
||||
}: let
|
||||
autoGarbageCollector = config.var.autoGarbageCollector;
|
||||
in {
|
||||
# Ask for password once per SSH session (tied to the tty, expires when session closes)
|
||||
security.sudo.extraConfig = ''
|
||||
Defaults timestamp_type=tty,timestamp_timeout=-1
|
||||
'';
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [config.var.username];
|
||||
commands = [
|
||||
{
|
||||
command = "/run/current-system/sw/bin/nixos-rebuild";
|
||||
options = ["NOPASSWD"];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
nixpkgs.config = {
|
||||
allowUnfree = true;
|
||||
allowBroken = false;
|
||||
@@ -40,17 +24,10 @@ in {
|
||||
"flakes"
|
||||
];
|
||||
substituters = [
|
||||
# high priority since it's almost always used
|
||||
"https://cache.nixos.org?priority=10"
|
||||
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://numtide.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE="
|
||||
];
|
||||
};
|
||||
gc = {
|
||||
|
||||
+21
-45
@@ -5,67 +5,49 @@
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
# Using beta driver for recent GPUs like RTX 4070
|
||||
nvidiaDriverChannel = config.boot.kernelPackages.nvidiaPackages.production;
|
||||
in {
|
||||
# Video drivers configuration for Xorg and Wayland
|
||||
services.xserver.videoDrivers = ["nvidia"]; # Simplified - other modules are loaded automatically
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
|
||||
# Kernel parameters for better Wayland and Hyprland integration
|
||||
boot.kernelParams = [
|
||||
"nvidia-drm.modeset=1" # Enable mode setting for Wayland
|
||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1" # Improves resume after sleep
|
||||
];
|
||||
|
||||
# Blacklist nouveau to avoid conflicts
|
||||
boot.blacklistedKernelModules = ["nouveau"];
|
||||
|
||||
# Environment variables for better compatibility
|
||||
environment.variables = {
|
||||
LIBVA_DRIVER_NAME = "nvidia"; # Hardware video acceleration
|
||||
GBM_BACKEND = "nvidia-drm"; # Graphics backend for Wayland
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; # Use Nvidia driver for GLX
|
||||
NIXOS_OZONE_WL = "1"; # Wayland support for Electron apps
|
||||
__GL_GSYNC_ALLOWED = "1"; # Enable G-Sync if available
|
||||
__GL_VRR_ALLOWED = "1"; # Enable VRR (Variable Refresh Rate)
|
||||
NVD_BACKEND = "direct"; # Configuration for new driver
|
||||
MOZ_ENABLE_WAYLAND = "1"; # Wayland support for Firefox
|
||||
LIBVA_DRIVER_NAME = "nvidia";
|
||||
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
__GL_GSYNC_ALLOWED = "1";
|
||||
__GL_VRR_ALLOWED = "1";
|
||||
NVD_BACKEND = "direct";
|
||||
MOZ_ENABLE_WAYLAND = "1";
|
||||
};
|
||||
|
||||
# Configuration for proprietary packages
|
||||
nixpkgs.config = {
|
||||
nvidia.acceptLicense = true;
|
||||
};
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
|
||||
# Nvidia configuration
|
||||
hardware = {
|
||||
nvidia = {
|
||||
open = false; # Proprietary driver for better performance
|
||||
nvidiaSettings = true; # Nvidia settings utility
|
||||
open = true; # Open kernel modules, recommended for Turing and newer (RTX 4070 = Ada Lovelace)
|
||||
nvidiaSettings = true;
|
||||
powerManagement = {
|
||||
enable = true; # Power management
|
||||
finegrained = true; # More precise power consumption control
|
||||
enable = true;
|
||||
finegrained = true;
|
||||
};
|
||||
modesetting.enable = true; # Required for Wayland
|
||||
modesetting.enable = true;
|
||||
package = nvidiaDriverChannel;
|
||||
forceFullCompositionPipeline = true; # Prevents screen tearing
|
||||
# forceFullCompositionPipeline = true; # Only useful when display is connected directly to Nvidia GPU, not in PRIME offload mode
|
||||
|
||||
# Configuration for hybrid AMD+Nvidia laptop
|
||||
prime = {
|
||||
# Optimized configuration for switchable graphics laptops
|
||||
offload = {
|
||||
enable = true; # Mode optimized for power saving
|
||||
enableOffloadCmd = true; # Allows running applications with dedicated GPU
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
# sync.enable disabled as offload is generally better for laptops
|
||||
sync.enable = false;
|
||||
# PCI IDs verified for your hardware
|
||||
amdgpuBusId = "PCI:5:0:0"; # Integrated AMD GPU
|
||||
nvidiaBusId = "PCI:1:0:0"; # Dedicated Nvidia GPU
|
||||
sync.enable = false; # offload mode is better for battery life
|
||||
amdgpuBusId = "PCI:5:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
};
|
||||
|
||||
# Enhanced graphics support
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
@@ -73,10 +55,8 @@ in {
|
||||
nvidia-vaapi-driver
|
||||
libva-vdpau-driver
|
||||
libvdpau-va-gl
|
||||
mesa
|
||||
egl-wayland
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
libva
|
||||
];
|
||||
};
|
||||
@@ -90,13 +70,9 @@ in {
|
||||
];
|
||||
};
|
||||
|
||||
# Additional useful packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
vulkan-tools
|
||||
mesa-demos
|
||||
libva-utils # VA-API debugging tools
|
||||
libva-utils
|
||||
];
|
||||
|
||||
# Enable Nvidia container toolkit for GPU acceleration in containers (docker)
|
||||
hardware.nvidia-container-toolkit.enable = false;
|
||||
}
|
||||
|
||||
@@ -23,16 +23,6 @@
|
||||
];
|
||||
consoleLogLevel = 0;
|
||||
initrd.verbose = false;
|
||||
|
||||
# plymouth = {
|
||||
# enable = true;
|
||||
# theme = lib.mkForce "cuts_alt";
|
||||
# themePackages = with pkgs; [
|
||||
# (adi1090x-plymouth-themes.override {
|
||||
# selected_themes = ["cuts_alt"];
|
||||
# })
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
# To avoid systemd services hanging on shutdown
|
||||
|
||||
+6
-2
@@ -1,10 +1,14 @@
|
||||
{config, ...}: {
|
||||
# USBGuard:
|
||||
# The following line allow all USB devices until a proper policy is configured.
|
||||
# Run `sudo usbguard generate-policy` with your devices plugged in,
|
||||
# then set rules = "<output>" and switch implicitPolicyTarget to "block".
|
||||
# services.usbguard.implicitPolicyTarget = lib.mkForce "allow";
|
||||
{
|
||||
services.usbguard = {
|
||||
enable = true;
|
||||
implicitPolicyTarget = "block";
|
||||
IPCAllowedUsers = [
|
||||
"root"
|
||||
config.var.username
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
+29
-48
@@ -12,11 +12,12 @@
|
||||
extraLocale = config.var.extraLocale;
|
||||
autoUpgrade = config.var.autoUpgrade;
|
||||
in {
|
||||
networking.hostName = hostname;
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
networkmanager.enable = true;
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
systemd.services.NetworkManager-wait-online.enable = false;
|
||||
|
||||
system.autoUpgrade = {
|
||||
enable = autoUpgrade;
|
||||
dates = "04:00";
|
||||
@@ -32,13 +33,10 @@ in {
|
||||
time = {
|
||||
timeZone = timeZone;
|
||||
};
|
||||
i18n.defaultLocale = defaultLocale;
|
||||
i18n.inputMethod = {
|
||||
enable = true;
|
||||
type = "fcitx5";
|
||||
fcitx5.addons = with pkgs; [fcitx5-gtk];
|
||||
};
|
||||
i18n.extraLocaleSettings = {
|
||||
|
||||
i18n = {
|
||||
defaultLocale = defaultLocale;
|
||||
extraLocaleSettings = {
|
||||
LC_ADDRESS = extraLocale;
|
||||
LC_IDENTIFICATION = extraLocale;
|
||||
LC_MEASUREMENT = extraLocale;
|
||||
@@ -49,32 +47,20 @@ in {
|
||||
LC_TELEPHONE = extraLocale;
|
||||
LC_TIME = extraLocale;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
libinput.enable = true;
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = keyboardLayout;
|
||||
xkb.variant = "";
|
||||
};
|
||||
gnome.gnome-keyring.enable = true;
|
||||
psd = {
|
||||
enable = true;
|
||||
resyncTimer = "10m";
|
||||
};
|
||||
};
|
||||
console.keyMap = keyboardLayout;
|
||||
|
||||
environment.variables = {
|
||||
XDG_DATA_HOME = "$HOME/.local/share";
|
||||
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
services.libinput.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
services = {
|
||||
dbus = {
|
||||
enable = true;
|
||||
implementation = "broker";
|
||||
packages = with pkgs; [
|
||||
gcr
|
||||
@@ -86,21 +72,15 @@ in {
|
||||
power-profiles-daemon.enable = true;
|
||||
udisks2.enable = true;
|
||||
};
|
||||
console.keyMap = keyboardLayout;
|
||||
|
||||
# enable zsh autocompletion for system packages (systemd, etc)
|
||||
environment.pathsToLink = ["/share/zsh"];
|
||||
|
||||
# Faster rebuilding
|
||||
documentation = {
|
||||
enable = true;
|
||||
doc.enable = false;
|
||||
man.enable = true;
|
||||
dev.enable = false;
|
||||
info.enable = false;
|
||||
nixos.enable = false;
|
||||
environment = {
|
||||
variables = {
|
||||
PASSWORD_STORE_DIR = "$HOME/.local/share/password-store";
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
# enable zsh autocompletion for system packages (systemd, etc)
|
||||
pathsToLink = ["/share/zsh"];
|
||||
systemPackages = with pkgs; [
|
||||
fd
|
||||
bc
|
||||
gcc
|
||||
@@ -123,9 +103,19 @@ in {
|
||||
unrar
|
||||
p7zip
|
||||
];
|
||||
};
|
||||
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# Faster rebuilding
|
||||
documentation = {
|
||||
doc.enable = false;
|
||||
dev.enable = false;
|
||||
info.enable = false;
|
||||
nixos.enable = false;
|
||||
};
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
config = {
|
||||
common.default = ["gtk"];
|
||||
@@ -138,14 +128,5 @@ in {
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
security = {
|
||||
# allow wayland lockers to unlock the screen
|
||||
pam.services.hyprlock.text = "auth include login";
|
||||
|
||||
# userland niceness
|
||||
rtkit.enable = true;
|
||||
|
||||
# don't ask for password for wheel group
|
||||
sudo.wheelNeedsPassword = false;
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
}
|
||||
|
||||
+4
-4
@@ -57,8 +57,8 @@
|
||||
name = "Maple Mono NF";
|
||||
};
|
||||
sansSerif = {
|
||||
package = pkgs.source-sans-pro;
|
||||
name = "Source Sans Pro";
|
||||
package = pkgs.rubik;
|
||||
name = "Rubik";
|
||||
};
|
||||
serif = config.stylix.fonts.sansSerif;
|
||||
emoji = {
|
||||
@@ -75,8 +75,8 @@
|
||||
|
||||
polarity = "dark";
|
||||
image = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/refs/heads/main/app/static/wallpapers/black-moutains-and-a-city.png";
|
||||
sha256 = "sha256-RTTA3Lf+hnPpo9hwS075kbnIouz12ul2GKO3EIgP6AU=";
|
||||
url = "https://raw.githubusercontent.com/anotherhadi/awesome-wallpapers/main/app/static/wallpapers/another-one.png";
|
||||
sha256 = "sha256-zthfsd4QLShPPApV8RoPANaymMC5IiCrmp8QwyyhCcY=";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
- [ ] Configuration waybar
|
||||
- [ ] Configuration sway-nc
|
||||
- [ ] Configuration sway-osd
|
||||
- [ ] Configuration hyprlock
|
||||
- [ ] Gaming/Focus mode
|
||||
- [ ] Configuration Rofi/Drun
|
||||
- [ ] Helium plus rapide ? service/deamon ?
|
||||
- [ ] Ghostty service/deamon ?
|
||||
- [ ] Clean files
|
||||
- [ ] Check claude: Sécu, mots en français, faute, ...
|
||||
Reference in New Issue
Block a user