diff options
Diffstat (limited to 'makefu/5pkgs')
-rw-r--r-- | makefu/5pkgs/HermesLedControl/default.nix | 6 | ||||
-rw-r--r-- | makefu/5pkgs/default.nix | 1 | ||||
-rw-r--r-- | makefu/5pkgs/seeed-voicecard/default.nix | 46 | ||||
-rw-r--r-- | makefu/5pkgs/shiori/default.nix | 16 | ||||
-rw-r--r-- | makefu/5pkgs/shiori/deps.nix | 570 | ||||
-rw-r--r-- | makefu/5pkgs/stockholm-new-host/default.nix | 50 |
6 files changed, 102 insertions, 587 deletions
diff --git a/makefu/5pkgs/HermesLedControl/default.nix b/makefu/5pkgs/HermesLedControl/default.nix index 88aed898d..77164f568 100644 --- a/makefu/5pkgs/HermesLedControl/default.nix +++ b/makefu/5pkgs/HermesLedControl/default.nix @@ -1,12 +1,16 @@ { lib, pkgs, python3Packages, makeWrapper, ... }: # How to use: -# create configuration .config/HermesLedControl/configuration.yml: +# create configuration configuration.yml: # engine: "rhasspy" # pathToConfig: "/var/lib/rhasspy/de/profile.json" # hardware: "respeaker4MicArray" # pattern: "fake-name" # enableDoA: false +# and run HermesLedControl --hermesLedControlConfig path-to-config.yml + +# all available config options can be see in: +# result/result/lib/HermesLedControl/models/Configuration.py with python3Packages; buildPythonApplication rec { diff --git a/makefu/5pkgs/default.nix b/makefu/5pkgs/default.nix index 66a8d99d1..c057d1470 100644 --- a/makefu/5pkgs/default.nix +++ b/makefu/5pkgs/default.nix @@ -44,6 +44,7 @@ in { alsa-hdspconf = callPackage ./custom/alsa-tools { alsaToolTarget="hdspconf";}; alsa-hdspmixer = callPackage ./custom/alsa-tools { alsaToolTarget="hdspmixer";}; alsa-hdsploader = callPackage ./custom/alsa-tools { alsaToolTarget="hdsploader";}; + brother_ql_web = (builtins.getFlake "github:makefu/brother_ql_web?rev=a3f8625f48111da8cd6f8e562c966cdca445b82d").packages.x86_64-linux.default; qcma = super.pkgs.libsForQt5.callPackage ./custom/qcma { }; inherit (callPackage ./devpi {}) devpi-web ; jellyfin = unstable.jellyfin; diff --git a/makefu/5pkgs/seeed-voicecard/default.nix b/makefu/5pkgs/seeed-voicecard/default.nix new file mode 100644 index 000000000..85038ffc1 --- /dev/null +++ b/makefu/5pkgs/seeed-voicecard/default.nix @@ -0,0 +1,46 @@ +{ pkgs, lib, fetchFromGitHub, fetchpatch, kernel, ... }: + +pkgs.stdenv.mkDerivation rec { + name = "seeed-voicecard-${version}-module-${kernel.modDirVersion}"; + version = "v4.1-post"; + + src = fetchFromGitHub { + owner = "respeaker"; + repo = "seeed-voicecard"; + rev = "c52606626de050bdad85803d7e427a64cb0cf05c"; + hash = "sha256-sFReX9Nz9TDRvheKfPijRw1wQ++jJUk5+lOwVmfx3wA="; + }; + + #preConfigure = '' + # substituteInPlace Makefile --replace "snd-soc-wm8960-objs := wm8960.o" "" + # substituteInPlace Makefile --replace "obj-m += snd-soc-wm8960.o" "" + #''; + + KERNELDIR = "${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"; + + NIX_CFLAGS = ["-Wno-error=cpp"]; + + patches = [ + (fetchpatch { url = "https://patch-diff.githubusercontent.com/raw/respeaker/seeed-voicecard/pull/323.patch"; hash = "sha256-coa0ZXDAGYxxi4ShL1HpOebfwOSmIpfdbEIYZtBWlYI="; }) + ]; + + nativeBuildInputs = [ pkgs.perl ] ++ kernel.moduleBuildDependencies; + buildInputs = [ pkgs.alsa-lib ]; + + buildPhase = '' + make -C $KERNELDIR M=$(pwd) modules + make -C ac108_plugin libasound_module_pcm_ac108.so + sed -i "s/brcm,bcm2708/raspberrypi/" *.dts + ''; + installPhase = '' + mkdir -p $out/lib/modules/${kernel.modDirVersion}/sound/soc/codecs + mkdir -p $out/lib/modules/${kernel.modDirVersion}/sound/soc/bcm + cp snd-soc-wm8960.ko $out/lib/modules/${kernel.modDirVersion}/sound/soc/codecs + cp snd-soc-ac108.ko $out/lib/modules/${kernel.modDirVersion}/sound/soc/codecs + cp snd-soc-seeed-voicecard.ko $out/lib/modules/${kernel.modDirVersion}/sound/soc/bcm + mkdir $out/lib/dts $out/lib/alsa-lib + cp *.dts $out/lib/dts + cp ac108_plugin/libasound_module_pcm_ac108.so $out/lib/alsa-lib + + ''; +} diff --git a/makefu/5pkgs/shiori/default.nix b/makefu/5pkgs/shiori/default.nix deleted file mode 100644 index 7de1e5ae1..000000000 --- a/makefu/5pkgs/shiori/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ buildGoPackage, fetchFromGitHub }: -let - builder = buildGoPackage; -in -builder rec { - name = "shiori-${version}"; - version = "1.6.0-warc"; - goPackagePath = "github.com/go-shiori/shiori"; - src = fetchFromGitHub { - owner = "go-shiori"; - repo = "shiori"; - rev = "83f133dd07bf661d3c4cf03043392100da489559"; - sha256 = "02b17hjbh4w0ip0snd8hmdjmbc2w1pv9sws9cf9r8w09c225nw2i"; - }; - goDeps = ./deps.nix; -} diff --git a/makefu/5pkgs/shiori/deps.nix b/makefu/5pkgs/shiori/deps.nix deleted file mode 100644 index 67d237fa9..000000000 --- a/makefu/5pkgs/shiori/deps.nix +++ /dev/null @@ -1,570 +0,0 @@ -# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix) -[ - { - goPackagePath = "github.com/BurntSushi/toml"; - fetch = { - type = "git"; - url = "https://github.com/BurntSushi/toml"; - rev = "v0.3.1"; - sha256 = "1fjdwwfzyzllgiwydknf1pwjvy49qxfsczqx5gz3y0izs7as99j6"; - }; - } - { - goPackagePath = "github.com/PuerkitoBio/goquery"; - fetch = { - type = "git"; - url = "https://github.com/PuerkitoBio/goquery"; - rev = "v1.5.0"; - sha256 = "1fqf4rs66wy02nxz6w4mvs2qawf2j8srz17i294v64y8gvxisp56"; - }; - } - { - goPackagePath = "github.com/andybalholm/cascadia"; - fetch = { - type = "git"; - url = "https://github.com/andybalholm/cascadia"; - rev = "v1.0.0"; - sha256 = "09j8cavbhqqdxjqrkwbc40g8p0i49zf3184rpjm5p2rjbprcghcc"; - }; - } - { - goPackagePath = "github.com/armon/consul-api"; - fetch = { - type = "git"; - url = "https://github.com/armon/consul-api"; - rev = "eb2c6b5be1b6"; - sha256 = "1j6fdr1sg36qy4n4xjl7brq739fpm5npq98cmvklzjc9qrx98nk9"; - }; - } - { - goPackagePath = "github.com/coreos/etcd"; - fetch = { - type = "git"; - url = "https://github.com/coreos/etcd"; - rev = "v3.3.10"; - sha256 = "1x2ii1hj8jraba8rbxz6dmc03y3sjxdnzipdvg6fywnlq1f3l3wl"; - }; - } - { - goPackagePath = "github.com/coreos/go-etcd"; - fetch = { - type = "git"; - url = "https://github.com/coreos/go-etcd"; - rev = "v2.0.0"; - sha256 = "1xb34hzaa1lkbq5vkzy9vcz6gqwj7hp6cdbvyack2bf28dwn33jj"; - }; - } - { - goPackagePath = "github.com/coreos/go-semver"; - fetch = { - type = "git"; - url = "https://github.com/coreos/go-semver"; - rev = "v0.2.0"; - sha256 = "1gghi5bnqj50hfxhqc1cxmynqmh2yk9ii7ab9gsm75y5cp94ymk0"; - }; - } - { - goPackagePath = "github.com/cpuguy83/go-md2man"; - fetch = { - type = "git"; - url = "https://github.com/cpuguy83/go-md2man"; - rev = "v1.0.10"; - sha256 = "1bqkf2bvy1dns9zd24k81mh2p1zxsx2nhq5cj8dz2vgkv1xkh60i"; - }; - } - { - goPackagePath = "github.com/davecgh/go-spew"; - fetch = { - type = "git"; - url = "https://github.com/davecgh/go-spew"; - rev = "v1.1.1"; - sha256 = "0hka6hmyvp701adzag2g26cxdj47g21x6jz4sc6jjz1mn59d474y"; - }; - } - { - goPackagePath = "github.com/disintegration/imaging"; - fetch = { - type = "git"; - url = "https://github.com/disintegration/imaging"; - rev = "v1.6.0"; - sha256 = "1as2r4z6303s528fhcfm6ybm1an8xhly9vr0fqk40y05x3x4h92x"; - }; - } - { - goPackagePath = "github.com/fatih/color"; - fetch = { - type = "git"; - url = "https://github.com/fatih/color"; - rev = "v1.7.0"; - sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv"; - }; - } - { - goPackagePath = "github.com/fsnotify/fsnotify"; - fetch = { - type = "git"; - url = "https://github.com/fsnotify/fsnotify"; - rev = "v1.4.7"; - sha256 = "07va9crci0ijlivbb7q57d2rz9h27zgn2fsm60spjsqpdbvyrx4g"; - }; - } - { - goPackagePath = "github.com/go-shiori/dom"; - fetch = { - type = "git"; - url = "https://github.com/go-shiori/dom"; - rev = "6867c1fcf154"; - sha256 = "10lhp58qy798vs5mazkhpxq4s5g42j2hps61y7c1npabp17k7zfm"; - }; - } - { - goPackagePath = "github.com/go-shiori/go-readability"; - fetch = { - type = "git"; - url = "https://github.com/go-shiori/go-readability"; - rev = "5413e9c4ec86"; - sha256 = "1bhr5chria90v0iwr4rwgvid7cr6aj5r458cmv9f6idpylx5dxl3"; - }; - } - { - goPackagePath = "github.com/go-shiori/warc"; - fetch = { - type = "git"; - url = "https://github.com/go-shiori/warc"; - rev = "7b3c5582fd83"; - sha256 = "0cgwfbiv83mswl1sxqrycn9fsrc3z8ms2q5rm6mvr7rsp3v1m6g4"; - }; - } - { - goPackagePath = "github.com/go-sql-driver/mysql"; - fetch = { - type = "git"; - url = "https://github.com/go-sql-driver/mysql"; - rev = "v1.4.1"; - sha256 = "1fvsvwc1v2i0gqn01mynvi1shp5xm0xaym6xng09fcbqb56lbjx1"; - }; - } - { - goPackagePath = "github.com/gofrs/uuid"; - fetch = { - type = "git"; - url = "https://github.com/gofrs/uuid"; - rev = "v3.2.0"; - sha256 = "1q63mp7bznhfgyw133c0wc0hpcj1cq9bcf7w1f8r6inkcrils1fz"; - }; - } - { - goPackagePath = "github.com/golang/protobuf"; - fetch = { - type = "git"; - url = "https://github.com/golang/protobuf"; - rev = "v1.3.1"; - sha256 = "15am4s4646qy6iv0g3kkqq52rzykqjhm4bf08dk0fy2r58knpsyl"; - }; - } - { - goPackagePath = "github.com/hashicorp/hcl"; - fetch = { - type = "git"; - url = "https://github.com/hashicorp/hcl"; - rev = "v1.0.0"; - sha256 = "0q6ml0qqs0yil76mpn4mdx4lp94id8vbv575qm60jzl1ijcl5i66"; - }; - } - { - goPackagePath = "github.com/inconshreveable/mousetrap"; - fetch = { - type = "git"; - url = "https://github.com/inconshreveable/mousetrap"; - rev = "v1.0.0"; - sha256 = "1mn0kg48xkd74brf48qf5hzp0bc6g8cf5a77w895rl3qnlpfw152"; - }; - } - { - goPackagePath = "github.com/jmoiron/sqlx"; - fetch = { - type = "git"; - url = "https://github.com/jmoiron/sqlx"; - rev = "v1.2.0"; - sha256 = "0pmi2asx157f5738g19fzyxb9g8yyfbpjyh2a2ykr9mafvp60rfd"; - }; - } - { - goPackagePath = "github.com/julienschmidt/httprouter"; - fetch = { - type = "git"; - url = "https://github.com/julienschmidt/httprouter"; - rev = "v1.2.0"; - sha256 = "1k8bylc9s4vpvf5xhqh9h246dl1snxrzzz0614zz88cdh8yzs666"; - }; - } - { - goPackagePath = "github.com/konsorten/go-windows-terminal-sequences"; - fetch = { - type = "git"; - url = "https://github.com/konsorten/go-windows-terminal-sequences"; - rev = "v1.0.2"; - sha256 = "09mn209ika7ciy87xf2x31dq5fnqw39jidgaljvmqxwk7ff1hnx7"; - }; - } - { - goPackagePath = "github.com/lib/pq"; - fetch = { - type = "git"; - url = "https://github.com/lib/pq"; - rev = "v1.1.1"; - sha256 = "0g64wlg1l1ybq4x44idksl4pgm055s58jxc6r6x4qhqm5q76h0km"; - }; - } - { - goPackagePath = "github.com/magiconair/properties"; - fetch = { - type = "git"; - url = "https://github.com/magiconair/properties"; - rev = "v1.8.0"; - sha256 = "1a10362wv8a8qwb818wygn2z48lgzch940hvpv81hv8gc747ajxn"; - }; - } - { - goPackagePath = "github.com/mattn/go-colorable"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-colorable"; - rev = "v0.1.1"; - sha256 = "0l640974j804c1yyjfgyxqlsivz0yrzmbql4mhcw2azryigkp08p"; - }; - } - { - goPackagePath = "github.com/mattn/go-isatty"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-isatty"; - rev = "v0.0.7"; - sha256 = "1i77aq4gf9as03m8fpfh8fq49n4z9j7548blrcsidm1xhslzk5xd"; - }; - } - { - goPackagePath = "github.com/mattn/go-sqlite3"; - fetch = { - type = "git"; - url = "https://github.com/mattn/go-sqlite3"; - rev = "v1.10.0"; - sha256 = "1zmz6asplixfihxhj11spgfs0v3xzb3nv0hlq6n6zsg781ni31xx"; - }; - } - { - goPackagePath = "github.com/mitchellh/go-homedir"; - fetch = { - type = "git"; - url = "https://github.com/mitchellh/go-homedir"; - rev = "v1.1.0"; - sha256 = "0ydzkipf28hwj2bfxqmwlww47khyk6d152xax4bnyh60f4lq3nx1"; - }; - } - { - goPackagePath = "github.com/mitchellh/mapstructure"; - fetch = { - type = "git"; - url = "https://github.com/mitchellh/mapstructure"; - rev = "v1.1.2"; - sha256 = "03bpv28jz9zhn4947saqwi328ydj7f6g6pf1m2d4m5zdh5jlfkrr"; - }; - } - { - goPackagePath = "github.com/muesli/go-app-paths"; - fetch = { - type = "git"; - url = "https://github.com/muesli/go-app-paths"; - rev = "913f7f7ac60f"; - sha256 = "0fwg2l5ypw7bm9fmgc4asb7hj5bhqq0lgw68nadm6xljh2vw594m"; - }; - } - { - goPackagePath = "github.com/patrickmn/go-cache"; - fetch = { - type = "git"; - url = "https://github.com/patrickmn/go-cache"; - rev = "v2.1.0"; - sha256 = "10020inkzrm931r4bixf8wqr9n39wcrb78vfyxmbvjavvw4zybgs"; - }; - } - { - goPackagePath = "github.com/pelletier/go-toml"; - fetch = { - type = "git"; - url = "https://github.com/pelletier/go-toml"; - rev = "v1.2.0"; - sha256 = "1fjzpcjng60mc3a4b2ql5a00d5gah84wj740dabv9kq67mpg8fxy"; - }; - } - { - goPackagePath = "github.com/pmezard/go-difflib"; - fetch = { - type = "git"; - url = "https://github.com/pmezard/go-difflib"; - rev = "v1.0.0"; - sha256 = "0c1cn55m4rypmscgf0rrb88pn58j3ysvc2d0432dp3c6fqg6cnzw"; - }; - } - { - goPackagePath = "github.com/russross/blackfriday"; - fetch = { - type = "git"; - url = "https://github.com/russross/blackfriday"; - rev = "v1.5.2"; - sha256 = "0jzbfzcywqcrnym4gxlz6nphmm1grg6wsl4f0r9x384rn83wkj7c"; - }; - } - { - goPackagePath = "github.com/sergi/go-diff"; - fetch = { - type = "git"; - url = "https://github.com/sergi/go-diff"; - rev = "v1.0.0"; - sha256 = "0swiazj8wphs2zmk1qgq75xza6m19snif94h2m6fi8dqkwqdl7c7"; - }; - } - { - goPackagePath = "github.com/shurcooL/httpfs"; - fetch = { - type = "git"; - url = "https://github.com/shurcooL/httpfs"; - rev = "74dc9339e414"; - sha256 = "19iyk75yfl83mlnvrr92s59n9j6968mpdrdg5cj78a81nfd08rv5"; - }; - } - { - goPackagePath = "github.com/shurcooL/vfsgen"; - fetch = { - type = "git"; - url = "https://github.com/shurcooL/vfsgen"; - rev = "6a9ea43bcacd"; - sha256 = "13i8wz234qr0fggsx71yhc76q0ka5lbslvira1xb71fpx2g97a50"; - }; - } - { - goPackagePath = "github.com/sirupsen/logrus"; - fetch = { - type = "git"; - url = "https://github.com/sirupsen/logrus"; - rev = "v1.4.2"; - sha256 = "087k2lxrr9p9dh68yw71d05h5g9p5v26zbwd6j7lghinjfaw334x"; - }; - } - { - goPackagePath = "github.com/spf13/afero"; - fetch = { - type = "git"; - url = "https://github.com/spf13/afero"; - rev = "v1.1.2"; - sha256 = "0miv4faf5ihjfifb1zv6aia6f6ik7h1s4954kcb8n6ixzhx9ck6k"; - }; - } - { - goPackagePath = "github.com/spf13/cast"; - fetch = { - type = "git"; - url = "https://github.com/spf13/cast"; - rev = "v1.3.0"; - sha256 = "0xq1ffqj8y8h7dcnm0m9lfrh0ga7pssnn2c1dnr09chqbpn4bdc5"; - }; - } - { - goPackagePath = "github.com/spf13/cobra"; - fetch = { - type = "git"; - url = "https://github.com/spf13/cobra"; - rev = "v0.0.5"; - sha256 = "0z4x8js65mhwg1gf6sa865pdxfgn45c3av9xlcc1l3xjvcnx32v2"; - }; - } - { - goPackagePath = "github.com/spf13/jwalterweatherman"; - fetch = { - type = "git"; - url = "https://github.com/spf13/jwalterweatherman"; - rev = "v1.0.0"; - sha256 = "093fmmvavv84pv4q84hav7ph3fmrq87bvspjj899q0qsx37yvdr8"; - }; - } - { - goPackagePath = "github.com/spf13/pflag"; - fetch = { - type = "git"; - url = "https://github.com/spf13/pflag"; - rev = "v1.0.3"; - sha256 = "1cj3cjm7d3zk0mf1xdybh0jywkbbw7a6yr3y22x9sis31scprswd"; - }; - } - { - goPackagePath = "github.com/spf13/viper"; - fetch = { - type = "git"; - url = "https://github.com/spf13/viper"; - rev = "v1.3.2"; - sha256 = "1829hvf805kda65l59r17wvid7y0vr390s23zfhf4w7vdb4wp3zh"; - }; - } - { - goPackagePath = "github.com/stretchr/objx"; - fetch = { - type = "git"; - url = "https://github.com/stretchr/objx"; - rev = "v0.1.1"; - sha256 = "0iph0qmpyqg4kwv8jsx6a56a7hhqq8swrazv40ycxk9rzr0s8yls"; - }; - } - { - goPackagePath = "github.com/stretchr/testify"; - fetch = { - type = "git"; - url = "https://github.com/stretchr/testify"; - rev = "v1.4.0"; - sha256 = "187i5g88sxfy4vxpm7dw1gwv29pa2qaq475lxrdh5livh69wqfjb"; - }; - } - { - goPackagePath = "github.com/tdewolff/parse"; - fetch = { - type = "git"; - url = "https://github.com/tdewolff/parse"; - rev = "v2.3.4"; - sha256 = "00hclphbjgc5vjrqgnclp72v8c45k35vmj84d2a0f7bw8cc88zcd"; - }; - } - { - goPackagePath = "github.com/tdewolff/test"; - fetch = { - type = "git"; - url = "https://github.com/tdewolff/test"; - rev = "v1.0.5"; - sha256 = "1f53nzfbs5gmn5bvqj3rzi15r9mxn8vq3f850rq3amwlfz927v9a"; - }; - } - { - goPackagePath = "github.com/ugorji/go"; - fetch = { - type = "git"; - url = "https://github.com/ugorji/go"; - rev = "d75b2dcb6bc8"; - sha256 = "0di1k35gpq9bp958ywranpbskx2vdwlb38s22vl9rybm3wa5g3ps"; - }; - } - { - goPackagePath = "github.com/xordataexchange/crypt"; - fetch = { - type = "git"; - url = "https://github.com/xordataexchange/crypt"; - rev = "b2862e3d0a77"; - sha256 = "04q3856anpzl4gdfgmg7pbp9cx231nkz3ymq2xp27rnmmwhfxr8y"; - }; - } - { - goPackagePath = "go.etcd.io/bbolt"; - fetch = { - type = "git"; - url = "https://github.com/etcd-io/bbolt"; - rev = "v1.3.3"; - sha256 = "0dn0zngks9xiz0rrrb3911f73ghl64z84jsmzai2yfmzqr7cdkqc"; - }; - } - { - goPackagePath = "golang.org/x/crypto"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/crypto"; - rev = "f99c8df09eb5"; - sha256 = "0jwi6c6366999mnpzwx3a2kr7hzvdx97qfwiphx0r7cy0mpf28hf"; - }; - } - { - goPackagePath = "golang.org/x/image"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/image"; - rev = "cff245a6509b"; - sha256 = "0hiznlkiaay30acwvvyq8g6bm32r7bc6gv47pygrcxqpapasbz84"; - }; - } - { - goPackagePath = "golang.org/x/net"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/net"; - rev = "d98b1b443823"; - sha256 = "1vzwpy56g056dsq304xga3d55jg2cxx89bijpfwjlhwyqyskybsz"; - }; - } - { - goPackagePath = "golang.org/x/sync"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sync"; - rev = "112230192c58"; - sha256 = "05i2k43j2d0llq768hg5pf3hb2yhfzp9la1w5wp0rsnnzblr0lfn"; - }; - } - { - goPackagePath = "golang.org/x/sys"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/sys"; - rev = "c178f38b412c"; - sha256 = "1r6v8xnvb4z5vdckbj6vd08kn6h4ivr9hvdpgq4drj6l1mp79rf7"; - }; - } - { - goPackagePath = "golang.org/x/text"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/text"; - rev = "v0.3.2"; - sha256 = "0flv9idw0jm5nm8lx25xqanbkqgfiym6619w575p7nrdh0riqwqh"; - }; - } - { - goPackagePath = "golang.org/x/tools"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/tools"; - rev = "72853e10c5a3"; - sha256 = "06v42k857lcivcar3fq8yjc782hny0m5yf20sb7ij5jva0gab026"; - }; - } - { - goPackagePath = "golang.org/x/xerrors"; - fetch = { - type = "git"; - url = "https://go.googlesource.com/xerrors"; - rev = "a985d3407aa7"; - sha256 = "00wzr5w8aadipgc3rkk8f11i41znskfj9ix5nhhaxyg7isrslgcj"; - }; - } - { - goPackagePath = "google.golang.org/appengine"; - fetch = { - type = "git"; - url = "https://github.com/golang/appengine"; - rev = "v1.6.4"; - sha256 = "07r8zj9wk5w33bpmi808xgindqnfpvi4hf7glgcpimlg6n66lsrp"; - }; - } - { - goPackagePath = "gopkg.in/check.v1"; - fetch = { - type = "git"; - url = "https://gopkg.in/check.v1"; - rev = "20d25e280405"; - sha256 = "0k1m83ji9l1a7ng8a7v40psbymxasmssbrrhpdv2wl4rhs0nc3np"; - }; - } - { - goPackagePath = "gopkg.in/yaml.v2"; - fetch = { - type = "git"; - url = "https://gopkg.in/yaml.v2"; - rev = "v2.2.2"; - sha256 = "01wj12jzsdqlnidpyjssmj0r4yavlqy7dwrg7adqd8dicjc4ncsa"; - }; - } -] diff --git a/makefu/5pkgs/stockholm-new-host/default.nix b/makefu/5pkgs/stockholm-new-host/default.nix new file mode 100644 index 000000000..39e08808b --- /dev/null +++ b/makefu/5pkgs/stockholm-new-host/default.nix @@ -0,0 +1,50 @@ +{ pkgs }: +pkgs.writers.writeDashBin "sthockholm-new-host" '' + set -eu + PATH=${lib.makePathBin with pkgs;[ mkpasswd pwqgen sshd coreutils openssh tinc_pre pass ]}:$PATH + HOSTNAME=$1 + STOCKHOLM=~/stockholm + KARTEI=$STOCKHOLM/kartei/makefu + export PASSWORD_STORE_DIR=$HOME/.secrets-pass + TMPDIR=$(mktemp -d) + + PASSWORD=$(pwqgen) + HASHED_PASSWORD=$(echo $PASSWORD | mkpasswd -m sha-512 -s) + + cd "$TMPDIR" + cat <<EOF > hashedPasswords.nix + { + root = "$HASHED_PASSWORD"; + } + EOF + + tinc --config "$PWD" generate-keys 4096 + mv ed25519_key.priv retiolum.ed25519_key.priv + mv rsa_key.priv retiolum.rsa_key.priv + mv ed25519_key.pub retiolum.ed25519_key.pub + mv rsa_key.pub retiolum.rsa_key.pub + + ssh-keygen -t ed25519 -f ssh_host_ed25519_key -P "" + ssh-keygen -t rsa -f ssh_host_rsa_key -P "" + + wg genkey > wireguard.key + wg pubkey < wireguard.key > wireguard.pub + + for i in *;do + cat "$i" | pass insert -m "$HOSTNAME/$i" + done + + cp retiolum.ed25519_key.pub "$KARTEI/retiolum/$HOSTNAME_ed25519.pub" + cp retiolum.rsa_key.pub "$KARTEI/retiolum/$HOSTNAME.pub" + cp ssh_host_ed25519_key.pub "$KARTEI/sshd/$HOSTNAME.pub" + echo "$PASSWORD" | pass insert -m "$HOSTNAME/root" + + + cat <<EOF + # add to $KARTEI/default.nix + # then git add $KARTEI && git commit -m "ma $HOSTNAME.r: add to kartei" + $HOSTNAME = { + nets.retiolum.ipv4.addr = "10.243.12.XXX"; + }; + EOF +'' |