From 11e8f2f8c6c712efd65fdff2052e1885e0b8fbed Mon Sep 17 00:00:00 2001 From: Martin Berg Alstad Date: Wed, 2 Apr 2025 20:09:55 +0200 Subject: [PATCH] :sparkles: Grayjay, Imv, updated dependencies - Added Grayjay flake - Added imv - Set imv as default image viewer - Changed catppuccin homeManagerModules to homeModules - Media dir in home dir for media config - pkg-config for rust development - Removed Loupe image viewer - Moved mpv to media dir --- configuration.nix | 7 +- flake.lock | 158 ++++++++++++++------------ flake.nix | 1 + home-manager/default-applications.nix | 2 +- home-manager/default.nix | 4 +- home-manager/media/default.nix | 6 + home-manager/media/imv.nix | 10 ++ home-manager/{ => media}/mpv.nix | 0 home-manager/yazi/default.nix | 1 - modules/development/rust.nix | 18 ++- modules/gnome/default.nix | 2 +- 11 files changed, 121 insertions(+), 88 deletions(-) create mode 100644 home-manager/media/default.nix create mode 100644 home-manager/media/imv.nix rename home-manager/{ => media}/mpv.nix (100%) diff --git a/configuration.nix b/configuration.nix index 0295833..73c5636 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,11 +1,11 @@ { pkgs, + inputs, outputs, + common, ... }: -let - common = import ./common.nix; -in + { imports = [ ./modules ]; @@ -51,6 +51,7 @@ in vlc vdhcoapp # TODO run "vdhcoapp install" on startup onlyoffice-desktopeditors + inputs.grayjay.packages.${pkgs.system}.grayjay ]; nix.settings.experimental-features = [ diff --git a/flake.lock b/flake.lock index 195efe2..a360bc3 100644 --- a/flake.lock +++ b/flake.lock @@ -3,10 +3,7 @@ "ags": { "inputs": { "astal": "astal", - "nixpkgs": [ - "hyprpanel", - "nixpkgs" - ] + "nixpkgs": ["hyprpanel", "nixpkgs"] }, "locked": { "lastModified": 1736090999, @@ -24,11 +21,7 @@ }, "astal": { "inputs": { - "nixpkgs": [ - "hyprpanel", - "ags", - "nixpkgs" - ] + "nixpkgs": ["hyprpanel", "ags", "nixpkgs"] }, "locked": { "lastModified": 1735172721, @@ -49,11 +42,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1741424456, - "narHash": "sha256-46m7KqjSoabM5JdqP8Om9+PWioRy0uU746MZuLyw/6o=", + "lastModified": 1743414153, + "narHash": "sha256-bFIXz7SvLlSNR4M3vYPYS1CpEN9vTUiH01R4iR/BDmA=", "owner": "catppuccin", "repo": "nix", - "rev": "dc7e553e91c37cec5083ac5cfaff6a28565d1334", + "rev": "2f52f9ead26f80d7b391cedcbb3eb309bd83fff4", "type": "github" }, "original": { @@ -64,17 +57,14 @@ }, "flake-parts": { "inputs": { - "nixpkgs-lib": [ - "nixvim", - "nixpkgs" - ] + "nixpkgs-lib": ["nixvim", "nixpkgs"] }, "locked": { - "lastModified": 1738453229, - "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", + "lastModified": 1743550720, + "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", + "rev": "c621e8422220273271f52058f618c94e405bb0f5", "type": "github" }, "original": { @@ -101,18 +91,34 @@ "type": "github" } }, - "home-manager": { + "grayjay": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ] + "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1739757849, - "narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=", + "lastModified": 1743563044, + "narHash": "sha256-UkykPaJt9Yr8YbBg34Bnh4wE+J2sksSDFdaalfnkG6k=", + "owner": "rishabh5321", + "repo": "grayjay-flake", + "rev": "82a651064b00480042d1b7f180ca77e04ea08689", + "type": "github" + }, + "original": { + "owner": "rishabh5321", + "repo": "grayjay-flake", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": ["nixpkgs"] + }, + "locked": { + "lastModified": 1743387206, + "narHash": "sha256-24N3NAuZZbYqZ39NgToZgHUw6M7xHrtrAm18kv0+2Wo=", "owner": "nix-community", "repo": "home-manager", - "rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe", + "rev": "15c5f9d04fabd176f30286c8f52bbdb2c853a146", "type": "github" }, "original": { @@ -125,7 +131,7 @@ "hyprpanel": { "inputs": { "ags": "ags", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1740863579, @@ -143,16 +149,8 @@ }, "ixx": { "inputs": { - "flake-utils": [ - "nixvim", - "nuschtosSearch", - "flake-utils" - ], - "nixpkgs": [ - "nixvim", - "nuschtosSearch", - "nixpkgs" - ] + "flake-utils": ["nixvim", "nuschtosSearch", "flake-utils"], + "nixpkgs": ["nixvim", "nuschtosSearch", "nixpkgs"] }, "locked": { "lastModified": 1729958008, @@ -171,11 +169,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1741246872, - "narHash": "sha256-Q6pMP4a9ed636qilcYX8XUguvKl/0/LGXhHcRI91p0U=", + "lastModified": 1742889210, + "narHash": "sha256-hw63HnwnqU3ZQfsMclLhMvOezpM7RSB0dMAtD5/sOiw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "10069ef4cf863633f57238f179a0297de84bd8d3", + "rev": "698214a32beb4f4c8e3942372c694f40848b360d", "type": "github" }, "original": { @@ -187,11 +185,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1741379970, - "narHash": "sha256-Wh7esNh7G24qYleLvgOSY/7HlDUzWaL/n4qzlBePpiw=", + "lastModified": 1743448293, + "narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "36fd87baa9083f34f7f5027900b62ee6d09b1f2f", + "rev": "77b584d61ff80b4cef9245829a6f1dfad5afdfa3", "type": "github" }, "original": { @@ -202,6 +200,22 @@ } }, "nixpkgs_2": { + "locked": { + "lastModified": 1743448293, + "narHash": "sha256-bmEPmSjJakAp/JojZRrUvNcDX2R5/nuX6bm+seVaGhs=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "77b584d61ff80b4cef9245829a6f1dfad5afdfa3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { "locked": { "lastModified": 1736344531, "narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=", @@ -217,13 +231,13 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_4": { "locked": { - "lastModified": 1741332913, - "narHash": "sha256-ri1e8ZliWS3Jnp9yqpKApHaOo7KBN33W8ECAKA4teAQ=", + "lastModified": 1743501102, + "narHash": "sha256-7PCBQ4aGVF8OrzMkzqtYSKyoQuU2jtpPi4lmABpe5X4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "20755fa05115c84be00b04690630cb38f0a203ad", + "rev": "02f2af8c8a8c3b2c05028936a1e84daefa1171d4", "type": "github" }, "original": { @@ -233,13 +247,13 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { - "lastModified": 1735471104, - "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", + "lastModified": 1742288794, + "narHash": "sha256-Txwa5uO+qpQXrNG4eumPSD+hHzzYi/CdaM80M9XRLCo=", "owner": "nixos", "repo": "nixpkgs", - "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", + "rev": "b6eaf97c6960d97350c584de1b6dcff03c9daf42", "type": "github" }, "original": { @@ -252,17 +266,15 @@ "nixvim": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs-unstable" - ], + "nixpkgs": ["nixpkgs-unstable"], "nuschtosSearch": "nuschtosSearch" }, "locked": { - "lastModified": 1741098523, - "narHash": "sha256-gXDSXDr6tAb+JgxGMvcEjKC9YO8tVOd8hMMZHJLyQ6Q=", + "lastModified": 1743598191, + "narHash": "sha256-30aI8rWjX64E9vIlE4iqgQguTjItvTnQLTqHtFppF/w=", "owner": "nix-community", "repo": "nixvim", - "rev": "03065fd4708bfdf47dd541d655392a60daa25ded", + "rev": "a183298bf67307bdb7a25a2a3c565e76029f1b9e", "type": "github" }, "original": { @@ -275,17 +287,14 @@ "inputs": { "flake-utils": "flake-utils", "ixx": "ixx", - "nixpkgs": [ - "nixvim", - "nixpkgs" - ] + "nixpkgs": ["nixvim", "nixpkgs"] }, "locked": { - "lastModified": 1738508923, - "narHash": "sha256-4DaDrQDAIxlWhTjH6h/+xfG05jt3qDZrZE/7zDLQaS4=", + "lastModified": 1743201766, + "narHash": "sha256-bb/dqoIjtIWtJRzASOe8g4m8W2jUIWtuoGPXdNjM/Tk=", "owner": "NuschtOS", "repo": "search", - "rev": "86e2038290859006e05ca7201425ea5b5de4aecb", + "rev": "2651dbfad93d6ef66c440cbbf23238938b187bde", "type": "github" }, "original": { @@ -297,9 +306,10 @@ "root": { "inputs": { "catppuccin": "catppuccin", + "grayjay": "grayjay", "home-manager": "home-manager", "hyprpanel": "hyprpanel", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_4", "nixpkgs-unstable": "nixpkgs-unstable", "nixvim": "nixvim", "spicetify-nix": "spicetify-nix", @@ -308,17 +318,15 @@ }, "spicetify-nix": { "inputs": { - "nixpkgs": [ - "nixpkgs" - ], + "nixpkgs": ["nixpkgs"], "systems": "systems_2" }, "locked": { - "lastModified": 1741493656, - "narHash": "sha256-1M2mf5pZTlhZXkSI8wKs9GfNb1hllND58zQUYSAe8EA=", + "lastModified": 1743595372, + "narHash": "sha256-e3x1mhpPpYgyyin9j/VbrBpOT5PFpEfx2hkxVZuJZhg=", "owner": "Gerg-L", "repo": "spicetify-nix", - "rev": "a06e502c884307c33dbdf2017fd50ab3592ad868", + "rev": "543f12dd14c62ddee79ab79fbfd8726f312b89ff", "type": "github" }, "original": { @@ -359,14 +367,14 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1741450391, - "narHash": "sha256-zEFEI2RWmxYS5EZTlA8VnX5X7AueDKpXF2IjJx+dyKE=", + "lastModified": 1743600524, + "narHash": "sha256-ZJesdL2jwCwBF4SsWvxNyGuHUv8cGLHIQwJxma6JQR0=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "6dceddfe8e1691607eaa8d9f12f33ab6a5acea82", + "rev": "9818e303273448dde6ada0f7bff8b98f5ce261da", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 50700fa..51aeef2 100644 --- a/flake.nix +++ b/flake.nix @@ -24,6 +24,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; zen-browser.url = "github:0xc000022070/zen-browser-flake"; + grayjay.url = "github:rishabh5321/grayjay-flake"; }; outputs = diff --git a/home-manager/default-applications.nix b/home-manager/default-applications.nix index d3f3e7f..f144d00 100644 --- a/home-manager/default-applications.nix +++ b/home-manager/default-applications.nix @@ -5,7 +5,7 @@ defaultApplications = let browser = "zen.desktop"; - imageViewer = "org.gnome.Loupe.desktop"; + imageViewer = "imv.desktop"; pdfReader = "org.gnome.Papers.desktop"; in { diff --git a/home-manager/default.nix b/home-manager/default.nix index ed462ca..a1aa283 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -10,7 +10,7 @@ let in { imports = [ - inputs.catppuccin.homeManagerModules.catppuccin + inputs.catppuccin.homeModules.catppuccin ./btop.nix ./cava ./cursors.nix @@ -21,7 +21,7 @@ in ./freetube.nix ./gtk.nix ./kitty.nix - ./mpv.nix + ./media ./nextcloud.nix ./rofi ./wlogout diff --git a/home-manager/media/default.nix b/home-manager/media/default.nix new file mode 100644 index 0000000..252528c --- /dev/null +++ b/home-manager/media/default.nix @@ -0,0 +1,6 @@ +{ + imports = [ + ./imv.nix + ./mpv.nix + ]; +} diff --git a/home-manager/media/imv.nix b/home-manager/media/imv.nix new file mode 100644 index 0000000..4848f91 --- /dev/null +++ b/home-manager/media/imv.nix @@ -0,0 +1,10 @@ +{ theme, ... }: + +{ + catppuccin.imv = { + enable = true; + flavor = theme.flavor; + }; + + programs.imv.enable = true; +} diff --git a/home-manager/mpv.nix b/home-manager/media/mpv.nix similarity index 100% rename from home-manager/mpv.nix rename to home-manager/media/mpv.nix diff --git a/home-manager/yazi/default.nix b/home-manager/yazi/default.nix index 589d8b8..38ac81c 100644 --- a/home-manager/yazi/default.nix +++ b/home-manager/yazi/default.nix @@ -3,7 +3,6 @@ let batTheme = ".config/yazi/catppuccin-${theme.flavor}.tmTheme"; in { - # TODO use catppuccin theme home.file.${batTheme}.source = ./catppuccin-mocha.tmTheme; programs.yazi = { diff --git a/modules/development/rust.nix b/modules/development/rust.nix index 0b6e726..da83ed7 100644 --- a/modules/development/rust.nix +++ b/modules/development/rust.nix @@ -1,9 +1,17 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [ - jetbrains.rust-rover - rustup - gcc - ]; + environment = { + sessionVariables = { + # Required for some Rust dependencies, like reqwest + PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig"; + }; + + systemPackages = with pkgs; [ + jetbrains.rust-rover + rustup + gcc + pkg-config # Required for some Rust dependencies + ]; + }; } diff --git a/modules/gnome/default.nix b/modules/gnome/default.nix index 0a39f32..46eaa9c 100644 --- a/modules/gnome/default.nix +++ b/modules/gnome/default.nix @@ -11,7 +11,7 @@ adwaita-icon-theme gnomeExtensions.appindicator # gnome-extension-manager - loupe + # loupe gnome-calculator gnome-disk-utility gnome-clocks