better consistency, add dotfiles for takamaki and new features

This commit is contained in:
greyweather committed 2026-08-31 01:10:23 +01:00
1 parent 023fc0c424
commit 5c2a328858
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 {}) ];
};
};
}
+31
View File
@@ -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;
};
};
}
@@ -17,17 +17,17 @@
home.activation = {
linkEquibopConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.home.homeDirectory}/.config/equibop/settings.json";
target = "${config.xdg.configHome}/equibop/settings.json";
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/equibop/settings.json";
});
linkEquibopConfigEquicordSettings = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.home.homeDirectory}/.config/equibop/settings/settings.json";
target = "${config.xdg.configHome}/equibop/settings/settings.json";
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/equibop/equicord-settings.json";
});
linkEquibopConfigQuickCss = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.home.homeDirectory}/.config/equibop/settings/quickCss.css";
target = "${config.xdg.configHome}/equibop/settings/quickCss.css";
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/equibop/quickCss.css";
});
};
+1 -1
View File
@@ -14,7 +14,7 @@
config = lib.mkIf (config.features.applications.gui.floorp.enable) (
let
firefox-addons = with pkgs; inputs.firefox-addons.packages.${system};
firefox-addons = with pkgs; inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system};
in {
programs.floorp = {
enable = true;
@@ -24,7 +24,6 @@
home.activation.linkRemminaPresets = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.home.homeDirectory}/.local/share/remmina";
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/remmina";
isDir = true;
});
};
};
+27 -10
View File
@@ -1,24 +1,42 @@
{ inputs, self, ... }: {
flake.nixosModules.graphics = { pkgs, config, lib, ... }: {
flake.nixosModules.graphics = { pkgs, config, lib, ... }: let
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
theme-option-type = with inputs.nixpkgs; lib.types.enum (builtins.attrNames spicePkgs.themes);
in {
options.features.applications.gui.spotify = {
enable = lib.mkEnableOption "spotify";
spicetify.enable = lib.mkEnableOption "spicetify";
spicetify = {
enable = lib.mkEnableOption "spicetify";
theme = lib.mkOption {
type = lib.types.nullOr (theme-option-type);
default = null;
};
};
};
config = lib.mkIf (config.features.applications.gui.spotify.enable) (inputs.helpers.mkIfElse (config.features.nixos.home-manager.enable) {
home-manager.users.grey.features.applications.gui.spotify = {
enable = lib.mkDefault true;
spicetify.enable = lib.mkDefault config.features.applications.gui.spotify.spicetify.enable;
spicetify = lib.mkDefault config.features.applications.gui.spotify.spicetify;
};
} {
environment.systemPackages = [ pkgs.spotify ];
});
};
flake.homeModules.graphics = { pkgs, config, lib, ... }: {
flake.homeModules.graphics = { pkgs, config, lib, ... }: let
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
theme-option-type = with inputs.nixpkgs; lib.types.enum (builtins.attrNames spicePkgs.themes);
in {
options.features.applications.gui.spotify = {
enable = lib.mkEnableOption "spotify";
spicetify.enable = lib.mkEnableOption "spicetify";
spicetify = {
enable = lib.mkEnableOption "spicetify";
theme = lib.mkOption {
type = lib.types.nullOr (theme-option-type);
default = null;
};
};
};
imports = [
@@ -28,13 +46,10 @@
config = lib.mkIf (config.features.applications.gui.spotify.enable) {
home.packages = lib.mkIf (!config.features.applications.gui.spotify.spicetify.enable) [ pkgs.spotify ];
programs.spicetify =
let
spicePkgs = inputs.spicetify.legacyPackages.${pkgs.stdenv.hostPlatform.system};
in lib.mkIf (config.features.applications.gui.spotify.spicetify.enable) {
programs.spicetify = lib.mkIf (config.features.applications.gui.spotify.spicetify.enable) {
enable = true;
enabledExtensions = with spicePkgs.extensions; [
hidePodcasts
# hidePodcasts
];
enabledSnippets = with spicePkgs.snippets; [
spinningCdCoverArt
@@ -47,6 +62,8 @@
enabledCustomApps = with spicePkgs.apps; [
# marketplace
];
theme = lib.mkIf (config.features.applications.gui.spotify.spicetify.theme != null) spicePkgs.themes.${config.features.applications.gui.spotify.spicetify.theme};
windowManagerPatch = true;
};
};
};
+2 -2
View File
@@ -17,12 +17,12 @@
home.activation = {
linkVsCodeConfigSettings = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.home.homeDirectory}/.config/Code/User/settings.json";
target = "${config.xdg.configHome}/Code/User/settings.json";
source = "${config.info.rootPath}/dotfiles/global/vscode/settings.json";
});
linkVsCodeConfigKeybindings = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.home.homeDirectory}/.config/Code/User/keybindings.json";
target = "${config.xdg.configHome}/Code/User/keybindings.json";
source = "${config.info.rootPath}/dotfiles/global/vscode/keybindings.json";
});
};
-19
View File
@@ -1,19 +0,0 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { pkgs, config, lib, ... }: {
options.features.nixos.nh.enable = lib.mkOption {
type = lib.types.bool;
default = true;
};
config = lib.mkIf (config.features.nixos.nh.enable) {
environment.systemPackages = [
inputs.nh.packages.${pkgs.stdenv.hostPlatform.system}.default
];
programs.nh = {
enable = true;
flake = "/home/grey/nixos";
};
};
};
}
+14
View File
@@ -0,0 +1,14 @@
{ inputs, self, ... }: {
flake.homeModules.audio = { pkgs, config, lib, ...}: {
options.features.services.easyeffects.enable = lib.mkEnableOption "easyeffects";
config = lib.mkIf (config.features.services.easyeffects.enable) {
services.easyeffects.enable = true;
home.activation.linkEasyEffectsConfig = lib.hm.dag.entryAfter ["writeBoundary"] (inputs.helpers.mkSymlinkActivationScript {
target = "${config.xdg.configHome}/easyeffects/db";
source = "${config.info.rootPath}/dotfiles/${config.info.hostName}/easyeffects";
});
};
};
}
+1 -3
View File
@@ -1,9 +1,7 @@
{ inputs, self, ... }: {
flake.nixosModules.global = { config, pkgs, lib, ... }: {
options.features.shells.defaultShell = lib.mkOption {
type = lib.types.enum (map (name: lib.removeSuffix ".nix" name) (
builtins.attrNames (builtins.readDir "${self}/modules/features/shells")
));
type = inputs.helpers.mkEnumFromDirContents "${self}/modules/features/shells";
default = "zsh";
};