Compare commits
3 commits
d00535a5ed
...
a8d753d0ec
Author | SHA1 | Date | |
---|---|---|---|
a8d753d0ec | |||
7d369ef34c | |||
9c969a30a0 |
7 changed files with 34 additions and 43 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;
|
||||
|
|
Binary file not shown.
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue