modules/calendar: move khal to the calendar folder
This commit is contained in:
parent
9c969a30a0
commit
7d369ef34c
5 changed files with 34 additions and 39 deletions
|
@ -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 = {};
|
||||
};
|
||||
};
|
||||
}
|
6
modules/home-manager/programs/calendar/default.nix
Normal file
6
modules/home-manager/programs/calendar/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ config, ...}:
|
||||
{
|
||||
imports = [./khal.nix];
|
||||
|
||||
config.accounts.calendar.basePath = "${config.xdg.dataHome}/calendars";
|
||||
}
|
27
modules/home-manager/programs/calendar/khal.nix
Normal file
27
modules/home-manager/programs/calendar/khal.nix
Normal 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 = { };
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue