Compare commits
No commits in common. "0603a18d9e4ab2153afc5313dd7e9d4f072bd27d" and "b234bdbd062c5861601edec932d12d5c1e9c077b" have entirely different histories.
0603a18d9e
...
b234bdbd06
13 changed files with 118 additions and 190 deletions
13
flake.nix
13
flake.nix
|
@ -211,17 +211,4 @@
|
|||
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="
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -17,14 +17,9 @@
|
|||
gaming.enable = true;
|
||||
personal.enable = true;
|
||||
};
|
||||
programs.hyprland = {
|
||||
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" ];
|
||||
};
|
||||
programs.hyprland.nvidiaSupport = true;
|
||||
programs.hyprland.keyboardLayouts = [ "us" "de" ];
|
||||
services.mullvad.enable = true;
|
||||
services.wallpaper.enable = true;
|
||||
programs.ledger.enable = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -105,8 +105,6 @@ in
|
|||
abbreviations = {
|
||||
us = "systemctl --user";
|
||||
rs = "sudo systemctl";
|
||||
uj = "journalctl --user";
|
||||
rj = "sudo journalctl";
|
||||
};
|
||||
aliases = {
|
||||
ls = "exa -lh --icons --git";
|
||||
|
@ -116,6 +114,8 @@ in
|
|||
cd = "__zoxide_z";
|
||||
|
||||
nixos-update = "pushd ~/.dotfiles && nix flake update && popd";
|
||||
|
||||
latexwatch = ''find -type f -name "*.tex" | entr -c latexmk -pdf -silent'';
|
||||
};
|
||||
variables = { EDITOR = "vim"; };
|
||||
};
|
||||
|
@ -151,39 +151,48 @@ in
|
|||
# archives
|
||||
ouch
|
||||
|
||||
# file management
|
||||
trash-cli
|
||||
|
||||
# monitoring
|
||||
htop
|
||||
bottom
|
||||
|
||||
# nix
|
||||
(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-test" "sudo nixos-rebuild test --flake ~/.dotfiles")
|
||||
manix
|
||||
nix-index
|
||||
nix-output-monitor
|
||||
nixpkgs-fmt
|
||||
statix
|
||||
which-nix
|
||||
|
||||
# utils
|
||||
# other
|
||||
bat
|
||||
cht-sh
|
||||
du-dust
|
||||
duf
|
||||
entr
|
||||
exa
|
||||
f
|
||||
fd
|
||||
gi
|
||||
parallel
|
||||
gparted
|
||||
neofetch
|
||||
reptyr
|
||||
ripgrep
|
||||
up
|
||||
vim
|
||||
viu
|
||||
wget
|
||||
];
|
||||
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
fonts = [ "FiraCode" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
fonts = [ "FiraCode" ];
|
||||
})
|
||||
];
|
||||
|
||||
programs = {
|
||||
mtr.enable = true;
|
||||
|
|
|
@ -84,7 +84,11 @@ in
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
anki
|
||||
calibre
|
||||
fd
|
||||
keepassxc
|
||||
nixpkgs-review
|
||||
pavucontrol
|
||||
stable.libreoffice # NOTE breaks often
|
||||
stable.signal-desktop # NOTE breaks often
|
||||
|
|
|
@ -69,5 +69,24 @@ 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -46,46 +46,14 @@ in
|
|||
# visual mode, but due to fish_cursor_default, is redundant here
|
||||
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
|
||||
complete -c c -kfa '(zoxide query -l | sed "s|$HOME|~|")'
|
||||
${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 \
|
||||
-n "__fish_seen_subcommand_from toggle" \
|
||||
-fa '(timers --json l | ${getExe pkgs.jq} -r .[][].name)'
|
||||
|
||||
complete -c timers \
|
||||
-n "__fish_seen_subcommand_from remove" \
|
||||
-fa '(timers --json l | ${getExe pkgs.jq} -r .[][].name)'
|
||||
|
|
|
@ -17,7 +17,7 @@ in
|
|||
#
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Monitors/
|
||||
${concatLines (map (x: "monitor=${x}") cfg.monitors)}
|
||||
monitor=,preferred,auto,1
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
|
@ -110,13 +110,6 @@ in
|
|||
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
|
||||
# Firefox Sharing Indicator
|
||||
${mkRules ["float" "move 49% 40" "noborder" "nofullscreenrequest"] ["title:^(.*Sharing Indicator.*)$"]}
|
||||
|
@ -214,9 +207,5 @@ in
|
|||
bindm = $mainMod, mouse:272, movewindow
|
||||
bindm = $mainMod, mouse:273, resizewindow
|
||||
|
||||
# Toggle waybar
|
||||
bindr = $mainMod, SUPER_L, exec, pkill -USR1 waybar
|
||||
|
||||
# Extra Config
|
||||
${cfg.extraConfig}
|
||||
exec-once=${getExe config.my.programs.wallpaper.package} -r
|
||||
''
|
||||
|
|
|
@ -31,15 +31,6 @@ in
|
|||
description = "list of keyboard layouts";
|
||||
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 {
|
||||
|
@ -79,7 +70,6 @@ in
|
|||
|
||||
settings = {
|
||||
mainBar = {
|
||||
start_hidden = true;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 20;
|
||||
|
@ -91,50 +81,46 @@ in
|
|||
};
|
||||
|
||||
# lock screen after timeout
|
||||
home-manager.users.moritz.programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "000000";
|
||||
home-manager.users.moritz = {
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${getExe pkgs.swaylock} -fF";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${getExe pkgs.swaylock} -fF";
|
||||
}
|
||||
];
|
||||
timeouts =
|
||||
let
|
||||
lockTimeout = 10;
|
||||
in
|
||||
[
|
||||
{
|
||||
timeout = lockTimeout * 60 - 10;
|
||||
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
||||
}
|
||||
{
|
||||
timeout = lockTimeout * 60;
|
||||
command = "${hyprland}/bin/hyprctl dispatch dpms off";
|
||||
resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = lockTimeout * 60 + 10;
|
||||
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
}
|
||||
] ++ optional
|
||||
(!cfg.nvidiaSupport) # TODO https://github.com/hyprwm/Hyprland/issues/1728
|
||||
{
|
||||
timeout = 30 * 60;
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend-and-hibernate";
|
||||
};
|
||||
systemdTarget = "hyprland-session.target";
|
||||
};
|
||||
};
|
||||
home-manager.users.moritz.services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "${getExe pkgs.swaylock} -fF";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = "${getExe pkgs.swaylock} -fF";
|
||||
}
|
||||
];
|
||||
timeouts =
|
||||
let
|
||||
lockTimeout = 10;
|
||||
in
|
||||
[
|
||||
{
|
||||
timeout = lockTimeout * 60 - 10;
|
||||
command = "${pkgs.libnotify}/bin/notify-send 'Locking screen!'";
|
||||
}
|
||||
{
|
||||
timeout = lockTimeout * 60;
|
||||
command = "${hyprland}/bin/hyprctl dispatch dpms off";
|
||||
resumeCommand = "${hyprland}/bin/hyprctl dispatch dpms on";
|
||||
}
|
||||
{
|
||||
timeout = lockTimeout * 60 + 10;
|
||||
command = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||
}
|
||||
] ++ optional
|
||||
(!cfg.nvidiaSupport) # TODO https://github.com/hyprwm/Hyprland/issues/1728
|
||||
{
|
||||
timeout = 30 * 60;
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend-and-hibernate";
|
||||
};
|
||||
systemdTarget = "hyprland-session.target";
|
||||
};
|
||||
|
||||
# adds pam module for swaylock
|
||||
security.pam.services.swaylock = { };
|
||||
|
@ -198,30 +184,17 @@ in
|
|||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
greetd = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
settings =
|
||||
let
|
||||
hyprlandCommand = getExe' hyprland "Hyprland";
|
||||
in
|
||||
{
|
||||
initial_session = {
|
||||
command = hyprlandCommand;
|
||||
user = "moritz";
|
||||
};
|
||||
default_session = {
|
||||
command = ''
|
||||
${pkgs.greetd.tuigreet}/bin/tuigreet \
|
||||
--time \
|
||||
--asterisks \
|
||||
--user-menu \
|
||||
--remember \
|
||||
--power-shutdown 'systemctl poweroff' \
|
||||
--power-reboot 'systemctl reboot' \
|
||||
--cmd ${hyprlandCommand}
|
||||
'';
|
||||
};
|
||||
displayManager = {
|
||||
lightdm.enable = true;
|
||||
autoLogin = {
|
||||
enable = true;
|
||||
user = "moritz";
|
||||
};
|
||||
defaultSession = "hyprland";
|
||||
sessionPackages = [ hyprland ]; # can't set the defaultSession otherwise
|
||||
};
|
||||
};
|
||||
};
|
||||
security.rtkit.enable = true;
|
||||
|
|
|
@ -57,9 +57,17 @@ in
|
|||
settings = {
|
||||
substituters = [
|
||||
"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 = [
|
||||
"jupyterwith.cachix.org-1:/kDy2B6YEhXGJuNguG1qyqIodMyO4w8KwWH4/vAc7CI="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"pre-commit-hooks.cachix.org-1:Pkk3Panw5AW24TOv6kz3PvLhlH8puAsJTBbOPmBo7Rc="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
WALLPAPERS_PATH="$HOME/.config/wallpapers"
|
||||
WALLPAPERS=$(find "$WALLPAPERS_PATH" -type f,l)
|
||||
DEBUG=0
|
||||
|
||||
function help() {
|
||||
echo "Usage:"
|
||||
|
@ -23,11 +22,7 @@ function setWallpaperX {
|
|||
}
|
||||
|
||||
function setWallpaperWayland {
|
||||
if [[ $DEBUG -eq 1 ]]; then
|
||||
swaybg --mode fill -i "$1" &
|
||||
else
|
||||
swaybg --mode fill -i "$1" 2>/dev/null &
|
||||
fi
|
||||
swaybg --mode fill -i "$1" 2>/dev/null &
|
||||
}
|
||||
|
||||
function setWallpaper() {
|
||||
|
@ -58,10 +53,6 @@ while [[ $# -gt 0 ]]; do
|
|||
shift # past argument
|
||||
shift # past value
|
||||
;;
|
||||
-v | --verbose)
|
||||
DEBUG=1
|
||||
shift # past argument
|
||||
;;
|
||||
*)
|
||||
POSITIONAL+=("$1") # save it in an array for later
|
||||
shift # past argument
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -18,6 +18,7 @@ in
|
|||
{
|
||||
"github.age".publicKeys = all;
|
||||
"ssh-home.age".publicKeys = personal;
|
||||
"ssh-builder.age".publicKeys = personal;
|
||||
"uni-vpn.age".publicKeys = personal;
|
||||
"wireguard-preshared-key.age".publicKeys = personal;
|
||||
"wireguard-private-key.age".publicKeys = personal;
|
||||
|
|
10
secrets/ssh-builder.age
Normal file
10
secrets/ssh-builder.age
Normal file
|
@ -0,0 +1,10 @@
|
|||
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‰¥æ0‘v
|
Loading…
Reference in a new issue