forked from KptltD00M/nixy
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fe508d9cd8 | |||
| c4e3af21e3 | |||
| ad031c8864 | |||
| c6a0a5196a |
@@ -3,3 +3,4 @@
|
|||||||
old/
|
old/
|
||||||
result/
|
result/
|
||||||
result
|
result
|
||||||
|
backups/
|
||||||
|
|||||||
Generated
+233
-1140
File diff suppressed because it is too large
Load Diff
@@ -9,11 +9,9 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
|
||||||
stylix.url = "github:danth/stylix";
|
stylix.url = "github:danth/stylix";
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
nvf.url = "github:notashelf/nvf";
|
nvf.url = "github:notashelf/nvf";
|
||||||
notashelf-tuigreet.url = "github:NotAShelf/tuigreet";
|
|
||||||
helium-browser.url = "github:oxcl/nix-flake-helium-browser";
|
helium-browser.url = "github:oxcl/nix-flake-helium-browser";
|
||||||
nur-anotherhadi.url = "github:anotherhadi/nur-packages";
|
nur-anotherhadi.url = "github:anotherhadi/nur-packages";
|
||||||
nix-citizen.url = "github:LovingMelody/nix-citizen";
|
nix-citizen.url = "github:LovingMelody/nix-citizen";
|
||||||
@@ -43,9 +41,6 @@
|
|||||||
|
|
||||||
# Server
|
# Server
|
||||||
nixarr.url = "github:rasmus-kirk/nixarr";
|
nixarr.url = "github:rasmus-kirk/nixarr";
|
||||||
default-creds.url = "github:anotherhadi/default-creds";
|
|
||||||
blog.url = "github:anotherhadi/blog";
|
|
||||||
awesome-wallpapers.url = "github:anotherhadi/awesome-wallpapers";
|
|
||||||
iknowyou.url = "github:anotherhadi/iknowyou";
|
iknowyou.url = "github:anotherhadi/iknowyou";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ in {
|
|||||||
user.name = username;
|
user.name = username;
|
||||||
user.email = email;
|
user.email = email;
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
pull.rebase = "false";
|
pull.rebase = false;
|
||||||
push.autoSetupRemote = true;
|
push.autoSetupRemote = true;
|
||||||
color.ui = "1";
|
color.ui = "1";
|
||||||
alias = {
|
alias = {
|
||||||
@@ -43,10 +43,10 @@ in {
|
|||||||
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
|
af = "!git add $(git ls-files -m -o --exclude-standard | sk -m)";
|
||||||
st = "status";
|
st = "status";
|
||||||
br = "branch";
|
br = "branch";
|
||||||
df = "!git hist | peco | awk '{print $2}' | xargs -I {} git diff {}^ {}";
|
df = "!git hist | sk | awk '{print $2}' | xargs -I {} git diff {}^ {}";
|
||||||
hist = ''log --pretty=format:"%Cgreen%h %Creset%cd %Cblue[%cn] %Creset%s%C(yellow)%d%C(reset)" --graph --date=relative --decorate --all'';
|
hist = ''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'';
|
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 ; }; nvim `f`";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
home.file.".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL";
|
home.file.".ssh/allowed_signers".text = "* ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIINhWby7lUUXQNKbRu9/UOrGjWDf3fvoAwGHomWv/+lL";
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
signing.format = "openpgp";
|
|
||||||
settings = {
|
settings = {
|
||||||
commit.gpgsign = true;
|
commit.gpgsign = true;
|
||||||
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
|
gpg.ssh.allowedSignersFile = "~/.ssh/allowed_signers";
|
||||||
|
|||||||
@@ -83,7 +83,7 @@
|
|||||||
go.enable = true;
|
go.enable = true;
|
||||||
markdown = {
|
markdown = {
|
||||||
enable = true;
|
enable = true;
|
||||||
format.type = ["prettierd"];
|
format.type = ["prettier"];
|
||||||
extensions = {
|
extensions = {
|
||||||
markview-nvim = {
|
markview-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
{
|
{lib, ...}: let
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [
|
hl = import ../../system/hyprland/lib.nix {inherit lib;};
|
||||||
|
in {
|
||||||
|
wayland.windowManager.hyprland.settings.on = hl.execOnce [
|
||||||
"protonvpn-app --start-minimized &"
|
"protonvpn-app --start-minimized &"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
cd = "z";
|
cd = "z";
|
||||||
ls = "eza --icons=always --no-quotes";
|
ls = "eza --icons=always --no-quotes";
|
||||||
tree = "eza --icons=always --tree --no-quotes";
|
tree = "eza --icons=always --tree --no-quotes";
|
||||||
cat = "bat --theme=base16 --color=always --paging=never --tabs=2 --wrap=never --plain";
|
cat = "bat --theme=base16 --paging=never --tabs=2 --wrap=never --plain";
|
||||||
mkdir = "mkdir -p";
|
mkdir = "mkdir -p";
|
||||||
|
|
||||||
# Shortcuts
|
# Shortcuts
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
alias -g C="| wl-copy"
|
alias -g C="| wl-copy"
|
||||||
alias -g NE="2>/dev/null"
|
alias -g NE="2>/dev/null"
|
||||||
alias -g ND=">/dev/null"
|
alias -g ND=">/dev/null"
|
||||||
alias -g NUL=">/dev/null 2>1"
|
alias -g NUL=">/dev/null 2>&1"
|
||||||
|
|
||||||
# search history based on what's typed in the prompt
|
# search history based on what's typed in the prompt
|
||||||
autoload -U history-search-end
|
autoload -U history-search-end
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
{
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
programs.zen-browser = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
policies = {
|
|
||||||
DisableTelemetry = true;
|
|
||||||
DisableFirefoxStudies = true;
|
|
||||||
DisablePocket = true;
|
|
||||||
|
|
||||||
OfferToSaveLogins = false;
|
|
||||||
PasswordManagerEnabled = false;
|
|
||||||
|
|
||||||
AutofillAddressEnabled = false;
|
|
||||||
AutofillCreditCardEnabled = false;
|
|
||||||
|
|
||||||
DontCheckDefaultBrowser = true;
|
|
||||||
|
|
||||||
DNSOverHTTPS = {
|
|
||||||
Enabled = true;
|
|
||||||
ProviderURL = "https://dns.quad9.net/dns-query";
|
|
||||||
Locked = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
profiles.default = {
|
|
||||||
search = {
|
|
||||||
force = true;
|
|
||||||
default = "Startpage";
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
"browser.startup.homepage" = "https://duckduckgo.com";
|
|
||||||
|
|
||||||
"browser.newtabpage.enabled" = false;
|
|
||||||
|
|
||||||
"privacy.resistFingerprinting" = true;
|
|
||||||
"privacy.trackingprotection.enabled" = true;
|
|
||||||
|
|
||||||
"geo.enabled" = false;
|
|
||||||
"dom.webnotifications.enabled" = false;
|
|
||||||
|
|
||||||
"signon.rememberSignons" = false;
|
|
||||||
|
|
||||||
"toolkit.telemetry.enabled" = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
||||||
ublock-origin
|
|
||||||
firefox-multi-account-containers
|
|
||||||
noscript
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.sessionVariables.BROWSER = "zen";
|
|
||||||
}
|
|
||||||
@@ -1,24 +0,0 @@
|
|||||||
{
|
|
||||||
programs.zen-browser = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
policies = {
|
|
||||||
DisableTelemetry = true;
|
|
||||||
DisableFirefoxStudies = true;
|
|
||||||
|
|
||||||
OfferToSaveLogins = false;
|
|
||||||
PasswordManagerEnabled = false;
|
|
||||||
|
|
||||||
DNSOverHTTPS = {
|
|
||||||
Enabled = true;
|
|
||||||
ProviderURL = "https://dns.quad9.net/dns-query";
|
|
||||||
Locked = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
Homepage = {
|
|
||||||
URL = "https://duckduckgo.com";
|
|
||||||
StartPage = "homepage";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -5,7 +5,9 @@
|
|||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}: {
|
}: let
|
||||||
|
hl = import ../hyprland/lib.nix {inherit lib;};
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.caelestia-shell.homeManagerModules.default
|
inputs.caelestia-shell.homeManagerModules.default
|
||||||
./bar.nix
|
./bar.nix
|
||||||
@@ -50,7 +52,7 @@
|
|||||||
gpu-screen-recorder
|
gpu-screen-recorder
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [
|
wayland.windowManager.hyprland.settings.on = hl.execOnce [
|
||||||
"uwsm app -- caelestia resizer -d"
|
"uwsm app -- caelestia resizer -d"
|
||||||
"uwsm app -- caelestia shell -d"
|
"uwsm app -- caelestia shell -d"
|
||||||
"caelestia scheme set -n onedark"
|
"caelestia scheme set -n onedark"
|
||||||
|
|||||||
@@ -1,52 +1,67 @@
|
|||||||
{config, ...}: let
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
animationSpeed = config.theme.animation-speed;
|
animationSpeed = config.theme.animation-speed;
|
||||||
|
|
||||||
animationDuration =
|
animationDuration =
|
||||||
if animationSpeed == "slow"
|
if animationSpeed == "slow"
|
||||||
then "4"
|
then 4
|
||||||
else if animationSpeed == "medium"
|
else if animationSpeed == "medium"
|
||||||
then "2.5"
|
then 2.5
|
||||||
else "1.5";
|
else 1.5;
|
||||||
borderDuration =
|
borderDuration =
|
||||||
if animationSpeed == "slow"
|
if animationSpeed == "slow"
|
||||||
then "10"
|
then 10
|
||||||
else if animationSpeed == "medium"
|
else if animationSpeed == "medium"
|
||||||
then "6"
|
then 6
|
||||||
else "3";
|
else 3;
|
||||||
|
bezier = points: {
|
||||||
|
type = "bezier";
|
||||||
|
inherit points;
|
||||||
|
};
|
||||||
|
curves = {
|
||||||
|
linear = [[0 0] [1 1]];
|
||||||
|
md3_standard = [[0.2 0] [0 1]];
|
||||||
|
md3_decel = [[0.05 0.7] [0.1 1]];
|
||||||
|
md3_accel = [[0.3 0] [0.8 0.15]];
|
||||||
|
overshot = [[0.05 0.9] [0.1 1.1]];
|
||||||
|
crazyshot = [[0.1 1.5] [0.76 0.92]];
|
||||||
|
hyprnostretch = [[0.05 0.9] [0.1 1.0]];
|
||||||
|
menu_decel = [[0.1 1] [0 1]];
|
||||||
|
menu_accel = [[0.38 0.04] [1 0.07]];
|
||||||
|
easeInOutCirc = [[0.85 0] [0.15 1]];
|
||||||
|
easeOutCirc = [[0 0.55] [0.45 1]];
|
||||||
|
easeOutExpo = [[0.16 1] [0.3 1]];
|
||||||
|
softAcDecel = [[0.26 0.26] [0.15 1]];
|
||||||
|
md2 = [[0.4 0] [0.2 1]];
|
||||||
|
};
|
||||||
|
|
||||||
|
anim = leaf: speed: bezier: extra:
|
||||||
|
{
|
||||||
|
inherit leaf speed bezier;
|
||||||
|
enabled = true;
|
||||||
|
}
|
||||||
|
// extra;
|
||||||
in {
|
in {
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
animations = {
|
config.animations.enabled = true;
|
||||||
enabled = true;
|
|
||||||
bezier = [
|
curve = lib.mapAttrsToList (name: points: {_args = [name (bezier points)];}) curves;
|
||||||
"linear, 0, 0, 1, 1"
|
|
||||||
"md3_standard, 0.2, 0, 0, 1"
|
|
||||||
"md3_decel, 0.05, 0.7, 0.1, 1"
|
|
||||||
"md3_accel, 0.3, 0, 0.8, 0.15"
|
|
||||||
"overshot, 0.05, 0.9, 0.1, 1.1"
|
|
||||||
"crazyshot, 0.1, 1.5, 0.76, 0.92"
|
|
||||||
"hyprnostretch, 0.05, 0.9, 0.1, 1.0"
|
|
||||||
"menu_decel, 0.1, 1, 0, 1"
|
|
||||||
"menu_accel, 0.38, 0.04, 1, 0.07"
|
|
||||||
"easeInOutCirc, 0.85, 0, 0.15, 1"
|
|
||||||
"easeOutCirc, 0, 0.55, 0.45, 1"
|
|
||||||
"easeOutExpo, 0.16, 1, 0.3, 1"
|
|
||||||
"softAcDecel, 0.26, 0.26, 0.15, 1"
|
|
||||||
"md2, 0.4, 0, 0.2, 1"
|
|
||||||
];
|
|
||||||
|
|
||||||
animation = [
|
animation = [
|
||||||
"windows, 1, ${animationDuration}, md3_decel, popin 60%"
|
(anim "windows" animationDuration "md3_decel" {style = "popin 60%";})
|
||||||
"windowsIn, 1, ${animationDuration}, md3_decel, popin 60%"
|
(anim "windowsIn" animationDuration "md3_decel" {style = "popin 60%";})
|
||||||
"windowsOut, 1, ${animationDuration}, md3_accel, popin 60%"
|
(anim "windowsOut" animationDuration "md3_accel" {style = "popin 60%";})
|
||||||
"border, 1, ${borderDuration}, default"
|
(anim "border" borderDuration "default" {})
|
||||||
"fade, 1, ${animationDuration}, md3_decel"
|
(anim "fade" animationDuration "md3_decel" {})
|
||||||
"layersIn, 1, ${animationDuration}, menu_decel, slide"
|
(anim "layersIn" animationDuration "menu_decel" {style = "slide";})
|
||||||
"layersOut, 1, ${animationDuration}, menu_accel"
|
(anim "layersOut" animationDuration "menu_accel" {})
|
||||||
"fadeLayersIn, 1, ${animationDuration}, menu_decel"
|
(anim "fadeLayersIn" animationDuration "menu_decel" {})
|
||||||
"fadeLayersOut, 1, ${animationDuration}, menu_accel"
|
(anim "fadeLayersOut" animationDuration "menu_accel" {})
|
||||||
"workspaces, 1, ${animationDuration}, menu_decel, slide"
|
(anim "workspaces" animationDuration "menu_decel" {style = "slide";})
|
||||||
"specialWorkspace, 1, ${animationDuration}, md3_decel, slidevert"
|
(anim "specialWorkspace" animationDuration "md3_decel" {style = "slidevert";})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,14 +4,13 @@
|
|||||||
config,
|
config,
|
||||||
pkgs-nur-hadi,
|
pkgs-nur-hadi,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
hl = import ./lib.nix {inherit lib;};
|
||||||
colors = config.lib.stylix.colors;
|
colors = config.lib.stylix.colors;
|
||||||
|
|
||||||
mkMenu = menu:
|
mkMenu = menu: let
|
||||||
let
|
|
||||||
configFile = pkgs.writeText "config.yaml" (
|
configFile = pkgs.writeText "config.yaml" (
|
||||||
lib.generators.toYAML { } {
|
lib.generators.toYAML {} {
|
||||||
anchor = "bottom-right";
|
anchor = "bottom-right";
|
||||||
border = "#${colors.base0D}80";
|
border = "#${colors.base0D}80";
|
||||||
background = "#${colors.base01}EE";
|
background = "#${colors.base01}EE";
|
||||||
@@ -220,18 +219,12 @@ let
|
|||||||
cmd = "systemctl reboot";
|
cmd = "systemctl reboot";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings = {
|
||||||
"$mod" = "SUPER";
|
|
||||||
"$shiftMod" = "SUPER_SHIFT";
|
|
||||||
|
|
||||||
bind =
|
bind =
|
||||||
[
|
[
|
||||||
# Applications
|
# Applications
|
||||||
(
|
(hl.bind "SUPER + SHIFT + A" (hl.exec (lib.getExe (mkMenu [
|
||||||
"$shiftMod, A, exec, "
|
|
||||||
+ lib.getExe (mkMenu [
|
|
||||||
{
|
{
|
||||||
key = "a";
|
key = "a";
|
||||||
desc = "Apps";
|
desc = "Apps";
|
||||||
@@ -257,15 +250,13 @@ in
|
|||||||
desc = "System";
|
desc = "System";
|
||||||
cmd = lib.getExe systemMenu;
|
cmd = lib.getExe systemMenu;
|
||||||
}
|
}
|
||||||
])
|
])))
|
||||||
)
|
null)
|
||||||
|
|
||||||
"$mod,B, exec, uwsm app -- ${config.programs.librewolf.package}/bin/helium" # Browser
|
(hl.bind "SUPER + B" (hl.exec "uwsm app -- ${config.programs.librewolf.package}/bin/helium") null) # Browser
|
||||||
|
|
||||||
# Power
|
# Power
|
||||||
(
|
(hl.bind "SUPER + X" (hl.exec (lib.getExe (mkMenu [
|
||||||
"$mod, X, exec, "
|
|
||||||
+ lib.getExe (mkMenu [
|
|
||||||
{
|
{
|
||||||
key = "l";
|
key = "l";
|
||||||
desc = "Lock";
|
desc = "Lock";
|
||||||
@@ -296,69 +287,100 @@ in
|
|||||||
desc = "Restart Waybar";
|
desc = "Restart Waybar";
|
||||||
cmd = "pkill -x waybar; waybar";
|
cmd = "pkill -x waybar; waybar";
|
||||||
}
|
}
|
||||||
])
|
])))
|
||||||
)
|
null)
|
||||||
|
|
||||||
# Quick launch
|
# Quick launch
|
||||||
"$mod,RETURN, exec, uwsm app -- ${pkgs.ghostty}/bin/ghostty" # Ghostty (terminal)
|
(hl.bind "SUPER + RETURN" (hl.exec "uwsm app -- ${pkgs.ghostty}/bin/ghostty") null) # Ghostty (terminal)
|
||||||
"$mod,E, exec, uwsm app -- ${pkgs.thunar}/bin/thunar" # Thunar
|
(hl.bind "SUPER + E" (hl.exec "uwsm app -- ${pkgs.thunar}/bin/thunar") null) # Thunar
|
||||||
"$mod, SPACE, exec, walker" # Launcher
|
(hl.bind "SUPER + SPACE" (hl.exec "walker") null) # Launcher
|
||||||
"$mod, N, exec, ${lib.getExe pkgs.grimblast} save area" # Save screenshot
|
(hl.bind "SUPER + N" (hl.exec "${lib.getExe pkgs.grimblast} save area") null) # Save screenshot
|
||||||
"$mod, D, exec, ${lib.getExe pkgs.grimblast} copy area" # Copy screenshot
|
(hl.bind "SUPER + D" (hl.exec "${lib.getExe pkgs.grimblast} copy area") null) # Copy screenshot
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
"$mod,Q, killactive," # Close window
|
(hl.bind "SUPER + Q" (hl.mkLuaInline "hl.dsp.window.close()") null) # Close window
|
||||||
"$mod,F, fullscreen" # Toggle Fullscreen
|
(hl.bind "SUPER + F" (hl.mkLuaInline ''hl.dsp.window.fullscreen({ mode = "fullscreen" })'') null) # Toggle Fullscreen
|
||||||
"$shiftMod,F, togglefloating," # Toggle Floating
|
(hl.bind "SUPER + SHIFT + F" (hl.mkLuaInline ''hl.dsp.window.float({ action = "toggle" })'') null) # Toggle Floating
|
||||||
|
|
||||||
# Focus Windows
|
# Focus Windows
|
||||||
"$mod,H, movefocus, l" # Move focus left
|
(hl.bind "SUPER + H" (hl.mkLuaInline ''hl.dsp.focus({ direction = "left" })'') null) # Move focus left
|
||||||
"$mod,J, movefocus, d" # Move focus Down
|
(hl.bind "SUPER + J" (hl.mkLuaInline ''hl.dsp.focus({ direction = "down" })'') null) # Move focus Down
|
||||||
"$mod,K, movefocus, u" # Move focus Up
|
(hl.bind "SUPER + K" (hl.mkLuaInline ''hl.dsp.focus({ direction = "up" })'') null) # Move focus Up
|
||||||
"$mod,L, movefocus, r" # Move focus Right
|
(hl.bind "SUPER + L" (hl.mkLuaInline ''hl.dsp.focus({ direction = "right" })'') null) # Move focus Right
|
||||||
"$shiftMod,H, focusmonitor, -1" # Focus previous monitor
|
(hl.bind "SUPER + SHIFT + H" (hl.mkLuaInline ''hl.dsp.focus({ monitor = "-1" })'') null) # Focus previous monitor
|
||||||
"$shiftMod,J, layoutmsg, removemaster" # Remove from master
|
(hl.bind "SUPER + SHIFT + J" (hl.mkLuaInline ''hl.dsp.layout("removemaster")'') null) # Remove from master
|
||||||
"$shiftMod,K, layoutmsg, addmaster" # Add to master
|
(hl.bind "SUPER + SHIFT + K" (hl.mkLuaInline ''hl.dsp.layout("addmaster")'') null) # Add to master
|
||||||
"$shiftMod,L, focusmonitor, 1" # Focus next monitor
|
(hl.bind "SUPER + SHIFT + L" (hl.mkLuaInline ''hl.dsp.focus({ monitor = "+1" })'') null) # Focus next monitor
|
||||||
|
|
||||||
# Utilities
|
# Utilities
|
||||||
"$shiftMod, S, exec, ${lib.getExe pkgs.grimblast} copy area" # Capture region
|
(hl.bind "SUPER + SHIFT + S" (hl.exec "${lib.getExe pkgs.grimblast} copy area") null) # Capture region
|
||||||
", Print, exec, ${lib.getExe pkgs.grimblast} copy area" # Capture region
|
(hl.bind "Print" (hl.exec "${lib.getExe pkgs.grimblast} copy area") null) # Capture region
|
||||||
"$shiftMod+Alt, S, exec, ${lib.getExe pkgs.grimblast} save area" # Capture region
|
(hl.bind "SUPER + SHIFT + ALT + S" (hl.exec "${lib.getExe pkgs.grimblast} save area") null) # Capture region
|
||||||
]
|
]
|
||||||
|
# Workspaces: keycodes 10-18 are the number row keys 1-9
|
||||||
++ (builtins.concatLists (
|
++ (builtins.concatLists (
|
||||||
builtins.genList (
|
builtins.genList (
|
||||||
i: let
|
i: let
|
||||||
ws = i + 1;
|
ws = toString (i + 1);
|
||||||
in [
|
in [
|
||||||
"$mod,code:1${toString i}, workspace, ${toString ws}"
|
(hl.bind "SUPER + code:1${toString i}" (hl.mkLuaInline "hl.dsp.focus({ workspace = ${ws} })") null)
|
||||||
"$mod SHIFT,code:1${toString i}, movetoworkspace, ${toString ws}"
|
(hl.bind "SUPER + SHIFT + code:1${toString i}" (hl.mkLuaInline "hl.dsp.window.move({ workspace = ${ws} })") null)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
9
|
9
|
||||||
));
|
))
|
||||||
|
# Mouse
|
||||||
bindm = [
|
++ [
|
||||||
"$mod,mouse:272, movewindow" # Move Window (mouse)
|
(hl.bind "SUPER + mouse:272" (hl.mkLuaInline "hl.dsp.window.drag()") {mouse = true;}) # Move Window (mouse)
|
||||||
"$mod,R, resizewindow" # Resize Window (mouse)
|
(hl.bind "SUPER + R" (hl.mkLuaInline "hl.dsp.window.resize()") {mouse = true;}) # Resize Window (mouse)
|
||||||
];
|
]
|
||||||
|
# Locked (also work on the lockscreen)
|
||||||
bindl = [
|
++ (map (b: hl.bind b.key (hl.exec b.cmd) {locked = true;}) [
|
||||||
# Brightness
|
# Brightness
|
||||||
", XF86MonBrightnessUp, exec, ${lib.getExe pkgs.brightnessctl} set 5%+"
|
{
|
||||||
", XF86MonBrightnessDown, exec, ${lib.getExe pkgs.brightnessctl} set 5%-"
|
key = "XF86MonBrightnessUp";
|
||||||
|
cmd = "${lib.getExe pkgs.brightnessctl} set 5%+";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "XF86MonBrightnessDown";
|
||||||
|
cmd = "${lib.getExe pkgs.brightnessctl} set 5%-";
|
||||||
|
}
|
||||||
|
|
||||||
# Media
|
# Media
|
||||||
", XF86AudioPlay, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
{
|
||||||
", XF86AudioPause, exec, ${lib.getExe pkgs.playerctl} play-pause"
|
key = "XF86AudioPlay";
|
||||||
", XF86AudioNext, exec, ${lib.getExe pkgs.playerctl} next"
|
cmd = "${lib.getExe pkgs.playerctl} play-pause";
|
||||||
", XF86AudioPrev, exec, ${lib.getExe pkgs.playerctl} previous"
|
}
|
||||||
", XF86AudioStop, exec, ${lib.getExe pkgs.playerctl} stop"
|
{
|
||||||
|
key = "XF86AudioPause";
|
||||||
|
cmd = "${lib.getExe pkgs.playerctl} play-pause";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "XF86AudioNext";
|
||||||
|
cmd = "${lib.getExe pkgs.playerctl} next";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "XF86AudioPrev";
|
||||||
|
cmd = "${lib.getExe pkgs.playerctl} previous";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "XF86AudioStop";
|
||||||
|
cmd = "${lib.getExe pkgs.playerctl} stop";
|
||||||
|
}
|
||||||
|
|
||||||
# Sound
|
# Sound
|
||||||
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
{
|
||||||
", XF86AudioRaiseVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+"
|
key = "XF86AudioMute";
|
||||||
", XF86AudioLowerVolume, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
cmd = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||||
];
|
}
|
||||||
|
{
|
||||||
|
key = "XF86AudioRaiseVolume";
|
||||||
|
cmd = "wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume -l 1 @DEFAULT_AUDIO_SINK@ 5%+";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
key = "XF86AudioLowerVolume";
|
||||||
|
cmd = "wpctl set-mute @DEFAULT_AUDIO_SINK@ 0; wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-";
|
||||||
|
}
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@
|
|||||||
blur = config.theme.blur;
|
blur = config.theme.blur;
|
||||||
keyboardLayout = config.var.keyboardLayout;
|
keyboardLayout = config.var.keyboardLayout;
|
||||||
background = "rgba(" + config.lib.stylix.colors.base00 + "EE)";
|
background = "rgba(" + config.lib.stylix.colors.base00 + "EE)";
|
||||||
|
hl = import ./lib.nix {inherit lib;};
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./animations.nix
|
./animations.nix
|
||||||
@@ -48,7 +49,7 @@ in {
|
|||||||
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configType = "hyprlang";
|
configType = "lua";
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
systemd = {
|
systemd = {
|
||||||
enable = false;
|
enable = false;
|
||||||
@@ -60,58 +61,59 @@ in {
|
|||||||
portalPackage = null;
|
portalPackage = null;
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
exec-once = [
|
on = hl.execOnce [
|
||||||
"dbus-update-activation-environment --systemd --all &"
|
"dbus-update-activation-environment --systemd --all &"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
# default for every monitor without an explicit rule (hosts add their own)
|
||||||
monitor = [
|
monitor = [
|
||||||
",prefered,auto,1" # default
|
{
|
||||||
|
output = "";
|
||||||
|
mode = "preferred";
|
||||||
|
position = "auto";
|
||||||
|
scale = 1;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
env = [
|
env = lib.mapAttrsToList (name: value: {_args = [name value];}) {
|
||||||
"XDG_CURRENT_DESKTOP,Hyprland"
|
XDG_CURRENT_DESKTOP = "Hyprland";
|
||||||
"XDG_SESSION_TYPE,wayland"
|
XDG_SESSION_TYPE = "wayland";
|
||||||
"XDG_SESSION_DESKTOP,Hyprland"
|
XDG_SESSION_DESKTOP = "Hyprland";
|
||||||
"ANKI_WAYLAND,1"
|
ANKI_WAYLAND = "1";
|
||||||
"DISABLE_QT5_COMPAT,0"
|
DISABLE_QT5_COMPAT = "0";
|
||||||
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
||||||
"QT_QPA_PLATFORM,wayland;xcb"
|
QT_QPA_PLATFORM = "wayland;xcb";
|
||||||
"QT_QPA_PLATFORMTHEME,gtk3"
|
QT_QPA_PLATFORMTHEME = "gtk3";
|
||||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
||||||
"ELECTRON_OZONE_PLATFORM_HINT,auto"
|
ELECTRON_OZONE_PLATFORM_HINT = "auto";
|
||||||
"DIRENV_LOG_FORMAT,"
|
DIRENV_LOG_FORMAT = "";
|
||||||
"SDL_VIDEODRIVER,wayland"
|
SDL_VIDEODRIVER = "wayland";
|
||||||
"CLUTTER_BACKEND,wayland"
|
CLUTTER_BACKEND = "wayland";
|
||||||
];
|
|
||||||
|
|
||||||
cursor = {
|
|
||||||
no_hardware_cursors = true;
|
|
||||||
default_monitor = "eDP-2";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config = {
|
||||||
|
cursor.no_hardware_cursors = true;
|
||||||
|
|
||||||
general = {
|
general = {
|
||||||
resize_on_border = true;
|
resize_on_border = true;
|
||||||
gaps_in = gaps-in;
|
gaps_in = gaps-in;
|
||||||
gaps_out = gaps-out;
|
gaps_out = gaps-out;
|
||||||
border_size = border-size;
|
border_size = border-size;
|
||||||
layout = "master";
|
layout = "master";
|
||||||
"col.inactive_border" = lib.mkForce background;
|
col.inactive_border = lib.mkForce background;
|
||||||
};
|
};
|
||||||
|
|
||||||
decoration = {
|
decoration = {
|
||||||
active_opacity = active-opacity;
|
active_opacity = active-opacity;
|
||||||
inactive_opacity = inactive-opacity;
|
inactive_opacity = inactive-opacity;
|
||||||
rounding = rounding;
|
inherit rounding;
|
||||||
shadow = {
|
shadow = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
range = 20;
|
range = 20;
|
||||||
render_power = 3;
|
render_power = 3;
|
||||||
};
|
};
|
||||||
blur = {
|
blur = {
|
||||||
enabled =
|
enabled = blur;
|
||||||
if blur
|
|
||||||
then "true"
|
|
||||||
else "false";
|
|
||||||
size = 18;
|
size = 18;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -122,26 +124,6 @@ in {
|
|||||||
mfact = 0.5;
|
mfact = 0.5;
|
||||||
};
|
};
|
||||||
|
|
||||||
gesture = "3, horizontal, workspace";
|
|
||||||
|
|
||||||
windowrule = [
|
|
||||||
"match:class .*, suppress_event maximize"
|
|
||||||
"match:class helium, suppress_event fullscreen"
|
|
||||||
"match:class helium, sync_fullscreen false"
|
|
||||||
|
|
||||||
"match:class proton-authenticator, float on"
|
|
||||||
"match:class proton-authenticator, center on"
|
|
||||||
"match:class proton-authenticator, size 500 400"
|
|
||||||
|
|
||||||
"match:class protonvpn-app, float on"
|
|
||||||
"match:class protonvpn-app, center on"
|
|
||||||
"match:class protonvpn-app, size 500 400"
|
|
||||||
|
|
||||||
"match:title run-bg, float on"
|
|
||||||
"match:title run-bg, center on"
|
|
||||||
"match:title run-bg, size 700 80"
|
|
||||||
];
|
|
||||||
|
|
||||||
misc = {
|
misc = {
|
||||||
disable_hyprland_logo = true;
|
disable_hyprland_logo = true;
|
||||||
disable_splash_rendering = true;
|
disable_splash_rendering = true;
|
||||||
@@ -167,9 +149,49 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
ecosystem = {
|
ecosystem.no_update_news = true;
|
||||||
no_update_news = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
gesture = {
|
||||||
|
fingers = 3;
|
||||||
|
direction = "horizontal";
|
||||||
|
action = "workspace";
|
||||||
|
};
|
||||||
|
|
||||||
|
window_rule = [
|
||||||
|
{
|
||||||
|
name = "suppress-maximize";
|
||||||
|
match.class = ".*";
|
||||||
|
suppress_event = "maximize";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "helium-fullscreen";
|
||||||
|
match.class = "helium";
|
||||||
|
suppress_event = "fullscreen";
|
||||||
|
sync_fullscreen = false;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "proton-authenticator";
|
||||||
|
match.class = "proton-authenticator";
|
||||||
|
float = true;
|
||||||
|
center = true;
|
||||||
|
size = [500 400];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "protonvpn-app";
|
||||||
|
match.class = "protonvpn-app";
|
||||||
|
float = true;
|
||||||
|
center = true;
|
||||||
|
size = [500 400];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "run-bg";
|
||||||
|
match.title = "run-bg";
|
||||||
|
float = true;
|
||||||
|
center = true;
|
||||||
|
size = [700 80];
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,8 +3,10 @@
|
|||||||
{
|
{
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
hl = import ./lib.nix {inherit lib;};
|
||||||
alert-when-low-battery = false;
|
alert-when-low-battery = false;
|
||||||
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
|
keyboard-backlight = pkgs.writeShellScriptBin "keyboard-backlight" ''
|
||||||
function set_keyboard_backlight {
|
function set_keyboard_backlight {
|
||||||
@@ -40,5 +42,5 @@
|
|||||||
|
|
||||||
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
|
command = "bash ${keyboard-backlight}/bin/keyboard-backlight &";
|
||||||
in {
|
in {
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [command];
|
wayland.windowManager.hyprland.settings.on = hl.execOnce [command];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
# Small helpers for writing the Hyprland Lua config through home-manager's `settings`
|
||||||
|
{lib}: rec {
|
||||||
|
inherit (lib.generators) mkLuaInline;
|
||||||
|
toLua = lib.generators.toLua {};
|
||||||
|
|
||||||
|
# hl.dsp.exec_cmd("...")
|
||||||
|
exec = cmd: mkLuaInline "hl.dsp.exec_cmd(${toLua cmd})";
|
||||||
|
|
||||||
|
# hl.bind(keys, dispatcher, opts?)
|
||||||
|
bind = keys: dsp: opts: {
|
||||||
|
_args = [keys dsp] ++ lib.optional (opts != null) opts;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Run commands once at compositor start (replacement for `exec-once`)
|
||||||
|
execOnce = cmds: [
|
||||||
|
{
|
||||||
|
_args = [
|
||||||
|
"hyprland.start"
|
||||||
|
(mkLuaInline ''
|
||||||
|
function()
|
||||||
|
${lib.concatMapStrings (c: " hl.exec_cmd(${toLua c})\n") cmds}end'')
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,6 +1,12 @@
|
|||||||
# HyprPolkitAgent is a simple polkit agent for wayland compositors
|
# HyprPolkitAgent is a simple polkit agent for wayland compositors
|
||||||
{pkgs, ...}: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
hl = import ./lib.nix {inherit lib;};
|
||||||
|
in {
|
||||||
home.packages = with pkgs; [hyprpolkitagent];
|
home.packages = with pkgs; [hyprpolkitagent];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start hyprpolkitagent"];
|
wayland.windowManager.hyprland.settings.on = hl.execOnce ["systemctl --user start hyprpolkitagent"];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
# Hyprpaper is used to set the wallpaper on the system
|
# Hyprpaper is used to set the wallpaper on the system
|
||||||
{lib, ...}: {
|
{lib, ...}: let
|
||||||
|
hl = import ../hyprland/lib.nix {inherit lib;};
|
||||||
|
in {
|
||||||
# The wallpaper is set by stylix
|
# The wallpaper is set by stylix
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -10,7 +12,7 @@
|
|||||||
};
|
};
|
||||||
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
|
systemd.user.services.hyprpaper.Unit.After = lib.mkForce "graphical-session.target";
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [
|
wayland.windowManager.hyprland.settings.on = hl.execOnce [
|
||||||
"systemctl --user enable --now hyprpaper.service"
|
"systemctl --user enable --now hyprpaper.service"
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,10 @@
|
|||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
hl = import ../hyprland/lib.nix {inherit lib;};
|
||||||
|
in {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
walker
|
walker
|
||||||
elephant
|
elephant
|
||||||
@@ -35,7 +39,7 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = [
|
wayland.windowManager.hyprland.settings.on = hl.execOnce [
|
||||||
"dbus-update-activation-environment --systemd --all"
|
"dbus-update-activation-environment --systemd --all"
|
||||||
"systemctl --user start elephant.service walker.service"
|
"systemctl --user start elephant.service walker.service"
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ let
|
|||||||
terminal = cmd: "uwsm app -- ${lib.getExe pkgs.ghostty} -e ${cmd}";
|
terminal = cmd: "uwsm app -- ${lib.getExe pkgs.ghostty} -e ${cmd}";
|
||||||
|
|
||||||
radius = toString config.theme.bar-rounding;
|
radius = toString config.theme.bar-rounding;
|
||||||
|
hl = import ../hyprland/lib.nix {inherit lib;};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
@@ -269,9 +270,5 @@ in
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings = {
|
wayland.windowManager.hyprland.settings.on = hl.execOnce ["waybar"];
|
||||||
exec-once = [
|
|
||||||
"waybar"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-10
@@ -3,7 +3,6 @@
|
|||||||
nixpkgs,
|
nixpkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
@@ -13,19 +12,16 @@ nixpkgs.lib.nixosSystem {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
({ config, pkgs, lib, ... }: {
|
({
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# ─────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────
|
||||||
# AMD Microcode
|
# AMD Microcode
|
||||||
# ─────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
hardware.cpu.amd.updateMicrocode = true;
|
||||||
|
|
||||||
# ─────────────────────────────────────────────────────────────
|
|
||||||
# Hardware accelaration
|
|
||||||
# ─────────────────────────────────────────────────────────────
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
enable32Bit = true;
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
|||||||
+12
-2
@@ -55,8 +55,18 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.monitor = [
|
wayland.windowManager.hyprland.settings.monitor = [
|
||||||
"DP-3,1920x1080@144.0,1920x0,1.0"
|
{
|
||||||
"HDMI-A-1,1920x1080@60.0,0x0,1.0"
|
output = "DP-3";
|
||||||
|
mode = "1920x1080@144.0";
|
||||||
|
position = "1920x0";
|
||||||
|
scale = 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "HDMI-A-1";
|
||||||
|
mode = "1920x1080@60.0";
|
||||||
|
position = "0x0";
|
||||||
|
scale = 1;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
config.var = {
|
config.var = {
|
||||||
hostname = "home-pc";
|
hostname = "home-pc";
|
||||||
username = "andi";
|
username = "andi";
|
||||||
configDirectory = "/home/" + config.var.username + "/.config/nixos"; # The path of the nixos configuration directory
|
configDirectory = "/etc/nixos/nixy"; # The path of the nixos configuration directory
|
||||||
|
|
||||||
keyboardLayout = "de";
|
keyboardLayout = "de";
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
git = {
|
git = {
|
||||||
username = "kptltd00m";
|
username = "kptltd00m";
|
||||||
email = "kptltd00m.doomlabs.de";
|
email = "kptltd00m@doomlabs.de";
|
||||||
};
|
};
|
||||||
|
|
||||||
autoUpgrade = false;
|
autoUpgrade = false;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, ... }: {
|
{config, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
# ─────────────────────────────────────────────────────────────
|
# ─────────────────────────────────────────────────────────────
|
||||||
# System configuration
|
# System configuration
|
||||||
@@ -22,7 +22,6 @@
|
|||||||
# You should let those lines as is
|
# You should let those lines as is
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./variables.nix
|
./variables.nix
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nix-ld.enable = true; #Dynamic Linking
|
programs.nix-ld.enable = true; #Dynamic Linking
|
||||||
|
|||||||
@@ -60,7 +60,13 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.monitor = [
|
wayland.windowManager.hyprland.settings.monitor = [
|
||||||
"eDP-1,1920x1080,0x0,1.5" # My internal laptop screen
|
# My internal laptop screen
|
||||||
|
{
|
||||||
|
output = "eDP-1";
|
||||||
|
mode = "1920x1080";
|
||||||
|
position = "0x0";
|
||||||
|
scale = 1.5;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
config.var = {
|
config.var = {
|
||||||
hostname = "thinkpad";
|
hostname = "thinkpad";
|
||||||
username = "andi";
|
username = "andi";
|
||||||
configDirectory = "/home/" + config.var.username + "/.config/nixos"; # The path of the nixos configuration directory
|
configDirectory = "/etc/nixos/nixy"; # The path of the nixos configuration directory
|
||||||
|
|
||||||
keyboardLayout = "de";
|
keyboardLayout = "de";
|
||||||
|
|
||||||
|
|||||||
@@ -15,15 +15,12 @@
|
|||||||
../../server-modules/glance
|
../../server-modules/glance
|
||||||
../../server-modules/adguardhome.nix
|
../../server-modules/adguardhome.nix
|
||||||
../../server-modules/arr.nix
|
../../server-modules/arr.nix
|
||||||
../../server-modules/blog.nix
|
|
||||||
../../server-modules/awesome-wallpapers.nix
|
|
||||||
../../server-modules/iknowyou.nix
|
../../server-modules/iknowyou.nix
|
||||||
../../server-modules/stirling-pdf.nix
|
../../server-modules/stirling-pdf.nix
|
||||||
../../server-modules/cyberchef.nix
|
../../server-modules/cyberchef.nix
|
||||||
../../server-modules/mazanoke.nix
|
../../server-modules/mazanoke.nix
|
||||||
../../server-modules/kernel-hardening.nix
|
../../server-modules/kernel-hardening.nix
|
||||||
../../server-modules/fail2ban.nix
|
../../server-modules/fail2ban.nix
|
||||||
../../server-modules/default-creds.nix
|
|
||||||
../../server-modules/umami.nix
|
../../server-modules/umami.nix
|
||||||
../../server-modules/gitea.nix
|
../../server-modules/gitea.nix
|
||||||
../../server-modules/mealie.nix
|
../../server-modules/mealie.nix
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ nixpkgs.lib.nixosSystem {
|
|||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
inputs.nixarr.nixosModules.default
|
inputs.nixarr.nixosModules.default
|
||||||
inputs.nix-index-database.nixosModules.default
|
inputs.nix-index-database.nixosModules.default
|
||||||
inputs.default-creds.nixosModules.default
|
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
+6
-1
@@ -41,7 +41,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.monitor = [
|
wayland.windowManager.hyprland.settings.monitor = [
|
||||||
"desc:Philips Consumer Electronics Company PHL 221B8L ZV02144013987,highres,0x0,1"
|
{
|
||||||
|
output = "desc:Philips Consumer Electronics Company PHL 221B8L ZV02144013987";
|
||||||
|
mode = "highres";
|
||||||
|
position = "0x0";
|
||||||
|
scale = 1;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
|
|||||||
@@ -4,8 +4,10 @@
|
|||||||
inputs,
|
inputs,
|
||||||
pkgs,
|
pkgs,
|
||||||
config,
|
config,
|
||||||
|
lib,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
hl = import ../../../home/system/hyprland/lib.nix {inherit lib;};
|
||||||
home = config.home.homeDirectory;
|
home = config.home.homeDirectory;
|
||||||
in {
|
in {
|
||||||
imports = [inputs.sops-nix.homeManagerModules.sops];
|
imports = [inputs.sops-nix.homeManagerModules.sops];
|
||||||
@@ -54,5 +56,5 @@ in {
|
|||||||
age
|
age
|
||||||
];
|
];
|
||||||
|
|
||||||
wayland.windowManager.hyprland.settings.exec-once = ["systemctl --user start sops-nix"];
|
wayland.windowManager.hyprland.settings.on = hl.execOnce ["systemctl --user start sops-nix"];
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-8
@@ -1,14 +1,7 @@
|
|||||||
# Hyprland is a dynamic tiling Wayland compositor.
|
# Hyprland is a dynamic tiling Wayland compositor.
|
||||||
{
|
{...}: {
|
||||||
inputs,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
programs.hyprland = {
|
programs.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
withUWSM = true;
|
withUWSM = true;
|
||||||
package = inputs.hyprland.packages."${pkgs.stdenv.hostPlatform.system}".hyprland;
|
|
||||||
portalPackage =
|
|
||||||
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
# Systemd-boot configuration for NixOS
|
# Systemd-boot configuration for NixOS
|
||||||
{pkgs, ...}: {
|
{pkgs, ...}: {
|
||||||
boot = {
|
boot = {
|
||||||
bootspec.enable = true;
|
|
||||||
loader = {
|
loader = {
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@
|
|||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
c = config.lib.stylix.colors;
|
c = config.lib.stylix.colors;
|
||||||
tuigreet = inputs.notashelf-tuigreet.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
tuigreet = pkgs.tuigreet;
|
||||||
|
|
||||||
theme = lib.concatStringsSep ";" [
|
theme = lib.concatStringsSep ";" [
|
||||||
"border=#${c.base0D}"
|
"border=#${c.base0D}"
|
||||||
|
|||||||
+1
-4
@@ -77,7 +77,7 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
implementation = "broker";
|
implementation = "broker";
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
gcr
|
gcr_4
|
||||||
gnome-settings-daemon
|
gnome-settings-daemon
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
@@ -144,8 +144,5 @@ in {
|
|||||||
|
|
||||||
# userland niceness
|
# userland niceness
|
||||||
rtkit.enable = true;
|
rtkit.enable = true;
|
||||||
|
|
||||||
# don't ask for password for wheel group
|
|
||||||
sudo.wheelNeedsPassword = false;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (import ./mk-container.nix {inherit lib config;}) mkContainer;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
(mkContainer {
|
|
||||||
name = "wallpapers";
|
|
||||||
hostIp = "10.233.4.1";
|
|
||||||
containerIp = "10.233.4.2";
|
|
||||||
nixosConfig = {pkgs, ...}: {
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
virtualHosts."wallpapers" = {
|
|
||||||
root = "${inputs.awesome-wallpapers.packages.${pkgs.stdenv.hostPlatform.system}.default}/share/awesome-wallpapers";
|
|
||||||
listen = [
|
|
||||||
{
|
|
||||||
addr = "0.0.0.0";
|
|
||||||
port = 8080;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
locations."/" = {
|
|
||||||
tryFiles = "$uri $uri/ /index.html";
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
port_in_redirect off;
|
|
||||||
absolute_redirect off;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
networking.firewall.allowedTCPPorts = [8080];
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
services.cloudflared.tunnels."${config.var.tunnelId}".ingress."wallpapers.${config.var.domain}" = "http://10.233.4.2:8080";
|
|
||||||
}
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (import ./mk-container.nix {inherit lib config;}) mkContainer;
|
|
||||||
domain = config.var.domain;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
(mkContainer {
|
|
||||||
name = "blog";
|
|
||||||
hostIp = "10.233.3.1";
|
|
||||||
containerIp = "10.233.3.2";
|
|
||||||
nixosConfig = {pkgs, ...}: {
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
virtualHosts = {
|
|
||||||
"blog" = {
|
|
||||||
root = "${inputs.blog.packages.${pkgs.stdenv.hostPlatform.system}.default}/share/blog";
|
|
||||||
listen = [
|
|
||||||
{
|
|
||||||
addr = "0.0.0.0";
|
|
||||||
port = 8080;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
locations."/" = {
|
|
||||||
tryFiles = "$uri $uri/ =404";
|
|
||||||
};
|
|
||||||
extraConfig = ''
|
|
||||||
port_in_redirect off;
|
|
||||||
absolute_redirect off;
|
|
||||||
error_page 403 /403.html;
|
|
||||||
error_page 404 /404.html;
|
|
||||||
error_page 500 /500.html;
|
|
||||||
error_page 503 /503.html;
|
|
||||||
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' data: https://umami.${domain}; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://git.${domain}; connect-src 'self' https://umami.${domain};" always;
|
|
||||||
add_header X-Frame-Options "SAMEORIGIN" always;
|
|
||||||
add_header X-Content-Type-Options "nosniff" always;
|
|
||||||
add_header Permissions-Policy "camera=(), microphone=(), geolocation=()" always;
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
"www-redirect" = {
|
|
||||||
listen = [
|
|
||||||
{
|
|
||||||
addr = "0.0.0.0";
|
|
||||||
port = 8081;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
extraConfig = "return 301 https://${domain}$request_uri;";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
|
||||||
8080
|
|
||||||
8081
|
|
||||||
];
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
services.cloudflared.tunnels."${config.var.tunnelId}".ingress = {
|
|
||||||
"${config.var.domain}" = "http://10.233.3.2:8080";
|
|
||||||
"www.${config.var.domain}" = "http://10.233.3.2:8081";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,36 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
inherit (import ./mk-container.nix {inherit lib config;}) mkContainer;
|
|
||||||
domain = config.var.domain;
|
|
||||||
in {
|
|
||||||
imports = [
|
|
||||||
(mkContainer {
|
|
||||||
name = "def-creds";
|
|
||||||
hostIp = "10.233.6.1";
|
|
||||||
containerIp = "10.233.6.2";
|
|
||||||
nixosConfig = {...}: {
|
|
||||||
imports = [inputs.default-creds.nixosModules.default];
|
|
||||||
services.default-creds = {
|
|
||||||
enable = true;
|
|
||||||
port = 8087;
|
|
||||||
};
|
|
||||||
networking.firewall.allowedTCPPorts = [8087];
|
|
||||||
systemd.services.default-creds.environment = {
|
|
||||||
HOST = lib.mkForce "0.0.0.0";
|
|
||||||
PUBLIC_UMAMI_URL = "https://umami.${domain}";
|
|
||||||
PUBLIC_UMAMI_WEBSITE_ID = "7197484c-01ad-488e-9caa-5ab7b7595f08";
|
|
||||||
UMAMI_URL = "https://umami.${domain}";
|
|
||||||
UMAMI_WEBSITE_ID = "7197484c-01ad-488e-9caa-5ab7b7595f08";
|
|
||||||
};
|
|
||||||
system.stateVersion = "24.05";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
|
|
||||||
services.default-creds.enable = lib.mkForce false;
|
|
||||||
services.cloudflared.tunnels."${config.var.tunnelId}".ingress."default-creds.${config.var.domain}" = "http://10.233.6.2:8087";
|
|
||||||
}
|
|
||||||
@@ -33,11 +33,6 @@
|
|||||||
url = "https://adguard.${domain}";
|
url = "https://adguard.${domain}";
|
||||||
icon = "si:adguard";
|
icon = "si:adguard";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
title = "Blog";
|
|
||||||
url = "https://${domain}";
|
|
||||||
icon = "si:blogger";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
title = "Gitea";
|
title = "Gitea";
|
||||||
url = "https://git.${domain}";
|
url = "https://git.${domain}";
|
||||||
@@ -63,11 +58,6 @@
|
|||||||
url = "https://iknowyou-prod.${domain}";
|
url = "https://iknowyou-prod.${domain}";
|
||||||
icon = "sh:iknowyou";
|
icon = "sh:iknowyou";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
title = "Wallpapers";
|
|
||||||
url = "https://wallpapers.${domain}";
|
|
||||||
icon = "si:unsplash";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
title = "Mazanoke";
|
title = "Mazanoke";
|
||||||
url = "https://mazanoke.${domain}";
|
url = "https://mazanoke.${domain}";
|
||||||
@@ -78,11 +68,6 @@
|
|||||||
url = "https://pdf.${domain}";
|
url = "https://pdf.${domain}";
|
||||||
icon = "sh:stirling-pdf";
|
icon = "sh:stirling-pdf";
|
||||||
}
|
}
|
||||||
{
|
|
||||||
title = "Default-creds";
|
|
||||||
url = "https://default-creds.${domain}";
|
|
||||||
icon = "si:passbolt";
|
|
||||||
}
|
|
||||||
{
|
{
|
||||||
title = "Cyberchef";
|
title = "Cyberchef";
|
||||||
url = "https://cyberchef.${domain}";
|
url = "https://cyberchef.${domain}";
|
||||||
|
|||||||
Reference in New Issue
Block a user