Compare commits
No commits in common. "58c8efa332ca7f7f786e1789f75c88c2e6e5aac4" and "41369784d264ae6943b195ecf1ee9ad614c576a5" have entirely different histories.
58c8efa332
...
41369784d2
12 changed files with 86 additions and 131 deletions
|
@ -19,7 +19,7 @@
|
||||||
profiles = {
|
profiles = {
|
||||||
desktop.enable = true;
|
desktop.enable = true;
|
||||||
personal.enable = true;
|
personal.enable = true;
|
||||||
webis.enable = true;
|
# webis.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@
|
||||||
rootFsOptions = {
|
rootFsOptions = {
|
||||||
compression = "zstd";
|
compression = "zstd";
|
||||||
"com.sun:auto-snapshot" = "false";
|
"com.sun:auto-snapshot" = "false";
|
||||||
"acltype" = "posixacl"; # NOTE: needed for systemd https://github.com/NixOS/nixpkgs/issues/16954
|
|
||||||
};
|
};
|
||||||
mountpoint = null;
|
mountpoint = null;
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
".local/share/zoxide"
|
".local/share/zoxide"
|
||||||
".local/state/nvim"
|
".local/state/nvim"
|
||||||
".config/kdeconnect"
|
".config/kdeconnect"
|
||||||
".cat_installer" # eduroam
|
|
||||||
".mozilla"
|
".mozilla"
|
||||||
"Documents"
|
"Documents"
|
||||||
"Downloads"
|
"Downloads"
|
||||||
|
|
|
@ -100,14 +100,10 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
startInBackground = true;
|
startInBackground = true;
|
||||||
};
|
};
|
||||||
systemd.user.services.nextcloud-client.Service = {
|
|
||||||
RestartSec = "500ms";
|
|
||||||
Restart = "on-failure";
|
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
illum.enable = true;
|
illum.enable = true;
|
||||||
|
resolved.enable = true;
|
||||||
gnome.gnome-keyring.enable = true;
|
gnome.gnome-keyring.enable = true;
|
||||||
pipewire = {
|
pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -115,16 +111,5 @@ in
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# faster startup https://majiehong.com/post/2021-07-30_slow_nixos_startup/
|
|
||||||
networking = {
|
|
||||||
# no need to wait interfaces to have an IP to continue booting
|
|
||||||
dhcpcd.wait = "background";
|
|
||||||
# avoid checking if IP is already taken to boot a few seconds faster
|
|
||||||
dhcpcd.extraConfig = "noarp";
|
|
||||||
};
|
|
||||||
# disable network-online.target
|
|
||||||
systemd.services.NetworkManager-wait-online.enable = false;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -155,7 +155,6 @@ in
|
||||||
bind = $mainMod , M , exec , hyprctl keyword general:layout master
|
bind = $mainMod , M , exec , hyprctl keyword general:layout master
|
||||||
bind = $mainMod , R , exec , rofi -show combi
|
bind = $mainMod , R , exec , rofi -show combi
|
||||||
bind = $mainMod , RETURN , exec , kitty
|
bind = $mainMod , RETURN , exec , kitty
|
||||||
bind = $mainMod SHIFT , RETURN , exec , kitty -- tmux new -A -s home
|
|
||||||
|
|
||||||
# XF86 keys
|
# XF86 keys
|
||||||
binde = , XF86AudioLowerVolume , exec , pamixer -d 5
|
binde = , XF86AudioLowerVolume , exec , pamixer -d 5
|
||||||
|
@ -166,57 +165,57 @@ in
|
||||||
bind = , XF86AudioPrev , exec , playerctl -p "spotifyd,firefox" previous
|
bind = , XF86AudioPrev , exec , playerctl -p "spotifyd,firefox" previous
|
||||||
|
|
||||||
# Move focus with mainMod + hjkl
|
# Move focus with mainMod + hjkl
|
||||||
binde = $mainMod , H , movefocus , l
|
binde = $mainMod, H, movefocus, l
|
||||||
binde = $mainMod , L , movefocus , r
|
binde = $mainMod, L, movefocus, r
|
||||||
binde = $mainMod , K , movefocus , u
|
binde = $mainMod, K, movefocus, u
|
||||||
binde = $mainMod , J , movefocus , d
|
binde = $mainMod, J, movefocus, d
|
||||||
|
|
||||||
# Change current active window size with mainMod + SHIFT + hjkl
|
# Change current active window size with mainMod + SHIFT + hjkl
|
||||||
binde = $mainMod SHIFT , H , resizeactive , -10 0
|
binde = $mainMod SHIFT, H, resizeactive, -10 0
|
||||||
binde = $mainMod SHIFT , J , resizeactive , 0 10
|
binde = $mainMod SHIFT, J, resizeactive, 0 10
|
||||||
binde = $mainMod SHIFT , K , resizeactive , 0 -10
|
binde = $mainMod SHIFT, K, resizeactive, 0 -10
|
||||||
binde = $mainMod SHIFT , L , resizeactive , 10 0
|
binde = $mainMod SHIFT, L, resizeactive, 10 0
|
||||||
|
|
||||||
# Move current active window with mainMod + ALT + hjkl
|
# Move current active window with mainMod + ALT + hjkl
|
||||||
bind = $mainMod ALT , H , movewindow , l
|
bind = $mainMod ALT, H, movewindow, l
|
||||||
bind = $mainMod ALT , J , movewindow , d
|
bind = $mainMod ALT, J, movewindow, d
|
||||||
bind = $mainMod ALT , K , movewindow , u
|
bind = $mainMod ALT, K, movewindow, u
|
||||||
bind = $mainMod ALT , L , movewindow , r
|
bind = $mainMod ALT, L, movewindow, r
|
||||||
|
|
||||||
# Switch workspaces with mainMod + [0-9]
|
# Switch workspaces with mainMod + [0-9]
|
||||||
bind = $mainMod , 1 , workspace , 1
|
bind = $mainMod, 1, workspace, 1
|
||||||
bind = $mainMod , 2 , workspace , 2
|
bind = $mainMod, 2, workspace, 2
|
||||||
bind = $mainMod , 3 , workspace , 3
|
bind = $mainMod, 3, workspace, 3
|
||||||
bind = $mainMod , 4 , workspace , 4
|
bind = $mainMod, 4, workspace, 4
|
||||||
bind = $mainMod , 5 , workspace , 5
|
bind = $mainMod, 5, workspace, 5
|
||||||
bind = $mainMod , 6 , workspace , 6
|
bind = $mainMod, 6, workspace, 6
|
||||||
bind = $mainMod , 7 , workspace , 7
|
bind = $mainMod, 7, workspace, 7
|
||||||
bind = $mainMod , 8 , workspace , 8
|
bind = $mainMod, 8, workspace, 8
|
||||||
bind = $mainMod , 9 , workspace , 9
|
bind = $mainMod, 9, workspace, 9
|
||||||
bind = $mainMod , 0 , workspace , 10
|
bind = $mainMod, 0, workspace, 10
|
||||||
|
|
||||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||||
bind = $mainMod SHIFT , 1 , movetoworkspace , 1
|
bind = $mainMod SHIFT, 1, movetoworkspace, 1
|
||||||
bind = $mainMod SHIFT , 2 , movetoworkspace , 2
|
bind = $mainMod SHIFT, 2, movetoworkspace, 2
|
||||||
bind = $mainMod SHIFT , 3 , movetoworkspace , 3
|
bind = $mainMod SHIFT, 3, movetoworkspace, 3
|
||||||
bind = $mainMod SHIFT , 4 , movetoworkspace , 4
|
bind = $mainMod SHIFT, 4, movetoworkspace, 4
|
||||||
bind = $mainMod SHIFT , 5 , movetoworkspace , 5
|
bind = $mainMod SHIFT, 5, movetoworkspace, 5
|
||||||
bind = $mainMod SHIFT , 6 , movetoworkspace , 6
|
bind = $mainMod SHIFT, 6, movetoworkspace, 6
|
||||||
bind = $mainMod SHIFT , 7 , movetoworkspace , 7
|
bind = $mainMod SHIFT, 7, movetoworkspace, 7
|
||||||
bind = $mainMod SHIFT , 8 , movetoworkspace , 8
|
bind = $mainMod SHIFT, 8, movetoworkspace, 8
|
||||||
bind = $mainMod SHIFT , 9 , movetoworkspace , 9
|
bind = $mainMod SHIFT, 9, movetoworkspace, 9
|
||||||
bind = $mainMod SHIFT , 0 , movetoworkspace , 10
|
bind = $mainMod SHIFT, 0, movetoworkspace, 10
|
||||||
|
|
||||||
# Scroll through existing workspaces with mainMod + scroll
|
# Scroll through existing workspaces with mainMod + scroll
|
||||||
bind = $mainMod , mouse_down , workspace , e+1
|
bind = $mainMod, mouse_down, workspace, e+1
|
||||||
bind = $mainMod , mouse_up , workspace , e-1
|
bind = $mainMod, mouse_up, workspace, e-1
|
||||||
|
|
||||||
# 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
|
||||||
|
|
||||||
# Toggle waybar
|
# Toggle waybar
|
||||||
bindr = $mainMod , SUPER_L , exec , pkill -USR1 waybar
|
bindr = $mainMod, SUPER_L, exec, pkill -USR1 waybar
|
||||||
|
|
||||||
# Extra Config
|
# Extra Config
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{ config
|
{ config
|
||||||
, lib
|
, lib
|
||||||
, pkgs
|
, pkgs
|
||||||
|
, inputs
|
||||||
, ...
|
, ...
|
||||||
} @ args:
|
} @ args:
|
||||||
|
|
||||||
|
@ -8,7 +9,8 @@ with lib;
|
||||||
let
|
let
|
||||||
cfg = config.my.programs.hyprland;
|
cfg = config.my.programs.hyprland;
|
||||||
|
|
||||||
hyprland = config.programs.hyprland.finalPackage;
|
hyprland-nvidia = pkgs.hyprland.override { enableNvidiaPatches = true; };
|
||||||
|
hyprland = if cfg.nvidiaSupport then hyprland-nvidia else pkgs.hyprland;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.my.programs.hyprland = {
|
options.my.programs.hyprland = {
|
||||||
|
@ -48,33 +50,16 @@ in
|
||||||
rofi.enable = true;
|
rofi.enable = true;
|
||||||
};
|
};
|
||||||
wallpapers.enable = true;
|
wallpapers.enable = true;
|
||||||
services = {
|
services.dunst.enable = true;
|
||||||
dunst.enable = true;
|
services.wallpaper.enable = true;
|
||||||
wallpaper = {
|
|
||||||
enable = true;
|
|
||||||
target = "hyprland-session.target";
|
|
||||||
};
|
|
||||||
spotify-player.target = "hyprland-session.target";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.hyprland = {
|
|
||||||
enable = true;
|
|
||||||
enableNvidiaPatches = cfg.nvidiaSupport;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager.users.moritz = {
|
home-manager.users.moritz = {
|
||||||
# enable home-manager module
|
# enable home-manager module
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableNvidiaPatches = cfg.nvidiaSupport;
|
package = hyprland;
|
||||||
extraConfig = import ./_config.nix args;
|
extraConfig = import ./_config.nix args;
|
||||||
systemd.extraCommands = [
|
|
||||||
"systemctl --user stop hyprland-session.target"
|
|
||||||
"sleep 1.5"
|
|
||||||
"systemctl --user start hyprland-session.target"
|
|
||||||
"systemctl --user start xdg-desktop-portal-hyprland.service"
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# add waybar as a status bar
|
# add waybar as a status bar
|
||||||
|
@ -84,7 +69,7 @@ in
|
||||||
# start using systemd service
|
# start using systemd service
|
||||||
systemd = {
|
systemd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
target = "hyprland-session.target";
|
target = "graphical-session.target";
|
||||||
};
|
};
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
|
@ -143,13 +128,23 @@ in
|
||||||
timeout = 30 * 60;
|
timeout = 30 * 60;
|
||||||
command = "${pkgs.systemd}/bin/systemctl suspend-and-hibernate";
|
command = "${pkgs.systemd}/bin/systemctl suspend-and-hibernate";
|
||||||
};
|
};
|
||||||
systemdTarget = "hyprland-session.target";
|
systemdTarget = "graphical-session.target";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.user.services.nextcloud-client.Service = {
|
||||||
|
RestartSec = "500ms";
|
||||||
|
Restart = "on-failure";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# adds pam module for swaylock
|
# adds pam module for swaylock
|
||||||
security.pam.services.swaylock = { };
|
security.pam.services.swaylock = { };
|
||||||
|
|
||||||
|
systemd.user.services.xdg-desktop-portal-hyprland = {
|
||||||
|
after = [ "hyprland-session.target" ];
|
||||||
|
requiredBy = [ "xdg-desktop-portal.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
# add user packages for wayland and hyprland in particular
|
# add user packages for wayland and hyprland in particular
|
||||||
users.users.moritz.packages = with pkgs; [
|
users.users.moritz.packages = with pkgs; [
|
||||||
brightnessctl # control brightness
|
brightnessctl # control brightness
|
||||||
|
@ -182,6 +177,7 @@ in
|
||||||
__GL_VRR_ALLOWED = "0";
|
__GL_VRR_ALLOWED = "0";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
dbus.enable = true;
|
dbus.enable = true;
|
||||||
# use pipewire (needed for screensharing)
|
# use pipewire (needed for screensharing)
|
||||||
|
@ -200,31 +196,18 @@ in
|
||||||
user = "moritz";
|
user = "moritz";
|
||||||
};
|
};
|
||||||
defaultSession = "hyprland";
|
defaultSession = "hyprland";
|
||||||
|
sessionPackages = [ hyprland ]; # can't set the defaultSession otherwise
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
|
|
||||||
home-manager.users.moritz.systemd.user.services =
|
|
||||||
let
|
|
||||||
units = [ "waybar" ];
|
|
||||||
mkAfter = _: {
|
|
||||||
Unit = {
|
|
||||||
After = [ "hyprland-session.target" ];
|
|
||||||
Wants = [ "hyprland-session.target" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in
|
|
||||||
genAttrs units mkAfter;
|
|
||||||
|
|
||||||
systemd.user.services =
|
# desktop portal (for screensharing)
|
||||||
let
|
xdg.portal = {
|
||||||
units = [ "pipewire" "xdg-desktop-portal" "xdg-desktop-portal-hyprland" "wireplumber" ];
|
enable = true;
|
||||||
mkAfter = _: {
|
wlr.enable = mkForce false;
|
||||||
after = [ "hyprland-session.target" ];
|
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||||
wants = [ "hyprland-session.target" ];
|
|
||||||
};
|
};
|
||||||
in
|
|
||||||
genAttrs units mkAfter;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,7 +36,6 @@ in
|
||||||
fish
|
fish
|
||||||
isort
|
isort
|
||||||
jq
|
jq
|
||||||
nil
|
|
||||||
nixd
|
nixd
|
||||||
nixpkgs-fmt
|
nixpkgs-fmt
|
||||||
nodePackages.bash-language-server
|
nodePackages.bash-language-server
|
||||||
|
|
|
@ -134,12 +134,11 @@ end
|
||||||
|
|
||||||
local servers = {
|
local servers = {
|
||||||
"bashls",
|
"bashls",
|
||||||
"gopls",
|
|
||||||
"nil_ls",
|
|
||||||
"nixd",
|
"nixd",
|
||||||
"pylsp",
|
"pylsp",
|
||||||
"ruff_lsp",
|
"ruff_lsp",
|
||||||
"typst_lsp",
|
"typst_lsp",
|
||||||
|
"gopls",
|
||||||
}
|
}
|
||||||
for _, lsp in ipairs(servers) do
|
for _, lsp in ipairs(servers) do
|
||||||
lspconfig_setup(lsp, {})
|
lspconfig_setup(lsp, {})
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
local telekasten = require("telekasten")
|
local telekasten = require("telekasten")
|
||||||
telekasten.setup({
|
telekasten.setup({
|
||||||
home = vim.fn.expand("~/Documents/Nextcloud/Notes/zettelkasten"),
|
home = vim.fn.expand("~/Nextcloud/Notes/zettelkasten"),
|
||||||
auto_set_filetype = false,
|
auto_set_filetype = false,
|
||||||
image_subdir = "assets",
|
image_subdir = "assets",
|
||||||
})
|
})
|
||||||
|
|
|
@ -30,10 +30,6 @@ in
|
||||||
type = types.package;
|
type = types.package;
|
||||||
default = pkgs.spotify-player;
|
default = pkgs.spotify-player;
|
||||||
};
|
};
|
||||||
target = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "graphical-session.target";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
@ -48,8 +44,9 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
systemd.user.services.spotify-player = {
|
systemd.user.services.spotify-player = {
|
||||||
after = [ cfg.target "network.target" ];
|
after = [ "graphical-session.target" "network.target" ];
|
||||||
wantedBy = [ cfg.target ];
|
partOf = [ "graphical-session.target" ];
|
||||||
|
wantedBy = [ "graphical-session.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "forking";
|
Type = "forking";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
|
|
@ -10,17 +10,12 @@ in
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = "30m";
|
default = "30m";
|
||||||
};
|
};
|
||||||
target = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
default = "graphical-session.target";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.user.services.wallpaper = {
|
systemd.user.services.wallpaper = {
|
||||||
script = "${getExe config.my.programs.wallpaper.package} -r -v";
|
script = "${getExe config.my.programs.wallpaper.package} -r -v";
|
||||||
wantedBy = [ cfg.target ];
|
wantedBy = [ "graphical-session.target" ];
|
||||||
after = [ cfg.target ];
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RuntimeMaxSec = cfg.frequency;
|
RuntimeMaxSec = cfg.frequency;
|
||||||
|
|
Binary file not shown.
Loading…
Reference in a new issue