Compare commits
5 Commits
b234bdbd06
...
0603a18d9e
Author | SHA1 | Date |
---|---|---|
Moritz Böhme | 0603a18d9e | |
Moritz Böhme | e11746c11c | |
Moritz Böhme | cb539cc874 | |
Moritz Böhme | ef0ec4693c | |
Moritz Böhme | 271cbb359b |
13
flake.nix
13
flake.nix
|
@ -211,4 +211,17 @@
|
|||
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,9 +17,14 @@
|
|||
gaming.enable = true;
|
||||
personal.enable = true;
|
||||
};
|
||||
programs.hyprland.nvidiaSupport = true;
|
||||
programs.hyprland.keyboardLayouts = [ "us" "de" ];
|
||||
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" ];
|
||||
};
|
||||
services.mullvad.enable = true;
|
||||
services.wallpaper.enable = true;
|
||||
programs.ledger.enable = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -105,6 +105,8 @@ in
|
|||
abbreviations = {
|
||||
us = "systemctl --user";
|
||||
rs = "sudo systemctl";
|
||||
uj = "journalctl --user";
|
||||
rj = "sudo journalctl";
|
||||
};
|
||||
aliases = {
|
||||
ls = "exa -lh --icons --git";
|
||||
|
@ -114,8 +116,6 @@ 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,48 +151,39 @@ 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
|
||||
|
||||
# other
|
||||
# utils
|
||||
bat
|
||||
cht-sh
|
||||
du-dust
|
||||
duf
|
||||
entr
|
||||
exa
|
||||
f
|
||||
fd
|
||||
gi
|
||||
gparted
|
||||
neofetch
|
||||
reptyr
|
||||
parallel
|
||||
ripgrep
|
||||
up
|
||||
vim
|
||||
viu
|
||||
wget
|
||||
];
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
fonts = {
|
||||
enableDefaultPackages = true;
|
||||
packages = with pkgs; [
|
||||
(nerdfonts.override {
|
||||
fonts = [ "FiraCode" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
mtr.enable = true;
|
||||
|
|
|
@ -84,11 +84,7 @@ in
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
anki
|
||||
calibre
|
||||
fd
|
||||
keepassxc
|
||||
nixpkgs-review
|
||||
pavucontrol
|
||||
stable.libreoffice # NOTE breaks often
|
||||
stable.signal-desktop # NOTE breaks often
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -46,14 +46,46 @@ 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/
|
||||
monitor=,preferred,auto,1
|
||||
${concatLines (map (x: "monitor=${x}") cfg.monitors)}
|
||||
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
|
||||
|
||||
|
@ -110,6 +110,13 @@ 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.*)$"]}
|
||||
|
@ -207,5 +214,9 @@ in
|
|||
bindm = $mainMod, mouse:272, movewindow
|
||||
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}
|
||||
''
|
||||
|
|
|
@ -31,6 +31,15 @@ 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 {
|
||||
|
@ -70,6 +79,7 @@ in
|
|||
|
||||
settings = {
|
||||
mainBar = {
|
||||
start_hidden = true;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 20;
|
||||
|
@ -81,8 +91,13 @@ in
|
|||
};
|
||||
|
||||
# lock screen after timeout
|
||||
home-manager.users.moritz = {
|
||||
services.swayidle = {
|
||||
home-manager.users.moritz.programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
color = "000000";
|
||||
};
|
||||
};
|
||||
home-manager.users.moritz.services.swayidle = {
|
||||
enable = true;
|
||||
events = [
|
||||
{
|
||||
|
@ -120,7 +135,6 @@ in
|
|||
};
|
||||
systemdTarget = "hyprland-session.target";
|
||||
};
|
||||
};
|
||||
|
||||
# adds pam module for swaylock
|
||||
security.pam.services.swaylock = { };
|
||||
|
@ -184,16 +198,29 @@ in
|
|||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
xserver = {
|
||||
enable = true;
|
||||
displayManager = {
|
||||
lightdm.enable = true;
|
||||
autoLogin = {
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings =
|
||||
let
|
||||
hyprlandCommand = getExe' hyprland "Hyprland";
|
||||
in
|
||||
{
|
||||
initial_session = {
|
||||
command = hyprlandCommand;
|
||||
user = "moritz";
|
||||
};
|
||||
defaultSession = "hyprland";
|
||||
sessionPackages = [ hyprland ]; # can't set the defaultSession otherwise
|
||||
default_session = {
|
||||
command = ''
|
||||
${pkgs.greetd.tuigreet}/bin/tuigreet \
|
||||
--time \
|
||||
--asterisks \
|
||||
--user-menu \
|
||||
--remember \
|
||||
--power-shutdown 'systemctl poweroff' \
|
||||
--power-reboot 'systemctl reboot' \
|
||||
--cmd ${hyprlandCommand}
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -57,17 +57,9 @@ 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,6 +2,7 @@
|
|||
|
||||
WALLPAPERS_PATH="$HOME/.config/wallpapers"
|
||||
WALLPAPERS=$(find "$WALLPAPERS_PATH" -type f,l)
|
||||
DEBUG=0
|
||||
|
||||
function help() {
|
||||
echo "Usage:"
|
||||
|
@ -22,7 +23,11 @@ function setWallpaperX {
|
|||
}
|
||||
|
||||
function setWallpaperWayland {
|
||||
if [[ $DEBUG -eq 1 ]]; then
|
||||
swaybg --mode fill -i "$1" &
|
||||
else
|
||||
swaybg --mode fill -i "$1" 2>/dev/null &
|
||||
fi
|
||||
}
|
||||
|
||||
function setWallpaper() {
|
||||
|
@ -53,6 +58,10 @@ 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
|
||||
|
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -18,7 +18,6 @@ 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;
|
||||
|
|
|
@ -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‰¥æ0‘v
|
Loading…
Reference in New Issue