1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

feat: use extra-modules to set wallpaper

This commit is contained in:
oddlama 2023-12-25 18:13:29 +01:00
parent 3036c53d87
commit d10cd74dc6
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
3 changed files with 11 additions and 36 deletions

6
flake.lock generated
View file

@ -405,11 +405,11 @@
"pre-commit-hooks": "pre-commit-hooks_3"
},
"locked": {
"lastModified": 1703274528,
"narHash": "sha256-r5y1DmRxlKF3rlJoIULeq1lGVGWbTZxmNGlQ0jW8ZjQ=",
"lastModified": 1703523999,
"narHash": "sha256-pKuYDvGYo6ufevbylNo6P6qjwrUHk0ENpFXrP7KU/wY=",
"owner": "oddlama",
"repo": "nixos-extra-modules",
"rev": "f4a871a401059ff0662ef86a059742d47d45a5bc",
"rev": "bc948ad1abed5eef3f8a10f5b44dc5bcd94d725a",
"type": "github"
},
"original": {

View file

@ -9,9 +9,10 @@
useUserPackages = true;
verbose = true;
sharedModules = [
inputs.extra-modules.homeManagerModules.default
inputs.nix-index-database.hmModules.nix-index
inputs.wired-notify.homeManagerModules.default
inputs.nixvim.homeManagerModules.nixvim
inputs.wired-notify.homeManagerModules.default
{
home.stateVersion = config.system.stateVersion;
}

View file

@ -54,6 +54,7 @@ in {
xsession.numlock.enable = true;
xsession.windowManager.i3 = {
enable = true;
enableSystemdTarget = true;
config = {
modifier = "Mod4";
terminal = "kitty";
@ -201,11 +202,6 @@ in {
};
};
in [
{
command = "${pkgs.systemd}/bin/systemctl --user start i3-session.target";
always = false;
notification = false;
}
{
command = "${getExe i3-per-workspace-layout} --config ${configLayouts}";
always = false;
@ -215,33 +211,9 @@ in {
};
};
systemd.user = {
targets.i3-session = {
Unit = {
Description = "i3 session";
Documentation = ["man:systemd.special(7)"];
BindsTo = ["graphical-session.target"];
Wants = ["graphical-session-pre.target"];
After = ["graphical-session-pre.target"];
};
};
services = {
#feh = {
# Unit = {
# Description = "feh background";
# PartOf = [ "i3-session.target" ];
# After = [ "xrandr.service" "picom.service" ];
# };
# Service = {
# ExecStart = "${pkgs.feh}/bin/feh --bg-fill ${config.xdg.dataHome}/wall.png";
# RemainAfterExit = true;
# Type = "oneshot";
# };
# Install.WantedBy = [ "i3-session.target" ];
#};
wired.Install.WantedBy = lib.mkForce ["i3-session.target"];
flameshot.Install.WantedBy = lib.mkForce ["i3-session.target"];
};
systemd.user.services = {
wired.Install.WantedBy = lib.mkForce ["i3-session.target"];
flameshot.Install.WantedBy = lib.mkForce ["i3-session.target"];
};
programs.autorandr.enable = true;
@ -284,6 +256,8 @@ in {
QT_SCREEN_SCALE_FACTORS = 2;
};
xsession.wallpapers.enable = true;
home.file.".xinitrc".text = ''
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
eval $(dbus-launch --exit-with-session --sh-syntax)