Flake attempt #30

This commit is contained in:
Javier Feliz 2025-09-07 20:16:41 -04:00
parent ffc240186d
commit a8a1022c77
4 changed files with 55 additions and 19 deletions

37
flake.lock generated
View File

@ -18,7 +18,41 @@
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1757256385,
"narHash": "sha256-WK7tOhWwr15mipcckhDg2no/eSpM1nIh4C9le8HgHhk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f35703b412c67b48e97beb6e27a6ab96a084cd37",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1757068644,
"narHash": "sha256-NOrUtIhTkIIumj1E/Rsv1J37Yi3xGStISEo8tZm3KW4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8eb28adfa3dc4de28e792e3bf49fcf9007ca8ac9",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1756787288,
"narHash": "sha256-rw/PHa1cqiePdBxhF66V7R+WAP8WekQ0mCDG4CFqT8Y=",
@ -37,7 +71,8 @@
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
"home-manager": "home-manager",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {

View File

@ -4,6 +4,7 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
home-manager.url = "github:nix-community/home-manager";
};
outputs =
@ -11,14 +12,14 @@
self,
nixpkgs,
flake-utils,
home-manager,
}:
flake-utils.lib.eachDefaultSystem (
(flake-utils.lib.eachDefaultSystem (
system:
let
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
};
in
{
@ -93,12 +94,15 @@
adwaita-icon-theme
];
};
overlays.default = final: prev: {
waycast = self.packages.${system}.default;
};
}
);
overlay = final: prev: {
waycast = self.packages.${final.system}.default;
};
homeManagerModules.waycast = import ./modules/home-manager/waycast.nix;
)) // {
homeManagerModules.default = { pkgs, ... }: import ./modules/home-manager/waycast.nix {
inherit pkgs;
waycastPackage = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
};
};
}

View File

@ -1,9 +1,5 @@
{
config,
lib,
pkgs,
...
}:
{ pkgs, waycastPackage }:
{ config, lib, ... }:
with lib;
@ -20,7 +16,7 @@ in
package = mkOption {
type = types.package;
default = pkgs.waycast or (throw "waycast package not found in pkgs");
default = waycastPackage;
description = "The waycast package to use";
};
@ -73,8 +69,8 @@ in
home.packages = [ cfg.package ];
xdg.configFile = mkMerge [
(mkIf (cfg.config != { }) {
"waycast/waycast.toml".source = toToml cfg.config;
(mkIf (cfg.settings != { }) {
"waycast/waycast.toml".source = toToml cfg.settings;
})
(mkIf (cfg.css != null) {

1
result Symbolic link
View File

@ -0,0 +1 @@
/nix/store/rvkvjz9b92dd4qx4l78q31bb18lflz70-waycast-0.0.1