diff --git a/flake/dev/flake.lock b/flake/dev/flake.lock index e9539fdd..123cd2b9 100644 --- a/flake/dev/flake.lock +++ b/flake/dev/flake.lock @@ -1,5 +1,25 @@ { "nodes": { + "dank-calendar": { + "inputs": { + "nixpkgs": [ + "dev-nixpkgs" + ] + }, + "locked": { + "lastModified": 1782499261, + "narHash": "sha256-W+tmdccdHqFL1v9WUmSIx12aXdzGsQDgtvvY7FLPhoE=", + "owner": "AvengeMedia", + "repo": "dankcalendar", + "rev": "9596d9645002dcc6403bf2226445af2309edc6f4", + "type": "github" + }, + "original": { + "owner": "AvengeMedia", + "repo": "dankcalendar", + "type": "github" + } + }, "dankMaterialShell": { "inputs": { "flake-compat": [ @@ -275,6 +295,7 @@ }, "root": { "inputs": { + "dank-calendar": "dank-calendar", "dankMaterialShell": "dankMaterialShell", "dev-flake-parts": "dev-flake-parts", "dev-nixpkgs": "dev-nixpkgs", diff --git a/flake/dev/flake.nix b/flake/dev/flake.nix index a5f107c0..9c405c1b 100644 --- a/flake/dev/flake.nix +++ b/flake/dev/flake.nix @@ -130,6 +130,11 @@ dev-systems.url = "github:nix-systems/default"; # keep-sorted start block=yes newline_separated=yes + dank-calendar = { + url = "github:AvengeMedia/dankcalendar"; + inputs.nixpkgs.follows = "dev-nixpkgs"; + }; + dankMaterialShell = { url = "github:AvengeMedia/DankMaterialShell"; inputs = { diff --git a/generated/all-maintainers.nix b/generated/all-maintainers.nix index 574efa6e..e1f6d0e5 100644 --- a/generated/all-maintainers.nix +++ b/generated/all-maintainers.nix @@ -243,6 +243,13 @@ githubId = 19377854; name = "jamie"; }; + thbemme = { + email = "thomas.bemme@googlemail.com"; + github = "thbemme"; + githubId = 14074615; + matrix = "@riza:chaos.jetzt"; + name = "Thomas Bemme"; + }; trueNAHO = { email = "nix@noahbiewesch.com"; github = "trueNAHO"; diff --git a/modules/dank-calendar/hm.nix b/modules/dank-calendar/hm.nix new file mode 100644 index 00000000..afd8b83a --- /dev/null +++ b/modules/dank-calendar/hm.nix @@ -0,0 +1,49 @@ +{ + mkTarget, + lib, + options, + pkgs, + ... +}: +mkTarget { + config = lib.optionals (options.programs ? dank-calendar) [ + ( + { colors }: + { + programs.dank-calendar.settings = { + colorSource = "custom"; + customThemeFile = + let + theme = with colors.withHashtag; { + name = "Stylix"; + primary = base0D; + primaryText = base00; + primaryContainer = base0C; + secondary = base0E; + surface = base01; + surfaceText = base05; + surfaceVariant = base02; + surfaceVariantText = base04; + surfaceTint = base0D; + background = base00; + backgroundText = base05; + outline = base03; + surfaceContainer = base01; + surfaceContainerHigh = base02; + surfaceContainerHighest = base03; + error = base08; + warning = base0A; + info = base0C; + }; + in + pkgs.writeText "dank-calendar-stylix-color-theme.json" ( + builtins.toJSON { + dark = theme; + light = theme; + } + ); + }; + } + ) + ]; +} diff --git a/modules/dank-calendar/meta.nix b/modules/dank-calendar/meta.nix new file mode 100644 index 00000000..4575917a --- /dev/null +++ b/modules/dank-calendar/meta.nix @@ -0,0 +1,6 @@ +{ lib, ... }: +{ + name = "DankCalendar"; + homepage = "https://github.com/AvengeMedia/dankcalendar"; + maintainers = [ lib.maintainers.thbemme ]; +} diff --git a/modules/dank-calendar/testbeds/dank-calendar.nix b/modules/dank-calendar/testbeds/dank-calendar.nix new file mode 100644 index 00000000..9a0c1714 --- /dev/null +++ b/modules/dank-calendar/testbeds/dank-calendar.nix @@ -0,0 +1,12 @@ +{ lib, ... }: +{ + stylix.testbed.ui = { + graphicalEnvironment = "hyprland"; + command.text = "dcal"; + sendNotifications = true; + }; + + home-manager.sharedModules = lib.singleton { + programs.dank-calendar.enable = true; + }; +} diff --git a/stylix/maintainers.nix b/stylix/maintainers.nix index 20963526..798f9c54 100644 --- a/stylix/maintainers.nix +++ b/stylix/maintainers.nix @@ -89,6 +89,13 @@ github = "skiletro"; githubId = 19377854; }; + thbemme = { + email = "thomas.bemme@googlemail.com"; + github = "thbemme"; + githubId = 14074615; + matrix = "@riza:chaos.jetzt"; + name = "Thomas Bemme"; + }; vidhanio = { email = "me@vidhan.io"; name = "Vidhan Bhatt"; diff --git a/stylix/testbed/default.nix b/stylix/testbed/default.nix index 3e92c4be..1a3d198b 100644 --- a/stylix/testbed/default.nix +++ b/stylix/testbed/default.nix @@ -35,6 +35,10 @@ let { inherit (inputs.spicetify-nix.nixosModules) spicetify; + dank-calendar.home-manager.sharedModules = [ + inputs.dank-calendar.homeModules.default + ]; + dank-material-shell.home-manager.sharedModules = [ inputs.dankMaterialShell.homeModules.dank-material-shell ];