mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-01-30 16:57:56 +00:00
pkgs/firefox-addons: add RSSHub Radar
This commit is contained in:
parent
d80611d1c4
commit
861aa28201
21
devcontainers/ruby-on-rails.nix
Normal file
21
devcontainers/ruby-on-rails.nix
Normal file
@ -0,0 +1,21 @@
|
||||
{ dockerTools, ruby, bundix, foodogsquaredLib }:
|
||||
|
||||
let name = s: "fds-ruby-on-rails-${ruby.version}${s}";
|
||||
in dockerTools.buildImage {
|
||||
name = name "";
|
||||
|
||||
copyToRoot = foodogsquaredLib.buildFDSEnv {
|
||||
name = name "root";
|
||||
paths = [ ruby bundix ];
|
||||
};
|
||||
|
||||
runAsRoot = ''
|
||||
mkdir -p /data
|
||||
'';
|
||||
|
||||
config = {
|
||||
Cmd = [ "/bin/bash" ];
|
||||
WorkingDir = "/data";
|
||||
Volumes."/data" = { };
|
||||
};
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
= Horizontal hunger
|
||||
:toc:
|
||||
|
||||
|
||||
A custom desktop session fully made with https://github.com/YaLTeR/niri[niri] and https://github.com/Aylur/ags[ags].
|
@ -0,0 +1,5 @@
|
||||
App.config({
|
||||
windows: [
|
||||
// this is where window definitions will go
|
||||
],
|
||||
});
|
@ -0,0 +1,195 @@
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
// You can set rules, model, layout, variant and options.
|
||||
// For more information, see xkeyboard-config(7).
|
||||
layout "us"
|
||||
options "grp:win_space_toggle,compose:ralt,ctrl:nocaps"
|
||||
}
|
||||
}
|
||||
|
||||
touchpad {
|
||||
tap
|
||||
natural-scroll
|
||||
accel-speed 0.2
|
||||
}
|
||||
|
||||
mouse {
|
||||
natural-scroll
|
||||
accel-speed 0.2
|
||||
}
|
||||
|
||||
warp-mouse-to-focus
|
||||
focus-follows-mouse
|
||||
}
|
||||
|
||||
// You can configure outputs by their name, which you can find
|
||||
// by running `niri msg outputs` while inside a niri instance.
|
||||
// The built-in laptop monitor is usually called "eDP-1".
|
||||
// Find more information on the wiki:
|
||||
// https://github.com/YaLTeR/niri/wiki/Configuration:-Outputs
|
||||
// Remember to uncomment the node by removing "/-"!
|
||||
/-output "eDP-1" {
|
||||
mode "1920x1080@120.030"
|
||||
scale 2.0
|
||||
transform "normal"
|
||||
position x=1280 y=0
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 5
|
||||
center-focused-column "on-overflow"
|
||||
|
||||
preset-column-widths {
|
||||
proportion 0.33333
|
||||
proportion 0.5
|
||||
proportion 0.66667
|
||||
}
|
||||
|
||||
default-column-width { proportion 0.33; }
|
||||
|
||||
focus-ring {
|
||||
width 4
|
||||
active-color "#7fc8ff"
|
||||
inactive-color "#505050"
|
||||
}
|
||||
|
||||
border {
|
||||
off
|
||||
|
||||
width 4
|
||||
active-color "#ffc87f"
|
||||
inactive-color "#505050"
|
||||
}
|
||||
}
|
||||
|
||||
screenshot-path null
|
||||
|
||||
animations {
|
||||
slowdown 2.0
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.wezfurlong\.wezterm$"#
|
||||
default-column-width {}
|
||||
}
|
||||
|
||||
window-rule {
|
||||
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||
|
||||
block-out-from "screen-capture"
|
||||
}
|
||||
|
||||
binds {
|
||||
Mod+T { spawn "alacritty"; }
|
||||
Mod+D { spawn "fuzzel"; }
|
||||
|
||||
XF86AudioRaiseVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+"; }
|
||||
XF86AudioLowerVolume allow-when-locked=true { spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-"; }
|
||||
XF86AudioMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
|
||||
XF86AudioMicMute allow-when-locked=true { spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
|
||||
|
||||
Mod+Q { close-window; }
|
||||
|
||||
Mod+Left { focus-column-left; }
|
||||
Mod+Down { focus-window-down; }
|
||||
Mod+Up { focus-window-up; }
|
||||
Mod+Right { focus-column-right; }
|
||||
Mod+H { focus-column-left; }
|
||||
Mod+J { focus-window-down; }
|
||||
Mod+K { focus-window-up; }
|
||||
Mod+L { focus-column-right; }
|
||||
|
||||
Mod+Ctrl+Left { move-column-left; }
|
||||
Mod+Ctrl+Down { move-window-down; }
|
||||
Mod+Ctrl+Up { move-window-up; }
|
||||
Mod+Ctrl+Right { move-column-right; }
|
||||
Mod+Ctrl+H { move-column-left; }
|
||||
Mod+Ctrl+J { move-window-down; }
|
||||
Mod+Ctrl+K { move-window-up; }
|
||||
Mod+Ctrl+L { move-column-right; }
|
||||
|
||||
// Alternative commands that move across workspaces when reaching
|
||||
// the first or last window in a column.
|
||||
// Mod+J { focus-window-or-workspace-down; }
|
||||
// Mod+K { focus-window-or-workspace-up; }
|
||||
// Mod+Ctrl+J { move-window-down-or-to-workspace-down; }
|
||||
// Mod+Ctrl+K { move-window-up-or-to-workspace-up; }
|
||||
|
||||
Mod+Home { focus-column-first; }
|
||||
Mod+End { focus-column-last; }
|
||||
Mod+Ctrl+Home { move-column-to-first; }
|
||||
Mod+Ctrl+End { move-column-to-last; }
|
||||
|
||||
Mod+Shift+Left { focus-monitor-left; }
|
||||
Mod+Shift+Down { focus-monitor-down; }
|
||||
Mod+Shift+Up { focus-monitor-up; }
|
||||
Mod+Shift+Right { focus-monitor-right; }
|
||||
Mod+Shift+H { focus-monitor-left; }
|
||||
Mod+Shift+J { focus-monitor-down; }
|
||||
Mod+Shift+K { focus-monitor-up; }
|
||||
Mod+Shift+L { focus-monitor-right; }
|
||||
|
||||
Mod+Shift+Ctrl+Left { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+Down { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+Up { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+Right { move-column-to-monitor-right; }
|
||||
Mod+Shift+Ctrl+H { move-column-to-monitor-left; }
|
||||
Mod+Shift+Ctrl+J { move-column-to-monitor-down; }
|
||||
Mod+Shift+Ctrl+K { move-column-to-monitor-up; }
|
||||
Mod+Shift+Ctrl+L { move-column-to-monitor-right; }
|
||||
|
||||
Mod+Page_Down { focus-workspace-down; }
|
||||
Mod+Page_Up { focus-workspace-up; }
|
||||
Mod+U { focus-workspace-down; }
|
||||
Mod+I { focus-workspace-up; }
|
||||
Mod+Ctrl+Page_Down { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+Page_Up { move-column-to-workspace-up; }
|
||||
Mod+Ctrl+U { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+I { move-column-to-workspace-up; }
|
||||
|
||||
// Alternatively, there are commands to move just a single window:
|
||||
// Mod+Ctrl+Page_Down { move-window-to-workspace-down; }
|
||||
// ...
|
||||
|
||||
Mod+Shift+Page_Down { move-workspace-down; }
|
||||
Mod+Shift+Page_Up { move-workspace-up; }
|
||||
Mod+Shift+U { move-workspace-down; }
|
||||
Mod+Shift+I { move-workspace-up; }
|
||||
|
||||
Mod+WheelScrollDown cooldown-ms=150 { focus-workspace-down; }
|
||||
Mod+WheelScrollUp cooldown-ms=150 { focus-workspace-up; }
|
||||
Mod+Ctrl+WheelScrollDown cooldown-ms=150 { move-column-to-workspace-down; }
|
||||
Mod+Ctrl+WheelScrollUp cooldown-ms=150 { move-column-to-workspace-up; }
|
||||
|
||||
Mod+WheelScrollRight { focus-column-right; }
|
||||
Mod+WheelScrollLeft { focus-column-left; }
|
||||
Mod+Ctrl+WheelScrollRight { move-column-right; }
|
||||
Mod+Ctrl+WheelScrollLeft { move-column-left; }
|
||||
|
||||
Mod+Shift+WheelScrollDown { focus-column-right; }
|
||||
Mod+Shift+WheelScrollUp { focus-column-left; }
|
||||
Mod+Ctrl+Shift+WheelScrollDown { move-column-right; }
|
||||
Mod+Ctrl+Shift+WheelScrollUp { move-column-left; }
|
||||
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
Mod+Ctrl+1 { move-column-to-workspace 1; }
|
||||
Mod+Ctrl+2 { move-column-to-workspace 2; }
|
||||
Mod+Ctrl+3 { move-column-to-workspace 3; }
|
||||
Mod+Ctrl+4 { move-column-to-workspace 4; }
|
||||
Mod+Ctrl+5 { move-column-to-workspace 5; }
|
||||
Mod+Ctrl+6 { move-column-to-workspace 6; }
|
||||
Mod+Ctrl+7 { move-column-to-workspace 7; }
|
||||
Mod+Ctrl+8 { move-column-to-workspace 8; }
|
||||
Mod+Ctrl+9 { move-column-to-workspace 9; }
|
||||
|
||||
}
|
188
modules/nixos/_private/workflows/horizontal-hunger/default.nix
Normal file
188
modules/nixos/_private/workflows/horizontal-hunger/default.nix
Normal file
@ -0,0 +1,188 @@
|
||||
{ config, options, lib, pkgs, foodogsquaredLib, ... }:
|
||||
|
||||
let
|
||||
workflowId = "one.foodogsquared.HorizontalHunger";
|
||||
|
||||
cfg = config.workflows.workflows.${workflowId};
|
||||
sessionConfig = config.programs.gnome-session.sessions.${workflowId};
|
||||
|
||||
requiredPackages = with pkgs; [
|
||||
# The window manager. We only put this here since it has some commands that
|
||||
# are useful to be having.
|
||||
cfg.package
|
||||
|
||||
# The application opener.
|
||||
junction
|
||||
];
|
||||
|
||||
workflowEnvironment = foodogsquaredLib.nixos.mkNixoslikeEnvironment config {
|
||||
name = "${workflowId}-env";
|
||||
paths = requiredPackages ++ cfg.extraApps;
|
||||
};
|
||||
in
|
||||
{
|
||||
options.workflows.enable = lib.mkOption {
|
||||
type = with lib.types; listOf (enum [ workflowId ]);
|
||||
};
|
||||
|
||||
options.workflows.workflows.${workflowId} = {
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
description = ''
|
||||
Derivation containing {program}`niri` executable which is the preferred
|
||||
window manager for this workflow.
|
||||
'';
|
||||
default = pkgs.niri;
|
||||
};
|
||||
|
||||
extraApps = lib.mkOption {
|
||||
type = with lib.types; listOf package;
|
||||
default = with pkgs; [
|
||||
flowtime
|
||||
dialect
|
||||
blanket
|
||||
];
|
||||
description = ''
|
||||
A list of extraneous applications to be included with the desktop
|
||||
session.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf (lib.elem workflowId config.workflows.enable) {
|
||||
# Enable all of the core services.
|
||||
hardware.bluetooth.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
programs.xwayland.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = lib.mkDefault true;
|
||||
pinentryPackage = pkgs.pinentry-gnome3;
|
||||
};
|
||||
security.polkit.enable = true;
|
||||
services.colord.enable = lib.mkDefault true;
|
||||
services.gnome.gnome-keyring.enable = lib.mkDefault true;
|
||||
services.power-profiles-daemon.enable = true;
|
||||
services.udisks2.enable = lib.mkDefault true;
|
||||
services.upower.enable = config.powerManagement.enable;
|
||||
services.libinput.enable = lib.mkDefault true;
|
||||
|
||||
# Configuring the preferred network manager.
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Configuring the XDG desktop components. Take note all of these are
|
||||
# required for the desktop widgets components to work since they rely on
|
||||
# them.
|
||||
xdg.mime.enable = true;
|
||||
xdg.icons.enable = true;
|
||||
|
||||
# For now, the portal configuration doesn't work since Niri is now
|
||||
# hardcoded to set the apprioriate envs for portal component. It is
|
||||
# considered broken (or rather unused) for now.
|
||||
xdg.portal =
|
||||
lib.mkMerge [
|
||||
{
|
||||
enable = lib.mkDefault true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
|
||||
# The option value is only a coerced `lib.type.str` so ehhh...
|
||||
config.${workflowId}.default =
|
||||
[ "gtk" ]
|
||||
++ lib.optionals (config.services.gnome.gnome-keyring.enable) [ "gnome" ];
|
||||
}
|
||||
|
||||
(lib.mkIf config.services.gnome.gnome-keyring.enable {
|
||||
config.${workflowId} = {
|
||||
"org.freedesktop.impl.portal.Secret" = "gnome-keyring";
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
# Install of the programs.
|
||||
environment.systemPackages = requiredPackages ++ cfg.extraApps;
|
||||
|
||||
# Configuring the actual desktop session.
|
||||
programs.gnome-session.sessions.${workflowId} = {
|
||||
fullName = "Horizontal Hunger";
|
||||
desktopNames = [ workflowId ];
|
||||
|
||||
systemd.targetUnit =
|
||||
let
|
||||
requiredComponents = [ "window-manager" ];
|
||||
getId = lib.foldlAttrs (acc: _: v: acc ++ [ "${v.id}.target" ]) [ ];
|
||||
in {
|
||||
requires = getId (lib.filterAttrs (n: _: lib.elem n requiredComponents) sessionConfig.components);
|
||||
wants = getId (lib.attrsets.removeAttrs sessionConfig.components requiredComponents);
|
||||
};
|
||||
|
||||
components = {
|
||||
window-manager = {
|
||||
script = "${lib.getExe' cfg.package "niri"} --config /tmp/shared/modules/nixos/_private/workflows/horizontal-hunger/config/niri/config";
|
||||
description = "Window manager";
|
||||
|
||||
systemd.serviceUnit = {
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
OOMScoreAdjust = -1000;
|
||||
};
|
||||
|
||||
unitConfig = {
|
||||
OnFailure = [ "gnome-session-shutdown.target" ];
|
||||
OnFailureJobMode = "replace-irreversibly";
|
||||
};
|
||||
|
||||
startLimitBurst = 5;
|
||||
startLimitIntervalSec = 10;
|
||||
};
|
||||
|
||||
systemd.targetUnit = {
|
||||
partOf = [ "gnome-session-initialized.target" ];
|
||||
after = [ "gnome-session-initialized.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
desktop-widgets = {
|
||||
script = "${lib.getExe' pkgs.ags "ags"} --config /tmp/shared/modules/nixos/_private/workflows/horizontal-hunger/config/ags/config.js";
|
||||
description = "Desktop widgets";
|
||||
|
||||
systemd.serviceUnit = {
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
OOMScoreAdjust = -1000;
|
||||
};
|
||||
|
||||
unitConfig = {
|
||||
OnFailure = [ "gnome-session-shutdown.target" ];
|
||||
OnFailureJobMode = "replace-irreversibly";
|
||||
};
|
||||
};
|
||||
|
||||
systemd.targetUnit = {
|
||||
partOf = [ "gnome-session-initialized.target" ];
|
||||
after = [ "gnome-session-initialized.target" ];
|
||||
};
|
||||
};
|
||||
|
||||
auth-agent = {
|
||||
script = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
|
||||
description = "Authentication agent";
|
||||
|
||||
systemd.serviceUnit = {
|
||||
serviceConfig = {
|
||||
Type = "notify";
|
||||
NotifyAccess = "all";
|
||||
OOMScoreAdjust = -500;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.targetUnit = {
|
||||
partOf = [ "graphical-session.target" "gnome-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
91
modules/nixos/services/docker-compose.nix
Normal file
91
modules/nixos/services/docker-compose.nix
Normal file
@ -0,0 +1,91 @@
|
||||
{ config, lib, pkgs, utils, ... }:
|
||||
|
||||
let
|
||||
cfg = config.services.docker-compose;
|
||||
|
||||
settingsFormat = pkgs.formats.yaml { };
|
||||
|
||||
jobModule = { name, lib, config, ... }: {
|
||||
options = {
|
||||
extraArgs = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [ ];
|
||||
description = ''
|
||||
Job-specific set of arguments to be added to {command}`docker compose`.
|
||||
'';
|
||||
};
|
||||
|
||||
files = lib.mkOption {
|
||||
type = with lib.types; listOf path;
|
||||
description = ''
|
||||
List of files to be used when setting up the docker-compose service.
|
||||
'';
|
||||
default = [];
|
||||
example = lib.literalExpression ''
|
||||
[
|
||||
/path/to/docker-compose.yml
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
settings = lib.mkOption {
|
||||
type = settingsFormat.type;
|
||||
description = ''
|
||||
Configuration to be used for the docker-compose process.
|
||||
'';
|
||||
default = { };
|
||||
example = {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
extraArgs =
|
||||
cfg.extraArgs
|
||||
++ lib.concatMap (f: [ "--file" f ]) config.files;
|
||||
|
||||
files = lib.optionals (config.settings != { }) [
|
||||
(settingsFormat.generate "docker-compose-generated-${name}" config.settings)
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
mkDockerComposeService = name: value:
|
||||
lib.nameValuePair "docker-compose-${utils.escapeSystemdPath name}" {
|
||||
path = [ config.virtualisation.docker.package ];
|
||||
script = "docker compose --project-name ${name} up";
|
||||
postStop = "docker compose --project-name ${name} down";
|
||||
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.services.docker-compose = {
|
||||
enable = lib.mkEnableOption "integration with docker-compose";
|
||||
|
||||
extraArgs = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = [];
|
||||
};
|
||||
|
||||
jobs = lib.mkOption {
|
||||
type = with lib.types; attrsOf (submodule jobModule);
|
||||
default = { };
|
||||
description = ''
|
||||
A jobset of Docker compose services to be integrated with the system.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = lib.singleton {
|
||||
assertion = cfg.enable && config.virtualisation.docker.enable;
|
||||
message = "Docker server is not enabled.";
|
||||
};
|
||||
|
||||
systemd.services = lib.mapAttrs' mkDockerComposeService cfg.jobs;
|
||||
};
|
||||
}
|
54
modules/wrapper-manager/fonts.nix
Normal file
54
modules/wrapper-manager/fonts.nix
Normal file
@ -0,0 +1,54 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.fonts;
|
||||
|
||||
fontsModuleFactory = { isGlobal ? false }: {
|
||||
enable = lib.mkEnableOption "local fonts support" // {
|
||||
default = if isGlobal then false else cfg.enable;
|
||||
};
|
||||
|
||||
packages = lib.mkOption {
|
||||
type = with lib.types; listOf package;
|
||||
description =
|
||||
if isGlobal then ''
|
||||
Global list of fonts to be added per wrapper (with the local fonts
|
||||
support enabled anyways).
|
||||
'' else ''
|
||||
List of fonts to be added to the wrapper.
|
||||
'';
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
with pkgs; [
|
||||
noto-sans
|
||||
source-sans-pro
|
||||
source-code-pro
|
||||
stix
|
||||
]
|
||||
'';
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
options.fonts = fontsModuleFactory { isGlobal = true; };
|
||||
|
||||
wrappers =
|
||||
let
|
||||
fontsSubmodule = { config, lib, name, pkgs, ... }: let
|
||||
submoduleCfg = config.fonts;
|
||||
in {
|
||||
options.fonts = fontsModuleFactory { isGlobal = false; };
|
||||
|
||||
config = let
|
||||
fontCache = pkgs.makeFontsCache {
|
||||
inherit (pkgs) fontconfig;
|
||||
fontsDirectories = submoduleCfg.packages;
|
||||
};
|
||||
in lib.mkIf submoduleCfg.enable {
|
||||
fonts.packages = cfg.packages;
|
||||
};
|
||||
};
|
||||
in lib.mkOption {
|
||||
type = with lib.types; attrsOf (submodule fontsSubmodule);
|
||||
};
|
||||
}
|
53
modules/wrapper-manager/programs/tmux.nix
Normal file
53
modules/wrapper-manager/programs/tmux.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.programs.tmux;
|
||||
in
|
||||
{
|
||||
options.programs.tmux = {
|
||||
enable = lib.mkEnableOption "configuring a tmux wrapper";
|
||||
|
||||
package = lib.mkPackageOption pkgs "tmux" { };
|
||||
|
||||
plugins = lib.mkOption {
|
||||
type = with lib.types; listOf (either package pluginSubmodule);
|
||||
description = ''
|
||||
List of tmux plugins to be included at your
|
||||
configuration.
|
||||
'';
|
||||
default = [ ];
|
||||
example = lib.literalExpression ''
|
||||
with pkgs; [
|
||||
tmuxPlugins.cpu
|
||||
{
|
||||
plugin = tmuxPlugins.resurrect;
|
||||
extraConfig = "set -g @resurrect-strategy-nvim 'session'";
|
||||
}
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
executableName = lib.mkOption {
|
||||
type = lib.types.nonEmptyStr;
|
||||
description = "The wrapper's executable name.";
|
||||
default = "tmux-custom";
|
||||
example = "tmux-your-mom";
|
||||
};
|
||||
|
||||
extraArgs = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
List of arguments to be prepended to the user-given arguments.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
basePackage = cfg.package;
|
||||
|
||||
wrappers.tmux = {
|
||||
inherit (cfg) executableName;
|
||||
prependArgs = cfg.extraArgs;
|
||||
};
|
||||
};
|
||||
}
|
@ -88,10 +88,10 @@
|
||||
};
|
||||
"open-access-helper" = buildFirefoxXpiAddon {
|
||||
pname = "open-access-helper";
|
||||
version = "2025.2.1";
|
||||
version = "2025.2";
|
||||
addonId = "info@oahelper.org";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4414378/open_access_helper-2025.2.1.xpi";
|
||||
sha256 = "ecba30f17d957323ed0bf9f6c246fba59d1232f42d6f90caa4b8d83716a57783";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4414263/open_access_helper-2025.2.xpi";
|
||||
sha256 = "8acfb2a15b39e406e3b9e59272424e35627892e76acb4b0e3ed42b09968eed4a";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://www.oahelper.org";
|
||||
@ -129,6 +129,20 @@
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"rsshub-radar" = buildFirefoxXpiAddon {
|
||||
pname = "rsshub-radar";
|
||||
version = "2.0.21";
|
||||
addonId = "i@diygod.me";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/4369623/rsshub_radar-2.0.21.xpi";
|
||||
sha256 = "ffa6bd7d98080feea5e551f4873b02ec923af061f1db79c22accad2e14458e1e";
|
||||
meta = with lib;
|
||||
{
|
||||
homepage = "https://github.com/DIYgod/RSSHub-Radar";
|
||||
description = "Easily find and subscribe to RSS and RSSHub.";
|
||||
mozPermissions = [ "storage" "tabs" "offscreen" "alarms" "<all_urls>" ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
"simple-translate" = buildFirefoxXpiAddon {
|
||||
pname = "simple-translate";
|
||||
version = "3.0.0";
|
||||
@ -214,4 +228,3 @@
|
||||
platforms = platforms.all;
|
||||
};
|
||||
};
|
||||
}
|
@ -31,5 +31,8 @@
|
||||
},
|
||||
{
|
||||
"slug": "open-access-helper"
|
||||
},
|
||||
{
|
||||
"slug": "rsshub-radar"
|
||||
}
|
||||
]
|
||||
|
26
pkgs/graphite-design-tool/default.nix
Normal file
26
pkgs/graphite-design-tool/default.nix
Normal file
@ -0,0 +1,26 @@
|
||||
{ rustPlatform, cargo-tauri_1, fetchFromGitHub, wrapGAppsHook, wasm-bindgen-cli, pkg-config, lib }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "graphite-design-tool";
|
||||
version = "unstable-2024-12-07";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "GraphiteEditor";
|
||||
repo = "graphite";
|
||||
rev = "b21b1cbfc7cb808ec5e2c66b090660506f07833f";
|
||||
hash = "sha256-RJYzS7TUViszDXomShw2h6DOVrER/VkW7cP69aEOQ/k=";
|
||||
};
|
||||
|
||||
useFetchCargoVendor = true;
|
||||
cargoHash = "sha256-+p9bpj+cSd0Bkpg+e4lwo4C7XqxZBc0McYYsNxAqzaA=";
|
||||
|
||||
nativeBuildInputs = [ cargo-tauri_1 pkg-config wrapGAppsHook wasm-bindgen-cli ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://graphite.rs/";
|
||||
description = "2D vector & raster editor that melds traditional layers & tools with a modern node-based, non-destructive, procedural workflow";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ foo-dogsquared ];
|
||||
mainProgram = "graphite";
|
||||
};
|
||||
}
|
42
pkgs/pd-l2ork/default.nix
Normal file
42
pkgs/pd-l2ork/default.nix
Normal file
@ -0,0 +1,42 @@
|
||||
{ stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
autoreconfHook,
|
||||
bison,
|
||||
fftw,
|
||||
libtool,
|
||||
libjack2,
|
||||
bluez,
|
||||
udev
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "pd-l2ork";
|
||||
version = "20241224";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pd-l2ork";
|
||||
repo = "pd-l2ork";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-A+ETptD1R+Pb4r2qgD0YxV7KYeAb9iLBwENhYQyjBc4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
libtool
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
bison
|
||||
fftw
|
||||
libjack2
|
||||
bluez
|
||||
udev
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://l2ork.music.vt.edu/";
|
||||
description = "Pure Data flavor based on Purr Data";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
})
|
51
pkgs/purr-data/default.nix
Normal file
51
pkgs/purr-data/default.nix
Normal file
@ -0,0 +1,51 @@
|
||||
{ stdenv,
|
||||
lib,
|
||||
fetchFromGitHub,
|
||||
bison,
|
||||
fftw,
|
||||
libtool,
|
||||
libjack2,
|
||||
bluez,
|
||||
udev,
|
||||
wget,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "pd-l2ork";
|
||||
version = "20241224";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "pd-l2ork";
|
||||
repo = "pd-l2ork";
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-A+ETptD1R+Pb4r2qgD0YxV7KYeAb9iLBwENhYQyjBc4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
libtool
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
bison
|
||||
fftw
|
||||
libjack2
|
||||
bluez
|
||||
udev
|
||||
wget
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
patchShebangs l2ork_addons/*.sh
|
||||
'';
|
||||
|
||||
buildFlags = [
|
||||
"prefix=${placeholder "out"}"
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://l2ork.music.vt.edu/";
|
||||
description = "Pure Data flavor based on Purr Data";
|
||||
license = licenses.bsd3;
|
||||
platforms = platforms.linux ++ platforms.darwin;
|
||||
};
|
||||
})
|
52
pkgs/rotp-fusion/default.nix
Normal file
52
pkgs/rotp-fusion/default.nix
Normal file
@ -0,0 +1,52 @@
|
||||
{ lib,
|
||||
fetchFromGitHub,
|
||||
maven,
|
||||
libwebp,
|
||||
vorbis-tools,
|
||||
}:
|
||||
|
||||
maven.buildMavenPackage rec {
|
||||
pname = "rotp-fusion";
|
||||
version = "2024/06/13/2254";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Xilmi";
|
||||
repo = "Rotp-Fusion";
|
||||
|
||||
# We'll just use URL-encoded strings just to be safe.
|
||||
rev = "2024%2F06%2F13%2F2254";
|
||||
hash = "sha256-gupeVfIrbFm5B11NdERtnXgkzRMa+yw5vC9MJVeXcys=";
|
||||
};
|
||||
|
||||
mvnHash = "";
|
||||
|
||||
nativeBuildInputs = [
|
||||
libwebp
|
||||
vorbis-tools
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Mod of Remnants of the Precursors with more features";
|
||||
homepage = "https://github.com/Xilmi/Rotp-Fusion";
|
||||
license = with licenses; [
|
||||
# For the Java codebase made by Ray Fowler.
|
||||
gpl3Only
|
||||
|
||||
# Java Files in `src/rotp/apachemath` folder.
|
||||
asl20
|
||||
|
||||
# The Java-rewrite of the following code at:
|
||||
#
|
||||
# http://hjemmesider.diku.dk/~torbenm/Planet
|
||||
{
|
||||
free = true;
|
||||
url = "http://hjemmesider.diku.dk/~torbenm/Planet";
|
||||
}
|
||||
|
||||
# All images made by Peter Penev, audio from Remi Agullo, and
|
||||
# various text written by Jeff Colucci and its translations.
|
||||
cc-by-nc-nd-40
|
||||
];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
11
pkgs/rotp-modnar/default.nix
Normal file
11
pkgs/rotp-modnar/default.nix
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
lib,
|
||||
rotp,
|
||||
fetchFromGitHub,
|
||||
}:
|
||||
|
||||
rotp.overrideAttrs (finalAttrs: prevAttrs: {
|
||||
src = fetchFromGitHub {
|
||||
|
||||
};
|
||||
})
|
30
pkgs/tailcall/default.nix
Normal file
30
pkgs/tailcall/default.nix
Normal file
@ -0,0 +1,30 @@
|
||||
{ rustPlatform, lib, fetchFromGitHub }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "tailcall";
|
||||
version = "0.129.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tailcallhq";
|
||||
repo = "tailcall";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-tTj1hugq6a6rAKwUsS072pCizsB/BYaBlu8OWGYKNsk=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = "${src}/Cargo.lock";
|
||||
outputHashes = {
|
||||
"genai-0.1.7-wip" = "sha256-peqM0rBLnL4F0M6o8CO/+ttv9eOLV4VkDEy2e4x7dn0=";
|
||||
"htpasswd-verify-0.3.0" = "sha256-GbkY590xWEZ+lVT9nffs4HIRW6CwBjll4rGIk27waxo=";
|
||||
"posthog-rs-0.2.3" = "sha256-1HxOEzc8GROStxuxG0cfCNa4iA04sCD7jD6uWT5bl2o=";
|
||||
"serde_json_borrow-0.7.0" = "sha256-UcgIWjdSCkYRYxEcWbwQs+BxX41ITqkvFSFtzEJchVk=";
|
||||
};
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://tailcall.run";
|
||||
description = "GraphQL runtime";
|
||||
license = licenses.asl20;
|
||||
mainProgram = "tailcall";
|
||||
};
|
||||
}
|
25
subprojects/bahaghari/CHANGELOG.adoc
Normal file
25
subprojects/bahaghari/CHANGELOG.adoc
Normal file
@ -0,0 +1,25 @@
|
||||
= Changelog
|
||||
:toc:
|
||||
|
||||
All changes in Bahaghari will be documented here for their users to see.
|
||||
The structure is loosely based on https://keepachangelog.com/en/1.1.0/[Keep a changelog format] except we separate the sections by the module and the library set instead.
|
||||
This is structured like this so it is easier to skim things.
|
||||
|
||||
|
||||
// TODO: Update the release date once released.
|
||||
[#0-1-0]
|
||||
== 0.1.0 (unreleased)
|
||||
|
||||
[#0-1-0-module-sets]
|
||||
=== Module sets
|
||||
|
||||
* Initialize Bahaghari module set including options for its schemes, templates, and builder.
|
||||
* Include the Bahaghari library set as part of the module argument.
|
||||
|
||||
[#0-1-0-library-set]
|
||||
=== Library set
|
||||
|
||||
* Initialize Tinted Theming-specific library subset.
|
||||
* Implement a basic math subset intended for computing with color namespaces (or whatever use cases for basic mathematics).
|
||||
* Implement basic color namespace for RGB, HSL, and HSLUV.
|
||||
* Create Tinted Theming-speific utilities subset.
|
45
subprojects/bahaghari/lib/colors/hsluv.nix
Normal file
45
subprojects/bahaghari/lib/colors/hsluv.nix
Normal file
@ -0,0 +1,45 @@
|
||||
# HSLuv implementation in Nix. This is taken from the reference implementation,
|
||||
# specifically from the JavaScript implementation at
|
||||
# https://github.com/hsluv/hsluv-javascript.
|
||||
{ pkgs, lib, self }:
|
||||
|
||||
let
|
||||
inherit (self.colors) rgb hsl;
|
||||
|
||||
refY = 1.0;
|
||||
refU = 0.19783000664283;
|
||||
refV = 0.46831999493879;
|
||||
kappa = 903.2962962;
|
||||
epsilon = 0.0088564516;
|
||||
|
||||
m = {
|
||||
r = [ 3.240969941904521 (-1.537383177570093) (-0.498610760293) ];
|
||||
g = [ (-0.96924363628087) 1.87596750150772 0.041555057407175 ];
|
||||
b = [ 0.055630079696993 (-0.20397695888897) 1.056971514242878 ];
|
||||
};
|
||||
|
||||
fromLinear = number:
|
||||
if number <= 0.0031308 then
|
||||
12.92 * number
|
||||
else
|
||||
1.055 * (self.math.pow number (1 / 2.4)) - 0.055;
|
||||
|
||||
toLinear = number:
|
||||
if number > 0.04045 then
|
||||
self.math.pow ((number + 0.055) / 1.055) 2.4
|
||||
else
|
||||
number / 12.92;
|
||||
in
|
||||
rec {
|
||||
inherit (hsl) valueHueMin valueHueMax valueParamMin valueParamMax;
|
||||
|
||||
HSLuv = color: {};
|
||||
|
||||
toRgb = { h, s, l, ... }@color: {
|
||||
|
||||
};
|
||||
|
||||
toHex = color: rgb.toHex (toRgb color);
|
||||
|
||||
toHex' = color: rgb.toHex' (toRgb color);
|
||||
}
|
57
subprojects/bahaghari/modules/panapton/default.nix
Normal file
57
subprojects/bahaghari/modules/panapton/default.nix
Normal file
@ -0,0 +1,57 @@
|
||||
{ config, options, lib, pkgs, bahaghariLib, ... }:
|
||||
|
||||
{
|
||||
options.bahaghari.panapton = {
|
||||
package = lib.mkPackageOption pkgs "panapton" { };
|
||||
|
||||
dataFiles = lib.mkOption {
|
||||
type = with lib.types; listOf package;
|
||||
default = [ ];
|
||||
description = ''
|
||||
A list of derivations containing Panapton data files (e.g., templates,
|
||||
schemes) to be included within Panapton builder operations. It is
|
||||
expected that the data files are in `$out/share/panapton`.
|
||||
|
||||
If you want to include only a specific type of data file, you can use
|
||||
{option}`bahaghari.panapton.{scheme,template}Dirs` instead.
|
||||
'';
|
||||
example = ''
|
||||
[
|
||||
(pkgs.callPackage ./custom-panapton-schemes-and-templates.nix)
|
||||
pkgs.foodogsquared-panapton-data-files
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
schemeDirs = lib.mkOption {
|
||||
type = with lib.types; listOf path;
|
||||
description = ''
|
||||
A list of scheme directories to be included within Panapton builder
|
||||
operations.
|
||||
'';
|
||||
default = [ ];
|
||||
example = ''
|
||||
[
|
||||
./foodogsquared-custom-panapton-schemes
|
||||
./foodogsquared-custom-panapton-schemes-extension
|
||||
]
|
||||
'';
|
||||
};
|
||||
|
||||
templateDirs = lib.mkOption {
|
||||
type = with lib.types; listOf path;
|
||||
description = ''
|
||||
A list of template directories to be included within Panapton builder
|
||||
operations.
|
||||
'';
|
||||
default = [ ];
|
||||
example = ''
|
||||
[
|
||||
./my-panapton-templates
|
||||
./my-other-panapton-templates
|
||||
]
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
}
|
8
subprojects/bahaghari/tests/lib/extra-utils.nix
Normal file
8
subprojects/bahaghari/tests/lib/extra-utils.nix
Normal file
@ -0,0 +1,8 @@
|
||||
# A bunch of utilities to be used in a bunch of tests.
|
||||
{ lib, self }:
|
||||
|
||||
{
|
||||
# The typical rounding procedure for our results. 10 decimal places should be
|
||||
# enough to test accuracy at least for a basic math subset like this.
|
||||
round' = self.math.round' (-10);
|
||||
}
|
Loading…
Reference in New Issue
Block a user