summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--krebs/5pkgs/override/default.nix15
-rw-r--r--krebs/5pkgs/simple/gitignore.nix46
-rw-r--r--makefu/2configs/ham/automation/moodlight.nix13
-rw-r--r--makefu/2configs/ham/deps/dwdwfsapi.nix38
-rw-r--r--makefu/2configs/ham/deps/pykodi.nix37
-rw-r--r--makefu/krops.nix2
-rw-r--r--tv/1systems/au/config.nix3
-rw-r--r--tv/1systems/wu/config.nix14
-rw-r--r--tv/2configs/hw/AO753.nix3
-rw-r--r--tv/2configs/hw/w110er.nix3
-rw-r--r--tv/2configs/hw/x220.nix7
-rw-r--r--tv/2configs/nginx/public_html.nix6
-rw-r--r--tv/3modules/default.nix1
-rw-r--r--tv/3modules/hw.nix16
14 files changed, 181 insertions, 23 deletions
diff --git a/krebs/5pkgs/override/default.nix b/krebs/5pkgs/override/default.nix
index 926e9dccd..e5867926e 100644
--- a/krebs/5pkgs/override/default.nix
+++ b/krebs/5pkgs/override/default.nix
@@ -10,6 +10,21 @@ self: super: {
};
});
+ exim = super.exim.overrideAttrs (old: rec {
+ version = warnOldVersion old.version "4.95+fixes";
+ src = self.fetchgit {
+ url = "git://git.exim.org/exim.git";
+ rev = "cdb37db5c0ff060de7edfc94e830cab6b7f7c084";
+ sha256 = "1xaxs1p8yy5f04an5g9mxhj5cvbnzj0xfb50aa1xxkhkqkspzlsg";
+ postFetch = /* sh */ ''
+ ${self.gnutar}/bin/tar xf ${old.src}
+ ${self.rsync}/bin/rsync -vac "$out"/src/ exim-4.94/src
+ rm -R "$out"
+ mv exim-4.94 "$out"
+ '';
+ };
+ });
+
flameshot = super.flameshot.overrideAttrs (old: rec {
patches = old.patches or [] ++ [
(self.writeText "flameshot-imgur.patch" /* diff */ ''
diff --git a/krebs/5pkgs/simple/gitignore.nix b/krebs/5pkgs/simple/gitignore.nix
new file mode 100644
index 000000000..b3c750a08
--- /dev/null
+++ b/krebs/5pkgs/simple/gitignore.nix
@@ -0,0 +1,46 @@
+{ pkgs }:
+
+/* gitignore - Filter for intentionally untracked lines or blocks of code
+
+This is a filter that allows specifying intentionally untracked lines and
+blocks of code that Git should ignore.
+
+Example:
+
+ int main(void) {
+ printf("I would never say derp.\n");
+ //#gitignore-begin
+ printf("DERP!\n");
+ //#gitignore-end
+ printf("DERP!\n"); //#gitignore
+ return 0;
+ }
+
+Installation:
+
+ Define a filter, e.g. in ~/.config/git/config[1]:
+
+ [filter "gitignore"]
+ clean = gitignore
+ smudge = cat
+
+ Assing that filter to some paths, e.g. in ~/.config/git/attributes[2]:
+
+ *.hs filter=gitignore
+ *.c filter=gitignore
+ ...
+
+ [1]: For more information about defining filters see git-config(1).
+ [2]: For more information about assigning filters see gitattributes(5).
+*/
+
+pkgs.execBin "gitignore" {
+ filename = "${pkgs.gnused}/bin/sed";
+ argv = [
+ "gitignore"
+ /* sed */ ''
+ /#gitignore-begin/,/#gitignore-end/d
+ /#gitignore/d
+ ''
+ ];
+}
diff --git a/makefu/2configs/ham/automation/moodlight.nix b/makefu/2configs/ham/automation/moodlight.nix
index df229f16b..d0e336851 100644
--- a/makefu/2configs/ham/automation/moodlight.nix
+++ b/makefu/2configs/ham/automation/moodlight.nix
@@ -5,14 +5,19 @@ let
arbeitszimmer = "light.box_led_status";
final_off = "01:00";
- turn_on = entity_id: at:
+ turn_on = entity_id: at: extra:
{ alias = "Turn on ${entity_id} at ${at}";
trigger = [
{ platform = "time"; inherit at; }
];
action =
[
- { service = "light.turn_on"; inherit entity_id; }
+ ({ service = "light.turn_on";
+ data = {
+ inherit entity_id;
+
+ } // extra;
+ })
];
};
in
@@ -21,8 +26,8 @@ in
{
automation =
[
- (turn_on wohnzimmer "17:30")
- (turn_on arbeitszimmer "9:00")
+ # (turn_on wohnzimmer "17:30")
+ (turn_on arbeitszimmer "9:00" { effect = "Slow Random Twinkle";})
{ alias = "Always turn off the lights at ${final_off}";
trigger = [
diff --git a/makefu/2configs/ham/deps/dwdwfsapi.nix b/makefu/2configs/ham/deps/dwdwfsapi.nix
new file mode 100644
index 000000000..d59dfa9e8
--- /dev/null
+++ b/makefu/2configs/ham/deps/dwdwfsapi.nix
@@ -0,0 +1,38 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, requests
+, ciso8601
+, urllib3
+}:
+
+buildPythonPackage rec {
+ pname = "dwdwfsapi";
+ version = "1.0.3";
+
+ disabled = false; # requires python version >=3.6
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "3d7d5bd66b1a647f07295068dc653b4ceafc2e8ec834b8e32419031c7b3a9b39";
+ };
+
+ # # Package conditions to handle
+ # # might have to sed setup.py and egg.info in patchPhase
+ # # sed -i "s/<package>.../<package>/"
+ # requests>=2.23.0,<3
+ # ciso8601>=2.1.3,<3
+ # urllib3>=1.25.8,<2
+ propagatedBuildInputs = [
+ requests
+ ciso8601
+ urllib3
+ ];
+
+ meta = with lib; {
+ description = "Python client to retrieve data provided by DWD via their geoserver WFS API";
+ homepage = https://github.com/stephan192/dwdwfsapi;
+ license = licenses.mit;
+ # maintainers = [ maintainers. ];
+ };
+}
diff --git a/makefu/2configs/ham/deps/pykodi.nix b/makefu/2configs/ham/deps/pykodi.nix
new file mode 100644
index 000000000..85a541f8a
--- /dev/null
+++ b/makefu/2configs/ham/deps/pykodi.nix
@@ -0,0 +1,37 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, jsonrpc-async
+, jsonrpc-websocket
+, aiohttp
+}:
+
+buildPythonPackage rec {
+ pname = "pykodi";
+ version = "0.2.2";
+
+ disabled = false; # requires python version >=3.7.0
+
+ src = fetchPypi {
+ inherit pname version;
+ sha256 = "43e7036a00a76f65c34dc5e7f1065a3ef071eea7619c2e6228e521b638e640bc";
+ };
+
+ # # Package conditions to handle
+ # # might have to sed setup.py and egg.info in patchPhase
+ # # sed -i "s/<package>.../<package>/"
+ # jsonrpc-async>=1.1.0
+ # jsonrpc-websocket>=1.2.1
+ propagatedBuildInputs = [
+ jsonrpc-async
+ jsonrpc-websocket
+ aiohttp
+ ];
+
+ meta = with lib; {
+ description = "An async python interface for Kodi over JSON-RPC";
+ homepage = https://github.com/OnFreund/PyKodi;
+ license = licenses.mit;
+ # maintainers = [ maintainers. ];
+ };
+}
diff --git a/makefu/krops.nix b/makefu/krops.nix
index 2fa050e95..a03fea029 100644
--- a/makefu/krops.nix
+++ b/makefu/krops.nix
@@ -71,7 +71,7 @@
(lib.mkIf ( host-src.hw ) {
nixos-hardware.git = {
url = https://github.com/nixos/nixos-hardware.git;
- ref = "30fdd53";
+ ref = "a0d8383";
};
})
(lib.mkIf ( host-src.home-manager ) {
diff --git a/tv/1systems/au/config.nix b/tv/1systems/au/config.nix
index 3891b7570..d9ba53912 100644
--- a/tv/1systems/au/config.nix
+++ b/tv/1systems/au/config.nix
@@ -16,4 +16,7 @@
networking.interfaces.wwp0s29u1u4i6.useDHCP = true;
system.stateVersion = "20.03";
+
+ tv.hw.screens.primary.width = 1920;
+ tv.hw.screens.primary.height = 1080;
}
diff --git a/tv/1systems/wu/config.nix b/tv/1systems/wu/config.nix
index f9c3860ed..f0ef6f9b0 100644
--- a/tv/1systems/wu/config.nix
+++ b/tv/1systems/wu/config.nix
@@ -7,10 +7,6 @@ with import <stockholm/lib>;
<stockholm/tv>
<stockholm/tv/2configs/hw/w110er.nix>
<stockholm/tv/2configs/exim-retiolum.nix>
- <stockholm/tv/2configs/gitrepos.nix>
- <stockholm/tv/2configs/mail-client.nix>
- <stockholm/tv/2configs/man.nix>
- <stockholm/tv/2configs/nginx/public_html.nix>
<stockholm/tv/2configs/pulse.nix>
<stockholm/tv/2configs/retiolum.nix>
<stockholm/tv/2configs/xserver>
@@ -38,14 +34,4 @@ with import <stockholm/lib>;
networking.wireless.enable = true;
- services.printing.enable = true;
-
- services.udev.extraRules = ''
- SUBSYSTEM=="net", ATTR{address}=="00:90:f5:da:aa:c3", NAME="en0"
- SUBSYSTEM=="net", ATTR{address}=="a0:88:b4:1b:ae:6c", NAME="wl0"
-
- # for jack
- KERNEL=="rtc0", GROUP="audio"
- KERNEL=="hpet", GROUP="audio"
- '';
}
diff --git a/tv/2configs/hw/AO753.nix b/tv/2configs/hw/AO753.nix
index a91a5e518..469f5c6f8 100644
--- a/tv/2configs/hw/AO753.nix
+++ b/tv/2configs/hw/AO753.nix
@@ -44,4 +44,7 @@ with import <stockholm/lib>;
'';
krebs.nixpkgs.allowUnfreePredicate = pkg: packageName pkg == "broadcom-sta";
+
+ tv.hw.screens.primary.width = 1366;
+ tv.hw.screens.primary.height = 768;
}
diff --git a/tv/2configs/hw/w110er.nix b/tv/2configs/hw/w110er.nix
index 7d837eabc..693cef5ac 100644
--- a/tv/2configs/hw/w110er.nix
+++ b/tv/2configs/hw/w110er.nix
@@ -59,4 +59,7 @@ with import <stockholm/lib>;
services.xserver = {
videoDriver = "intel";
};
+
+ tv.hw.screens.primary.width = 1366;
+ tv.hw.screens.primary.height = 768;
}
diff --git a/tv/2configs/hw/x220.nix b/tv/2configs/hw/x220.nix
index aadfc6691..ecbb84a44 100644
--- a/tv/2configs/hw/x220.nix
+++ b/tv/2configs/hw/x220.nix
@@ -1,4 +1,6 @@
-{ config, pkgs, ... }:
+{ config, pkgs, ... }: let
+ lib = import <stockholm/lib>;
+in
{
imports = [
../smartd.nix
@@ -74,4 +76,7 @@
services.xserver = {
videoDriver = "intel";
};
+
+ tv.hw.screens.primary.width = lib.mkDefault 1366;
+ tv.hw.screens.primary.height = lib.mkDefault 768;
}
diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix
index a37498ba3..43d7189ef 100644
--- a/tv/2configs/nginx/public_html.nix
+++ b/tv/2configs/nginx/public_html.nix
@@ -12,9 +12,9 @@ with import <stockholm/lib>;
"${config.krebs.build.host.name}.hkw"
"${config.krebs.build.host.name}.r"
];
- locations."~ ^/~(.+?)(/.*)?\$".extraConfig = ''
- alias /home/$1/public_html$2;
- '';
+ locations."~ ^/~([a-z]+)(?:/(.*))?\$" = {
+ alias = "/srv/$1/public_html/$2";
+ };
};
};
tv.iptables.input-internet-accept-tcp = singleton "http";
diff --git a/tv/3modules/default.nix b/tv/3modules/default.nix
index 5be1beef8..9f2f8e606 100644
--- a/tv/3modules/default.nix
+++ b/tv/3modules/default.nix
@@ -5,6 +5,7 @@
./ejabberd
./focus.nix
./hosts.nix
+ ./hw.nix
./im.nix
./iptables.nix
./slock.nix
diff --git a/tv/3modules/hw.nix b/tv/3modules/hw.nix
new file mode 100644
index 000000000..6eb722d2f
--- /dev/null
+++ b/tv/3modules/hw.nix
@@ -0,0 +1,16 @@
+let
+ lib = import <stockholm/lib>;
+ local.types.screen = lib.types.submodule {
+ options.width = lib.mkOption {
+ type = lib.types.uint;
+ };
+ options.height = lib.mkOption {
+ type = lib.types.uint;
+ };
+ };
+in {
+ options.tv.hw.screens = lib.mkOption {
+ type = lib.types.attrsOf local.types.screen;
+ default = {};
+ };
+}