summaryrefslogtreecommitdiffstats
path: root/tv
diff options
context:
space:
mode:
Diffstat (limited to 'tv')
-rw-r--r--tv/1systems/alnus/config.nix11
-rw-r--r--tv/2configs/bash/default.nix2
-rw-r--r--tv/2configs/binary-cache/default.nix24
-rw-r--r--tv/2configs/gitrepos.nix2
-rw-r--r--tv/2configs/nginx/default.nix15
-rw-r--r--tv/3modules/im.nix2
-rw-r--r--tv/5pkgs/haskell/default.nix12
-rw-r--r--tv/5pkgs/override/jc.nix21
-rw-r--r--tv/5pkgs/simple/weechat-tv.nix9
9 files changed, 60 insertions, 38 deletions
diff --git a/tv/1systems/alnus/config.nix b/tv/1systems/alnus/config.nix
index bddd69efa..c36fbc4bf 100644
--- a/tv/1systems/alnus/config.nix
+++ b/tv/1systems/alnus/config.nix
@@ -69,13 +69,12 @@ with import <stockholm/lib>;
enable = true;
twoFingerScroll = true;
};
-
- desktopManager.xfce.enable = true;
-
- displayManager.lightdm.autoLogin.enable = true;
- displayManager.lightdm.autoLogin.user = "dv";
- displayManager.lightdm.enable = true;
};
+ services.xserver.desktopManager.plasma5.enable = true;
+ services.xserver.displayManager.autoLogin.enable = true;
+ services.xserver.displayManager.autoLogin.user = "dv";
+
+ system.stateVersion = "22.05";
users.users.dv = {
inherit (config.krebs.users.dv) home uid;
diff --git a/tv/2configs/bash/default.nix b/tv/2configs/bash/default.nix
index 42914e060..92e2499a9 100644
--- a/tv/2configs/bash/default.nix
+++ b/tv/2configs/bash/default.nix
@@ -6,7 +6,7 @@ with import <stockholm/lib>;
programs.bash = {
interactiveShellInit = /* sh */ ''
HISTCONTROL='erasedups:ignorespace'
- HISTSIZE=65536
+ HISTSIZE=900001
HISTFILESIZE=$HISTSIZE
HISTTIMEFORMAT=
diff --git a/tv/2configs/binary-cache/default.nix b/tv/2configs/binary-cache/default.nix
index f6eaba36f..58791f4f6 100644
--- a/tv/2configs/binary-cache/default.nix
+++ b/tv/2configs/binary-cache/default.nix
@@ -3,24 +3,15 @@
environment.etc."binary-cache.pubkey".text =
config.krebs.build.host.binary-cache.pubkey;
+ nixpkgs.overlays = [
+ (self: super: {
+ nix-serve = self.haskellPackages.nix-serve-ng;
+ })
+ ];
+
services.nix-serve = {
enable = true;
- secretKeyFile = config.krebs.secret.files.binary-cache-seckey.path;
- };
-
- systemd.services.nix-serve = {
- after = [
- config.krebs.secret.files.binary-cache-seckey.service
- ];
- partOf = [
- config.krebs.secret.files.binary-cache-seckey.service
- ];
- };
-
- krebs.secret.files.binary-cache-seckey = {
- path = "/run/secret/nix-serve.key";
- owner.name = "nix-serve";
- source-path = toString <secrets> + "/nix-serve.key";
+ secretKeyFile = toString <secrets> + "/nix-serve.key";
};
services.nginx = {
@@ -28,6 +19,7 @@
virtualHosts.nix-serve = {
serverAliases = [
"cache.${config.krebs.build.host.name}.hkw"
+ "cache.${config.krebs.build.host.name}.r"
];
locations."/".extraConfig = ''
proxy_pass http://localhost:${toString config.services.nix-serve.port};
diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix
index 4d22fdff5..50444c1ee 100644
--- a/tv/2configs/gitrepos.nix
+++ b/tv/2configs/gitrepos.nix
@@ -109,7 +109,6 @@ let {
};
q = {};
reaktor2 = {};
- regfish = {};
stockholm = {
cgit.desc = "NixOS configuration";
};
@@ -156,6 +155,7 @@ let {
painload = {};
push = {};
Reaktor = {};
+ regfish = {};
with-tmpdir = {};
get = {};
load-env = {};
diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix
index b0acb9435..efea3a844 100644
--- a/tv/2configs/nginx/default.nix
+++ b/tv/2configs/nginx/default.nix
@@ -4,22 +4,19 @@ with import <stockholm/lib>;
{
services.nginx = {
+ enableReload = true;
+
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedTlsSettings = true;
- virtualHosts._http = {
+ virtualHosts.${toJSON ""} = {
default = true;
extraConfig = ''
- return 404;
- '';
- };
-
- virtualHosts.default = {
- locations."= /etc/os-release".extraConfig = ''
- default_type text/plain;
- alias /etc/os-release;
+ error_page 400 =444 /;
+ return 444;
'';
+ rejectSSL = true;
};
};
tv.iptables = {
diff --git a/tv/3modules/im.nix b/tv/3modules/im.nix
index 8cb137510..e98a57327 100644
--- a/tv/3modules/im.nix
+++ b/tv/3modules/im.nix
@@ -71,7 +71,7 @@ in {
export PATH=${lib.makeSearchPath "bin" [
pkgs.tmux
pkgs.gnugrep
- pkgs.weechat
+ pkgs.weechat-tv
]}
if tmux list-sessions -F\#S | grep -q '^im''$'; then
exec tmux attach -t im
diff --git a/tv/5pkgs/haskell/default.nix b/tv/5pkgs/haskell/default.nix
index fcede2f9c..33fd2506a 100644
--- a/tv/5pkgs/haskell/default.nix
+++ b/tv/5pkgs/haskell/default.nix
@@ -10,11 +10,15 @@ in
haskell = super.haskell // {
packages = mapAttrs (name: value:
if hasAttr "override" value
- then value.override { inherit overrides; }
+ then value.override (old: {
+ overrides =
+ composeExtensions (old.overrides or (_: _: { })) overrides;
+ })
else value
) super.haskell.packages;
};
- haskellPackages = super.haskellPackages.override {
- inherit overrides;
- };
+ haskellPackages = super.haskellPackages.override (old: {
+ overrides =
+ composeExtensions (old.overrides or (_: _: { })) overrides;
+ });
}
diff --git a/tv/5pkgs/override/jc.nix b/tv/5pkgs/override/jc.nix
new file mode 100644
index 000000000..346dd3eee
--- /dev/null
+++ b/tv/5pkgs/override/jc.nix
@@ -0,0 +1,21 @@
+self: super:
+
+let
+ version = "1.21.0";
+in
+
+# Prevent downgrades.
+assert self.lib.versionAtLeast version super.jc.version;
+
+self.python3.pkgs.toPythonApplication
+ (self.python3.pkgs.jc.overrideAttrs
+ (oldAttrs: {
+ name = "jc-${version}";
+ version = version;
+ src = self.fetchFromGitHub {
+ owner = "kellyjonbrazil";
+ repo = "jc";
+ rev = "v${version}";
+ sha256 = "sha256-kS42WokR7ZIqIPi8LbX4tmtjn37tckea2ELbuqzTm2o";
+ };
+ }))
diff --git a/tv/5pkgs/simple/weechat-tv.nix b/tv/5pkgs/simple/weechat-tv.nix
new file mode 100644
index 000000000..17d286366
--- /dev/null
+++ b/tv/5pkgs/simple/weechat-tv.nix
@@ -0,0 +1,9 @@
+{ lib, pkgs }:
+
+pkgs.wrapWeechat pkgs.weechat-unwrapped {
+ configure = { availablePlugins, ... }: {
+ scripts = [
+ pkgs.weechatScripts.weechat-matrix
+ ];
+ };
+}