From 71078e81a151fe0234825e7f8501f451acbd98ea Mon Sep 17 00:00:00 2001 From: ulic-youthlic Date: Sat, 11 Jan 2025 17:30:45 +0800 Subject: [PATCH] move foot to module, and disable it. --- .../configurations/Tytonidae/default.nix | 2 +- .../configurations/Tytonidae/foot/default.nix | 8 ------ home/modules/default.nix | 1 + home/modules/foot/default.nix | 25 +++++++++++++++++++ .../Tytonidae => modules}/foot/foot.ini | 0 5 files changed, 27 insertions(+), 9 deletions(-) delete mode 100644 home/david/configurations/Tytonidae/foot/default.nix create mode 100644 home/modules/foot/default.nix rename home/{david/configurations/Tytonidae => modules}/foot/foot.ini (100%) diff --git a/home/david/configurations/Tytonidae/default.nix b/home/david/configurations/Tytonidae/default.nix index e7b61e6..e207d8e 100644 --- a/home/david/configurations/Tytonidae/default.nix +++ b/home/david/configurations/Tytonidae/default.nix @@ -10,7 +10,6 @@ imports = [ ./starship ./firefox.nix - ./foot ./niri ]; @@ -25,6 +24,7 @@ fish.enable = true; bash.enable = true; ghostty.enable = true; + foot.enable = false; }; xdg.userDirs = { diff --git a/home/david/configurations/Tytonidae/foot/default.nix b/home/david/configurations/Tytonidae/foot/default.nix deleted file mode 100644 index 2fbaba2..0000000 --- a/home/david/configurations/Tytonidae/foot/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ config, ... }: -{ - programs.foot = { - enable = true; - server.enable = true; - }; - xdg.configFile."foot/foot.ini".source = (config.lib.file.mkOutOfStoreSymlink ./foot.ini); -} diff --git a/home/modules/default.nix b/home/modules/default.nix index e289214..5417394 100644 --- a/home/modules/default.nix +++ b/home/modules/default.nix @@ -11,6 +11,7 @@ ./git.nix ./shell ./ghostty.nix + ./foot ]; options = { diff --git a/home/modules/foot/default.nix b/home/modules/foot/default.nix new file mode 100644 index 0000000..ec0490c --- /dev/null +++ b/home/modules/foot/default.nix @@ -0,0 +1,25 @@ +{ config, lib, ... }: +let + cfg = config.youthlic.programs.foot; +in +{ + options = { + youthlic.programs.foot = { + enable = lib.mkOption { + type = lib.types.bool; + default = true; + example = false; + description = '' + whether use foot terminal + ''; + }; + }; + }; + config = lib.mkIf cfg.enable { + programs.foot = { + enable = true; + server.enable = true; + settings = builtins.fromINI (builtins.readFile ./foot.ini); + }; + }; +} diff --git a/home/david/configurations/Tytonidae/foot/foot.ini b/home/modules/foot/foot.ini similarity index 100% rename from home/david/configurations/Tytonidae/foot/foot.ini rename to home/modules/foot/foot.ini