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 = {
|
||||
desktop.enable = true;
|
||||
personal.enable = true;
|
||||
webis.enable = true;
|
||||
# webis.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@
|
|||
rootFsOptions = {
|
||||
compression = "zstd";
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
"acltype" = "posixacl"; # NOTE: needed for systemd https://github.com/NixOS/nixpkgs/issues/16954
|
||||
};
|
||||
mountpoint = null;
|
||||
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
".local/share/zoxide"
|
||||
".local/state/nvim"
|
||||
".config/kdeconnect"
|
||||
".cat_installer" # eduroam
|
||||
".mozilla"
|
||||
"Documents"
|
||||
"Downloads"
|
||||
|
|
|
@ -100,14 +100,10 @@ in
|
|||
enable = true;
|
||||
startInBackground = true;
|
||||
};
|
||||
systemd.user.services.nextcloud-client.Service = {
|
||||
RestartSec = "500ms";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
illum.enable = true;
|
||||
resolved.enable = true;
|
||||
gnome.gnome-keyring.enable = true;
|
||||
pipewire = {
|
||||
enable = true;
|
||||
|
@ -115,16 +111,5 @@ in
|
|||
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 , R , exec , rofi -show combi
|
||||
bind = $mainMod , RETURN , exec , kitty
|
||||
bind = $mainMod SHIFT , RETURN , exec , kitty -- tmux new -A -s home
|
||||
|
||||
# XF86 keys
|
||||
binde = , XF86AudioLowerVolume , exec , pamixer -d 5
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, inputs
|
||||
, ...
|
||||
} @ args:
|
||||
|
||||
|
@ -8,7 +9,8 @@ with lib;
|
|||
let
|
||||
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
|
||||
{
|
||||
options.my.programs.hyprland = {
|
||||
|
@ -48,33 +50,16 @@ in
|
|||
rofi.enable = true;
|
||||
};
|
||||
wallpapers.enable = true;
|
||||
services = {
|
||||
dunst.enable = true;
|
||||
wallpaper = {
|
||||
enable = true;
|
||||
target = "hyprland-session.target";
|
||||
};
|
||||
spotify-player.target = "hyprland-session.target";
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
enableNvidiaPatches = cfg.nvidiaSupport;
|
||||
services.dunst.enable = true;
|
||||
services.wallpaper.enable = true;
|
||||
};
|
||||
|
||||
home-manager.users.moritz = {
|
||||
# enable home-manager module
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
enableNvidiaPatches = cfg.nvidiaSupport;
|
||||
package = hyprland;
|
||||
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
|
||||
|
@ -84,7 +69,7 @@ in
|
|||
# start using systemd service
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "hyprland-session.target";
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
|
||||
settings = {
|
||||
|
@ -143,13 +128,23 @@ in
|
|||
timeout = 30 * 60;
|
||||
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
|
||||
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
|
||||
users.users.moritz.packages = with pkgs; [
|
||||
brightnessctl # control brightness
|
||||
|
@ -182,6 +177,7 @@ in
|
|||
__GL_VRR_ALLOWED = "0";
|
||||
});
|
||||
|
||||
|
||||
services = {
|
||||
dbus.enable = true;
|
||||
# use pipewire (needed for screensharing)
|
||||
|
@ -200,31 +196,18 @@ in
|
|||
user = "moritz";
|
||||
};
|
||||
defaultSession = "hyprland";
|
||||
sessionPackages = [ hyprland ]; # can't set the defaultSession otherwise
|
||||
};
|
||||
};
|
||||
};
|
||||
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 =
|
||||
let
|
||||
units = [ "pipewire" "xdg-desktop-portal" "xdg-desktop-portal-hyprland" "wireplumber" ];
|
||||
mkAfter = _: {
|
||||
after = [ "hyprland-session.target" ];
|
||||
wants = [ "hyprland-session.target" ];
|
||||
# desktop portal (for screensharing)
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
wlr.enable = mkForce false;
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-hyprland ];
|
||||
};
|
||||
in
|
||||
genAttrs units mkAfter;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -36,7 +36,6 @@ in
|
|||
fish
|
||||
isort
|
||||
jq
|
||||
nil
|
||||
nixd
|
||||
nixpkgs-fmt
|
||||
nodePackages.bash-language-server
|
||||
|
|
|
@ -134,12 +134,11 @@ end
|
|||
|
||||
local servers = {
|
||||
"bashls",
|
||||
"gopls",
|
||||
"nil_ls",
|
||||
"nixd",
|
||||
"pylsp",
|
||||
"ruff_lsp",
|
||||
"typst_lsp",
|
||||
"gopls",
|
||||
}
|
||||
for _, lsp in ipairs(servers) do
|
||||
lspconfig_setup(lsp, {})
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
local telekasten = require("telekasten")
|
||||
telekasten.setup({
|
||||
home = vim.fn.expand("~/Documents/Nextcloud/Notes/zettelkasten"),
|
||||
home = vim.fn.expand("~/Nextcloud/Notes/zettelkasten"),
|
||||
auto_set_filetype = false,
|
||||
image_subdir = "assets",
|
||||
})
|
||||
|
|
|
@ -30,10 +30,6 @@ in
|
|||
type = types.package;
|
||||
default = pkgs.spotify-player;
|
||||
};
|
||||
target = mkOption {
|
||||
type = types.str;
|
||||
default = "graphical-session.target";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
|
@ -48,8 +44,9 @@ in
|
|||
}
|
||||
];
|
||||
systemd.user.services.spotify-player = {
|
||||
after = [ cfg.target "network.target" ];
|
||||
wantedBy = [ cfg.target ];
|
||||
after = [ "graphical-session.target" "network.target" ];
|
||||
partOf = [ "graphical-session.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "forking";
|
||||
Restart = "always";
|
||||
|
|
|
@ -10,17 +10,12 @@ in
|
|||
type = types.str;
|
||||
default = "30m";
|
||||
};
|
||||
target = mkOption {
|
||||
type = types.str;
|
||||
default = "graphical-session.target";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.wallpaper = {
|
||||
script = "${getExe config.my.programs.wallpaper.package} -r -v";
|
||||
wantedBy = [ cfg.target ];
|
||||
after = [ cfg.target ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RuntimeMaxSec = cfg.frequency;
|
||||
|
|
Binary file not shown.
Loading…
Reference in a new issue