Compare commits

..

3 commits

7 changed files with 34 additions and 43 deletions

View file

@ -1,35 +0,0 @@
{ config, lib, ... }:
let
cfg = config.local.programs.calendar;
mkCalOpts = name: {
enable = lib.mkEnableOption name;
# Custom package doesn't work yet.
# See: https://github.com/nix-community/home-manager/pull/5428
# package = lib.mkPackageOption pkgs name { };
};
in
{
options.local.programs.calendar = {
khal = mkCalOpts "khal";
};
config = {
accounts.calendar.basePath = "${config.xdg.dataHome}/calendars";
programs.khal = lib.mkIf cfg.khal.enable {
enable = true;
locale = rec {
timeformat = "%H:%M";
dateformat = "%Y-%m-%d";
longdateformat = dateformat;
datetimeformat = "${dateformat} ${timeformat}";
longdatetimeformat = datetimeformat;
};
# See: https://khal.readthedocs.io/en/latest/configure.html
settings = {};
};
};
}

View file

@ -0,0 +1,6 @@
{ config, ...}:
{
imports = [./khal.nix];
config.accounts.calendar.basePath = "${config.xdg.dataHome}/calendars";
}

View file

@ -0,0 +1,27 @@
{ config, lib, ... }:
let cfg = config.local.programs.calendar; in
{
options.local.programs.calendar.khal = {
enable = lib.mkEnableOption "khal";
# Custom package doesn't work yet.
# See: https://github.com/nix-community/home-manager/pull/5428
# package = lib.mkPackageOption pkgs "khal" { };
};
config = {
programs.khal = lib.mkIf cfg.khal.enable {
enable = true;
locale = rec {
timeformat = "%H:%M";
dateformat = "%d.%m.";
longdateformat = "%d.%m.%Y";
datetimeformat = "${dateformat} ${timeformat}";
longdatetimeformat = "${longdateformat} ${timeformat}";
};
# See: https://khal.readthedocs.io/en/latest/configure.html
settings = { };
};
};
}

View file

@ -3,12 +3,12 @@
{
imports = [
./aerc.nix
./calendar.nix
./communication.nix
./dev-tools.nix
./flameshot.nix
./libreoffice.nix
./share-files.nix
./calendar
./editors
./file-managers
./terminals

View file

@ -42,9 +42,6 @@ in
};
};
})
(final: prev: {
khal = (import inputs.nixpkgs-unstable { inherit (config.nixpkgs) system; }).khal;
})
(final: prev: {
unstable = import inputs.nixpkgs-unstable {
inherit (config.nixpkgs) config overlays system;

Binary file not shown.

View file

@ -96,10 +96,6 @@
local.programs.file-managers.vifm.enable = lib.mkDefault true;
local.programs.aerc.enable = lib.mkDefault true;
local.programs.calendar.khal = {
enable = lib.mkDefault true;
# package = pkgs.unstable.khal;
};
local.programs.communication = {
telegram.enable = lib.mkDefault true;