Compare commits
No commits in common. "77edc325e2e8612fb8ba4da96e87c224a2284465" and "97e183ce59249a7e295c293702048986ce87a3c9" have entirely different histories.
77edc325e2
...
97e183ce59
|
@ -33,7 +33,6 @@ in
|
||||||
gpg.enable = mkDefault true;
|
gpg.enable = mkDefault true;
|
||||||
hyprland.enable = mkDefault true;
|
hyprland.enable = mkDefault true;
|
||||||
logseq.enable = mkDefault true;
|
logseq.enable = mkDefault true;
|
||||||
nix-edit.enable = mkDefault true;
|
|
||||||
nvim.enable = mkDefault true;
|
nvim.enable = mkDefault true;
|
||||||
python.versions."311".enable = mkDefault true;
|
python.versions."311".enable = mkDefault true;
|
||||||
spotify.enable = mkDefault true;
|
spotify.enable = mkDefault true;
|
||||||
|
|
|
@ -31,7 +31,8 @@ in
|
||||||
"browser.urlbar.suggest.searches" = true;
|
"browser.urlbar.suggest.searches" = true;
|
||||||
|
|
||||||
# startup page
|
# startup page
|
||||||
"browser.startup.page" = 0;
|
"browser.startup.homepage" = "https://searxng.moritzboeh.me/";
|
||||||
|
"browser.startup.page" = 1;
|
||||||
|
|
||||||
# drm
|
# drm
|
||||||
"media.eme.enabled" = true;
|
"media.eme.enabled" = true;
|
||||||
|
|
|
@ -221,6 +221,4 @@ in
|
||||||
# Move/resize windows with mainMod + LMB/RMB and dragging
|
# Move/resize windows with mainMod + LMB/RMB and dragging
|
||||||
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
|
|
||||||
''
|
''
|
||||||
|
|
|
@ -58,16 +58,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
# use package with hyprland support for switching workspaces
|
# use package with hyprland support for switching workspaces
|
||||||
package = pkgs.symlinkJoin {
|
package = pkgs.waybar-hyprland;
|
||||||
name = "waybar-hyprland";
|
|
||||||
paths = [ pkgs.waybar-hyprland ];
|
|
||||||
nativeBuildInputs = [ pkgs.makeWrapper ];
|
|
||||||
postBuild = ''
|
|
||||||
wrapProgram $out/bin/waybar \
|
|
||||||
--prefix PATH ":" "${hyprland}/bin"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# start using systemd service
|
# start using systemd service
|
||||||
systemd = {
|
systemd = {
|
||||||
|
@ -79,7 +70,7 @@ in
|
||||||
mainBar = {
|
mainBar = {
|
||||||
layer = "top";
|
layer = "top";
|
||||||
position = "top";
|
position = "top";
|
||||||
height = 20;
|
height = 30;
|
||||||
modules-left = [ "wlr/workspaces" ];
|
modules-left = [ "wlr/workspaces" ];
|
||||||
modules-center = [ "hyprland/window" ];
|
modules-center = [ "hyprland/window" ];
|
||||||
modules-right = [ "network" "memory" "cpu" "battery" "clock" ];
|
modules-right = [ "network" "memory" "cpu" "battery" "clock" ];
|
||||||
|
@ -92,6 +83,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# lock screen after timeout
|
# lock screen after timeout
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
services.swayidle = {
|
services.swayidle = {
|
||||||
|
@ -137,6 +129,40 @@ in
|
||||||
# adds pam module for swaylock
|
# adds pam module for swaylock
|
||||||
security.pam.services.swaylock = { };
|
security.pam.services.swaylock = { };
|
||||||
|
|
||||||
|
|
||||||
|
# start hyprpaper daemon using systemd unit (to set wallpaper)
|
||||||
|
systemd.user.services.hyprpaper =
|
||||||
|
let
|
||||||
|
wallpaper = "/home/moritz/.config/wallpapers/a_short_walk.png";
|
||||||
|
config = pkgs.writeTextFile {
|
||||||
|
name = "hyprpaper.conf";
|
||||||
|
text = ''
|
||||||
|
preload = ${wallpaper}
|
||||||
|
wallpaper = ,${wallpaper}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/sleep 0.5";
|
||||||
|
ExecStart = "${getExe pkgs.hyprpaper} -c ${config}";
|
||||||
|
RestartSec = "500ms";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.random-wallpaper = {
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
|
requires = [ "hyprpaper.service" ];
|
||||||
|
serviceConfig = {
|
||||||
|
ExecStartPre = "${pkgs.coreutils}/bin/sleep 0.5";
|
||||||
|
ExecStart = "${getExe config.my.programs.wallpaper.package} -r";
|
||||||
|
RestartSec = "500ms";
|
||||||
|
Restart = "on-failure";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# only consider graphical-session.target started when hyprland-sesstion.target is reached
|
# only consider graphical-session.target started when hyprland-sesstion.target is reached
|
||||||
systemd.user.targets.hyprland-session = {
|
systemd.user.targets.hyprland-session = {
|
||||||
partOf = [ "graphical-session.target" ];
|
partOf = [ "graphical-session.target" ];
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
{ lib
|
|
||||||
, config
|
|
||||||
, pkgs
|
|
||||||
, ...
|
|
||||||
}:
|
|
||||||
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.my.programs.nix-edit;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options.my.programs.nix-edit.enable = mkEnableOption "nix-edit";
|
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
|
||||||
environment.systemPackages =
|
|
||||||
let
|
|
||||||
nix-edit = pkgs.writeShellApplication {
|
|
||||||
name = "nix-edit";
|
|
||||||
runtimeInputs = with pkgs; [ nix gnugrep ];
|
|
||||||
text = builtins.readFile ./nix-edit.sh;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
[ nix-edit ];
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
input=$(
|
|
||||||
echo ":lf nixpkgs"
|
|
||||||
echo "pkgs = legacyPackages.\${builtins.currentSystem}"
|
|
||||||
echo ":doc $1"
|
|
||||||
echo ":e $1"
|
|
||||||
)
|
|
||||||
echo "$input" | nix repl --quiet 2> >(grep -v "ioctl" |
|
|
||||||
grep -v "^error: value does not have documentation$" |
|
|
||||||
grep -vP "error: .* has no source location information" |
|
|
||||||
grep -vP "Welcome to Nix \d+\.\d+\.\d+\." |
|
|
||||||
grep -vP "Added \d+ variables." |
|
|
||||||
grep -v -e '^[[:space:]]*$'
|
|
||||||
)
|
|
|
@ -8,7 +8,7 @@ let
|
||||||
|
|
||||||
script = pkgs.writeShellApplication {
|
script = pkgs.writeShellApplication {
|
||||||
name = "wallpaper";
|
name = "wallpaper";
|
||||||
runtimeInputs = with pkgs; [ findutils coreutils feh swaybg fzf viu ];
|
runtimeInputs = with pkgs; [ findutils coreutils feh hyprland jq fzf viu ];
|
||||||
text = builtins.readFile ./wallpaper.sh;
|
text = builtins.readFile ./wallpaper.sh;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
|
@ -14,23 +14,20 @@ function help() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function randomWallpaper() {
|
function randomWallpaper() {
|
||||||
echo "$WALLPAPERS" | shuf -n 1
|
find ~/.config/wallpapers/ -type f,l | shuf -n 1
|
||||||
}
|
|
||||||
|
|
||||||
function setWallpaperX {
|
|
||||||
feh --bg-fill "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
function setWallpaperWayland {
|
|
||||||
swaybg --mode fill -i "$1" 2>/dev/null &
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function setWallpaper() {
|
function setWallpaper() {
|
||||||
if [[ -z ${WAYLAND_DISPLAY+x} ]]; then
|
case "${XDG_CURRENT_DESKTOP,,}" in
|
||||||
setWallpaperX "$1"
|
hyprland)
|
||||||
else
|
hyprctl hyprpaper preload "$1" &>/dev/null
|
||||||
setWallpaperWayland "$1"
|
hyprctl monitors -j | jq '.[].name' | xargs -I{} -P 0 hyprctl hyprpaper wallpaper '{}',"$1" &>/dev/null
|
||||||
fi
|
hyprctl hyprpaper unload all &>/dev/null
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
feh --bg-fill "$1" &>/dev/null
|
||||||
|
;;
|
||||||
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
# Parse arguments
|
# Parse arguments
|
||||||
|
|
|
@ -19,7 +19,7 @@ in
|
||||||
|
|
||||||
users.users.moritz = {
|
users.users.moritz = {
|
||||||
extraGroups = [ "libvirtd" ];
|
extraGroups = [ "libvirtd" ];
|
||||||
packages = with pkgs; [ virt-manager virt-viewer ];
|
packages = with pkgs; [ virt-manager ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,4 +22,12 @@ final: prev: {
|
||||||
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
--add-flags "--socket=wayland --enable-features=UseOzonePlatform --ozone-platform=wayland"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
waybar-hyprland = prev.waybar.overrideAttrs (old: {
|
||||||
|
pname = "${old.pname}-hyprland";
|
||||||
|
postPatch = old.postPatch or "" + ''
|
||||||
|
sed -i 's,zext_workspace_handle_v1_activate(workspace_handle_);,const std::string command = "${final.hyprland}/bin/hyprctl dispatch workspace " + name_;\n\tsystem(command.c_str());,g' src/modules/wlr/workspace_manager.cpp
|
||||||
|
'';
|
||||||
|
mesonFlags = old.mesonFlags or [ ] ++ [ "-Dexperimental=true" ];
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue