Merge remote-tracking branch 'origin/main' into compass
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellScriptBin "aacs" ''
|
||||
set -ex
|
||||
[ ! -d "''${HOME}/.config/aacs" ] && mkdir -p "''${HOME}/.config/aacs"
|
||||
cd "''${HOME}/.config/aacs"
|
||||
[ -f KEYDB.cfg.zip ] && rm -f KEYDB.cfg.zip
|
||||
curl -L -o KEYDB.cfg.zip "http://fvonline-db.bplaced.net/fv_download.php?lang=eng"
|
||||
${pkgs.unzip}/bin/unzip KEYDB.cfg.zip
|
||||
mv keydb.cfg KEYDB.cfg''
|
||||
@@ -1,57 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs,
|
||||
colorama,
|
||||
dunamai,
|
||||
iteration-utilities,
|
||||
jinja2,
|
||||
jinja2-ansible-filters,
|
||||
packaging,
|
||||
pathspec,
|
||||
plumbum,
|
||||
pydantic,
|
||||
pygments,
|
||||
pyyaml,
|
||||
pyyaml-include,
|
||||
questionary,
|
||||
setuptools,
|
||||
wheel}:
|
||||
|
||||
let
|
||||
pydeps = [
|
||||
colorama
|
||||
dunamai
|
||||
iteration-utilities
|
||||
jinja2
|
||||
jinja2-ansible-filters
|
||||
packaging
|
||||
pathspec
|
||||
plumbum
|
||||
pydantic
|
||||
pygments
|
||||
pyyaml
|
||||
pyyaml-include
|
||||
questionary
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
in buildPythonPackage rec {
|
||||
pname = "copier";
|
||||
version = "6.2.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-eSxm7Rpu3dhWkLoSA1/b8IemWxjIsHwlJ+NYEpbilkk=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A library and CLI app for rendering templates";
|
||||
homepage = "https://github.com/copier-org/copier";
|
||||
license = licenses.mit;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = pydeps;
|
||||
|
||||
buildInputs = [];
|
||||
}
|
||||
+13
-14
@@ -3,7 +3,6 @@ final: prev:
|
||||
let
|
||||
myPackages = pypackages: with pypackages; [
|
||||
black
|
||||
copier
|
||||
dateutil
|
||||
flake8
|
||||
ipython
|
||||
@@ -48,27 +47,27 @@ in rec {
|
||||
jinja2-ansible-filters
|
||||
pyyaml-include;
|
||||
};
|
||||
iteration-utilities = cp ./iteration-utilities.nix {};
|
||||
jinja2-ansible-filters = cp ./jinja2-ansible-filters.nix {};
|
||||
pyyaml-include = cp ./pyyaml-include.nix {};
|
||||
xonsh-vox = cp ./xonsh-vox.nix {};
|
||||
})
|
||||
];
|
||||
|
||||
aacs = prev.callPackage ./aacs.nix {};
|
||||
brew = prev.callPackage ./homebrew.nix {};
|
||||
|
||||
enwiki-dump = prev.callPackage ./enwiki-dump.nix {};
|
||||
hms = prev.callPackage ./hms.nix {
|
||||
pkgs = final.pkgs;
|
||||
};
|
||||
inject = prev.callPackage ./inject.nix { inherit (final) pkgs; };
|
||||
jinja2-cli = prev.python3.pkgs.callPackage ./jinja2-cli.nix {};
|
||||
libbluray = prev.libbluray.override {
|
||||
withAACS = true;
|
||||
withBDplus = true;
|
||||
};
|
||||
setup-ssh = prev.callPackage ./setup-ssh.nix {
|
||||
pkgs = final.pkgs;
|
||||
};
|
||||
template = prev.callPackage ./template.nix { };
|
||||
|
||||
xonsh = (prev.callPackage ./xonsh.nix {
|
||||
#inherit (final) lib coreutils python3Packages git;
|
||||
}).overridePythonAttrs (old: rec{
|
||||
xonsh = prev.xonsh.overridePythonAttrs (old: rec{
|
||||
python3 = final.gregpy;
|
||||
propagatedBuildInputs = with final.gregpy.pkgs; old.propagatedBuildInputs ++ [
|
||||
xonsh-apipenv
|
||||
@@ -77,9 +76,9 @@ in rec {
|
||||
];
|
||||
});
|
||||
|
||||
bitwarden = macOver ./mac/bitwarden.nix "bitwarden";
|
||||
gnucash = macOver ./mac/gnucash.nix "gnucash";
|
||||
handbrake = macOver ./mac/handbrake.nix "handbrake";
|
||||
onlyoffice-bin = macOver ./mac/onlyoffice-bin.nix "onlyoffice-bin";
|
||||
vlc = macOver ./mac/vlc.nix "vlc";
|
||||
#bitwarden = macOver ./mac/bitwarden.nix "bitwarden";
|
||||
#gnucash = macOver ./mac/gnucash.nix "gnucash";
|
||||
#handbrake = macOver ./mac/handbrake.nix "handbrake";
|
||||
#onlyoffice-bin = macOver ./mac/onlyoffice-bin.nix "onlyoffice-bin";
|
||||
#vlc = macOver ./mac/vlc.nix "vlc";
|
||||
}
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "iteration-utilities";
|
||||
version = "0.11.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit version;
|
||||
pname = "iteration_utilities";
|
||||
sha256 = "sha256-+R9BolSemn5A/1Rg/fkDO27lswXZvneUO2OlVFNMKnc=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "Utilities based on Pythons iterators and generators.";
|
||||
homepage = "https://github.com/MSeifert04/iteration_utilities";
|
||||
license = licenses.afl20;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [];
|
||||
|
||||
doCheck = false;
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs}:
|
||||
|
||||
let
|
||||
pydeps = pypkgs: with pypkgs; [
|
||||
ansible-core
|
||||
setuptools
|
||||
wheel
|
||||
];
|
||||
in buildPythonPackage rec {
|
||||
pname = "jinja2-ansible-filters";
|
||||
version = "1.3.2";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-B8EM9E1wc/TwEQLKEtmi3DG0HUfkxh7ZLvam0mabNWs=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A port of the Jinja2 filters from Ansible";
|
||||
homepage = "https://gitlab.com/dreamer-labs/libraries/jinja2-ansible-filters";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
(python3.withPackages pydeps)
|
||||
];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
(python3.withPackages pydeps)
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
|
||||
flake8,
|
||||
jinja2,
|
||||
pytestCheckHook,
|
||||
setuptools,
|
||||
}:
|
||||
|
||||
buildPythonPackage {
|
||||
pname = "jinja2-cli";
|
||||
version = "0.8.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "mattrobenolt";
|
||||
repo = "jinja2-cli";
|
||||
rev = "0.8.2";
|
||||
hash = "sha256-67gYt0nZX+VTVaoSxVXGzbRiXD7EMsVBFWC8wHo+Vw0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
jinja2
|
||||
setuptools
|
||||
];
|
||||
|
||||
checkInputs = [
|
||||
flake8
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "A CLI interface for Jinja2 templates";
|
||||
homepage = "https://github.com/mattrobenolt/jinja2-cli";
|
||||
license = licenses.bsd2;
|
||||
maintainers = [ lib.maintainers.greg ];
|
||||
};
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
{ lib, buildPythonPackage, fetchPypi, pkgs,
|
||||
pyyaml,
|
||||
setuptools,
|
||||
setuptools-scm,
|
||||
setuptools-scm-git-archive,
|
||||
wheel
|
||||
}:
|
||||
|
||||
let
|
||||
pydeps = [
|
||||
pyyaml
|
||||
];
|
||||
in buildPythonPackage rec {
|
||||
pname = "pyyaml-include";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-9/vrjnG1C+Dm4HRy98edv7GhW63pyToHg2n/SeV+Z3E=";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "A PyYAML extension to allow includes.";
|
||||
homepage = "https://github.com/tanbro/pyyaml-include";
|
||||
license = licenses.gpl3;
|
||||
maintainers = [];
|
||||
};
|
||||
|
||||
doCheck = false;
|
||||
|
||||
propagatedBuildInputs = pydeps;
|
||||
|
||||
buildInputs = [
|
||||
setuptools
|
||||
setuptools-scm
|
||||
setuptools-scm-git-archive
|
||||
wheel
|
||||
];
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
];
|
||||
}
|
||||
@@ -1,11 +1,12 @@
|
||||
# vim: set ft=bash:
|
||||
if [ ! -f "${HOME}/.ssh/id_rsa" ]; then
|
||||
file="${HOME}/.ssh/id_ed25519"
|
||||
if [ ! -f "${file}" ]; then
|
||||
echo "Generating a new key"
|
||||
ssh-keygen -t rsa -b 8192 -f "${HOME}/.ssh/id_rsa" -N ''
|
||||
cat "${HOME}/.ssh/id_rsa.pub" >> /etc/nixos/home/ssh/authorized_keys
|
||||
ssh-keygen -t ed25519 -f "${file}" -N ''
|
||||
cat "${file}.pub" >> /etc/nixos/home/ssh/authorized_keys
|
||||
|
||||
echo "Authing key to GitHub - may fail"
|
||||
gh auth refresh -h github.com -s admin:public_key
|
||||
gh ssh-key add -t ${HOSTNAME}-auto ~/.ssh/id_rsa.pub || true
|
||||
gh ssh-key add -t ${HOSTNAME}-auto "${file}" || true
|
||||
fi
|
||||
cp /etc/nixos/home/ssh/authorized_keys "${HOME}/.ssh/authorized_keys"
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
{ stdenv, jinja2-cli }:
|
||||
|
||||
name: vars: template:
|
||||
(stdenv.mkDerivation {
|
||||
inherit name;
|
||||
|
||||
passAsFile = [ "varsData" ];
|
||||
varsData = builtins.toJSON vars;
|
||||
|
||||
nativeBuildInputs = [ jinja2-cli ];
|
||||
phases = [ "buildPhase" "installPhase" ];
|
||||
|
||||
buildPhase = ''${jinja2-cli}/bin/jinja2 --format=json ${template} $varsDataPath > result'';
|
||||
installPhase = "cp result $out";
|
||||
})
|
||||
Reference in New Issue
Block a user