From 33655bfd89f7ea6f8ab3e3139cd79f4c2d2a0ef6 Mon Sep 17 00:00:00 2001 From: makefu Date: Sun, 13 Jan 2019 23:05:12 +0100 Subject: ma cake.r: remove hack to get wifi working --- makefu/1systems/cake/config.nix | 41 +++----------------------------- makefu/1systems/cake/hardware-config.nix | 26 ++++++++++++++++++++ 2 files changed, 29 insertions(+), 38 deletions(-) create mode 100644 makefu/1systems/cake/hardware-config.nix diff --git a/makefu/1systems/cake/config.nix b/makefu/1systems/cake/config.nix index 2491352e..e40042b2 100644 --- a/makefu/1systems/cake/config.nix +++ b/makefu/1systems/cake/config.nix @@ -2,6 +2,7 @@ { imports = [ + ./hardware-config.nix # configure your hw: # @@ -11,46 +12,10 @@ tinc.retiolum.enable = true; build.host = config.krebs.hosts.cake; }; - boot.loader.grub.enable = false; - boot.loader.generic-extlinux-compatible.enable = true; - boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=tty0" ]; - programs.info.enable = false; - programs.man.enable = false; + documentation.info.enable = false; + documentation.man.enable = false; services.nixosManual.enable = false; - boot.tmpOnTmpfs = lib.mkForce false; sound.enable = false; - hardware.enableRedistributableFirmware = true; - hardware.firmware = [ - (pkgs.stdenv.mkDerivation { - name = "broadcom-rpi3-rest"; - src = pkgs.fetchurl { - url = "https://raw.githubusercontent.com/RPi-Distro/firmware-nonfree/54bab3d/brcm80211/brcm/brcmfmac43430-sdio.txt"; - sha256 = "19bmdd7w0xzybfassn7x4rb30l70vynnw3c80nlapna2k57xwbw7"; - }; - phases = [ "installPhase" ]; - installPhase = '' - mkdir -p $out/lib/firmware/brcm - cp $src $out/lib/firmware/brcm/brcmfmac43430-sdio.txt - ''; - }) - ]; - networking.wireless.enable = true; - users.extraUsers.root.openssh.authorizedKeys.keys = [ - config.krebs.users.Mic92.pubkey - ]; - -# File systems configuration for using the installer's partition layout - fileSystems = { - "/boot" = { - device = "/dev/disk/by-label/NIXOS_BOOT"; - fsType = "vfat"; - }; - "/" = { - device = "/dev/disk/by-label/NIXOS_SD"; - fsType = "ext4"; - }; - }; } diff --git a/makefu/1systems/cake/hardware-config.nix b/makefu/1systems/cake/hardware-config.nix new file mode 100644 index 00000000..a81dce4f --- /dev/null +++ b/makefu/1systems/cake/hardware-config.nix @@ -0,0 +1,26 @@ +{ pkgs, lib, ... }: +{ + # raspi3 + boot.loader.grub.enable = false; + boot.loader.generic-extlinux-compatible.enable = true; + boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=tty0" ]; + boot.tmpOnTmpfs = lib.mkForce false; + hardware.enableRedistributableFirmware = true; + + ## wifi not working, will be fixed with https://github.com/NixOS/nixpkgs/pull/53747 + # boot.kernelPackages = pkgs.linuxPackages_latest; + boot.kernelPackages = pkgs.linuxPackages; + + networking.wireless.enable = true; + # File systems configuration for using the installer's partition layout + fileSystems = { + "/boot" = { + device = "/dev/disk/by-label/NIXOS_BOOT"; + fsType = "vfat"; + }; + "/" = { + device = "/dev/disk/by-label/NIXOS_SD"; + fsType = "ext4"; + }; + }; +} -- cgit v1.2.3 From 6af865b1e6bba605f11f5d4c6cfb7e92b4f01666 Mon Sep 17 00:00:00 2001 From: makefu Date: Mon, 21 Jan 2019 11:17:27 +0100 Subject: ma 2default: extra pathsToLink --- makefu/2configs/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/2configs/default.nix b/makefu/2configs/default.nix index 61cba86d..d66b492a 100644 --- a/makefu/2configs/default.nix +++ b/makefu/2configs/default.nix @@ -85,5 +85,5 @@ with import ; SystemMaxUse=1G RuntimeMaxUse=128M ''; - + environment.pathsToLink = [ "/share" ]; } -- cgit v1.2.3 From 9312695b39bb490c76d7297c346ef17ac462b569 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 08:13:44 +0100 Subject: ma cake.r: update hardware-config --- makefu/1systems/cake/hardware-config.nix | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/makefu/1systems/cake/hardware-config.nix b/makefu/1systems/cake/hardware-config.nix index a81dce4f..d021f945 100644 --- a/makefu/1systems/cake/hardware-config.nix +++ b/makefu/1systems/cake/hardware-config.nix @@ -1,18 +1,34 @@ { pkgs, lib, ... }: { # raspi3 + boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=tty0" "console=ttyS1,115200n8" ]; boot.loader.grub.enable = false; - boot.loader.generic-extlinux-compatible.enable = true; - boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=tty0" ]; + boot.loader.raspberryPi.enable = true; + boot.loader.raspberryPi.version = 3; + boot.loader.raspberryPi.uboot.enable = true; + boot.loader.raspberryPi.uboot.configurationLimit = 3; + boot.loader.raspberryPi.firmwareConfig = '' + gpu_mem=32 + arm_freq=1350 + core_freq=500 + over_voltage=4 + disable_splash=1 + # bye bye warranty + force_turbo=1 + ''; + boot.loader.generationsDir.enable = lib.mkDefault false; + boot.tmpOnTmpfs = lib.mkForce false; + boot.cleanTmpDir = true; hardware.enableRedistributableFirmware = true; ## wifi not working, will be fixed with https://github.com/NixOS/nixpkgs/pull/53747 # boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelPackages = pkgs.linuxPackages; - + boot.kernelPackages = pkgs.linuxPackages_latest; + environment.systemPackages = [ pkgs.raspberrypi-tools ]; networking.wireless.enable = true; # File systems configuration for using the installer's partition layout + swapDevices = [ { device = "/var/swap"; size = 2048; } ]; fileSystems = { "/boot" = { device = "/dev/disk/by-label/NIXOS_BOOT"; -- cgit v1.2.3 From 04ddb5307bc68e91e4ce534469faa3cc52b4dd02 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 08:14:34 +0100 Subject: ma hw/malduino_elite: init required so modem-manager does not try to use it as modem --- makefu/1systems/x/config.nix | 1 + makefu/2configs/hw/malduino_elite.nix | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 makefu/2configs/hw/malduino_elite.nix diff --git a/makefu/1systems/x/config.nix b/makefu/1systems/x/config.nix index 5a4eea2e..35779507 100644 --- a/makefu/1systems/x/config.nix +++ b/makefu/1systems/x/config.nix @@ -69,6 +69,7 @@ # Hardware + # # diff --git a/makefu/2configs/hw/malduino_elite.nix b/makefu/2configs/hw/malduino_elite.nix new file mode 100644 index 00000000..1af85493 --- /dev/null +++ b/makefu/2configs/hw/malduino_elite.nix @@ -0,0 +1,15 @@ +{ config, lib, pkgs, ... }: + +{ + + services.udev.extraRules = '' + ACTION!="add|change", GOTO="mm_usb_device_blacklist_local_end" + SUBSYSTEM!="usb", GOTO="mm_usb_device_blacklist_local_end" + ENV{DEVTYPE}!="usb_device", GOTO="mm_usb_device_blacklist_local_end" + + ATTRS{idVendor}=="1b4f" ATTRS{idProduct}=="9204", ENV{ID_MM_DEVICE_IGNORE}="1" + ATTRS{idVendor}=="1b4f" ATTRS{idProduct}=="9203", ENV{ID_MM_DEVICE_IGNORE}="1" + + LABEL="mm_usb_device_blacklist_local_end" + ''; +} -- cgit v1.2.3 From 1a9957cc87e7bd3a2f0e4aa610c0c68350682b4f Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 08:15:13 +0100 Subject: ma tools: add nix-review, accept sdk license --- makefu/2configs/tools/android-pentest.nix | 1 + makefu/2configs/tools/dev.nix | 1 + 2 files changed, 2 insertions(+) diff --git a/makefu/2configs/tools/android-pentest.nix b/makefu/2configs/tools/android-pentest.nix index 9dedafdd..05560db9 100644 --- a/makefu/2configs/tools/android-pentest.nix +++ b/makefu/2configs/tools/android-pentest.nix @@ -1,6 +1,7 @@ { pkgs, ... }: { + nixpkgs.config.android_sdk.accept_license = true; users.users.makefu.packages = with pkgs; [ mitmproxy nmap diff --git a/makefu/2configs/tools/dev.nix b/makefu/2configs/tools/dev.nix index 09ee6349..f8e3f9f4 100644 --- a/makefu/2configs/tools/dev.nix +++ b/makefu/2configs/tools/dev.nix @@ -22,6 +22,7 @@ cdrtools # nix related nix-index + nix-review # git-related tig ]; -- cgit v1.2.3 From d8ab2b7f65d72931aac87059c91c04223af8ea1b Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 08:15:33 +0100 Subject: ma printer: use splix instead of samsung drivers --- makefu/2configs/printer.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/makefu/2configs/printer.nix b/makefu/2configs/printer.nix index fb1a6735..0889ebbc 100644 --- a/makefu/2configs/printer.nix +++ b/makefu/2configs/printer.nix @@ -6,7 +6,8 @@ in { services.printing = { enable = true; drivers = with pkgs; [ - samsungUnifiedLinuxDriver + # samsungUnifiedLinuxDriver + splix # scx 3200 cups-dymo # dymo labelwriter foo2zjs # magicolor 1690mf cups-zj-58 -- cgit v1.2.3 From d6b74138c33c7458ebb6c87f171e7efcb9908f98 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 09:02:54 +0100 Subject: ma home-manager: set the XDG_DATA_DIRS and GDK_PIXBUF_MODULE_FILE load icons --- makefu/2configs/home-manager/desktop.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/makefu/2configs/home-manager/desktop.nix b/makefu/2configs/home-manager/desktop.nix index 40a1c649..3be020fa 100644 --- a/makefu/2configs/home-manager/desktop.nix +++ b/makefu/2configs/home-manager/desktop.nix @@ -1,8 +1,9 @@ { pkgs, lib, ... }: { - users.users.makefu.packages = with pkgs;[ bat direnv ]; + users.users.makefu.packages = with pkgs;[ bat direnv clipit ]; home-manager.users.makefu = { + systemd.user.services.network-manager-applet.Service.Environment = ''XDG_DATA_DIRS=/run/current-system/sw/share:${pkgs.networkmanagerapplet}/share GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache''; programs.browserpass = { browsers = [ "firefox" ] ; enable = true; }; programs.firefox.enable = true; programs.obs-studio.enable = true; @@ -36,6 +37,7 @@ }; Service = { + Environment = ''XDG_DATA_DIRS=/run/current-system/sw/share:${pkgs.clipit}/share GDK_PIXBUF_MODULE_FILE=${pkgs.librsvg.out}/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache''; ExecStart = "${pkgs.clipit}/bin/clipit"; Restart = "on-abort"; }; -- cgit v1.2.3 From 1cb0ec0b03bad3fb57a200d425da0b936fa20436 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 09:03:13 +0100 Subject: ma krops: bump home-manager ref --- makefu/krops.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/makefu/krops.nix b/makefu/krops.nix index 30db0766..57a3b3bb 100644 --- a/makefu/krops.nix +++ b/makefu/krops.nix @@ -74,7 +74,7 @@ (lib.mkIf ( host-src.home-manager ) { home-manager.git = { url = https://github.com/rycee/home-manager; - ref = "f947faf"; + ref = "4aa07c3"; }; }) ]; -- cgit v1.2.3 From a8586920832b55b43b5cb4bdd61c081fb821a113 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 09:03:57 +0100 Subject: ma bureautomation: rename plugs --- makefu/2configs/bureautomation/hass.nix | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/makefu/2configs/bureautomation/hass.nix b/makefu/2configs/bureautomation/hass.nix index a89a4813..57184bdf 100644 --- a/makefu/2configs/bureautomation/hass.nix +++ b/makefu/2configs/bureautomation/hass.nix @@ -3,19 +3,14 @@ let tasmota_plug = name: topic: { platform = "mqtt"; inherit name; - state_topic = "/bam/${topic}/stat/POWER1"; - command_topic = "/bam/${topic}/cmnd/POWER1"; + state_topic = "/bam/${topic}/stat/POWER"; + command_topic = "/bam/${topic}/cmnd/POWER"; availability_topic = "/bam/${topic}/tele/LWT"; payload_on= "ON"; payload_off= "OFF"; payload_available= "Online"; payload_not_available= "Offline"; }; - tasmota_stecki = name: topic: - ( tasmota_plug name topic) // - { state_topic = "/bam/${topic}/stat/POWER"; - command_topic = "/bam/${topic}/cmnd/POWER"; - }; espeasy_dht22 = name: [ { platform = "mqtt"; name = "${name} DHT22 Temperature"; @@ -77,8 +72,8 @@ in { switch = [ (tasmota_plug "Bauarbeiterlampe" "plug") (tasmota_plug "Blitzdings" "plug2") - (tasmota_stecki "Fernseher" "fernseher") - (tasmota_plug "Pluggy" "plug4") + (tasmota_plug "Fernseher" "plug3") + (tasmota_plug "Feuer" "plug4") ]; binary_sensor = [ { platform = "mqtt"; @@ -179,7 +174,7 @@ in { "switch.bauarbeiterlampe" "switch.blitzdings" "switch.fernseher" - "switch.pluggy" + "switch.feuer" ]; camera = [ "camera.Baumarkt" @@ -212,7 +207,7 @@ in { }; action = { service = "homeassistant.turn_on"; - entity_id = [ "switch.fernseher" "switch.blitzdings" ]; + entity_id = [ "switch.fernseher" "switch.feuer" ]; }; } { alias = "Turn off Fernseher 10 minutes after last movement"; @@ -231,7 +226,7 @@ in { ]; action = { service = "homeassistant.turn_off"; - entity_id = [ "switch.fernseher" "switch.blitzdings" ]; + entity_id = [ "switch.fernseher" "switch.feuer" ]; }; condition = { condition = "and"; -- cgit v1.2.3 From 5f96265d83228d581730da9a85488342010080dc Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 09:04:20 +0100 Subject: ma gui: disable transparency --- makefu/2configs/gui/base.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/makefu/2configs/gui/base.nix b/makefu/2configs/gui/base.nix index 6bcd0982..63ce6201 100644 --- a/makefu/2configs/gui/base.nix +++ b/makefu/2configs/gui/base.nix @@ -28,6 +28,7 @@ in windowManager = { awesome.enable = true; + awesome.noArgb = true; awesome.luaModules = [ pkgs.luaPackages.vicious ]; default = "awesome"; }; -- cgit v1.2.3 From b8bd543a79684d1c63a06fe5c1784d75e6dbbf85 Mon Sep 17 00:00:00 2001 From: makefu Date: Tue, 22 Jan 2019 09:05:56 +0100 Subject: ma pkgs.baidudl: init --- makefu/5pkgs/baidudl/default.nix | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 makefu/5pkgs/baidudl/default.nix diff --git a/makefu/5pkgs/baidudl/default.nix b/makefu/5pkgs/baidudl/default.nix new file mode 100644 index 00000000..3c701fd6 --- /dev/null +++ b/makefu/5pkgs/baidudl/default.nix @@ -0,0 +1,23 @@ +{ stdenv, lib, pkgs, curl, jansson ,fetchFromGitHub, autoreconfHook }: +stdenv.mkDerivation rec { + pname = "baidudl"; + version = "2018-01-16"; + name = "${pname}-${version}"; + + src = fetchFromGitHub { + owner = "yzfedora"; + repo = "baidudl"; + rev = "712f2554a5ef7b2eba5c248d6406a6c535ef47b2"; + sha256 = "1nfzalyd9k87q6njdxpg7pa62q6hyfr2vwxwvahaflyp31nlpa0y"; + }; + + + nativeBuildInputs = [ autoreconfHook ]; + buildInputs = [ curl.dev jansson ]; + + meta = { + homepage = https://github.com/yzfedora/baidudl; + description = "This is a multi-thread download tool for pan.baidu.com"; + license = lib.licenses.gpl3; + }; +} -- cgit v1.2.3