refactor: moved darwin, home-manager, and system configurations to dendrite pattern
This commit is contained in:
parent
0ea11e0236
commit
149f4f151f
193 changed files with 3284 additions and 3095 deletions
|
|
@ -1,8 +0,0 @@
|
||||||
# this folder container modules that are for darwin only
|
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./home-manager
|
|
||||||
./users.nix
|
|
||||||
./system.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
# modules in this folder are to adapt home-manager modules configs to darwin-module configs
|
|
||||||
{...}: {}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{self, ...}: {
|
|
||||||
system.configurationRevision = self.rev or self.dirtyRev or null;
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
interval = [
|
|
||||||
{
|
|
||||||
Hour = 4;
|
|
||||||
Minute = 15;
|
|
||||||
Weekday = 7;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
optimise = {
|
|
||||||
automatic = true;
|
|
||||||
interval = [
|
|
||||||
{
|
|
||||||
Hour = 4;
|
|
||||||
Minute = 15;
|
|
||||||
Weekday = 7;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
host = config.host;
|
|
||||||
in {
|
|
||||||
users = {
|
|
||||||
users = {
|
|
||||||
leyla = {
|
|
||||||
name = lib.mkForce host.users.leyla.name;
|
|
||||||
home = lib.mkForce "/home/${host.users.leyla.name}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
# this folder container modules that are for home manager only
|
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./sops.nix
|
|
||||||
./user.nix
|
|
||||||
./flipperzero.nix
|
|
||||||
./i18n.nix
|
|
||||||
./impermanence.nix
|
|
||||||
./openssh.nix
|
|
||||||
./gnome.nix
|
|
||||||
./programs
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{lib, ...}: {
|
|
||||||
options.hardware.flipperzero.enable = lib.mkEnableOption "enable flipperzero hardware";
|
|
||||||
}
|
|
||||||
|
|
@ -1,203 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
enabledExtensions =
|
|
||||||
[]
|
|
||||||
++ lib.optional config.gnome.extensions.dash-to-dock.enable pkgs.gnomeExtensions.dash-to-dock
|
|
||||||
++ lib.optional config.gnome.extensions.dash-to-panel.enable pkgs.gnomeExtensions.dash-to-panel;
|
|
||||||
|
|
||||||
extensions = config.gnome.extraExtensions ++ enabledExtensions;
|
|
||||||
in {
|
|
||||||
options.gnome = {
|
|
||||||
extraWindowControls = lib.mkEnableOption "Should we add back in the minimize and maximize window controls?";
|
|
||||||
clockFormat = lib.mkOption {
|
|
||||||
type = lib.types.enum [
|
|
||||||
"12h"
|
|
||||||
"24h"
|
|
||||||
];
|
|
||||||
default = "24h";
|
|
||||||
};
|
|
||||||
colorScheme = lib.mkOption {
|
|
||||||
type = lib.types.enum [
|
|
||||||
"default"
|
|
||||||
"prefer-dark"
|
|
||||||
"prefer-light"
|
|
||||||
];
|
|
||||||
default = "default";
|
|
||||||
};
|
|
||||||
accentColor = lib.mkOption {
|
|
||||||
type = lib.types.enum [
|
|
||||||
"blue"
|
|
||||||
"teal"
|
|
||||||
"green"
|
|
||||||
"yellow"
|
|
||||||
"orange"
|
|
||||||
"red"
|
|
||||||
"pink"
|
|
||||||
"purple"
|
|
||||||
"slate"
|
|
||||||
];
|
|
||||||
default = "blue";
|
|
||||||
};
|
|
||||||
extraExtensions = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.package;
|
|
||||||
default = [];
|
|
||||||
description = "The set of extensions to install and enable in the user environment.";
|
|
||||||
};
|
|
||||||
hotkeys = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({name, ...}: {
|
|
||||||
options = {
|
|
||||||
key = lib.mkOption {
|
|
||||||
type = lib.types.strMatching "[a-zA-Z0-9-]+";
|
|
||||||
default = builtins.replaceStrings [" " "/" "_"] ["-" "-" "-"] name;
|
|
||||||
};
|
|
||||||
name = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = name;
|
|
||||||
};
|
|
||||||
binding = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
command = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
default = {};
|
|
||||||
};
|
|
||||||
displayScaling = lib.mkOption {
|
|
||||||
type = lib.types.nullOr (lib.types.enum [100 125 150 175 200]);
|
|
||||||
default = null;
|
|
||||||
description = "Display scaling percentage for GNOME";
|
|
||||||
};
|
|
||||||
experimentalFeatures = lib.mkOption {
|
|
||||||
type = lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
scaleMonitorFramebuffer = lib.mkEnableOption "scale-monitor-framebuffer experimental feature";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
default = {};
|
|
||||||
description = "GNOME experimental features to enable";
|
|
||||||
};
|
|
||||||
|
|
||||||
nightLight = lib.mkOption {
|
|
||||||
type = lib.types.submodule {
|
|
||||||
options = {
|
|
||||||
enable = lib.mkEnableOption "night light (blue light filter)";
|
|
||||||
automatic = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether to automatically schedule night light based on sunset/sunrise";
|
|
||||||
};
|
|
||||||
fromTime = lib.mkOption {
|
|
||||||
type = lib.types.float;
|
|
||||||
default = 20.0;
|
|
||||||
description = "Start time for night light in 24-hour format (e.g., 20.0 for 8:00 PM)";
|
|
||||||
};
|
|
||||||
toTime = lib.mkOption {
|
|
||||||
type = lib.types.float;
|
|
||||||
default = 6.0;
|
|
||||||
description = "End time for night light in 24-hour format (e.g., 6.0 for 6:00 AM)";
|
|
||||||
};
|
|
||||||
temperature = lib.mkOption {
|
|
||||||
type = lib.types.int;
|
|
||||||
default = 4000;
|
|
||||||
description = "Color temperature for night light (1000-10000K, lower is warmer)";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
default = {};
|
|
||||||
description = "Night light configuration";
|
|
||||||
};
|
|
||||||
|
|
||||||
extensions = {
|
|
||||||
dash-to-dock = {
|
|
||||||
enable = lib.mkEnableOption "Dash to Dock extension";
|
|
||||||
options = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.attrs;
|
|
||||||
default = null;
|
|
||||||
description = "Dash to Dock configuration options. If null, no custom configuration will be applied.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
dash-to-panel = {
|
|
||||||
enable = lib.mkEnableOption "Dash to Panel extension";
|
|
||||||
options = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.attrs;
|
|
||||||
default = null;
|
|
||||||
description = "Dash to Panel configuration options. If null, no custom configuration will be applied.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
home.packages = extensions;
|
|
||||||
dconf = {
|
|
||||||
settings = lib.mkMerge [
|
|
||||||
{
|
|
||||||
"org/gnome/shell" = {
|
|
||||||
disable-user-extensions = false; # enables user extensions
|
|
||||||
enabled-extensions = builtins.map (extension: extension.extensionUuid) extensions;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/desktop/wm/preferences".button-layout = lib.mkIf config.gnome.extraWindowControls ":minimize,maximize,close";
|
|
||||||
|
|
||||||
"org/gnome/desktop/interface".color-scheme = config.gnome.colorScheme;
|
|
||||||
"org/gnome/desktop/interface".accent-color = config.gnome.accentColor;
|
|
||||||
"org/gnome/desktop/interface".clock-format = config.gnome.clockFormat;
|
|
||||||
"org/gnome/desktop/interface".text-scaling-factor = lib.mkIf (config.gnome.displayScaling != null) (config.gnome.displayScaling / 100.0);
|
|
||||||
|
|
||||||
"org/gnome/mutter".experimental-features = lib.mkIf (builtins.any (x: x) (builtins.attrValues config.gnome.experimentalFeatures)) (
|
|
||||||
lib.optional config.gnome.experimentalFeatures.scaleMonitorFramebuffer "scale-monitor-framebuffer"
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
# Night light configuration
|
|
||||||
(lib.mkIf config.gnome.nightLight.enable {
|
|
||||||
"org/gnome/settings-daemon/plugins/color" = {
|
|
||||||
night-light-enabled = true;
|
|
||||||
night-light-schedule-automatic = config.gnome.nightLight.automatic;
|
|
||||||
night-light-schedule-from = lib.mkIf (!config.gnome.nightLight.automatic) config.gnome.nightLight.fromTime;
|
|
||||||
night-light-schedule-to = lib.mkIf (!config.gnome.nightLight.automatic) config.gnome.nightLight.toTime;
|
|
||||||
night-light-temperature = config.gnome.nightLight.temperature;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(
|
|
||||||
lib.mkMerge (
|
|
||||||
builtins.map (value: let
|
|
||||||
entry = "org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/${value.key}";
|
|
||||||
in {
|
|
||||||
${entry} = {
|
|
||||||
binding = value.binding;
|
|
||||||
command = value.command;
|
|
||||||
name = value.name;
|
|
||||||
};
|
|
||||||
|
|
||||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
|
||||||
custom-keybindings = [
|
|
||||||
"/${entry}/"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
})
|
|
||||||
(
|
|
||||||
lib.attrsets.mapAttrsToList (_: value: value) config.gnome.hotkeys
|
|
||||||
)
|
|
||||||
)
|
|
||||||
)
|
|
||||||
|
|
||||||
# Extension configurations
|
|
||||||
(lib.mkIf (config.gnome.extensions.dash-to-dock.enable && config.gnome.extensions.dash-to-dock.options != null) {
|
|
||||||
"org/gnome/shell/extensions/dash-to-dock" = config.gnome.extensions.dash-to-dock.options;
|
|
||||||
})
|
|
||||||
|
|
||||||
(lib.mkIf (config.gnome.extensions.dash-to-panel.enable && config.gnome.extensions.dash-to-panel.options != null) {
|
|
||||||
"org/gnome/shell/extensions/dash-to-panel" = config.gnome.extensions.dash-to-panel.options;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options = {
|
|
||||||
i18n = {
|
|
||||||
defaultLocale = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "en_US.UTF-8";
|
|
||||||
example = "nl_NL.UTF-8";
|
|
||||||
description = ''
|
|
||||||
The default locale. It determines the language for program
|
|
||||||
messages, the format for dates and times, sort order, and so on.
|
|
||||||
It also determines the character set, such as UTF-8.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
extraLocaleSettings = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf lib.types.str;
|
|
||||||
default = {};
|
|
||||||
example = {
|
|
||||||
LC_MESSAGES = "en_US.UTF-8";
|
|
||||||
LC_TIME = "de_DE.UTF-8";
|
|
||||||
};
|
|
||||||
description = ''
|
|
||||||
A set of additional system-wide locale settings other than
|
|
||||||
`LANG` which can be configured with
|
|
||||||
{option}`i18n.defaultLocale`.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
home.sessionVariables =
|
|
||||||
{
|
|
||||||
LANG = config.i18n.defaultLocale;
|
|
||||||
}
|
|
||||||
// config.i18n.extraLocaleSettings;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,43 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.impermanence;
|
|
||||||
in {
|
|
||||||
options.impermanence = {
|
|
||||||
enable = lib.mkEnableOption "impermanence for home directory";
|
|
||||||
fallbackPersistence.enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
persistencePath = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default =
|
|
||||||
if osConfig.storage.generateBase
|
|
||||||
then "/persist/replicate/home"
|
|
||||||
else "/persist";
|
|
||||||
description = "The base path for user home persistence. The impermanence module will automatically append the user's home directory path. Automatically adapts based on whether the system uses the new dataset layout or the legacy one.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf config.impermanence.enable {
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion = osConfig.storage.impermanence.enable;
|
|
||||||
message = "impermanence can not be enabled for a user when it is not enabled for the system";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
})
|
|
||||||
# If impermanence is not enabled for this user but system impermanence is enabled,
|
|
||||||
# persist the entire home directory as fallback
|
|
||||||
(lib.mkIf (osConfig.storage.impermanence.enable && !cfg.enable && cfg.fallbackPersistence.enable) {
|
|
||||||
home.persistence."${cfg.persistencePath}" = {
|
|
||||||
directories = ["."];
|
|
||||||
allowOther = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,107 +0,0 @@
|
||||||
{
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.openssh = {
|
|
||||||
enable = lib.mkEnableOption "should we enable openssh";
|
|
||||||
authorizedKeys = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.str;
|
|
||||||
default = [];
|
|
||||||
};
|
|
||||||
hostKeys = lib.mkOption {
|
|
||||||
type = lib.types.listOf lib.types.attrs;
|
|
||||||
default = [];
|
|
||||||
example = [
|
|
||||||
{
|
|
||||||
type = "rsa";
|
|
||||||
bits = 4096;
|
|
||||||
path = "${config.home.username}_${osConfig.networking.hostName}_rsa";
|
|
||||||
rounds = 100;
|
|
||||||
openSSHFormat = true;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
type = "ed25519";
|
|
||||||
path = "${config.home.username}_${osConfig.networking.hostName}_ed25519";
|
|
||||||
rounds = 100;
|
|
||||||
comment = "key comment";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
description = ''
|
|
||||||
NixOS can automatically generate SSH host keys. This option
|
|
||||||
specifies the path, type and size of each key. See
|
|
||||||
{manpage}`ssh-keygen(1)` for supported types
|
|
||||||
and sizes. Paths are relative to home directory
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.openssh.enable (
|
|
||||||
lib.mkMerge [
|
|
||||||
(
|
|
||||||
lib.mkIf ((builtins.length config.programs.openssh.hostKeys) != 0) {
|
|
||||||
services.ssh-agent.enable = true;
|
|
||||||
programs.ssh = {
|
|
||||||
enable = true;
|
|
||||||
enableDefaultConfig = false;
|
|
||||||
matchBlocks = {
|
|
||||||
"*" = {
|
|
||||||
compression = true;
|
|
||||||
addKeysToAgent = "confirm";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# extraConfig = lib.strings.concatLines (
|
|
||||||
# builtins.map (hostKey: "IdentityFile ~/.ssh/${hostKey.path}") config.programs.openssh.hostKeys
|
|
||||||
# );
|
|
||||||
};
|
|
||||||
|
|
||||||
systemd.user.services = builtins.listToAttrs (
|
|
||||||
builtins.map (hostKey:
|
|
||||||
lib.attrsets.nameValuePair "ssh-gen-keys-${hostKey.path}" {
|
|
||||||
Install = {
|
|
||||||
WantedBy = ["default.target"];
|
|
||||||
};
|
|
||||||
Service = let
|
|
||||||
path = "${config.home.homeDirectory}/.ssh/${hostKey.path}";
|
|
||||||
in {
|
|
||||||
Restart = "always";
|
|
||||||
Type = "simple";
|
|
||||||
ExecStart = "${
|
|
||||||
pkgs.writeShellScript "ssh-gen-keys" ''
|
|
||||||
if ! [ -s "${path}" ]; then
|
|
||||||
if ! [ -h "${path}" ]; then
|
|
||||||
rm -f "${path}"
|
|
||||||
fi
|
|
||||||
mkdir -p "$(dirname '${path}')"
|
|
||||||
chmod 0755 "$(dirname '${path}')"
|
|
||||||
${pkgs.openssh}/bin/ssh-keygen \
|
|
||||||
-t "${hostKey.type}" \
|
|
||||||
${lib.optionalString (hostKey ? bits) "-b ${toString hostKey.bits}"} \
|
|
||||||
${lib.optionalString (hostKey ? rounds) "-a ${toString hostKey.rounds}"} \
|
|
||||||
${lib.optionalString (hostKey ? comment) "-C '${hostKey.comment}'"} \
|
|
||||||
${lib.optionalString (hostKey ? openSSHFormat && hostKey.openSSHFormat) "-o"} \
|
|
||||||
-f "${path}" \
|
|
||||||
-N ""
|
|
||||||
chown ${config.home.username} ${path}*
|
|
||||||
chgrp ${config.home.username} ${path}*
|
|
||||||
fi
|
|
||||||
''
|
|
||||||
}";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
config.programs.openssh.hostKeys
|
|
||||||
);
|
|
||||||
}
|
|
||||||
)
|
|
||||||
(lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
files = lib.lists.flatten (
|
|
||||||
builtins.map (hostKey: [".ssh/${hostKey.path}" ".ssh/${hostKey.path}.pub"]) config.programs.openssh.hostKeys
|
|
||||||
);
|
|
||||||
};
|
|
||||||
})
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.android-studio = {
|
|
||||||
enable = lib.mkEnableOption "enable android-studio";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.android-studio.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
android-studio
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/Google/AndroidStudio"
|
|
||||||
".android"
|
|
||||||
".gradle"
|
|
||||||
"${config.xdg.cacheHome}/Google/AndroidStudio"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf (config.programs.anki.enable && config.impermanence.enable) {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
".local/share/Anki2"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.bitwarden = {
|
|
||||||
enable = lib.mkEnableOption "enable bitwarden";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.bitwarden.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
bitwarden-desktop
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/Bitwarden"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.bruno = {
|
|
||||||
enable = lib.mkEnableOption "enable bruno";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.bruno.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
bruno
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/bruno/"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.programs.calibre.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
calibre
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/calibre"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.davinci-resolve = {
|
|
||||||
enable = lib.mkEnableOption "enable davinci-resolve";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.davinci-resolve.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
davinci-resolve
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.dataHome}/DaVinciResolve"
|
|
||||||
"${config.xdg.configHome}/blackmagic"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.dbeaver-bin = {
|
|
||||||
enable = lib.mkEnableOption "enable dbeaver";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.dbeaver-bin.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
dbeaver-bin
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.dataHome}/DBeaverData/"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./android-studio.nix
|
|
||||||
./firefox.nix
|
|
||||||
./signal.nix
|
|
||||||
./bitwarden.nix
|
|
||||||
./makemkv.nix
|
|
||||||
./obs.nix
|
|
||||||
./anki.nix
|
|
||||||
./piper.nix
|
|
||||||
./qbittorrent.nix
|
|
||||||
./discord.nix
|
|
||||||
./obsidian.nix
|
|
||||||
./prostudiomasters.nix
|
|
||||||
./idea.nix
|
|
||||||
./kdenlive.nix
|
|
||||||
./kicad.nix
|
|
||||||
./krita.nix
|
|
||||||
./protonvpn.nix
|
|
||||||
./calibre.nix
|
|
||||||
./bruno.nix
|
|
||||||
./dbeaver.nix
|
|
||||||
./dungeon-draft.nix
|
|
||||||
./steam.nix
|
|
||||||
./vscode
|
|
||||||
./ungoogled-chromium.nix
|
|
||||||
./libreoffice.nix
|
|
||||||
./mapillary-uploader.nix
|
|
||||||
./inkscape.nix
|
|
||||||
./gimp.nix
|
|
||||||
./guild-wars-2.nix
|
|
||||||
./proxmark3.nix
|
|
||||||
./freecad.nix
|
|
||||||
./onionshare.nix
|
|
||||||
./mfoc.nix
|
|
||||||
./noita-entangled-worlds.nix
|
|
||||||
./pdfarranger.nix
|
|
||||||
./picard.nix
|
|
||||||
./qflipper.nix
|
|
||||||
./openvpn.nix
|
|
||||||
./noisetorch.nix
|
|
||||||
./olympus.nix
|
|
||||||
./openrgb.nix
|
|
||||||
./via.nix
|
|
||||||
./vortex.nix
|
|
||||||
./davinci-resolve.nix
|
|
||||||
./gdx-liftoff.nix
|
|
||||||
./tor-browser.nix
|
|
||||||
./vmware-workstation.nix
|
|
||||||
./proton-mail-pwa.nix
|
|
||||||
./proton-calendar-pwa.nix
|
|
||||||
./matrix-cyberia-pwa.nix
|
|
||||||
./e621-downloader.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.programs.discord.enable (lib.mkMerge [
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/discord/"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.dungeon-draft;
|
|
||||||
in {
|
|
||||||
options.programs.dungeon-draft = {
|
|
||||||
enable = lib.mkEnableOption "Dungeon Draft";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion = !cfg.enable;
|
|
||||||
message = ''
|
|
||||||
Dungeon Draft module is not yet fully configured.
|
|
||||||
Please download the Dungeon Draft executable (.exe) from the official website,
|
|
||||||
then configure the Wine environment and executable path as needed.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.e621-downloader = {
|
|
||||||
enable = lib.mkEnableOption "enable e621-downloader";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.e621-downloader.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
e621-downloader
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
buildProfilePersistence = profile: {
|
|
||||||
directories = [
|
|
||||||
".mozilla/firefox/${profile}/extensions"
|
|
||||||
];
|
|
||||||
files = [
|
|
||||||
".mozilla/firefox/${profile}/cookies.sqlite"
|
|
||||||
".mozilla/firefox/${profile}/favicons.sqlite"
|
|
||||||
# Permissions and ${profileName} levels for each site
|
|
||||||
".mozilla/firefox/${profile}/permissions.sqlite"
|
|
||||||
".mozilla/firefox/${profile}/content-prefs.sqlite"
|
|
||||||
# Browser history and bookmarks
|
|
||||||
".mozilla/firefox/${profile}/places.sqlite"
|
|
||||||
# I guess this is useful?
|
|
||||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=1511384
|
|
||||||
# https://developer.mozilla.org/en-US/docs/Web/API/Storage_API/Storage_quotas_and_eviction_criteria
|
|
||||||
".mozilla/firefox/${profile}/storage.sqlite"
|
|
||||||
# Extension configuration
|
|
||||||
".mozilla/firefox/${profile}/extension-settings.json"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
in {
|
|
||||||
config = lib.mkIf (config.programs.firefox.enable && config.impermanence.enable) {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = lib.mkMerge (
|
|
||||||
(
|
|
||||||
lib.attrsets.mapAttrsToList
|
|
||||||
(profile: _: buildProfilePersistence profile)
|
|
||||||
config.programs.firefox.profiles
|
|
||||||
)
|
|
||||||
++ (
|
|
||||||
lib.lists.optional
|
|
||||||
((builtins.length (lib.attrsets.mapAttrsToList (key: value: value) config.programs.firefox.profiles)) == 0)
|
|
||||||
(buildProfilePersistence "default")
|
|
||||||
)
|
|
||||||
);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.freecad = {
|
|
||||||
enable = lib.mkEnableOption "enable freecad";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.freecad.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
freecad
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/FreeCAD"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.gdx-liftoff = {
|
|
||||||
enable = lib.mkEnableOption "enable gdx-liftoff";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.gdx-liftoff.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
gdx-liftoff
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.gimp = {
|
|
||||||
enable = lib.mkEnableOption "enable gimp";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.gimp.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
gimp
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/GIMP"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.guild-wars-2;
|
|
||||||
in {
|
|
||||||
options.programs.guild-wars-2 = {
|
|
||||||
enable = lib.mkEnableOption "Guild Wars 2";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion = !cfg.enable;
|
|
||||||
message = ''
|
|
||||||
Guild Wars 2 module is not yet fully configured.
|
|
||||||
Please install Guild Wars 2 manually via Steam or the official client,
|
|
||||||
then configure the Wine environment as needed.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.jetbrains.idea-oss = {
|
|
||||||
enable = lib.mkEnableOption "enable idea-oss";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.jetbrains.idea-oss.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
jetbrains.idea-oss
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
# configuration
|
|
||||||
"${config.xdg.configHome}/JetBrains/"
|
|
||||||
# plugins
|
|
||||||
"${config.xdg.dataHome}/JetBrains/"
|
|
||||||
# System and Logs
|
|
||||||
"${config.xdg.cacheHome}/JetBrains/"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.inkscape = {
|
|
||||||
enable = lib.mkEnableOption "enable inkscape";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.inkscape.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
inkscape
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/inkscape"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.kdenlive;
|
|
||||||
in {
|
|
||||||
options.programs.kdenlive = {
|
|
||||||
enable = lib.mkEnableOption "kdenlive";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.kdePackages.kdenlive;
|
|
||||||
description = "The kdenlive package to install.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
cfg.package
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/kdenliverc"
|
|
||||||
"${config.xdg.dataHome}/kdenlive"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.kicad = {
|
|
||||||
enable = lib.mkEnableOption "enable kicad";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.kicad.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
kicad
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
# TODO:
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.krita = {
|
|
||||||
enable = lib.mkEnableOption "enable krita";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.krita.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
krita
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/kritarc"
|
|
||||||
"${config.xdg.dataHome}/krita"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.libreoffice = {
|
|
||||||
enable = lib.mkEnableOption "enable libreoffice";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.libreoffice.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
libreoffice
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/libreoffice"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.makemkv = {
|
|
||||||
enable = lib.mkEnableOption "enable makemkv";
|
|
||||||
appKeyFile = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
destinationDir = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.makemkv.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
makemkv
|
|
||||||
];
|
|
||||||
|
|
||||||
sops.templates."MakeMKV.settings.conf".content = ''
|
|
||||||
app_DestinationDir = "${config.programs.makemkv.destinationDir}"
|
|
||||||
app_DestinationType = "2"
|
|
||||||
app_Key = "${config.programs.makemkv.appKeyFile}"
|
|
||||||
'';
|
|
||||||
|
|
||||||
home.file.".MakeMKV/settings.conf".source = config.lib.file.mkOutOfStoreSymlink config.sops.templates."MakeMKV.settings.conf".path;
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
".MakeMKV"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
with lib; let
|
|
||||||
cfg = config.programs.mapillary-uploader;
|
|
||||||
in {
|
|
||||||
options.programs.mapillary-uploader = {
|
|
||||||
enable = mkEnableOption "Mapillary Desktop Uploader";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = [pkgs.mapillary-uploader];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/mapillary-uploader"
|
|
||||||
"${config.xdg.dataHome}/mapillary-uploader"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,56 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.matrix-cyberia-pwa;
|
|
||||||
isChromium = cfg.package == pkgs.chromium;
|
|
||||||
isBrowserImpermanenceSupported = cfg.package == pkgs.chromium;
|
|
||||||
in {
|
|
||||||
options.programs.matrix-cyberia-pwa = {
|
|
||||||
enable = lib.mkEnableOption "enable Matrix Cyberia PWA";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.chromium;
|
|
||||||
description = "Browser package to use for the PWA";
|
|
||||||
};
|
|
||||||
impermanence = {
|
|
||||||
enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = isBrowserImpermanenceSupported;
|
|
||||||
description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
warnings =
|
|
||||||
lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported)
|
|
||||||
"matrix-cyberia-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}";
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf isChromium {
|
|
||||||
xdg.desktopEntries.matrix-cyberia-pwa = {
|
|
||||||
name = "Matrix (Cyberia)";
|
|
||||||
type = "Application";
|
|
||||||
exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://chat.cyberia.club/";
|
|
||||||
icon = "matrix";
|
|
||||||
terminal = false;
|
|
||||||
categories = ["Network" "InstantMessaging"];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
(
|
|
||||||
lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) {
|
|
||||||
home.persistence."/persist${config.home.homeDirectory}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/chromium"
|
|
||||||
];
|
|
||||||
allowOther = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.mfoc = {
|
|
||||||
enable = lib.mkEnableOption "enable mfoc";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.mfoc.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
mfoc
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.noisetorch = {
|
|
||||||
enable = lib.mkEnableOption "enable noisetorch";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.noisetorch.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
noisetorch
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,18 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options = {
|
|
||||||
programs.noita-entangled-worlds = {
|
|
||||||
enable = lib.mkEnableOption "Noita Entangled Worlds multiplayer mod";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.noita-entangled-worlds.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
noita_entangled_worlds
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.programs.obs-studio.enable (lib.mkMerge [
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/obs-studio"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
config = lib.mkIf config.programs.obsidian.enable (lib.mkMerge [
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/obsidian"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.olympus;
|
|
||||||
in {
|
|
||||||
options.programs.olympus = {
|
|
||||||
enable = lib.mkEnableOption "olympus";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.olympus;
|
|
||||||
description = "The olympus package to install.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = [
|
|
||||||
cfg.package
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/olympus"
|
|
||||||
"${config.xdg.dataHome}/olympus"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.onionshare = {
|
|
||||||
enable = lib.mkEnableOption "enable onionshare";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.onionshare.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
onionshare
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.openrgb = {
|
|
||||||
enable = lib.mkEnableOption "enable openrgb";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.openrgb.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
openrgb
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/OpenRGB"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.openvpn = {
|
|
||||||
enable = lib.mkEnableOption "enable openvpn";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.openvpn.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
openvpn
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.pdfarranger = {
|
|
||||||
enable = lib.mkEnableOption "enable pdfarranger";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.pdfarranger.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
pdfarranger
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.picard = {
|
|
||||||
enable = lib.mkEnableOption "enable picard";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.picard.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
picard
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/MusicBrainz"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.piper = {
|
|
||||||
enable = lib.mkEnableOption "enable piper";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.piper.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
piper
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.prostudiomasters = {
|
|
||||||
enable = lib.mkEnableOption "enable prostudiomasters";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.prostudiomasters.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
prostudiomasters
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/ProStudioMasters"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.proton-calendar-pwa;
|
|
||||||
isChromium = cfg.package == pkgs.chromium;
|
|
||||||
isBrowserImpermanenceSupported = cfg.package == pkgs.chromium;
|
|
||||||
in {
|
|
||||||
options.programs.proton-calendar-pwa = {
|
|
||||||
enable = lib.mkEnableOption "enable Proton Calendar PWA";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.chromium;
|
|
||||||
description = "Browser package to use for the PWA";
|
|
||||||
};
|
|
||||||
impermanence = {
|
|
||||||
enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = isBrowserImpermanenceSupported;
|
|
||||||
description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
warnings =
|
|
||||||
lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported)
|
|
||||||
"proton-calendar-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}";
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf isChromium {
|
|
||||||
xdg.desktopEntries.proton-calendar-pwa = {
|
|
||||||
name = "Proton Calendar";
|
|
||||||
type = "Application";
|
|
||||||
exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://calendar.proton.me";
|
|
||||||
icon = "chrome-ojibjkjikcpjonjjngfkegflhmffeemk-Default";
|
|
||||||
terminal = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
(
|
|
||||||
lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) {
|
|
||||||
home.persistence."/persist${config.home.homeDirectory}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/chromium"
|
|
||||||
];
|
|
||||||
allowOther = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,55 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.proton-mail-pwa;
|
|
||||||
isChromium = cfg.package == pkgs.chromium;
|
|
||||||
isBrowserImpermanenceSupported = cfg.package == pkgs.chromium;
|
|
||||||
in {
|
|
||||||
options.programs.proton-mail-pwa = {
|
|
||||||
enable = lib.mkEnableOption "enable Proton Mail PWA";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.chromium;
|
|
||||||
description = "Browser package to use for the PWA";
|
|
||||||
};
|
|
||||||
impermanence = {
|
|
||||||
enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = isBrowserImpermanenceSupported;
|
|
||||||
description = "Enable impermanence configuration for the PWA. Only automatically enabled when using chromium.";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
warnings =
|
|
||||||
lib.optional (config.impermanence.enable && !isBrowserImpermanenceSupported)
|
|
||||||
"proton-mail-pwa: Using unsupported package. You will need to manually configure pwa for ${cfg.package.pname}. Supported package(s) ${pkgs.chromium.pname}";
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf isChromium {
|
|
||||||
xdg.desktopEntries.proton-mail-pwa = {
|
|
||||||
name = "Proton Mail";
|
|
||||||
type = "Application";
|
|
||||||
exec = "${cfg.package}/bin/${cfg.package.pname} --app=https://mail.proton.me";
|
|
||||||
icon = "chrome-jnpecgipniidlgicjocehkhajgdnjekh-Default";
|
|
||||||
terminal = false;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
(
|
|
||||||
lib.mkIf (config.impermanence.enable && cfg.impermanence.enable && isChromium) {
|
|
||||||
home.persistence."/persist${config.home.homeDirectory}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/chromium"
|
|
||||||
];
|
|
||||||
allowOther = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.protonvpn-gui = {
|
|
||||||
enable = lib.mkEnableOption "enable protonvpn";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.protonvpn-gui.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
proton-vpn
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/protonvpn"
|
|
||||||
"${config.xdg.configHome}/Proton"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.proxmark3 = {
|
|
||||||
enable = lib.mkEnableOption "enable proxmark3";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.proxmark3.enable {
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
proxmark3
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.qbittorrent = {
|
|
||||||
enable = lib.mkEnableOption "enable qbittorrent";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.qbittorrent.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
qbittorrent
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/qBittorrent"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.qflipper = {
|
|
||||||
enable = lib.mkEnableOption "enable qflipper";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.qflipper.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
qFlipper
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/qFlipper"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.signal-desktop = {
|
|
||||||
enable = lib.mkEnableOption "enable signal";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.signal-desktop.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
signal-desktop
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/Signal"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.steam = {
|
|
||||||
enable = lib.mkEnableOption "enable steam";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.steam.enable (
|
|
||||||
lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
steam
|
|
||||||
steam.run
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
{
|
|
||||||
directory = "${config.xdg.dataHome}/Steam";
|
|
||||||
method = "symlink";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
# TODO: bind impermanence config
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.tor-browser = {
|
|
||||||
enable = lib.mkEnableOption "enable tor-browser";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.tor-browser.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
tor-browser
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.dataHome}/torbrowser"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.ungoogled-chromium = {
|
|
||||||
enable = lib.mkEnableOption "enable ungoogled-chromium";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.ungoogled-chromium.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
ungoogled-chromium
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/chromium"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.via = {
|
|
||||||
enable = lib.mkEnableOption "enable via";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.via.enable (lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
via
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
"${config.xdg.configHome}/via"
|
|
||||||
"${config.xdg.dataHome}/via"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
@ -1,36 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.vmware-workstation = {
|
|
||||||
enable = lib.mkEnableOption "enable VMware Workstation";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.programs.vmware-workstation.enable (
|
|
||||||
lib.mkMerge [
|
|
||||||
{
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
vmware-workstation
|
|
||||||
];
|
|
||||||
}
|
|
||||||
(
|
|
||||||
lib.mkIf config.impermanence.enable {
|
|
||||||
home.persistence."${config.impermanence.persistencePath}" = {
|
|
||||||
directories = [
|
|
||||||
{
|
|
||||||
directory = ".vmware";
|
|
||||||
method = "symlink";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
directory = "vmware";
|
|
||||||
method = "symlink";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
)
|
|
||||||
]
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
cfg = config.programs.vortex;
|
|
||||||
in {
|
|
||||||
options.programs.vortex = {
|
|
||||||
enable = lib.mkEnableOption "Vortex (Nexus Mods manager)";
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
assertions = [
|
|
||||||
{
|
|
||||||
assertion = !cfg.enable;
|
|
||||||
message = ''
|
|
||||||
Vortex module is not yet fully configured.
|
|
||||||
Please download and install Vortex manually from the Nexus Mods website,
|
|
||||||
then configure the Wine environment and dependencies as needed.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,45 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepository = pkgs.codium-extensions;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.aiCode = {
|
|
||||||
enable = lib.mkEnableOption "should the ai code extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "ai-code" {};
|
|
||||||
ollamaHost = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
description = "what host should be used for ollama";
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
inlineCompletion = {
|
|
||||||
enable = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
description = "should inline completion be enabled";
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
model = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.str;
|
|
||||||
description = "what model should be used for ollama";
|
|
||||||
default = null;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.aiCode.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.aiCode.extension
|
|
||||||
];
|
|
||||||
userSettings = {
|
|
||||||
"aiCode.ollamaHost" = lib.mkIf (config.extraExtensions.aiCode.ollamaHost != null) config.extraExtensions.aiCode.ollamaHost;
|
|
||||||
"aiCode.inlineCompletion.enable" = config.extraExtensions.aiCode.inlineCompletion.enable;
|
|
||||||
"aiCode.inlineCompletion.model" = lib.mkIf (config.extraExtensions.aiCode.inlineCompletion.model != null) config.extraExtensions.aiCode.inlineCompletion.model;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.alejandra = {
|
|
||||||
enable = lib.mkEnableOption "Enable Alejandra extension for Nix formatting";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "alejandra" {
|
|
||||||
default = ["kamadorueda" "alejandra"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.alejandra.enable {
|
|
||||||
extensions = [config.extraExtensions.alejandra.extension];
|
|
||||||
userSettings = {
|
|
||||||
"[nix]" = {
|
|
||||||
"editor.defaultFormatter" = "kamadorueda.alejandra";
|
|
||||||
"editor.formatOnPaste" = true;
|
|
||||||
"editor.formatOnSave" = true;
|
|
||||||
"editor.formatOnType" = true;
|
|
||||||
};
|
|
||||||
"alejandra.program" = "alejandra";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.astroVscode = {
|
|
||||||
enable = lib.mkEnableOption "should the astro-vscode extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "astro-vscode" {
|
|
||||||
default = ["astro-build" "astro-vscode"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.astroVscode.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.astroVscode.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.atomKeybindings = {
|
|
||||||
enable = lib.mkEnableOption "should the atom keybindings extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "atom-keybindings" {
|
|
||||||
default = ["ms-vscode" "atom-keybindings"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.atomKeybindings.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.atomKeybindings.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.autoRenameTag = {
|
|
||||||
enable = lib.mkEnableOption "should the auto-rename-tag extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "auto-rename-tag" {
|
|
||||||
default = ["formulahendry" "auto-rename-tag"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.autoRenameTag.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.autoRenameTag.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,237 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
|
|
||||||
mcp-nixos = inputs.mcp-nixos.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
|
||||||
|
|
||||||
anyProfileHasInstallTool = lib.any (
|
|
||||||
profile:
|
|
||||||
profile.extraExtensions.claudeDev.enable
|
|
||||||
&& profile.extraExtensions.claudeDev.installTool
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles);
|
|
||||||
|
|
||||||
getInstallToolPackage = lib.findFirst (package: package != null) pkgs.cline (map (
|
|
||||||
profile:
|
|
||||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.installTool
|
|
||||||
then profile.extraExtensions.claudeDev.package
|
|
||||||
else null
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles));
|
|
||||||
|
|
||||||
anyProfileHasMcpNixos = lib.any (
|
|
||||||
profile:
|
|
||||||
profile.extraExtensions.claudeDev.enable
|
|
||||||
&& profile.extraExtensions.claudeDev.mcp.nixos.enable
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles);
|
|
||||||
|
|
||||||
anyProfileHasMcpEslint = lib.any (
|
|
||||||
profile:
|
|
||||||
profile.extraExtensions.claudeDev.enable
|
|
||||||
&& profile.extraExtensions.claudeDev.mcp.eslint.enable
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles);
|
|
||||||
|
|
||||||
anyProfileHasMcpVitest = lib.any (
|
|
||||||
profile:
|
|
||||||
profile.extraExtensions.claudeDev.enable
|
|
||||||
&& profile.extraExtensions.claudeDev.mcp.vitest.enable
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles);
|
|
||||||
|
|
||||||
anyProfileHasMcpSleep = lib.any (
|
|
||||||
profile:
|
|
||||||
profile.extraExtensions.claudeDev.enable
|
|
||||||
&& profile.extraExtensions.claudeDev.mcp.sleep.enable
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles);
|
|
||||||
|
|
||||||
anyProfileHasMcp = anyProfileHasMcpNixos || anyProfileHasMcpEslint || anyProfileHasMcpVitest || anyProfileHasMcpSleep;
|
|
||||||
|
|
||||||
getMcpTimeout = serverName:
|
|
||||||
lib.findFirst (timeout: timeout != null) null (map (
|
|
||||||
profile:
|
|
||||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.mcp.${serverName}.enable
|
|
||||||
then profile.extraExtensions.claudeDev.mcp.${serverName}.timeout
|
|
||||||
else null
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles));
|
|
||||||
|
|
||||||
getMcpAutoApprove = serverName:
|
|
||||||
lib.foldl' (
|
|
||||||
acc: profile:
|
|
||||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.mcp.${serverName}.enable
|
|
||||||
then acc // profile.extraExtensions.claudeDev.mcp.${serverName}.autoApprove
|
|
||||||
else acc
|
|
||||||
) {} (lib.attrValues config.programs.vscode.profiles);
|
|
||||||
|
|
||||||
getMcpPackage = serverName:
|
|
||||||
lib.findFirst (package: package != null) null (map (
|
|
||||||
profile:
|
|
||||||
if profile.extraExtensions.claudeDev.enable && profile.extraExtensions.claudeDev.mcp.${serverName}.enable
|
|
||||||
then profile.extraExtensions.claudeDev.mcp.${serverName}.package
|
|
||||||
else null
|
|
||||||
) (lib.attrValues config.programs.vscode.profiles));
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.claudeDev = {
|
|
||||||
enable = lib.mkEnableOption "should the claude-dev extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "claude-dev" {
|
|
||||||
default = ["saoudrizwan" "claude-dev"];
|
|
||||||
};
|
|
||||||
|
|
||||||
installTool = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = true;
|
|
||||||
description = "Whether to install the cline CLI tool for subagent support when the extension is enabled";
|
|
||||||
};
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.package;
|
|
||||||
default = pkgs.cline;
|
|
||||||
description = "The package to install for the cline CLI tool";
|
|
||||||
};
|
|
||||||
|
|
||||||
mcp = {
|
|
||||||
nixos = {
|
|
||||||
enable = lib.mkEnableOption "enable NixOS MCP server for Claude Dev";
|
|
||||||
autoApprove = {
|
|
||||||
nixos_search = lib.mkEnableOption "should the nixos_search tool be auto approved for the nixos MCP server";
|
|
||||||
nixos_info = lib.mkEnableOption "should the nixos_info tool be auto approved for the nixos MCP server";
|
|
||||||
home_manager_search = lib.mkEnableOption "should the home_manager_search tool be auto approved for the nixos MCP server";
|
|
||||||
home_manager_info = lib.mkEnableOption "should the home_manager_info tool be auto approved for the nixos MCP server";
|
|
||||||
darwin_search = lib.mkEnableOption "should the darwin_search tool be auto approved for the nixos MCP server";
|
|
||||||
darwin_info = lib.mkEnableOption "should the darwin_info tool be auto approved for the nixos MCP server";
|
|
||||||
nixos_flakes_search = lib.mkEnableOption "should the nixos_flakes_search tool be auto approved for the nixos MCP server";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
eslint = {
|
|
||||||
enable = lib.mkEnableOption "enable ESLint MCP server for Claude Dev";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "@eslint/mcp@latest";
|
|
||||||
description = "NPM package to use for ESLint MCP server";
|
|
||||||
};
|
|
||||||
timeout = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.int;
|
|
||||||
default = null;
|
|
||||||
description = "Timeout in seconds for ESLint MCP server operations";
|
|
||||||
};
|
|
||||||
autoApprove = {
|
|
||||||
lint-files = lib.mkEnableOption "Should the lint-files tool be auto approved for ESLint MCP server";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
vitest = {
|
|
||||||
enable = lib.mkEnableOption "enable Vitest MCP server for Claude Dev";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "@djankies/vitest-mcp";
|
|
||||||
description = "NPM package to use for Vitest MCP server";
|
|
||||||
};
|
|
||||||
timeout = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.int;
|
|
||||||
default = null;
|
|
||||||
description = "Timeout in seconds for Vitest MCP server operations";
|
|
||||||
};
|
|
||||||
autoApprove = {
|
|
||||||
list_tests = lib.mkEnableOption "Should the list_tests tool be auto approved for Vitest MCP server";
|
|
||||||
run_tests = lib.mkEnableOption "Should the run_tests tool be auto approved for Vitest MCP server";
|
|
||||||
analyze_coverage = lib.mkEnableOption "Should the analyze_coverage tool be auto approved for Vitest MCP server";
|
|
||||||
set_project_root = lib.mkEnableOption "Should the set_project_root tool be auto approved for Vitest MCP server";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
sleep = {
|
|
||||||
enable = lib.mkEnableOption "enable Sleep MCP server for Claude Dev";
|
|
||||||
package = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = "sleep-mcp";
|
|
||||||
description = "NPM package to use for Sleep MCP server";
|
|
||||||
};
|
|
||||||
timeout = lib.mkOption {
|
|
||||||
type = lib.types.nullOr lib.types.int;
|
|
||||||
default = null;
|
|
||||||
description = "Timeout in seconds for Sleep MCP server operations";
|
|
||||||
};
|
|
||||||
autoApprove = {
|
|
||||||
sleep = lib.mkEnableOption "Should the sleep tool be auto approved for Sleep MCP server";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.claudeDev.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.claudeDev.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
|
||||||
(lib.mkIf anyProfileHasInstallTool {
|
|
||||||
home.packages = [
|
|
||||||
getInstallToolPackage
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
(lib.mkIf anyProfileHasMcpNixos {
|
|
||||||
home.packages = [
|
|
||||||
mcp-nixos
|
|
||||||
];
|
|
||||||
})
|
|
||||||
|
|
||||||
(lib.mkIf anyProfileHasMcp {
|
|
||||||
home.file."${config.xdg.configHome}/VSCodium/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json" = {
|
|
||||||
text = builtins.toJSON {
|
|
||||||
mcpServers =
|
|
||||||
(lib.optionalAttrs anyProfileHasMcpNixos {
|
|
||||||
nixos = {
|
|
||||||
command = "${mcp-nixos}/bin/mcp-nixos";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
// (lib.optionalAttrs anyProfileHasMcpEslint {
|
|
||||||
eslint =
|
|
||||||
{
|
|
||||||
command = "${pkgs.nodejs}/bin/npx";
|
|
||||||
args = ["-y" (getMcpPackage "eslint")];
|
|
||||||
}
|
|
||||||
// (lib.optionalAttrs ((getMcpTimeout "eslint") != null) {
|
|
||||||
timeout = getMcpTimeout "eslint";
|
|
||||||
})
|
|
||||||
// (lib.optionalAttrs ((getMcpAutoApprove "eslint") != {}) {
|
|
||||||
autoApprove = builtins.attrNames (lib.filterAttrs (_: v: v) (getMcpAutoApprove "eslint"));
|
|
||||||
});
|
|
||||||
})
|
|
||||||
// (lib.optionalAttrs anyProfileHasMcpVitest {
|
|
||||||
vitest =
|
|
||||||
{
|
|
||||||
command = "${pkgs.nodejs}/bin/npx";
|
|
||||||
args = ["-y" (getMcpPackage "vitest")];
|
|
||||||
}
|
|
||||||
// (lib.optionalAttrs ((getMcpTimeout "vitest") != null) {
|
|
||||||
timeout = getMcpTimeout "vitest";
|
|
||||||
})
|
|
||||||
// (lib.optionalAttrs ((getMcpAutoApprove "vitest") != {}) {
|
|
||||||
autoApprove = builtins.attrNames (lib.filterAttrs (_: v: v) (getMcpAutoApprove "vitest"));
|
|
||||||
});
|
|
||||||
})
|
|
||||||
// (lib.optionalAttrs anyProfileHasMcpSleep {
|
|
||||||
sleep-mcp =
|
|
||||||
{
|
|
||||||
command = "${pkgs.nodejs}/bin/npx";
|
|
||||||
args = ["-y" (getMcpPackage "sleep")];
|
|
||||||
}
|
|
||||||
// (lib.optionalAttrs ((getMcpTimeout "sleep") != null) {
|
|
||||||
timeout = getMcpTimeout "sleep";
|
|
||||||
})
|
|
||||||
// (lib.optionalAttrs ((getMcpAutoApprove "sleep") != {}) {
|
|
||||||
autoApprove = builtins.attrNames (lib.filterAttrs (_: v: v) (getMcpAutoApprove "sleep"));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
force = true;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,40 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.vscode-marketplace;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.conventionalCommits = {
|
|
||||||
enable = lib.mkEnableOption "Enable VSCode Conventional Commits extension";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "conventional-commits" {
|
|
||||||
default = ["vivaxy" "vscode-conventional-commits"];
|
|
||||||
};
|
|
||||||
|
|
||||||
gitmoji = lib.mkEnableOption "should emoji be prompted for as a part of the commit message./";
|
|
||||||
|
|
||||||
promptScopes = lib.mkEnableOption "prompting for scopes in conventional commits";
|
|
||||||
|
|
||||||
promptFooter = lib.mkEnableOption "prompting for footer in conventional commits";
|
|
||||||
|
|
||||||
showNewVersionNotes = lib.mkEnableOption "showing new version notes for conventional commits";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.conventionalCommits.enable {
|
|
||||||
extensions = [config.extraExtensions.conventionalCommits.extension];
|
|
||||||
|
|
||||||
userSettings = {
|
|
||||||
"conventionalCommits.gitmoji" = config.extraExtensions.conventionalCommits.gitmoji;
|
|
||||||
"conventionalCommits.promptScopes" = config.extraExtensions.conventionalCommits.promptScopes;
|
|
||||||
"conventionalCommits.promptFooter" = config.extraExtensions.conventionalCommits.promptFooter;
|
|
||||||
"conventionalCommits.showNewVersionNotes" = config.extraExtensions.conventionalCommits.showNewVersionNotes;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,31 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./oneDark.nix
|
|
||||||
./atomKeybindings.nix
|
|
||||||
./aiCode.nix
|
|
||||||
./alejandra.nix
|
|
||||||
./nixIde.nix
|
|
||||||
./autoRenameTag.nix
|
|
||||||
./es7ReactJsSnippets.nix
|
|
||||||
./liveServer.nix
|
|
||||||
./tauriVscode.nix
|
|
||||||
./vscodeEslint.nix
|
|
||||||
./vscodeJest.nix
|
|
||||||
./vscodeStandard.nix
|
|
||||||
./vscodeStylelint.nix
|
|
||||||
./go.nix
|
|
||||||
./evenBetterToml.nix
|
|
||||||
./openRemoteSsh.nix
|
|
||||||
./platformIO.nix
|
|
||||||
./rustAnalyzer.nix
|
|
||||||
./astroVscode.nix
|
|
||||||
./vscodeMdx.nix
|
|
||||||
./claudeDev.nix
|
|
||||||
./nearley.nix
|
|
||||||
./vitest.nix
|
|
||||||
./direnv.nix
|
|
||||||
./conventionalCommits.nix
|
|
||||||
./openDyslexicFont.nix
|
|
||||||
./graphql.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.vscode-marketplace;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.direnv = {
|
|
||||||
enable = lib.mkEnableOption "Enable direnv extension";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "direnv" {
|
|
||||||
default = ["mkhl" "direnv"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.direnv.enable {
|
|
||||||
extensions = [config.extraExtensions.direnv.extension];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.es7ReactJsSnippets = {
|
|
||||||
enable = lib.mkEnableOption "should the es7-react-js-snippets extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "es7-react-js-snippets" {
|
|
||||||
default = ["dsznajder" "es7-react-js-snippets"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.es7ReactJsSnippets.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.es7ReactJsSnippets.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.evenBetterToml = {
|
|
||||||
enable = lib.mkEnableOption "should the even-better-toml extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "even-better-toml" {
|
|
||||||
default = ["tamasfe" "even-better-toml"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.evenBetterToml.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.evenBetterToml.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,34 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.go = {
|
|
||||||
enable = lib.mkEnableOption "should the go extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "go" {
|
|
||||||
default = ["golang" "go"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.go.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.go.extension
|
|
||||||
];
|
|
||||||
userSettings = {
|
|
||||||
"go.alternateTools" = {
|
|
||||||
"gopls" = "gopls";
|
|
||||||
};
|
|
||||||
"go.toolsManagement.autoUpdate" = false;
|
|
||||||
"go.useLanguageServer" = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.graphql = {
|
|
||||||
enable = lib.mkEnableOption "should the graphql highlighting extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "vscode-graphql" {
|
|
||||||
default = ["graphql" "vscode-graphql-syntax"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.graphql.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.graphql.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.liveServer = {
|
|
||||||
enable = lib.mkEnableOption "should the live-server extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "live-server" {
|
|
||||||
default = ["ms-vscode" "live-server"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.liveServer.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.liveServer.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.vscode-marketplace;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.nearley = {
|
|
||||||
enable = lib.mkEnableOption "should the nearley extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "nearley" {
|
|
||||||
default = ["karyfoundation" "nearley"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.nearley.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.nearley.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,29 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.nixIde = {
|
|
||||||
enable = lib.mkEnableOption "Enable Nix IDE extension";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "nix-ide" {
|
|
||||||
default = ["jnoortheen" "nix-ide"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.nixIde.enable {
|
|
||||||
extensions = [config.extraExtensions.nixIde.extension];
|
|
||||||
userSettings = {
|
|
||||||
"nix.enableLanguageServer" = true;
|
|
||||||
"nix.serverPath" = "nil";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.oneDark = {
|
|
||||||
enable = lib.mkEnableOption "should the one dark theme for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "onedark" {
|
|
||||||
default = ["akamud" "vscode-theme-onedark"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.oneDark.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.oneDark.extension
|
|
||||||
];
|
|
||||||
userSettings = {
|
|
||||||
"workbench.colorTheme" = "Atom One Dark";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,49 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.openDyslexicFont = {
|
|
||||||
enable = lib.mkEnableOption "should OpenDyslexic font be set as the default font for VSCode";
|
|
||||||
package = lib.mkPackageOption pkgs "nerd-fonts.open-dyslexic" {
|
|
||||||
default = ["nerd-fonts" "open-dyslexic"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.openDyslexicFont.enable {
|
|
||||||
userSettings = {
|
|
||||||
"editor.fontFamily" = "'OpenDyslexicM Nerd Font Mono', Droid Sans Mono, monospace";
|
|
||||||
"editor.fontSize" = 14;
|
|
||||||
"editor.letterSpacing" = -0.3;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
config = let
|
|
||||||
enabledProfiles =
|
|
||||||
lib.filter (profile: profile.extraExtensions.openDyslexicFont.enable or false)
|
|
||||||
(lib.attrValues config.programs.vscode.profiles);
|
|
||||||
|
|
||||||
anyProfileUsesOpenDyslexicFont = enabledProfiles != [];
|
|
||||||
|
|
||||||
fontPackages = lib.unique (map (profile: profile.extraExtensions.openDyslexicFont.package) enabledProfiles);
|
|
||||||
in {
|
|
||||||
# Ensure OpenDyslexic font packages are installed when any VSCode profile uses them
|
|
||||||
home.packages = fontPackages;
|
|
||||||
|
|
||||||
fonts.fontconfig.enable = lib.mkIf anyProfileUsesOpenDyslexicFont true;
|
|
||||||
|
|
||||||
# Add assertion to ensure the fonts are available
|
|
||||||
assertions =
|
|
||||||
map (fontPkg: {
|
|
||||||
assertion = lib.elem fontPkg config.home.packages;
|
|
||||||
message = "OpenDyslexic font package '${fontPkg.name or "unknown"}' must be installed when using openDyslexicFont extension for VSCode.";
|
|
||||||
})
|
|
||||||
fontPackages;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.openRemoteSsh = {
|
|
||||||
enable = lib.mkEnableOption "should the open-remote-ssh extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "open-remote-ssh" {
|
|
||||||
default = ["jeanp413" "open-remote-ssh"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.openRemoteSsh.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.openRemoteSsh.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.platformIO = {
|
|
||||||
enable = lib.mkEnableOption "should the platformIO extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "platformIO" {
|
|
||||||
default = ["pioarduino" "pioarduino-ide"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.platformIO.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.platformIO.extension
|
|
||||||
];
|
|
||||||
userSettings = {
|
|
||||||
"platformio-ide.useBuiltinPIOCore" = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.rustAnalyzer = {
|
|
||||||
enable = lib.mkEnableOption "should the rust-analyzer extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "rust-analyzer" {
|
|
||||||
default = ["rust-lang" "rust-analyzer"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.rustAnalyzer.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.rustAnalyzer.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.tauriVscode = {
|
|
||||||
enable = lib.mkEnableOption "should the tauri-vscode extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "tauri-vscode" {
|
|
||||||
default = ["tauri-apps" "tauri-vscode"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.tauriVscode.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.tauriVscode.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.vitest = {
|
|
||||||
enable = lib.mkEnableOption "should the vitest extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "vitest" {
|
|
||||||
default = ["vitest" "explorer"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.vitest.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.vitest.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.vscodeEslint = {
|
|
||||||
enable = lib.mkEnableOption "should the vscode-eslint extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "vscode-eslint" {
|
|
||||||
default = ["dbaeumer" "vscode-eslint"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.vscodeEslint.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.vscodeEslint.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.vscodeJest = {
|
|
||||||
enable = lib.mkEnableOption "should the vscode-jest extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "vscode-jest" {
|
|
||||||
default = ["orta" "vscode-jest"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.vscodeJest.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.vscodeJest.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.vscodeMdx = {
|
|
||||||
enable = lib.mkEnableOption "should the vscode-mdx extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "vscode-mdx" {
|
|
||||||
default = ["unifiedjs" "vscode-mdx"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.vscodeMdx.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.vscodeMdx.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.vscodeStandard = {
|
|
||||||
enable = lib.mkEnableOption "should the vscode-standard extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "vscode-standard" {
|
|
||||||
default = ["standard" "vscode-standard"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.vscodeStandard.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.vscodeStandard.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
pkgsRepositories = pkgs.nix-vscode-extensions.forVSCodeVersion config.programs.vscode.package.version;
|
|
||||||
pkgsRepository = pkgsRepositories.open-vsx;
|
|
||||||
in {
|
|
||||||
options.programs.vscode.profiles = lib.mkOption {
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({config, ...}: {
|
|
||||||
options = {
|
|
||||||
extraExtensions.vscodeStylelint = {
|
|
||||||
enable = lib.mkEnableOption "should the vscode-stylelint extension for vscode be enabled";
|
|
||||||
extension = lib.mkPackageOption pkgsRepository "vscode-stylelint" {
|
|
||||||
default = ["stylelint" "vscode-stylelint"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
config = lib.mkIf config.extraExtensions.vscodeStylelint.enable {
|
|
||||||
extensions = [
|
|
||||||
config.extraExtensions.vscodeStylelint.extension
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{...}: {
|
|
||||||
config = {
|
|
||||||
sops = {
|
|
||||||
age.keyFile = "/var/lib/sops-nix/key.txt";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.user = {
|
|
||||||
isDesktopUser = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = osConfig.host.users.${config.home.username}.isDesktopUser;
|
|
||||||
};
|
|
||||||
isTerminalUser = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = osConfig.host.users.${config.home.username}.isTerminalUser;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
# this folder container modules that are for nixos and darwin
|
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
./home-manager
|
|
||||||
./system.nix
|
|
||||||
./nix-development.nix
|
|
||||||
./users.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
# modules in this folder are to adapt home-manager modules configs to system-module configs
|
|
||||||
{...}: {}
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options.host.nix-development.enable = lib.mkEnableOption "should desktop configuration be enabled";
|
|
||||||
|
|
||||||
config = lib.mkMerge [
|
|
||||||
{
|
|
||||||
host.nix-development.enable = lib.mkDefault true;
|
|
||||||
}
|
|
||||||
(lib.mkIf config.host.nix-development.enable {
|
|
||||||
nix = {
|
|
||||||
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
|
||||||
};
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
# nix language server
|
|
||||||
nil
|
|
||||||
# nix formatter
|
|
||||||
alejandra
|
|
||||||
];
|
|
||||||
})
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
{...}: {
|
|
||||||
nix = {
|
|
||||||
settings = {
|
|
||||||
experimental-features = ["nix-command" "flakes"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,113 +0,0 @@
|
||||||
{
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
...
|
|
||||||
}: let
|
|
||||||
host = config.host;
|
|
||||||
|
|
||||||
hostUsers = host.hostUsers;
|
|
||||||
principleUsers = host.principleUsers;
|
|
||||||
in {
|
|
||||||
options.host = {
|
|
||||||
users = lib.mkOption {
|
|
||||||
default = {};
|
|
||||||
type = lib.types.attrsOf (lib.types.submodule ({
|
|
||||||
config,
|
|
||||||
name,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
options = {
|
|
||||||
name = lib.mkOption {
|
|
||||||
type = lib.types.str;
|
|
||||||
default = name;
|
|
||||||
description = ''
|
|
||||||
What should this users name on the system be
|
|
||||||
'';
|
|
||||||
defaultText = lib.literalExpression "config.host.users.\${name}.name";
|
|
||||||
};
|
|
||||||
isPrincipleUser = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
User should be configured as root and have ssh access
|
|
||||||
'';
|
|
||||||
defaultText = lib.literalExpression "config.host.users.\${name}.isPrincipleUser";
|
|
||||||
};
|
|
||||||
isDesktopUser = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
User should install their desktop applications
|
|
||||||
'';
|
|
||||||
defaultText = lib.literalExpression "config.host.users.\${name}.isDesktopUser";
|
|
||||||
};
|
|
||||||
isTerminalUser = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
User should install their terminal applications
|
|
||||||
'';
|
|
||||||
defaultText = lib.literalExpression "config.host.users.\${name}.isTerminalUser";
|
|
||||||
};
|
|
||||||
isNormalUser = lib.mkOption {
|
|
||||||
type = lib.types.bool;
|
|
||||||
default = config.isDesktopUser || config.isTerminalUser;
|
|
||||||
description = ''
|
|
||||||
User should install their applications and can log in
|
|
||||||
'';
|
|
||||||
defaultText = lib.literalExpression "config.host.users.\${name}.isNormalUser";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
hostUsers = lib.mkOption {
|
|
||||||
default = lib.attrsets.mapAttrsToList (_: user: user) host.users;
|
|
||||||
};
|
|
||||||
principleUsers = lib.mkOption {
|
|
||||||
default = lib.lists.filter (user: user.isPrincipleUser) hostUsers;
|
|
||||||
};
|
|
||||||
normalUsers = lib.mkOption {
|
|
||||||
default = lib.lists.filter (user: user.isNormalUser) hostUsers;
|
|
||||||
};
|
|
||||||
desktopUsers = lib.mkOption {
|
|
||||||
default = lib.lists.filter (user: user.isDesktopUser) hostUsers;
|
|
||||||
};
|
|
||||||
terminalUsers = lib.mkOption {
|
|
||||||
default = lib.lists.filter (user: user.isTerminalUser) hostUsers;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = {
|
|
||||||
host.users = {
|
|
||||||
leyla = {
|
|
||||||
isPrincipleUser = lib.mkDefault false;
|
|
||||||
isDesktopUser = lib.mkDefault false;
|
|
||||||
isTerminalUser = lib.mkDefault false;
|
|
||||||
};
|
|
||||||
eve = {
|
|
||||||
isPrincipleUser = lib.mkDefault false;
|
|
||||||
isDesktopUser = lib.mkDefault false;
|
|
||||||
isTerminalUser = lib.mkDefault false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
assertions =
|
|
||||||
(
|
|
||||||
builtins.map (user: {
|
|
||||||
assertion = !(user.isPrincipleUser && !user.isNormalUser);
|
|
||||||
message = ''
|
|
||||||
Non normal user ${user.name} can not be a principle user.
|
|
||||||
'';
|
|
||||||
})
|
|
||||||
hostUsers
|
|
||||||
)
|
|
||||||
++ [
|
|
||||||
{
|
|
||||||
assertion = (builtins.length principleUsers) > 0;
|
|
||||||
message = ''
|
|
||||||
At least one user must be a principle user.
|
|
||||||
'';
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
10
modules/darwin/default.nix
Normal file
10
modules/darwin/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{config, ...}: let
|
||||||
|
mod = config.flake.darwinModules;
|
||||||
|
in {
|
||||||
|
flake.darwinModules.darwin-modules-all = {
|
||||||
|
imports = [
|
||||||
|
mod.darwin-system
|
||||||
|
mod.darwin-users
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
29
modules/darwin/system.nix
Normal file
29
modules/darwin/system.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{...}: {
|
||||||
|
flake.darwinModules.darwin-system = {self, ...}: {
|
||||||
|
system.configurationRevision = self.rev or self.dirtyRev or null;
|
||||||
|
|
||||||
|
nix = {
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
interval = [
|
||||||
|
{
|
||||||
|
Hour = 4;
|
||||||
|
Minute = 15;
|
||||||
|
Weekday = 7;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
optimise = {
|
||||||
|
automatic = true;
|
||||||
|
interval = [
|
||||||
|
{
|
||||||
|
Hour = 4;
|
||||||
|
Minute = 15;
|
||||||
|
Weekday = 7;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/darwin/users.nix
Normal file
18
modules/darwin/users.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{...}: {
|
||||||
|
flake.darwinModules.darwin-users = {
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
host = config.host;
|
||||||
|
in {
|
||||||
|
users = {
|
||||||
|
users = {
|
||||||
|
leyla = {
|
||||||
|
name = lib.mkForce host.users.leyla.name;
|
||||||
|
home = lib.mkForce "/home/${host.users.leyla.name}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
16
modules/home-manager/default.nix
Normal file
16
modules/home-manager/default.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{config, ...}: let
|
||||||
|
mod = config.flake.homeModules;
|
||||||
|
in {
|
||||||
|
flake.homeModules.home-manager-modules-all = {
|
||||||
|
imports = [
|
||||||
|
mod.home-manager-sops
|
||||||
|
mod.home-manager-user
|
||||||
|
mod.home-manager-flipperzero
|
||||||
|
mod.home-manager-i18n
|
||||||
|
mod.home-manager-impermanence
|
||||||
|
mod.home-manager-openssh
|
||||||
|
mod.home-manager-gnome
|
||||||
|
mod.home-manager-programs
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue