summaryrefslogtreecommitdiffstats
path: root/lass
diff options
context:
space:
mode:
Diffstat (limited to 'lass')
-rw-r--r--lass/2configs/desktop-base.nix1
-rw-r--r--lass/2configs/os-templates/CAC-CentOS-6.5-64bit.nix47
-rw-r--r--lass/3modules/newsbot-js.nix87
-rw-r--r--lass/5pkgs/newsbot-js/default.nix4
4 files changed, 137 insertions, 2 deletions
diff --git a/lass/2configs/desktop-base.nix b/lass/2configs/desktop-base.nix
index 4e693997d..27aadb590 100644
--- a/lass/2configs/desktop-base.nix
+++ b/lass/2configs/desktop-base.nix
@@ -30,6 +30,7 @@ in {
powertop
sxiv
much
+ push
#window manager stuff
haskellPackages.xmobar
diff --git a/lass/2configs/os-templates/CAC-CentOS-6.5-64bit.nix b/lass/2configs/os-templates/CAC-CentOS-6.5-64bit.nix
new file mode 100644
index 000000000..b5ec722a0
--- /dev/null
+++ b/lass/2configs/os-templates/CAC-CentOS-6.5-64bit.nix
@@ -0,0 +1,47 @@
+_:
+
+{
+ boot.loader.grub = {
+ device = "/dev/sda";
+ splashImage = null;
+ };
+
+ boot.initrd.availableKernelModules = [
+ "ata_piix"
+ "vmw_pvscsi"
+ ];
+
+ fileSystems."/" = {
+ device = "/dev/VolGroup/lv_root";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" = {
+ device = "/dev/sda1";
+ fsType = "ext4";
+ };
+
+ swapDevices = [
+ { device = "/dev/VolGroup/lv_swap"; }
+ ];
+
+ users.extraGroups = {
+ # ● systemd-tmpfiles-setup.service - Create Volatile Files and Directories
+ # Loaded: loaded (/nix/store/2l33gg7nmncqkpysq9f5fxyhlw6ncm2j-systemd-217/example/systemd/system/systemd-tmpfiles-setup.service)
+ # Active: failed (Result: exit-code) since Mon 2015-03-16 10:29:18 UTC; 4s ago
+ # Docs: man:tmpfiles.d(5)
+ # man:systemd-tmpfiles(8)
+ # Process: 19272 ExecStart=/nix/store/2l33gg7nmncqkpysq9f5fxyhlw6ncm2j-systemd-217/bin/systemd-tmpfiles --create --remove --boot --exclude-prefix=/dev (code=exited, status=1/FAILURE)
+ # Main PID: 19272 (code=exited, status=1/FAILURE)
+ #
+ # Mar 16 10:29:17 cd systemd-tmpfiles[19272]: [/usr/lib/tmpfiles.d/legacy.conf:26] Unknown group 'lock'.
+ # Mar 16 10:29:18 cd systemd-tmpfiles[19272]: Two or more conflicting lines for /var/log/journal configured, ignoring.
+ # Mar 16 10:29:18 cd systemd-tmpfiles[19272]: Two or more conflicting lines for /var/log/journal/7b35116927d74ea58785e00b47ac0f0d configured, ignoring.
+ # Mar 16 10:29:18 cd systemd[1]: systemd-tmpfiles-setup.service: main process exited, code=exited, status=1/FAILURE
+ # Mar 16 10:29:18 cd systemd[1]: Failed to start Create Volatile Files and Directories.
+ # Mar 16 10:29:18 cd systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
+ # Mar 16 10:29:18 cd systemd[1]: systemd-tmpfiles-setup.service failed.
+ # warning: error(s) occured while switching to the new configuration
+ lock.gid = 10001;
+ };
+}
diff --git a/lass/3modules/newsbot-js.nix b/lass/3modules/newsbot-js.nix
new file mode 100644
index 000000000..6d87d256d
--- /dev/null
+++ b/lass/3modules/newsbot-js.nix
@@ -0,0 +1,87 @@
+{ config, lib, pkgs, ... }:
+
+with builtins;
+with lib;
+
+let
+ cfg = config.lass.newsbot-js;
+
+ out = {
+ options.lass.newsbot-js = api;
+ config = mkIf cfg.enable imp;
+ };
+
+ api = {
+ enable = mkEnableOption "Enable krebs newsbot";
+ ircServer = mkOption {
+ type = types.str;
+ default = "echelon.retiolum";
+ description = "to which server the bot should connect";
+ };
+ channel = mkOption {
+ type = types.str;
+ default = "#news";
+ description = "post the news in this channel";
+ };
+ masterNick = mkOption {
+ type = types.str;
+ default = "knews";
+ description = "nickname of the master bot";
+ };
+ feeds = mkOption {
+ type = types.path;
+ description = ''
+ file with feeds to post
+ format:
+ $nick|$feedURI
+ '';
+ };
+ urlShortenerHost = mkOption {
+ type = types.str;
+ default = "echelon";
+ description = "what server to use for url shortening, host";
+ };
+ urlShortenerPort = mkOption {
+ type = types.str;
+ default = "80";
+ description = "what server to use for url shortening, port";
+ };
+ };
+
+ imp = {
+ users.extraUsers.newsbot-js = {
+ name = "newsbot-js";
+ uid = 1616759810; #genid newsbot-js
+ description = "newsbot-js user";
+ home = "/var/empty";
+ };
+
+ systemd.services.newsbot-js = {
+ description = "krebs newsbot";
+ after = [ "network.target" ];
+ wantedBy = [ "multi-user.target" ];
+
+ path = with pkgs; [
+ newsbot-js
+ ];
+
+ environment = {
+ irc_server = cfg.ircServer;
+ master_nick = cfg.masterNick;
+ news_channel = cfg.channel;
+ feeds_file = cfg.feeds;
+ url_shortener_host = cfg.urlShortenerHost;
+ url_shortener_port = cfg.urlShortenerPort;
+ };
+
+ restartIfChanged = true;
+
+ serviceConfig = {
+ User = "newsbot-js";
+ Restart = "always";
+ ExecStart = "${pkgs.newsbot-js}/bin/newsbot";
+ };
+ };
+ };
+
+in out
diff --git a/lass/5pkgs/newsbot-js/default.nix b/lass/5pkgs/newsbot-js/default.nix
index 7758b04db..ace2a976f 100644
--- a/lass/5pkgs/newsbot-js/default.nix
+++ b/lass/5pkgs/newsbot-js/default.nix
@@ -26,8 +26,8 @@ in nodePackages.buildNodePackage {
src = fetchgit {
url = "http://cgit.echelon/newsbot-js/";
- rev = "cd32ef7b39819f53c7125b22c594202724cc8754";
- sha256 = "425e800f7638a5679ed8a049614a7533f3c8dd09659061885240dc93952ff0ae";
+ rev = "b22729670236bfa6491207d57c5d7565137625ca";
+ sha256 = "8ff00de56d85543399776c82d41d92ccc68000e5dce0f008d926748e188f3c69";
};
phases = [