diff --git a/_typos.toml b/_typos.toml index a2f7f59..a44fcd3 100644 --- a/_typos.toml +++ b/_typos.toml @@ -5,3 +5,7 @@ extend-ignore-re = ['[a-fA-F0-9]{6}'] [default.extend-words] doas = "doas" edn = "edn" + +[type.images] +extend-glob = ["*.png"] +check-file = false diff --git a/flake.lock b/flake.lock index b2a27c6..9e24a79 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1713077896, - "narHash": "sha256-Noot8H0EZEAFRQWyGxh9ryvhK96xpIqKbh78X447JWs=", + "lastModified": 1714515075, + "narHash": "sha256-azMK7aWH0eUc3IqU4Fg5rwZdB9WZBvimOGG3piqvtsY=", "owner": "nix-community", "repo": "home-manager", - "rev": "630a0992b3627c64e34f179fab68e3d48c6991c0", + "rev": "6d3b6dc9222c12b951169becdf4b0592ee9576ef", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1712963716, - "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", "type": "github" }, "original": { @@ -37,11 +37,11 @@ }, "nur": { "locked": { - "lastModified": 1713113175, - "narHash": "sha256-E/WxD3Nh4kd3AYYLk8UyMnkUm9AMT3zUk/rBI4Qjk04=", + "lastModified": 1714596740, + "narHash": "sha256-V3ZR38xu3JSUrg04wMTp0fzDSP+ogNJOOU5ckreCzLQ=", "owner": "nix-community", "repo": "NUR", - "rev": "90060445d9ee7b731c147b2caa53dc45d557bce9", + "rev": "c8456769a0904ac761020a76bf0bb72a92c27c7c", "type": "github" }, "original": { diff --git a/hosts/luci/files/lockscreen.png b/hosts/luci/files/lockscreen.png new file mode 100644 index 0000000..4094671 Binary files /dev/null and b/hosts/luci/files/lockscreen.png differ diff --git a/hosts/luci/files/wallpaper.png b/hosts/luci/files/wallpaper.png new file mode 100644 index 0000000..cc73b58 Binary files /dev/null and b/hosts/luci/files/wallpaper.png differ diff --git a/hosts/luci/home-config.nix b/hosts/luci/home-config.nix index b8f7836..d09db33 100644 --- a/hosts/luci/home-config.nix +++ b/hosts/luci/home-config.nix @@ -25,6 +25,8 @@ desktop.sway = { enable = true; kanshi = true; + wallpapers.lockscreen = "${./files/lockscreen.png}"; + wallpapers.desktop = "${./files/wallpaper.png} center #000000"; waybar = { laptop = true; gpuThermal = { diff --git a/home-manager/hosts/luci.nix b/hosts/luci/includes/home-manager.nix similarity index 74% rename from home-manager/hosts/luci.nix rename to hosts/luci/includes/home-manager.nix index d4b03b6..5ebec63 100644 --- a/home-manager/hosts/luci.nix +++ b/hosts/luci/includes/home-manager.nix @@ -1,4 +1,6 @@ -_: { +_: +{ + ## Specific host home manager configuration wayland.windowManager.sway.config = { input = { "1:1:AT_Translated_Set_2_keyboard" = { @@ -13,11 +15,5 @@ _: { "pointer_accel" = "0.3"; }; }; - - output = { - "*" = { - bg = "~/medias/images/wallpapers/wallpaper.png center #000000"; - }; - }; }; } diff --git a/modules/home-manager/desktop/sway/default.nix b/modules/home-manager/desktop/sway/default.nix index 4ea96f4..f7d40e0 100644 --- a/modules/home-manager/desktop/sway/default.nix +++ b/modules/home-manager/desktop/sway/default.nix @@ -13,6 +13,19 @@ in description = "configure laptop mode"; }; + wallpapers = { + lockscreen = mkOption { + type = types.str; + default = ""; + description = "path for lockscreen wallpaper"; + }; + desktop = mkOption { + type = types.str; + default = ""; + description = "path for desktop wallpaper"; + }; + }; + waybar = { laptop = mkOption { type = types.bool; @@ -130,7 +143,7 @@ in qt = { enable = true; - platformTheme = "gnome"; + platformTheme.name = "adwaita"; style.name = "adwaita-dark"; }; xdg = { diff --git a/modules/home-manager/desktop/sway/includes/sway.nix b/modules/home-manager/desktop/sway/includes/sway.nix index 4fad68c..c398807 100644 --- a/modules/home-manager/desktop/sway/includes/sway.nix +++ b/modules/home-manager/desktop/sway/includes/sway.nix @@ -1,5 +1,8 @@ { config, pkgs, lib, ... }: with lib; +let + cfg = config.modules.desktop.sway; +in { config = mkIf config.modules.desktop.sway.enable { wayland.windowManager.sway = { @@ -20,6 +23,11 @@ with lib; xkb_variant = "altgr-intl"; }; }; + output = { + "*" = { + bg = "${cfg.wallpapers.desktop}"; + }; + }; seat = { "*".hide_cursor = "when-typing enable"; }; diff --git a/modules/home-manager/desktop/sway/includes/swaylock.nix b/modules/home-manager/desktop/sway/includes/swaylock.nix index a8890a4..527f777 100644 --- a/modules/home-manager/desktop/sway/includes/swaylock.nix +++ b/modules/home-manager/desktop/sway/includes/swaylock.nix @@ -1,11 +1,14 @@ { config, lib, ... }: with lib; +let + cfg = config.modules.desktop.sway; +in { config = mkIf config.modules.desktop.sway.enable { programs.swaylock = { enable = true; settings = { - image = "~/medias/images/wallpapers/lockscreen.png"; + image = "${cfg.wallpapers.lockscreen}"; scaling = "center"; color = "000000"; indicator-radius = 70; diff --git a/nixos/default.nix b/nixos/default.nix index ac970c6..a32272a 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -55,8 +55,8 @@ ../hosts/${hostname}/home-config.nix ../modules/home-manager/default.nix ] ++ lib.optional ( - builtins.pathExists ../home-manager/hosts/${hostname}.nix - ) ../home-manager/hosts/${hostname}.nix; + builtins.pathExists ../hosts/${hostname}/includes/home-manager.nix + ) ../hosts/${hostname}/includes/home-manager.nix; }; };