Compare commits

..

5 commits

13 changed files with 190 additions and 118 deletions

View file

@ -211,4 +211,17 @@
default = overlay; default = overlay;
}; };
}; };
nixConfig = {
extra-substituters = [
"https://hyprland.cachix.org"
"https://nix-community.cachix.org"
"https://pre-commit-hooks.cachix.org"
];
extra-trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
];
};
} }

View file

@ -17,9 +17,14 @@
gaming.enable = true; gaming.enable = true;
personal.enable = true; personal.enable = true;
}; };
programs.hyprland.nvidiaSupport = true; programs.hyprland = {
programs.hyprland.keyboardLayouts = [ "us" "de" ]; nvidiaSupport = true;
monitors = [ "HDMI-A-1,3840x2160,auto,1.2" ",preferred,auto,1" ];
extraConfig = "exec=hyprctl keyword monitor HDMI-A-1,3840x2160@120,auto,1.2";
keyboardLayouts = [ "us" "de" ];
};
services.mullvad.enable = true; services.mullvad.enable = true;
services.wallpaper.enable = true;
programs.ledger.enable = true; programs.ledger.enable = true;
}; };

View file

@ -105,6 +105,8 @@ in
abbreviations = { abbreviations = {
us = "systemctl --user"; us = "systemctl --user";
rs = "sudo systemctl"; rs = "sudo systemctl";
uj = "journalctl --user";
rj = "sudo journalctl";
}; };
aliases = { aliases = {
ls = "exa -lh --icons --git"; ls = "exa -lh --icons --git";
@ -114,8 +116,6 @@ in
cd = "__zoxide_z"; cd = "__zoxide_z";
nixos-update = "pushd ~/.dotfiles && nix flake update && popd"; nixos-update = "pushd ~/.dotfiles && nix flake update && popd";
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
}; };
variables = { EDITOR = "vim"; }; variables = { EDITOR = "vim"; };
}; };
@ -151,48 +151,39 @@ in
# archives # archives
ouch ouch
# file management
trash-cli
# monitoring # monitoring
htop
bottom bottom
# nix # nix
(nom-system-command "nixos-boot" "sudo nixos-rebuild boot --flake ~/.dotfiles") (nom-system-command "nixos-boot" "sudo nixos-rebuild boot --flake ~/.dotfiles")
(nom-system-command "nixos-switch" "sudo nixos-rebuild switch --flake ~/.dotfiles") (nom-system-command "nixos-switch" "sudo nixos-rebuild switch --flake ~/.dotfiles")
(nom-system-command "nixos-test" "sudo nixos-rebuild test --flake ~/.dotfiles") (nom-system-command "nixos-test" "sudo nixos-rebuild test --flake ~/.dotfiles")
manix
nix-index
nix-output-monitor nix-output-monitor
nixpkgs-fmt nixpkgs-fmt
statix
which-nix which-nix
# other # utils
bat bat
cht-sh cht-sh
du-dust
duf
entr
exa exa
f f
fd
gi gi
gparted parallel
neofetch
reptyr
ripgrep ripgrep
up
vim vim
viu viu
wget wget
]; ];
fonts.packages = with pkgs; [ fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
(nerdfonts.override { (nerdfonts.override {
fonts = [ "FiraCode" ]; fonts = [ "FiraCode" ];
}) })
]; ];
};
programs = { programs = {
mtr.enable = true; mtr.enable = true;

View file

@ -84,11 +84,7 @@ in
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
anki
calibre
fd
keepassxc keepassxc
nixpkgs-review
pavucontrol pavucontrol
stable.libreoffice # NOTE breaks often stable.libreoffice # NOTE breaks often
stable.signal-desktop # NOTE breaks often stable.signal-desktop # NOTE breaks often

View file

@ -69,24 +69,5 @@ in
}; };
}; };
}; };
nix.buildMachines = [{
hostName = "builder";
systems = [ "aarch64-linux" "x86_64-linux" ];
protocol = "ssh-ng";
maxJobs = 1;
speedFactor = 1;
supportedFeatures = [ "nixos-test" "benchmark" "kvm" ];
mandatoryFeatures = [ ];
}];
nix.distributedBuilds = true;
# optional, useful when the builder has a faster internet connection than yours
nix.extraOptions = ''
builders-use-substitutes = true
'';
age.secrets."ssh-builder" = {
file = ../../secrets/ssh-builder.age;
owner = "0";
path = "/root/.ssh/config";
};
}; };
} }

View file

@ -46,14 +46,46 @@ in
# visual mode, but due to fish_cursor_default, is redundant here # visual mode, but due to fish_cursor_default, is redundant here
set fish_cursor_visual block set fish_cursor_visual block
# Complex abbreviations
function last_history_item
echo $history[1]
end
abbr -a !! --position anywhere --function last_history_item
function sed_history_item
echo $history[1] | perl -p -e (string trim -l --chars=! $argv)
end
abbr -a sed_history --position command --regex '^!s/.+/.*/g?' --function sed_history_item
function multicd
echo cd (string repeat -n (math (string length -- $argv[1]) - 1) ../)
end
abbr --add dotdot --regex '^\.\.+$' --function multicd
abbr -a P --position anywhere --set-cursor "% | $PAGER"
function editor_edit
echo $EDITOR $argv
end
abbr -a editor_edit_files --position command --regex ".+\.(txt|md|org)" --function editor_edit
function editor
echo $EDITOR
end
abbr -a e --function editor
# Completions # Completions
complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")' complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")'
${optionalString config.virtualisation.podman.dockerCompat /* fish */ "complete -c docker -w podman"} ${optionalString config.virtualisation.podman.dockerCompat /* fish */ "complete -c docker -w podman"}
complete -c nom -fn "not __fish_seen_subcommand_from build shell develop" -a "build shell develop"
complete -c nom -fn "__fish_seen_subcommand_from build" -w "nix build"
complete -c nom -fn "__fish_seen_subcommand_from shell" -w "nix shell"
complete -c nom -fn "__fish_seen_subcommand_from develop" -w "nix develop"
complete -c timers \ complete -c timers \
-n "__fish_seen_subcommand_from toggle" \ -n "__fish_seen_subcommand_from toggle" \
-fa '(timers --json l | ${getExe pkgs.jq} -r .[][].name)' -fa '(timers --json l | ${getExe pkgs.jq} -r .[][].name)'
complete -c timers \ complete -c timers \
-n "__fish_seen_subcommand_from remove" \ -n "__fish_seen_subcommand_from remove" \
-fa '(timers --json l | ${getExe pkgs.jq} -r .[][].name)' -fa '(timers --json l | ${getExe pkgs.jq} -r .[][].name)'

View file

@ -17,7 +17,7 @@ in
# #
# See https://wiki.hyprland.org/Configuring/Monitors/ # See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,1 ${concatLines (map (x: "monitor=${x}") cfg.monitors)}
# See https://wiki.hyprland.org/Configuring/Keywords/ for more # See https://wiki.hyprland.org/Configuring/Keywords/ for more
@ -110,6 +110,13 @@ in
workspace_swipe = on workspace_swipe = on
} }
misc {
# disable_hypr_chan = true
vrr = 1
mouse_move_enables_dpms = true
key_press_enables_dpms = true
}
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more # See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# Firefox Sharing Indicator # Firefox Sharing Indicator
${mkRules ["float" "move 49% 40" "noborder" "nofullscreenrequest"] ["title:^(.*Sharing Indicator.*)$"]} ${mkRules ["float" "move 49% 40" "noborder" "nofullscreenrequest"] ["title:^(.*Sharing Indicator.*)$"]}
@ -207,5 +214,9 @@ in
bindm = $mainMod, mouse:272, movewindow bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow bindm = $mainMod, mouse:273, resizewindow
exec-once=${getExe config.my.programs.wallpaper.package} -r # Toggle waybar
bindr = $mainMod, SUPER_L, exec, pkill -USR1 waybar
# Extra Config
${cfg.extraConfig}
'' ''

View file

@ -31,6 +31,15 @@ in
description = "list of keyboard layouts"; description = "list of keyboard layouts";
default = [ "de" "us" ]; default = [ "de" "us" ];
}; };
monitors = mkOption {
type = types.listOf types.str;
description = "monitor settings";
default = [ ",preferred,auto,1" ];
};
extraConfig = mkOption {
type = types.str;
default = "";
};
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
@ -70,6 +79,7 @@ in
settings = { settings = {
mainBar = { mainBar = {
start_hidden = true;
layer = "top"; layer = "top";
position = "top"; position = "top";
height = 20; height = 20;
@ -81,8 +91,13 @@ in
}; };
# lock screen after timeout # lock screen after timeout
home-manager.users.moritz = { home-manager.users.moritz.programs.swaylock = {
services.swayidle = { enable = true;
settings = {
color = "000000";
};
};
home-manager.users.moritz.services.swayidle = {
enable = true; enable = true;
events = [ events = [
{ {
@ -120,7 +135,6 @@ in
}; };
systemdTarget = "hyprland-session.target"; systemdTarget = "hyprland-session.target";
}; };
};
# adds pam module for swaylock # adds pam module for swaylock
security.pam.services.swaylock = { }; security.pam.services.swaylock = { };
@ -184,16 +198,29 @@ in
alsa.support32Bit = true; alsa.support32Bit = true;
pulse.enable = true; pulse.enable = true;
}; };
xserver = { greetd = {
enable = true;
displayManager = {
lightdm.enable = true;
autoLogin = {
enable = true; enable = true;
settings =
let
hyprlandCommand = getExe' hyprland "Hyprland";
in
{
initial_session = {
command = hyprlandCommand;
user = "moritz"; user = "moritz";
}; };
defaultSession = "hyprland"; default_session = {
sessionPackages = [ hyprland ]; # can't set the defaultSession otherwise command = ''
${pkgs.greetd.tuigreet}/bin/tuigreet \
--time \
--asterisks \
--user-menu \
--remember \
--power-shutdown 'systemctl poweroff' \
--power-reboot 'systemctl reboot' \
--cmd ${hyprlandCommand}
'';
};
}; };
}; };
}; };

View file

@ -57,17 +57,9 @@ in
settings = { settings = {
substituters = [ substituters = [
"https://cache.nixos.org/" "https://cache.nixos.org/"
"https://jupyterwith.cachix.org"
"https://nix-community.cachix.org"
"https://pre-commit-hooks.cachix.org"
"https://hyprland.cachix.org"
]; ];
trusted-public-keys = [ trusted-public-keys = [
"jupyterwith.cachix.org-1:/kDy2B6YEhXGJuNguG1qyqIodMyO4w8KwWH4/vAc7CI="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
trusted-users = [ "root" "@wheel" ]; trusted-users = [ "root" "@wheel" ];

View file

@ -2,6 +2,7 @@
WALLPAPERS_PATH="$HOME/.config/wallpapers" WALLPAPERS_PATH="$HOME/.config/wallpapers"
WALLPAPERS=$(find "$WALLPAPERS_PATH" -type f,l) WALLPAPERS=$(find "$WALLPAPERS_PATH" -type f,l)
DEBUG=0
function help() { function help() {
echo "Usage:" echo "Usage:"
@ -22,7 +23,11 @@ function setWallpaperX {
} }
function setWallpaperWayland { function setWallpaperWayland {
if [[ $DEBUG -eq 1 ]]; then
swaybg --mode fill -i "$1" &
else
swaybg --mode fill -i "$1" 2>/dev/null & swaybg --mode fill -i "$1" 2>/dev/null &
fi
} }
function setWallpaper() { function setWallpaper() {
@ -53,6 +58,10 @@ while [[ $# -gt 0 ]]; do
shift # past argument shift # past argument
shift # past value shift # past value
;; ;;
-v | --verbose)
DEBUG=1
shift # past argument
;;
*) *)
POSITIONAL+=("$1") # save it in an array for later POSITIONAL+=("$1") # save it in an array for later
shift # past argument shift # past argument

View file

@ -0,0 +1,26 @@
{ lib, config, ... }:
with lib;
let
cfg = config.my.services.wallpaper;
in
{
options.my.services.wallpaper = {
enable = mkEnableOption "wallpaper changer";
frequency = mkOption {
type = types.str;
default = "30m";
};
};
config = mkIf cfg.enable {
systemd.user.services.wallpaper = {
script = "${getExe config.my.programs.wallpaper.package} -r -v";
wantedBy = [ "graphical-session.target" ];
serviceConfig = {
Restart = "always";
RuntimeMaxSec = cfg.frequency;
ExitType = "cgroup";
};
};
};
}

View file

@ -18,7 +18,6 @@ in
{ {
"github.age".publicKeys = all; "github.age".publicKeys = all;
"ssh-home.age".publicKeys = personal; "ssh-home.age".publicKeys = personal;
"ssh-builder.age".publicKeys = personal;
"uni-vpn.age".publicKeys = personal; "uni-vpn.age".publicKeys = personal;
"wireguard-preshared-key.age".publicKeys = personal; "wireguard-preshared-key.age".publicKeys = personal;
"wireguard-private-key.age".publicKeys = personal; "wireguard-private-key.age".publicKeys = personal;

View file

@ -1,10 +0,0 @@
age-encryption.org/v1
-> ssh-ed25519 wG6LYg 5umyOPP+KaUaQckEZYnh+nyX2RIMDp/KtJraFuATQBM
qsS9JiY0qxR7IMwpH2x1VWF5A5/wrAkbeOzuMcf1fS0
-> ssh-ed25519 ZYd7Zg L9EJulnOPk7fEcmrWU8mVRbEN80dHCji1n4bnwGJigk
KTnk+Ku96gJ7Tj2egXyqX6UIuytHTuMFM1ygDXoIDxg
-> XQ.ai[-grease a ) r]>2~U
7CDc3c+1EZaEB15RE8JMzmdbr2WmQeP2ivIh4qgYTnKImHxJaJEhgScd0EzyEXVP
NZxuP+0
--- CE/X6hjRUWT1ya1ySIjFBnLdmPkVbL4ugDwYv9XGYoo
Úô½çµß‰¦¥×3Ïÿ8ìež:Im…èúÔF?U¨~Ù83ÍÉÜóÝðµôìNC<4E>zAÅãõúû°õM]0¥²fšð´ku˜¯†<C2AF>FL§lš<åÀSXCÅÛhEh<45> Î¥GKF<15>È<+çÒoŒ_<C592>ÝÐIP´ùça<vJ<>SxzŸÇyà£_\ÿ<>8p‰¥æ0v