Compare commits
18 Commits
gitea-acti
...
739324df92
| Author | SHA1 | Date | |
|---|---|---|---|
|
739324df92
|
|||
|
a840f3f3d6
|
|||
|
36897a543d
|
|||
|
161a4a3164
|
|||
|
6920f115fc
|
|||
|
c3ae074b0e
|
|||
|
17013e425e
|
|||
|
e5934da311
|
|||
|
4c8d7df432
|
|||
|
94a18eac26
|
|||
|
0b76292a1f
|
|||
|
747aae7774
|
|||
|
95d04865b6
|
|||
|
92401c5f6d
|
|||
|
3cd3ab43e4
|
|||
|
02172cd3cf
|
|||
|
388891aa55
|
|||
|
a6c7ddbb34
|
@@ -16,9 +16,7 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: https://gitea.com/actions/checkout@v3
|
uses: https://gitea.com/actions/checkout@v3
|
||||||
- name: Install nix
|
- name: Install nix
|
||||||
uses: https://github.com/cachix/install-nix-action@v23
|
uses: https://github.com/cachix/install-nix-action@v24
|
||||||
with:
|
|
||||||
github_access_token: ${{ secrets.INPUT_GITHUB_ACCESS_TOKEN }}
|
|
||||||
- name: Check ${{ matrix.check }}
|
- name: Check ${{ matrix.check }}
|
||||||
# Depends on nixos/nix#7759 to simply `nix flake check`
|
# Depends on nixos/nix#7759 to simply `nix flake check`
|
||||||
run: nix run .#checks.$(nix eval --raw --impure --expr "builtins.currentSystem").${{ matrix.check }}
|
run: nix run .#checks.$(nix eval --raw --impure --expr "builtins.currentSystem").${{ matrix.check }}
|
||||||
@@ -48,7 +46,7 @@ jobs:
|
|||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: https://gitea.com/actions/checkout@v3
|
uses: https://gitea.com/actions/checkout@v3
|
||||||
- name: Install nix
|
- name: Install nix
|
||||||
uses: https://github.com/cachix/install-nix-action@v23
|
uses: https://github.com/cachix/install-nix-action@v24
|
||||||
- name: Show nixpkgs version
|
- name: Show nixpkgs version
|
||||||
run: nix eval --impure --expr '(import ./flake-compat.nix { src = ./.; }).lib.version'
|
run: nix eval --impure --expr '(import ./flake-compat.nix { src = ./.; }).lib.version'
|
||||||
- name: Setup cachix
|
- name: Setup cachix
|
||||||
|
|||||||
28
.travis.yml
28
.travis.yml
@@ -1,28 +0,0 @@
|
|||||||
version: ~> 1.0
|
|
||||||
import: nix-community/nix-travis-ci:nix.yml@main
|
|
||||||
|
|
||||||
dist: xenial
|
|
||||||
os: linux
|
|
||||||
|
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- CACHIX_CACHE="xeals"
|
|
||||||
- NUR_REPO="xeals"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
- env: NIX_PATH=nixpkgs=channel:nixpkgs-unstable
|
|
||||||
- env: NIX_PATH=nixpkgs=channel:nixos-unstable
|
|
||||||
# - env: NIX_PATH=nixpkgs=channel:nixos-20.03
|
|
||||||
|
|
||||||
script:
|
|
||||||
- nix-build ci.nix -kA buildOutputs
|
|
||||||
- nix eval -f default.nix 'lib'
|
|
||||||
- nix eval -f default.nix 'modules'
|
|
||||||
- nix eval -f default.nix 'overlays'
|
|
||||||
|
|
||||||
after_success:
|
|
||||||
- if [ -n "${CACHIX_CACHE}" ]; then nix-build ci.nix -kA cacheOutputs | cachix push "${CACHIX_CACHE}"; fi
|
|
||||||
- if [[ NUR_REPO != "xeals" && "cron" != "${TRAVIS_EVENT_TYPE}" && "false" = "${TRAVIS_PULL_REQUEST}" && "master" = "${TRAVIS_BRANCH}" ]]; then
|
|
||||||
curl -XPOST "https://nur-update.herokuapp.com/update?repo=${NUR_REPO}"; fi
|
|
||||||
|
|
||||||
52
README.md
52
README.md
@@ -2,44 +2,26 @@
|
|||||||
|
|
||||||
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
**My personal [NUR](https://github.com/nix-community/NUR) repository**
|
||||||
|
|
||||||
[](https://github.com/xeals/nur-packages/actions) [](https://xeals.cachix.org)
|
[CI](https://git.xeals.me/xeals/nur-packages/actions) [](https://xeals.cachix.org)
|
||||||
|
|
||||||
## Noteworthy packages
|
## Using
|
||||||
|
|
||||||
### Jetbrains with plugins
|
Using packages is easier through the combined [NUR](https://github.com/nix-community/NUR) flake.
|
||||||
|
|
||||||
A fan of the Emacs/Vim/VSCode plugin builder? Now enjoy it with your favourite Jetbrains IDE!
|
|
||||||
|
|
||||||
The system is mostly proof-of-concept and there are a couple of issues with it at the moment, but it works for what is available in the repo.
|
|
||||||
|
|
||||||
#### Using
|
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
{ pkgs ? import <nixpkgs> {} }:
|
# flake.nix
|
||||||
let
|
{
|
||||||
xeals = import (builtins.fetchTarball "https://git.xeal.me/xeals/nur-packages/archive/master.tar.gz") {
|
inputs = {
|
||||||
inherit pkgs;
|
xeals.url = "git+https://git.xeal.me/xeals/nur-packages"; # Direct
|
||||||
|
xeals.url = "github:xeals/nur-packages"; # GitHub mirror
|
||||||
};
|
};
|
||||||
in
|
|
||||||
# e.g., for IntelliJ IDEA
|
outputs = { nixpkgs, xeals, ... }: {
|
||||||
xeals.jetbrains.ideaCommunityWithPlugins (jpkgs: [
|
nixosConfigurations.foo = nixpkgs.lib.nixosSystem {
|
||||||
jpkgs.ideavim
|
modules = [
|
||||||
jpkgs.checkstyle-idea
|
xeals.nixosModules.betanin
|
||||||
])
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Issues
|
|
||||||
|
|
||||||
- [ ] The plugin derivation overrides the base instead of extending it; this is really only an issue for the open-source IDEs, and only once they're actually built from source (instead of repackaging the JARs)
|
|
||||||
- [ ] Plugins must be manually added to the repo; long-term, I'd really want some way to scrape them, or at least have a script to add and update
|
|
||||||
|
|
||||||
### spotify-ripper
|
|
||||||
|
|
||||||
`spotify-ripper` is pretty flexible in the formats it supports, so the derivation allows you to customize which support packages to build with.
|
|
||||||
|
|
||||||
The default package comes with nothing (which is not entirely useful -- this will probably change at some point). See [the builder](./pkgs/tools/misc/spotify-ripper/default.nix) for options.
|
|
||||||
|
|
||||||
## General issues
|
|
||||||
|
|
||||||
- [ ] `spotify-ripper` does not build on stable NixOS channels before 20.09 when built with m4a or mp4 support, as `fdk-aac-encoder` is not available
|
|
||||||
- [ ] Due to changes in toolchains affected fixed output hashes, anything using `buildGoModule` and `buildRustPackage` will fail on NixOS 20.03. Override the hashes of `vendor` and `cargoDeps` attributes as needed
|
|
||||||
|
|||||||
12
flake.lock
generated
12
flake.lock
generated
@@ -5,11 +5,11 @@
|
|||||||
"systems": "systems"
|
"systems": "systems"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1694529238,
|
"lastModified": 1710146030,
|
||||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "flake-utils",
|
"repo": "flake-utils",
|
||||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -20,11 +20,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1699725108,
|
"lastModified": 1719931832,
|
||||||
"narHash": "sha256-NTiPW4jRC+9puakU4Vi8WpFEirhp92kTOSThuZke+FA=",
|
"narHash": "sha256-0LD+KePCKKEb4CcPsTBOwf019wDtZJanjoKm1S8q3Do=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "911ad1e67f458b6bcf0278fa85e33bb9924fed7e",
|
"rev": "0aeab749216e4c073cece5d34bc01b79e717c3e0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
28
flake.nix
28
flake.nix
@@ -5,10 +5,6 @@
|
|||||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
outputs = { self, nixpkgs, flake-utils }:
|
outputs = { self, nixpkgs, flake-utils }:
|
||||||
let
|
|
||||||
inherit (nixpkgs) lib;
|
|
||||||
inherit (flake-utils.lib) mkApp;
|
|
||||||
in
|
|
||||||
flake-utils.lib.eachDefaultSystem
|
flake-utils.lib.eachDefaultSystem
|
||||||
(system:
|
(system:
|
||||||
let
|
let
|
||||||
@@ -17,14 +13,12 @@
|
|||||||
{
|
{
|
||||||
packages = import ./pkgs/top-level { localSystem = system; inherit pkgs; };
|
packages = import ./pkgs/top-level { localSystem = system; inherit pkgs; };
|
||||||
|
|
||||||
|
formatter = pkgs.writeShellScriptBin "nur-packages-fmt" ''
|
||||||
|
${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt .
|
||||||
|
${pkgs.deadnix}/bin/deadnix -e .
|
||||||
|
'';
|
||||||
|
|
||||||
checks = {
|
checks = {
|
||||||
# FIXME: Disabled until I can work out what to do with generated code.
|
|
||||||
# nixpkgs-fmt = pkgs.writeShellScriptBin "nixpkgs-fmt-check" ''
|
|
||||||
# ${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt --check .
|
|
||||||
# '';
|
|
||||||
# deadnix = pkgs.writeShellScriptBin "deadnix-check" ''
|
|
||||||
# ${pkgs.deadnix}/bin/deadnix --fail .
|
|
||||||
# '';
|
|
||||||
# Ensures that the NUR bot can evaluate and find all our packages.
|
# Ensures that the NUR bot can evaluate and find all our packages.
|
||||||
# Normally we'd also run with `--option restrict-eval true`, but
|
# Normally we'd also run with `--option restrict-eval true`, but
|
||||||
# this is incompatible with flakes because reasons.
|
# this is incompatible with flakes because reasons.
|
||||||
@@ -47,19 +41,11 @@
|
|||||||
devShells.ci = pkgs.mkShellNoCC {
|
devShells.ci = pkgs.mkShellNoCC {
|
||||||
buildInputs = [ pkgs.nix-build-uncached ];
|
buildInputs = [ pkgs.nix-build-uncached ];
|
||||||
};
|
};
|
||||||
|
|
||||||
apps = {
|
|
||||||
alacritty = mkApp { drv = pkgs.alacritty-ligatures; exePath = "/bin/alacritty"; };
|
|
||||||
psst-cli = mkApp { drv = pkgs.psst; exePath = "/bin/psst-cli"; };
|
|
||||||
psst-gui = mkApp { drv = pkgs.psst; exePath = "/bin/psst-gui"; };
|
|
||||||
samrewritten = mkApp { drv = pkgs.samrewritten; };
|
|
||||||
spotify-ripper = mkApp { drv = pkgs.spotify-ripper; };
|
|
||||||
};
|
|
||||||
})
|
})
|
||||||
// {
|
// {
|
||||||
nixosModules = lib.mapAttrs (_: path: import path) (import ./modules) // {
|
nixosModules = nixpkgs.lib.mapAttrs (_: path: import path) (import ./modules) // {
|
||||||
default = {
|
default = {
|
||||||
imports = lib.attrValues self.nixosModules;
|
imports = nixpkgs.lib.attrValues self.nixosModules;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
amdgpu-pwm = ./services/hardware/amdgpu-pwm.nix;
|
amdgpu-pwm = ./services/hardware/amdgpu-pwm.nix;
|
||||||
betanin = ./services/web-apps/betanin.nix;
|
betanin = ./services/web-apps/betanin.nix;
|
||||||
dunst = ./services/x11/dunst.nix;
|
dunst = ./services/x11/dunst.nix;
|
||||||
|
koillection = ./services/web-apps/koillection.nix;
|
||||||
porkbun-ddns = ./services/networking/porkbun-ddns.nix;
|
porkbun-ddns = ./services/networking/porkbun-ddns.nix;
|
||||||
radeon-profile-daemon = ./services/hardware/radeon-profile-daemon.nix;
|
radeon-profile-daemon = ./services/hardware/radeon-profile-daemon.nix;
|
||||||
}
|
}
|
||||||
|
|||||||
318
modules/services/web-apps/koillection.nix
Normal file
318
modules/services/web-apps/koillection.nix
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
{ config, lib, modulesPath, options, pkgs, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) literalExpression mkEnableOption mkIf mkOption optionalString types;
|
||||||
|
|
||||||
|
opt = options.services.koillection;
|
||||||
|
cfg = config.services.koillection;
|
||||||
|
db = cfg.database;
|
||||||
|
|
||||||
|
koillection = (pkgs.koillection or pkgs.callPackage ../../../pkgs/by-name/ko/koillection/package.nix { }).override {
|
||||||
|
dataDir = cfg.dataDir;
|
||||||
|
};
|
||||||
|
inherit (koillection.passthru) phpPackage;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.services.koillection = {
|
||||||
|
enable = mkEnableOption "Koillection, a collection manager";
|
||||||
|
|
||||||
|
user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "koillection";
|
||||||
|
description = lib.mdDoc "User Koillection runs as.";
|
||||||
|
};
|
||||||
|
|
||||||
|
group = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "koillection";
|
||||||
|
description = lib.mdDoc "Group Koillection runs as.";
|
||||||
|
};
|
||||||
|
|
||||||
|
hostName = lib.mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = config.networking.fqdnOrHostName;
|
||||||
|
defaultText = "config.networking.fqdnOrHostName";
|
||||||
|
example = "koillection.example.com";
|
||||||
|
description = lib.mdDoc "The hostname to serve Koillection on.";
|
||||||
|
};
|
||||||
|
|
||||||
|
dataDir = mkOption {
|
||||||
|
description = lib.mdDoc "Koillection data directory";
|
||||||
|
default = "/var/lib/koillection";
|
||||||
|
type = types.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
database = {
|
||||||
|
host = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = if db.createLocally then "/run/postgresql" else null;
|
||||||
|
defaultText = literalExpression ''
|
||||||
|
if config.${opt.database.createLocally}
|
||||||
|
then "/run/postgresql"
|
||||||
|
else null
|
||||||
|
'';
|
||||||
|
example = "192.168.12.85";
|
||||||
|
description = lib.mdDoc "Database host address or unix socket.";
|
||||||
|
};
|
||||||
|
port = mkOption {
|
||||||
|
type = types.port;
|
||||||
|
default = 5432;
|
||||||
|
description = lib.mdDoc "Database host port.";
|
||||||
|
};
|
||||||
|
name = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = "koillection";
|
||||||
|
description = lib.mdDoc "Database name.";
|
||||||
|
};
|
||||||
|
user = mkOption {
|
||||||
|
type = types.str;
|
||||||
|
default = cfg.user;
|
||||||
|
defaultText = literalExpression "user";
|
||||||
|
description = lib.mdDoc "Database username.";
|
||||||
|
};
|
||||||
|
passwordFile = mkOption {
|
||||||
|
type = with types; nullOr path;
|
||||||
|
default = null;
|
||||||
|
example = "/run/keys/koillection-dbpassword";
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
A file containing the password corresponding to
|
||||||
|
{option}`database.user`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
createLocally = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = lib.mdDoc "Create the database and database user locally.";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
poolConfig = mkOption {
|
||||||
|
type = with types; attrsOf (oneOf [ str int bool ]);
|
||||||
|
default = {
|
||||||
|
"pm" = "dynamic";
|
||||||
|
"pm.max_children" = 32;
|
||||||
|
"pm.start_servers" = 2;
|
||||||
|
"pm.min_spare_servers" = 2;
|
||||||
|
"pm.max_spare_servers" = 4;
|
||||||
|
"pm.max_requests" = 500;
|
||||||
|
};
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
Options for the bookstack PHP pool. See the documentation on `php-fpm.conf`
|
||||||
|
for details on configuration directives.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
nginx = mkOption {
|
||||||
|
type = types.submodule (
|
||||||
|
lib.recursiveUpdate
|
||||||
|
(import "${modulesPath}/services/web-servers/nginx/vhost-options.nix" { inherit config lib; })
|
||||||
|
{ }
|
||||||
|
);
|
||||||
|
default = { };
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
serverAliases = [
|
||||||
|
"koillection.''${config.networking.domain}"
|
||||||
|
];
|
||||||
|
# To enable encryption and let let's encrypt take care of certificate
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
With this option, you can customize the nginx virtualHost settings.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkOption {
|
||||||
|
type = with types;
|
||||||
|
attrsOf
|
||||||
|
(nullOr
|
||||||
|
(either
|
||||||
|
(oneOf [ bool int port path str ])
|
||||||
|
(submodule {
|
||||||
|
options = {
|
||||||
|
_secret = mkOption {
|
||||||
|
type = nullOr str;
|
||||||
|
description = lib.mdDoc ''
|
||||||
|
The path to a file containing the value the option should
|
||||||
|
be set to in the final configuration file.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})));
|
||||||
|
default = { };
|
||||||
|
example = literalExpression ''
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.koillection.config = {
|
||||||
|
APP_ENV = "prod";
|
||||||
|
# DB_DRIVER = "pdo_pgsql";
|
||||||
|
DB_USER = db.user;
|
||||||
|
DB_PASSWORD._secret = db.passwordFile;
|
||||||
|
DB_HOST = db.host;
|
||||||
|
DB_PORT = db.port;
|
||||||
|
DB_NAME = db.name;
|
||||||
|
# FIXME
|
||||||
|
# DB_VERSION = lib.versions.major config.services.postgresql.package.version;
|
||||||
|
DB_VERSION = "15";
|
||||||
|
PHP_TZ = config.time.timeZone;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.postgresql = mkIf db.createLocally {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = [ db.name ];
|
||||||
|
ensureUsers = [{
|
||||||
|
name = db.user;
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.phpfpm.pools.koillection = {
|
||||||
|
inherit (cfg) user group;
|
||||||
|
inherit phpPackage;
|
||||||
|
# Copied from docker/php.ini
|
||||||
|
phpOptions = ''
|
||||||
|
max_execution_time = 200
|
||||||
|
|
||||||
|
apc.enabled = 1
|
||||||
|
apc.shm_size = 64M
|
||||||
|
apc.ttl = 7200
|
||||||
|
|
||||||
|
opcache.enable = 1
|
||||||
|
opcache.memory_consumption = 256
|
||||||
|
opcache.max_accelerated_files = 20000
|
||||||
|
opcache.max_wasted_percentage = 10
|
||||||
|
opcache.validate_timestamps = 0
|
||||||
|
opcache.preload = ${koillection}/share/php/koillection/config/preload.php
|
||||||
|
opcache.preload_user = ${cfg.user}
|
||||||
|
expose_php = Off
|
||||||
|
|
||||||
|
session.cookie_httponly = 1
|
||||||
|
realpath_cache_size = 4096K
|
||||||
|
realpath_cache_ttle = 600
|
||||||
|
'';
|
||||||
|
settings = {
|
||||||
|
"listen.mode" = "0660";
|
||||||
|
"listen.owner" = cfg.user;
|
||||||
|
"listen.group" = cfg.group;
|
||||||
|
} // cfg.poolConfig;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx = {
|
||||||
|
enable = lib.mkDefault true;
|
||||||
|
virtualHosts."${cfg.hostName}" = lib.mkMerge [
|
||||||
|
cfg.nginx
|
||||||
|
{
|
||||||
|
root = lib.mkForce "${koillection}/share/php/koillection/public";
|
||||||
|
extraConfig = optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;";
|
||||||
|
locations = {
|
||||||
|
"/" = {
|
||||||
|
index = "index.php";
|
||||||
|
extraConfig = ''try_files $uri $uri/ /index.php?query_string;'';
|
||||||
|
};
|
||||||
|
"~ \.php$" = {
|
||||||
|
extraConfig = ''
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
include ${config.services.nginx.package}/conf/fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param REDIRECT_STATUS 200;
|
||||||
|
fastcgi_pass unix:${config.services.phpfpm.pools."koillection".socket};
|
||||||
|
${optionalString (cfg.nginx.addSSL || cfg.nginx.forceSSL || cfg.nginx.onlySSL || cfg.nginx.enableACME) "fastcgi_param HTTPS on;"}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
"~ \.(js|css|gif|png|ico|jpg|jpeg)$" = {
|
||||||
|
extraConfig = "expires 365d;";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.koillection-setup = {
|
||||||
|
description = "Preparation tasks for koillection";
|
||||||
|
before = [ "phpfpm-koillection.service" ];
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
User = cfg.user;
|
||||||
|
WorkingDirectory = koillection;
|
||||||
|
RuntimeDirectory = "koillection/cache";
|
||||||
|
RuntimeDirectoryMode = "0700";
|
||||||
|
};
|
||||||
|
path = [ pkgs.replace-secret ];
|
||||||
|
script =
|
||||||
|
let
|
||||||
|
isSecret = v: lib.isAttrs v && v ? _secret && lib.isString v._secret;
|
||||||
|
koillectionEnvVars = lib.generators.toKeyValue {
|
||||||
|
mkKeyValue = lib.flip lib.generators.mkKeyValueDefault "=" {
|
||||||
|
mkValueString = v: with builtins;
|
||||||
|
if isInt v then toString v
|
||||||
|
else if lib.isString v then v
|
||||||
|
else if true == v then "true"
|
||||||
|
else if false == v then "false"
|
||||||
|
else if isSecret v then hashString "sha256" v._secret
|
||||||
|
else throw "unsupported type ${typeOf v}: ${(lib.generators.toPretty {}) v}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
secretPaths = lib.mapAttrsToList (_: v: v._secret) (lib.filterAttrs (_: isSecret) cfg.config);
|
||||||
|
mkSecretReplacement = file: ''
|
||||||
|
replace-secret ${lib.escapeShellArgs [ ( builtins.hashString "sha256" file ) file "${cfg.dataDir}/.env" ]}
|
||||||
|
'';
|
||||||
|
secretReplacements = lib.concatMapStrings mkSecretReplacement secretPaths;
|
||||||
|
filteredConfig = lib.converge (lib.filterAttrsRecursive (_: v: ! builtins.elem v [{ } null])) cfg.config;
|
||||||
|
koillectionEnv = pkgs.writeText "koillection.env" (koillectionEnvVars filteredConfig);
|
||||||
|
in
|
||||||
|
''
|
||||||
|
# error handling
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# set permissions
|
||||||
|
umask 077
|
||||||
|
|
||||||
|
# create .env file
|
||||||
|
install -T -m 0600 -o ${cfg.user} ${koillectionEnv} "${cfg.dataDir}/.env"
|
||||||
|
${secretReplacements}
|
||||||
|
|
||||||
|
# prepend `base64:` if it does not exist in APP_KEY
|
||||||
|
|
||||||
|
if ! grep 'APP_KEY=base64:' "${cfg.dataDir}/.env" >/dev/null; then
|
||||||
|
sed -i 's/APP_KEY=/APP_KEY=base64:/' "${cfg.dataDir}/.env"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# migrate db
|
||||||
|
${lib.getExe phpPackage} ${koillection}/share/php/koillection/bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
|
||||||
|
|
||||||
|
# dump translations
|
||||||
|
# TODO: Might need pointing somewhere else.
|
||||||
|
${lib.getExe phpPackage} ${koillection}/share/php/koillection/bin/console app:translations:dump
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.tmpfiles.rules = [
|
||||||
|
"d ${cfg.dataDir} 0710 ${cfg.user} ${cfg.group} - -"
|
||||||
|
"d ${cfg.dataDir}/public 0750 ${cfg.user} ${cfg.group} - -"
|
||||||
|
"d ${cfg.dataDir}/public/uploads 0750 ${cfg.user} ${cfg.group} - -"
|
||||||
|
"d ${cfg.dataDir}/var 0700 ${cfg.user} ${cfg.group} - -"
|
||||||
|
"d ${cfg.dataDir}/var/cache 0700 ${cfg.user} ${cfg.group} - -"
|
||||||
|
"d ${cfg.dataDir}/var/cache/prod 0700 ${cfg.user} ${cfg.group} - -"
|
||||||
|
"d ${cfg.dataDir}/var/logs 0700 ${cfg.user} ${cfg.group} - -"
|
||||||
|
];
|
||||||
|
|
||||||
|
users = {
|
||||||
|
users = mkIf (cfg.user == "koillection") {
|
||||||
|
koillection = {
|
||||||
|
inherit (cfg) group;
|
||||||
|
isSystemUser = true;
|
||||||
|
};
|
||||||
|
"${config.services.nginx.user}".extraGroups = [ cfg.group ];
|
||||||
|
};
|
||||||
|
groups = mkIf (cfg.group == "koillection") {
|
||||||
|
koillection = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "atlauncher";
|
pname = "atlauncher";
|
||||||
version = "3.4.35.2";
|
version = "3.4.35.4";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${version}/ATLauncher-${version}.jar";
|
url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${version}/ATLauncher-${version}.jar";
|
||||||
hash = "sha256-CVJQGMnETW9BOn2To09/UuLrseNfovUyEFhcz/zyHOQ=";
|
hash = "sha256-M8ygN70yizJM6VEffBh/lH/DneKAzQ5UFzc3g51dja0=";
|
||||||
};
|
};
|
||||||
|
|
||||||
dontUnpack = true;
|
dontUnpack = true;
|
||||||
|
|||||||
@@ -1,62 +0,0 @@
|
|||||||
diff --git a/cardboard/meson.build b/cardboard/meson.build
|
|
||||||
index b236f71..a90f230 100644
|
|
||||||
--- a/cardboard/meson.build
|
|
||||||
+++ b/cardboard/meson.build
|
|
||||||
@@ -4,24 +4,15 @@ xkbcommon = dependency('xkbcommon')
|
|
||||||
xcb = dependency('xcb', required: get_option('xwayland'))
|
|
||||||
|
|
||||||
wlroots_version = '>=0.10.0'
|
|
||||||
-wlroots_proj = subproject(
|
|
||||||
+wlroots = dependency(
|
|
||||||
'wlroots',
|
|
||||||
- default_options: ['examples=false'],
|
|
||||||
required: true,
|
|
||||||
version: wlroots_version,
|
|
||||||
)
|
|
||||||
|
|
||||||
-wlroots = wlroots_proj.get_variable('wlroots')
|
|
||||||
-wlroots_conf = wlroots_proj.get_variable('conf_data')
|
|
||||||
-wlroots_has_xwayland = wlroots_conf.get('WLR_HAS_XWAYLAND') == 1
|
|
||||||
+have_xwayland = xcb.found()
|
|
||||||
|
|
||||||
-if get_option('xwayland').enabled() and not wlroots_has_xwayland
|
|
||||||
- error('Cannot enable Xwayland support in cardboard: wlroots has been built without Xwayland support')
|
|
||||||
-endif
|
|
||||||
-have_xwayland = xcb.found() and wlroots_has_xwayland
|
|
||||||
-
|
|
||||||
-expected_proj = subproject('expected', required: true)
|
|
||||||
-expected = expected_proj.get_variable('expected_dep')
|
|
||||||
+expected = dependency('tl-expected', required: true, method: 'cmake', modules: ['tl::expected'])
|
|
||||||
|
|
||||||
conf_data = configuration_data()
|
|
||||||
conf_data.set10('HAVE_XWAYLAND', have_xwayland)
|
|
||||||
diff --git a/cutter/meson.build b/cutter/meson.build
|
|
||||||
index f1260a4..1485f37 100644
|
|
||||||
--- a/cutter/meson.build
|
|
||||||
+++ b/cutter/meson.build
|
|
||||||
@@ -1,6 +1,5 @@
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-only
|
|
||||||
-expected_proj = subproject('expected', required: true)
|
|
||||||
-expected = expected_proj.get_variable('expected_dep')
|
|
||||||
+expected = dependency('tl-expected', required: true, method: 'cmake', modules: ['tl::expected'])
|
|
||||||
|
|
||||||
executable(
|
|
||||||
'cutter',
|
|
||||||
diff --git a/libcardboard/meson.build b/libcardboard/meson.build
|
|
||||||
index 89698fe..3ac8115 100644
|
|
||||||
--- a/libcardboard/meson.build
|
|
||||||
+++ b/libcardboard/meson.build
|
|
||||||
@@ -1,11 +1,9 @@
|
|
||||||
# SPDX-License-Identifier: GPL-3.0-only
|
|
||||||
libcardboard_inc = include_directories('include')
|
|
||||||
|
|
||||||
-expected_proj = subproject('expected', required: true)
|
|
||||||
-expected = expected_proj.get_variable('expected_dep')
|
|
||||||
+expected = dependency('tl-expected', required: true, method: 'cmake', modules: ['tl::expected'])
|
|
||||||
|
|
||||||
-cereal_proj = subproject('cereal', required: true)
|
|
||||||
-cereal = cereal_proj.get_variable('cereal_dep')
|
|
||||||
+cereal = dependency('cereal', required: true, method: 'cmake')
|
|
||||||
|
|
||||||
sources = files(
|
|
||||||
'src/command_protocol.cpp',
|
|
||||||
@@ -1,68 +0,0 @@
|
|||||||
{ stdenv
|
|
||||||
, lib
|
|
||||||
, fetchFromGitLab
|
|
||||||
, cereal
|
|
||||||
, cmake
|
|
||||||
, libGL
|
|
||||||
, libX11
|
|
||||||
, libinput
|
|
||||||
, libxkbcommon
|
|
||||||
, meson
|
|
||||||
, ninja
|
|
||||||
, pixman
|
|
||||||
, pkg-config
|
|
||||||
, tl-expected
|
|
||||||
, wayland
|
|
||||||
, wayland-protocols
|
|
||||||
, wlroots
|
|
||||||
}:
|
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
|
||||||
pname = "cardboard";
|
|
||||||
version = "20210120.g7b15613";
|
|
||||||
|
|
||||||
src = fetchFromGitLab {
|
|
||||||
owner = "cardboardwm";
|
|
||||||
repo = "cardboard";
|
|
||||||
rev = "7b15613e6e1222a6a83d69a2e5da2810dfb45522";
|
|
||||||
sha256 = "044sb0lv1gcywpdncvlv7npxvbsqcc1mwpk0f6i73dinchdz7gmq";
|
|
||||||
};
|
|
||||||
|
|
||||||
patches = [
|
|
||||||
./0001-use-system-dependencies.patch
|
|
||||||
];
|
|
||||||
|
|
||||||
# CMake likes to own the configurePhase, but we only need it for dependency
|
|
||||||
# discovery. Remove it.
|
|
||||||
configurePhase = "mesonConfigurePhase";
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
cmake
|
|
||||||
meson
|
|
||||||
ninja
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = [
|
|
||||||
cereal
|
|
||||||
libGL
|
|
||||||
libX11
|
|
||||||
libinput
|
|
||||||
libxkbcommon
|
|
||||||
pixman
|
|
||||||
tl-expected
|
|
||||||
wayland
|
|
||||||
wayland-protocols
|
|
||||||
wlroots
|
|
||||||
];
|
|
||||||
|
|
||||||
passthru.providedSessions = [ "cardboard" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Scrollable tiling Wayland compositor designed with laptops in mind";
|
|
||||||
homepage = "https://gitlab.com/cardboardwm/cardboard";
|
|
||||||
license = licenses.gpl3;
|
|
||||||
platforms = wlroots.meta.platforms;
|
|
||||||
broken = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -9,14 +9,14 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
pname = "cura5";
|
pname = "cura5";
|
||||||
version = "5.5.0";
|
version = "5.6.0";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
cura5 = appimageTools.wrapType2 {
|
cura5 = appimageTools.wrapType2 {
|
||||||
inherit pname version;
|
inherit pname version;
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/Ultimaker-Cura-${version}-linux-X64.AppImage";
|
url = "https://github.com/Ultimaker/Cura/releases/download/${version}/Ultimaker-Cura-${version}-linux-X64.AppImage";
|
||||||
hash = "sha256-EG5LMiDFUSXFbtRhd15egPkbp12kEp2TdUdLssSy7Jg=";
|
hash = "sha256-EHiWoNpLKHPzv6rZrtNgEr7y//iVcRYeV/TaCn8QpEA=";
|
||||||
};
|
};
|
||||||
extraPkgs = _: [ ];
|
extraPkgs = _: [ ];
|
||||||
};
|
};
|
||||||
|
|||||||
35
pkgs/by-name/ge/gersemi/package.nix
Normal file
35
pkgs/by-name/ge/gersemi/package.nix
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{ lib
|
||||||
|
, python3
|
||||||
|
, fetchPypi
|
||||||
|
}:
|
||||||
|
|
||||||
|
python3.pkgs.buildPythonApplication rec {
|
||||||
|
pname = "gersemi";
|
||||||
|
version = "0.11.0";
|
||||||
|
format = "setuptools";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
hash = "sha256-K8ZbVVYiEazdjbuAUa8r9lJyjOPt2jsKbUAovTx9XeY=";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Remove dataclasses backport requirement since it doesn't work on newer
|
||||||
|
# Python.
|
||||||
|
patchPhase = ''
|
||||||
|
sed -i '/dataclasses/d' setup.py
|
||||||
|
'';
|
||||||
|
|
||||||
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
|
appdirs
|
||||||
|
colorama
|
||||||
|
lark
|
||||||
|
pyyaml
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A formatter to make your CMake code the real treasure";
|
||||||
|
homepage = "https://github.com/BlankSpruce/gersemi";
|
||||||
|
license = lib.licenses.mpl20;
|
||||||
|
platforms = python3.meta.platforms;
|
||||||
|
};
|
||||||
|
}
|
||||||
25
pkgs/by-name/ko/koillection/koillection-dirs.patch
Normal file
25
pkgs/by-name/ko/koillection/koillection-dirs.patch
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
*** a/src/Kernel.php
|
||||||
|
--- b/src/Kernel.php
|
||||||
|
@@ -8,6 +8,21 @@ class Kernel extends BaseKernel
|
||||||
|
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||||
|
|
||||||
|
class Kernel extends BaseKernel
|
||||||
|
{
|
||||||
|
use MicroKernelTrait;
|
||||||
|
+
|
||||||
|
+ public function getDataDir(): string
|
||||||
|
+ {
|
||||||
|
+ return '@dataDir@';
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public function getCacheDir(): string
|
||||||
|
+ {
|
||||||
|
+ return $this->getDataDir() . '/var/cache/' . $this->getEnvironment();
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public function getLogDir(): string
|
||||||
|
+ {
|
||||||
|
+ return $this->getDataDir() . '/var/logs';
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
|
||||||
69
pkgs/by-name/ko/koillection/package.nix
Normal file
69
pkgs/by-name/ko/koillection/package.nix
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
{ lib
|
||||||
|
, dataDir ? "/var/lib/koillection"
|
||||||
|
# REVIEW: This supposed to be aliased by the caller, which means it shouldn't
|
||||||
|
# go in by-name, I think.
|
||||||
|
, php83
|
||||||
|
, fetchFromGitHub
|
||||||
|
, mkYarnPackage
|
||||||
|
, fetchYarnDeps
|
||||||
|
}:
|
||||||
|
|
||||||
|
php83.buildComposerProject (finalAttrs: {
|
||||||
|
pname = "koillection";
|
||||||
|
version = "1.5.2";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "benjaminjonard";
|
||||||
|
repo = "koillection";
|
||||||
|
rev = finalAttrs.version;
|
||||||
|
hash = "sha256-r2rkHhp0F5QfwJuKeu4UdPoluDXxpyhYpie1zUk1h5c=";
|
||||||
|
};
|
||||||
|
|
||||||
|
frontend = mkYarnPackage {
|
||||||
|
inherit (finalAttrs) pname version;
|
||||||
|
|
||||||
|
src = "${finalAttrs.src}/assets";
|
||||||
|
|
||||||
|
offlineCache = fetchYarnDeps {
|
||||||
|
yarnLock = "${finalAttrs.src}/assets/yarn.lock";
|
||||||
|
hash = "";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./koillection-dirs.patch
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace src/Kernel.php \
|
||||||
|
--replace "@dataDir@" "${dataDir}"
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Lock file uses exact constraints, which Composer doesn't like.
|
||||||
|
composerStrictValidation = false;
|
||||||
|
# Actually installs plugins, i.e., Symfony.
|
||||||
|
composerNoPlugins = false;
|
||||||
|
vendorHash = "sha256-LU9ZN4qUNUpSBGH6AChw3qU4RjgsoPJmLL01FS7UKRQ=";
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
local koillection_out=$out/share/php/koillection
|
||||||
|
|
||||||
|
rm -R $koillection_out/public/uploads
|
||||||
|
ln -s ${dataDir}/.env $koillection_out/.env.local
|
||||||
|
ln -s ${dataDir}/public/uploads $koillection_out/public/uploads
|
||||||
|
|
||||||
|
cp -r ${finalAttrs.frontend} assets/
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru = {
|
||||||
|
phpPackage = php83;
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Self-hosted service allowing users to manage any kind of collections";
|
||||||
|
homepage = "https://github.com/benjaminjonard/koillection";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
|
broken = true; # Blocked on NixOS/nixpkgs#254369
|
||||||
|
};
|
||||||
|
})
|
||||||
16
pkgs/by-name/th/thor/nugetDeps.nix
Normal file
16
pkgs/by-name/th/thor/nugetDeps.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
# This file was automatically generated by passthru.fetch-deps.
|
||||||
|
# Please dont edit it manually, your changes might get overwritten!
|
||||||
|
|
||||||
|
{ fetchNuGet }: [
|
||||||
|
(fetchNuGet { pname = "K4os.Compression.LZ4"; version = "1.3.5"; sha256 = "1nv9inhz0n25lhkw9xgp6g5xbqmcdccdhx6mwrli0pdp6hjmlh9k"; })
|
||||||
|
(fetchNuGet { pname = "K4os.Compression.LZ4.Streams"; version = "1.3.5"; sha256 = "09m0jxq6558r1v1l4rsc8c0n6nlacz2d8c03as6kvvvz2gr7h506"; })
|
||||||
|
(fetchNuGet { pname = "K4os.Hash.xxHash"; version = "1.0.8"; sha256 = "0vz1f81z4rh7a576fdzbc6wmj7p4gaca1rch3anvh1s5qd7xdd10"; })
|
||||||
|
(fetchNuGet { pname = "Serilog"; version = "3.0.0-dev-02022"; sha256 = "0c7gqhzkcdzmhycq60mzwqwcycl99ksk4q0pmwz140japasfhcqk"; })
|
||||||
|
(fetchNuGet { pname = "Serilog.Exceptions"; version = "8.4.0"; sha256 = "1v0rnhr616wj85gb6wvafj22kvnphp7m9vsyalcc25hwa1jvlryr"; })
|
||||||
|
(fetchNuGet { pname = "Serilog.Sinks.Console"; version = "4.1.1-dev-00910"; sha256 = "00h3sd0lxnx53jmgqh84pw73zk3d710dvlgkf4x135vfhax9bw7m"; })
|
||||||
|
(fetchNuGet { pname = "SharpCompress"; version = "0.33.0"; sha256 = "1j94hfjvkygpp97svv75jay0rmnx9ygg86d5syyahl9hayns4ig9"; })
|
||||||
|
(fetchNuGet { pname = "Spectre.Console"; version = "0.47.1-preview.0.8"; sha256 = "1r6v16lh7mqxxh3j9lqryif8skx3q9nkgf5gnp5xpc4im3a52wql"; })
|
||||||
|
(fetchNuGet { pname = "System.IO.Pipelines"; version = "6.0.3"; sha256 = "1jgdazpmwc21dd9naq3l9n5s8a1jnbwlvgkf1pnm0aji6jd4xqdz"; })
|
||||||
|
(fetchNuGet { pname = "System.Memory"; version = "4.5.5"; sha256 = "08jsfwimcarfzrhlyvjjid61j02irx6xsklf32rv57x2aaikvx0h"; })
|
||||||
|
(fetchNuGet { pname = "System.Reflection.TypeExtensions"; version = "4.7.0"; sha256 = "04qw9km34pmzr2alckb3mqdb4fpqwlvzk59lg8c7jfidghcl4jqq"; })
|
||||||
|
]
|
||||||
32
pkgs/by-name/th/thor/package.nix
Normal file
32
pkgs/by-name/th/thor/package.nix
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
{ lib
|
||||||
|
, fetchFromGitHub
|
||||||
|
, buildDotnetModule
|
||||||
|
, dotnetCorePackages
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildDotnetModule rec {
|
||||||
|
pname = "thor";
|
||||||
|
version = "1.0.4";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "Samsung-Loki";
|
||||||
|
repo = "Thor";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-tYzPpgbM9rCDdLW0ERZWmmxzMYpe1BNyFwmpaLQXRGQ=";
|
||||||
|
};
|
||||||
|
|
||||||
|
dotnet-sdk = dotnetCorePackages.sdk_7_0;
|
||||||
|
dotnet-runtime = dotnetCorePackages.runtime_7_0;
|
||||||
|
nugetDeps = ./nugetDeps.nix;
|
||||||
|
projectFile = "TheAirBlow.Thor.Shell/TheAirBlow.Thor.Shell.csproj";
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
mv $out/bin/TheAirBlow.Thor.Shell $out/bin/thor
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/Samsung-Loki/Thor";
|
||||||
|
description = "An alternative to Heimdall";
|
||||||
|
license = lib.licenses.mpl20;
|
||||||
|
};
|
||||||
|
}
|
||||||
27
pkgs/by-name/wg/wg2nd/package.nix
Normal file
27
pkgs/by-name/wg/wg2nd/package.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{ lib
|
||||||
|
, stdenv
|
||||||
|
, fetchFromGitHub
|
||||||
|
, libcap
|
||||||
|
}: stdenv.mkDerivation {
|
||||||
|
pname = "wg2nd";
|
||||||
|
version = "20240605.23a3710";
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "flu0r1ne";
|
||||||
|
repo = "wg2nd";
|
||||||
|
rev = "23a37100f121edd0c1291c4a78901662eae5d58b";
|
||||||
|
hash = "sha256-XY19Vicg8l/2stlWj1QqJt0pJOi/kueQpBufVlLJVxk=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [ libcap ];
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
PREFIX=$out BINDIR=/bin make install
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "WireGuard to systemd-networkd Configuration Converter";
|
||||||
|
homepage = "https://git.flu0r1ine.net/wg2nd/about";
|
||||||
|
license = [ lib.licenses.gpl2Only lib.licenses.mit ];
|
||||||
|
platforms = lib.platforms.linux;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user