better consistency, add dotfiles for takamaki and new features
This commit is contained in:
35 files changed
+2455
-190
No files matched your search
@@ -0,0 +1,49 @@
|
||||
{ inputs, self, ... }: let
|
||||
color-converter-package = { lib, pkgs }: pkgs.python3Packages.buildPythonApplication rec {
|
||||
pname = "color-converter";
|
||||
version = "1.0.0";
|
||||
__structuredAttrs = true;
|
||||
strictDeps = true;
|
||||
pyproject = false;
|
||||
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "sotrali";
|
||||
repo = "color-converter";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-xvU7Z6rV+o0F9s1JBGnRWccK0JhZPL7BbPOsnZJLTJM=";
|
||||
};
|
||||
|
||||
dontUnpack = true;
|
||||
installPhase = ''
|
||||
install -Dm755 "${src}/${pname}.py" "$out/bin/${pname}"
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "A robust CLI color conversion utility";
|
||||
homepage = "https://github.com/sotrali/color-converter";
|
||||
changelog = "https://github.com/sotrali/color-converter/releases/tag/${src.tag}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ ];
|
||||
mainProgram = "color-converter";
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
};
|
||||
in {
|
||||
flake.nixosModules.global = { pkgs, lib, config, ... }: {
|
||||
options.features.applications.cli.color-converter.enable = lib.mkEnableOption "color-converter";
|
||||
|
||||
config = lib.mkIf (config.features.applications.cli.color-converter.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
|
||||
home-manager.users.grey.features.applications.cli.color-converter.enable = lib.mkDefault true;
|
||||
} {
|
||||
environment.systemPackages = [ (pkgs.callPackage color-converter-package {}) ];
|
||||
});
|
||||
};
|
||||
|
||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
||||
options.features.applications.cli.color-converter.enable = lib.mkEnableOption "color-converter";
|
||||
|
||||
config = lib.mkIf (config.features.applications.cli.color-converter.enable) {
|
||||
home.packages = [ (pkgs.callPackage color-converter-package {}) ];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{ inputs, self, ... }: let
|
||||
mkNhAttrs = flake: {
|
||||
enable = true;
|
||||
inherit flake;
|
||||
clean = {
|
||||
enable = true;
|
||||
dates = "Sun 05:00";
|
||||
extraArgs = "--keep 5 --keep-since 3d";
|
||||
};
|
||||
};
|
||||
in {
|
||||
flake.nixosModules.global = { pkgs, config, lib, ... }: {
|
||||
options.features.applications.cli.nh.enable = lib.mkEnableOption "nh";
|
||||
|
||||
config = lib.mkIf (config.features.applications.cli.nh.enable) {
|
||||
programs.nh = mkNhAttrs config.info.rootPath;
|
||||
|
||||
home-manager.users.grey = lib.mkIf (config.features.nixos.home-manager.enable) {
|
||||
features.applications.cli.nh.enable = lib.mkDefault true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
flake.homeModules.global = { pkgs, config, lib, ... }: {
|
||||
options.features.applications.cli.nh.enable = lib.mkEnableOption "nh";
|
||||
|
||||
config = lib.mkIf (config.features.applications.cli.nh.enable && config.info.isStandalone) {
|
||||
programs.nh = mkNhAttrs config.info.rootPath;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user