From 35cc31d3e478951e1c72126fc43c4209ebf70e00 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 8 Sep 2018 12:45:47 +0200 Subject: ma 2/default: vim.nix resides in editor --- makefu/2configs/default.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 0a89d2023..6192a92a5 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -8,13 +8,16 @@ with import ; mapAttrs (_: h: { hashedPassword = h; }) (import ); } - ./vim.nix + ./editor/vim.nix ./binary-cache/nixos.nix ]; boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest; programs.command-not-found.enable = false; + + nix.package = pkgs.nixUnstable; + nixpkgs.config.allowUnfreePredicate = (pkg: pkgs.lib.hasPrefix "unrar-" pkg.name); krebs = { enable = true; @@ -158,4 +161,10 @@ with import ; "-a task,never" ]; }; + system.activationScripts.state = optionalString (config.state != []) '' + cat << EOF + This machine is burdened with state: + ${concatMapStringsSep "\n" (d: "* ${d}") config.state} + EOF + ''; } -- cgit v1.2.3 From 704fad65c3f53173571cb95d49f1b9fbdd29bb64 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 8 Sep 2018 12:46:25 +0200 Subject: ma state module: init --- makefu/3modules/default.nix | 1 + makefu/3modules/state.nix | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 makefu/3modules/state.nix diff --git a/makefu/3modules/default.nix b/makefu/3modules/default.nix index fa4eb827c..f06ce3d53 100644 --- a/makefu/3modules/default.nix +++ b/makefu/3modules/default.nix @@ -2,6 +2,7 @@ _: { imports = [ + ./state.nix ./populate.nix ./awesome-extra.nix ./deluge.nix diff --git a/makefu/3modules/state.nix b/makefu/3modules/state.nix new file mode 100644 index 000000000..461b90152 --- /dev/null +++ b/makefu/3modules/state.nix @@ -0,0 +1,9 @@ +{config, lib, pkgs, ... }: + +{ + options.state = lib.mkOption { + type = lib.types.listOf lib.types.str; + description = "state which is currently scattered on the machine"; + default = []; + }; +} -- cgit v1.2.3 From 02bcfe81bf009d38e8fc863d19620b09a56a288e Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 8 Sep 2018 12:47:03 +0200 Subject: ma gum.r: no explicit import of vim --- makefu/1systems/gum/config.nix | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/makefu/1systems/gum/config.nix b/makefu/1systems/gum/config.nix index 998ecd0fb..351844482 100644 --- a/makefu/1systems/gum/config.nix +++ b/makefu/1systems/gum/config.nix @@ -17,7 +17,6 @@ in { # - # Security @@ -26,7 +25,6 @@ in { - # services @@ -57,7 +55,7 @@ in { - + # @@ -196,12 +194,6 @@ in { get tmux ]; - services.bitlbee = { - enable = true; - libpurple_plugins = [ pkgs.telegram-purple ]; - }; - - # Hardware # Network networking = { -- cgit v1.2.3 From cb52c1eddc99ab1115bf19854fac6a736e2842e1 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 8 Sep 2018 12:47:27 +0200 Subject: ma nextgum.r: provide bitlbee --- makefu/1systems/nextgum/config.nix | 13 ++++++------- makefu/2configs/bitlbee.nix | 8 ++++++++ 2 files changed, 14 insertions(+), 7 deletions(-) create mode 100644 makefu/2configs/bitlbee.nix diff --git a/makefu/1systems/nextgum/config.nix b/makefu/1systems/nextgum/config.nix index 9761546e7..db22cf9b8 100644 --- a/makefu/1systems/nextgum/config.nix +++ b/makefu/1systems/nextgum/config.nix @@ -19,14 +19,15 @@ in { - + + # services @@ -51,12 +52,13 @@ in { + ## buildbot # Removed until move: no extra mails - # + # Removed until move: avoid double-update of domain # # Removed until move: avoid letsencrypt ban @@ -166,6 +168,8 @@ in { networking.firewall.allowedTCPPorts = [ 5201 ]; } + # krebs infrastructure services + ]; makefu.dl-dir = "/var/download"; @@ -200,13 +204,8 @@ in { environment.systemPackages = with pkgs;[ weechat bepasty-client-cli - get tmux ]; - services.bitlbee = { - enable = true; - libpurple_plugins = [ pkgs.telegram-purple ]; - }; # Hardware diff --git a/makefu/2configs/bitlbee.nix b/makefu/2configs/bitlbee.nix new file mode 100644 index 000000000..17efa7113 --- /dev/null +++ b/makefu/2configs/bitlbee.nix @@ -0,0 +1,8 @@ +{pkgs, ... }: +# state: /var/lib/bitlbee +{ + services.bitlbee = { + enable = true; + libpurple_plugins = [ pkgs.telegram-purple ]; + }; +} -- cgit v1.2.3 From 22c1a59cf181580809e4b8838b84ea2206ab14aa Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 8 Sep 2018 12:48:26 +0200 Subject: ma omo.r: add new harddisk --- makefu/1systems/omo/config.nix | 71 ++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 2 deletions(-) diff --git a/makefu/1systems/omo/config.nix b/makefu/1systems/omo/config.nix index a85d5f5ce..109877bf1 100644 --- a/makefu/1systems/omo/config.nix +++ b/makefu/1systems/omo/config.nix @@ -10,6 +10,7 @@ let rootDisk = byid "ata-SanDisk_SD8SNAT128G1122_162099420904"; rootPartition = byid "ata-SanDisk_SD8SNAT128G1122_162099420904-part2"; primaryInterface = "enp2s0"; + firetv = "192.168.1.238"; # cryptsetup luksFormat $dev --cipher aes-xts-plain64 -s 512 -h sha512 # cryptsetup luksAddKey $dev tmpkey # cryptsetup luksOpen $dev crypt0 --key-file tmpkey --keyfile-size=4096 @@ -28,7 +29,8 @@ let # | * | # | * | # |_______| - cryptDisk0 = byid "ata-ST2000DM001-1CH164_Z240XTT6"; + # cryptDisk0 = byid "ata-ST2000DM001-1CH164_Z240XTT6"; + cryptDisk0 = byid "ata-ST8000DM004-2CX188_ZCT01PLV"; cryptDisk1 = byid "ata-TP02000GB_TPW151006050068"; cryptDisk2 = byid "ata-ST4000DM000-1F2168_Z303HVSG"; cryptDisk3 = byid "ata-ST8000DM004-2CX188_ZCT01SG4"; @@ -97,6 +99,71 @@ in { # Temporary: # + { # ncdc + environment.systemPackages = [ pkgs.ncdc ]; + networking.firewall = { + allowedUDPPorts = [ 51411 ]; + allowedTCPPorts = [ 51411 ]; + }; + } + { + systemd.services.firetv = { + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + User = "nobody"; + ExecStart = "${pkgs.python-firetv}/bin/firetv-server -d ${firetv}:5555"; + }; + }; + nixpkgs.config.permittedInsecurePackages = [ + "homeassistant-0.65.5" + ]; + services.home-assistant = { + config = { + homeassistant = { + name = "Home"; time_zone = "Europe/Berlin"; + latitude = "48.7687"; + longitude = "9.2478"; + }; + media_player = [ + { platform = "kodi"; + host = firetv; + } + { platform = "firetv"; + # assumes python-firetv running + } + ]; + sensor = [ + { platform = "luftdaten"; + name = "Ditzingen"; + sensorid = "663"; + monitored_conditions = [ "P1" "P2" ]; + } + # https://www.home-assistant.io/cookbook/automation_for_rainy_days/ + { platform = "darksky"; + api_key = "c73619e6ea79e553a585be06aacf3679"; + language = "de"; + monitored_conditions = [ "summary" "icon" + "nearest_storm_distance" "precip_probability" + "precip_intensity" + "temperature" # "temperature_high" "temperature_low" + "hourly_summary" + "uv_index" ]; + units = "si" ; + update_interval = { + days = 0; + hours = 0; + minutes = 10; + seconds = 0; + }; + } + ]; + frontend = { }; + http = { }; + }; + enable = true; + #configDir = "/var/lib/hass"; + }; + } ]; makefu.full-populate = true; makefu.server.primary-itf = primaryInterface; @@ -164,7 +231,7 @@ in { // cryptMount "crypt2" // cryptMount "crypt3" // { "/media/cryptX" = { - device = (lib.concatMapStringsSep ":" (d: (toMapper d)) [ 0 1 2 ]); + device = (lib.concatMapStringsSep ":" (d: (toMapper d)) [ 0 1 2 3 ]); fsType = "mergerfs"; noCheck = true; options = [ "defaults" "allow_other" "nofail" "nonempty" ]; -- cgit v1.2.3 From 3e6515e09741134287051c11c8a3b3e3d1a6cafb Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 8 Sep 2018 12:49:42 +0200 Subject: ma {latte,studio}.r: remove explicit vim import --- makefu/1systems/latte/config.nix | 1 - makefu/1systems/studio/config.nix | 1 - 2 files changed, 2 deletions(-) diff --git a/makefu/1systems/latte/config.nix b/makefu/1systems/latte/config.nix index 5352b029f..bec778abc 100644 --- a/makefu/1systems/latte/config.nix +++ b/makefu/1systems/latte/config.nix @@ -22,7 +22,6 @@ in { # Tools - # Services diff --git a/makefu/1systems/studio/config.nix b/makefu/1systems/studio/config.nix index b9a1a5d6a..b3d9383c4 100644 --- a/makefu/1systems/studio/config.nix +++ b/makefu/1systems/studio/config.nix @@ -3,7 +3,6 @@ imports = [ - -- cgit v1.2.3 From b4c96ad61109ac59fb90546d104aaeb7ac273c84 Mon Sep 17 00:00:00 2001 From: makefu Date: Sat, 8 Sep 2018 12:50:14 +0200 Subject: ma x.r: test more config --- makefu/1systems/x/config.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index e5b481ab6..f6ca0c0ac 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -15,7 +15,7 @@ with import ; - + # # Debugging @@ -36,6 +36,8 @@ with import ; # Krebs + + # applications @@ -72,6 +74,7 @@ with import ; # + # Filesystem @@ -82,6 +85,8 @@ with import ; programs.adb.enable = true; } # temporary + + # # # # @@ -138,8 +143,11 @@ with import ; boot.loader.grub.configurationLimit = 3; environment.systemPackages = [ pkgs.passwdqc-utils pkgs.nixUnstable ]; - nixpkgs.overlays = [ (import ) ]; # environment.variables = { GOROOT = [ "${pkgs.go.out}/share/go" ]; }; - + state = [ + "/home/makefu/stockholm" + "/home/makefu/backup/borgun" + "/home/makefu/.mail/" + ]; } -- cgit v1.2.3