Compare commits
2 commits
a615ab83e3
...
6f0a5fcc30
Author | SHA1 | Date | |
---|---|---|---|
6f0a5fcc30 | |||
2810b9eb5c |
5 changed files with 30 additions and 6 deletions
|
@ -1,11 +1,14 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.local.programs.calendar;
|
cfg = config.local.programs.calendar;
|
||||||
|
|
||||||
mkCalOpts = name: {
|
mkCalOpts = name: {
|
||||||
enable = lib.mkEnableOption name;
|
enable = lib.mkEnableOption name;
|
||||||
package = lib.mkPackageOption pkgs name { };
|
|
||||||
|
# Custom package doesn't work yet.
|
||||||
|
# See: https://github.com/nix-community/home-manager/pull/5428
|
||||||
|
# package = lib.mkPackageOption pkgs name { };
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
@ -13,6 +16,20 @@ in
|
||||||
khal = mkCalOpts "khal";
|
khal = mkCalOpts "khal";
|
||||||
};
|
};
|
||||||
|
|
||||||
config.home.packages =
|
config = {
|
||||||
lib.optional cfg.khal.enable cfg.khal.package;
|
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 = {};
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -42,6 +42,9 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
(final: prev: {
|
||||||
|
khal = (import inputs.nixpkgs-unstable { inherit (config.nixpkgs) system; }).khal;
|
||||||
|
})
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
unstable = import inputs.nixpkgs-unstable {
|
unstable = import inputs.nixpkgs-unstable {
|
||||||
inherit (config.nixpkgs) config overlays system;
|
inherit (config.nixpkgs) config overlays system;
|
||||||
|
|
BIN
users/jan/calendars.secret.nix
Normal file
BIN
users/jan/calendars.secret.nix
Normal file
Binary file not shown.
|
@ -55,7 +55,8 @@
|
||||||
|
|
||||||
home-manager.users.jan = {
|
home-manager.users.jan = {
|
||||||
imports = [
|
imports = [
|
||||||
./accounts.secret.nix
|
./email_accounts.secret.nix
|
||||||
|
./calendars.secret.nix
|
||||||
./git
|
./git
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -77,7 +78,6 @@
|
||||||
|
|
||||||
local.shell.enable = lib.mkDefault true;
|
local.shell.enable = lib.mkDefault true;
|
||||||
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Programs
|
# Programs
|
||||||
################################################################################
|
################################################################################
|
||||||
|
@ -96,6 +96,10 @@
|
||||||
local.programs.file-managers.vifm.enable = lib.mkDefault true;
|
local.programs.file-managers.vifm.enable = lib.mkDefault true;
|
||||||
|
|
||||||
local.programs.aerc.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 = {
|
local.programs.communication = {
|
||||||
telegram.enable = lib.mkDefault true;
|
telegram.enable = lib.mkDefault true;
|
||||||
|
|
Loading…
Reference in a new issue