Merge remote-tracking branch 'gum/master'
This commit is contained in:
commit
d619bcbf4a
@ -2,6 +2,7 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
<stockholm/makefu>
|
<stockholm/makefu>
|
||||||
|
./hardware-config.nix
|
||||||
<stockholm/makefu/2configs/tools/core.nix>
|
<stockholm/makefu/2configs/tools/core.nix>
|
||||||
# configure your hw:
|
# configure your hw:
|
||||||
# <stockholm/makefu/2configs/save-diskspace.nix>
|
# <stockholm/makefu/2configs/save-diskspace.nix>
|
||||||
@ -11,46 +12,10 @@
|
|||||||
tinc.retiolum.enable = true;
|
tinc.retiolum.enable = true;
|
||||||
build.host = config.krebs.hosts.cake;
|
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;
|
documentation.info.enable = false;
|
||||||
programs.man.enable = false;
|
documentation.man.enable = false;
|
||||||
services.nixosManual.enable = false;
|
services.nixosManual.enable = false;
|
||||||
boot.tmpOnTmpfs = lib.mkForce false;
|
|
||||||
sound.enable = 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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
42
makefu/1systems/cake/hardware-config.nix
Normal file
42
makefu/1systems/cake/hardware-config.nix
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
{ pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
# raspi3
|
||||||
|
boot.kernelParams = ["cma=32M" "console=ttyS0,115200n8" "console=tty0" "console=ttyS1,115200n8" ];
|
||||||
|
boot.loader.grub.enable = false;
|
||||||
|
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_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";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -69,6 +69,7 @@
|
|||||||
# Hardware
|
# Hardware
|
||||||
<stockholm/makefu/2configs/hw/tp-x230.nix>
|
<stockholm/makefu/2configs/hw/tp-x230.nix>
|
||||||
<stockholm/makefu/2configs/hw/mceusb.nix>
|
<stockholm/makefu/2configs/hw/mceusb.nix>
|
||||||
|
<stockholm/makefu/2configs/hw/malduino_elite.nix>
|
||||||
# <stockholm/makefu/2configs/hw/tpm.nix>
|
# <stockholm/makefu/2configs/hw/tpm.nix>
|
||||||
# <stockholm/makefu/2configs/hw/rtl8812au.nix>
|
# <stockholm/makefu/2configs/hw/rtl8812au.nix>
|
||||||
<stockholm/makefu/2configs/hw/network-manager.nix>
|
<stockholm/makefu/2configs/hw/network-manager.nix>
|
||||||
|
@ -3,19 +3,14 @@ let
|
|||||||
tasmota_plug = name: topic:
|
tasmota_plug = name: topic:
|
||||||
{ platform = "mqtt";
|
{ platform = "mqtt";
|
||||||
inherit name;
|
inherit name;
|
||||||
state_topic = "/bam/${topic}/stat/POWER1";
|
state_topic = "/bam/${topic}/stat/POWER";
|
||||||
command_topic = "/bam/${topic}/cmnd/POWER1";
|
command_topic = "/bam/${topic}/cmnd/POWER";
|
||||||
availability_topic = "/bam/${topic}/tele/LWT";
|
availability_topic = "/bam/${topic}/tele/LWT";
|
||||||
payload_on= "ON";
|
payload_on= "ON";
|
||||||
payload_off= "OFF";
|
payload_off= "OFF";
|
||||||
payload_available= "Online";
|
payload_available= "Online";
|
||||||
payload_not_available= "Offline";
|
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: [
|
espeasy_dht22 = name: [
|
||||||
{ platform = "mqtt";
|
{ platform = "mqtt";
|
||||||
name = "${name} DHT22 Temperature";
|
name = "${name} DHT22 Temperature";
|
||||||
@ -77,8 +72,8 @@ in {
|
|||||||
switch = [
|
switch = [
|
||||||
(tasmota_plug "Bauarbeiterlampe" "plug")
|
(tasmota_plug "Bauarbeiterlampe" "plug")
|
||||||
(tasmota_plug "Blitzdings" "plug2")
|
(tasmota_plug "Blitzdings" "plug2")
|
||||||
(tasmota_stecki "Fernseher" "fernseher")
|
(tasmota_plug "Fernseher" "plug3")
|
||||||
(tasmota_plug "Pluggy" "plug4")
|
(tasmota_plug "Feuer" "plug4")
|
||||||
];
|
];
|
||||||
binary_sensor = [
|
binary_sensor = [
|
||||||
{ platform = "mqtt";
|
{ platform = "mqtt";
|
||||||
@ -179,7 +174,7 @@ in {
|
|||||||
"switch.bauarbeiterlampe"
|
"switch.bauarbeiterlampe"
|
||||||
"switch.blitzdings"
|
"switch.blitzdings"
|
||||||
"switch.fernseher"
|
"switch.fernseher"
|
||||||
"switch.pluggy"
|
"switch.feuer"
|
||||||
];
|
];
|
||||||
camera = [
|
camera = [
|
||||||
"camera.Baumarkt"
|
"camera.Baumarkt"
|
||||||
@ -212,7 +207,7 @@ in {
|
|||||||
};
|
};
|
||||||
action = {
|
action = {
|
||||||
service = "homeassistant.turn_on";
|
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";
|
{ alias = "Turn off Fernseher 10 minutes after last movement";
|
||||||
@ -231,7 +226,7 @@ in {
|
|||||||
];
|
];
|
||||||
action = {
|
action = {
|
||||||
service = "homeassistant.turn_off";
|
service = "homeassistant.turn_off";
|
||||||
entity_id = [ "switch.fernseher" "switch.blitzdings" ];
|
entity_id = [ "switch.fernseher" "switch.feuer" ];
|
||||||
};
|
};
|
||||||
condition =
|
condition =
|
||||||
{ condition = "and";
|
{ condition = "and";
|
||||||
|
@ -84,5 +84,5 @@ with import <stockholm/lib>;
|
|||||||
SystemMaxUse=1G
|
SystemMaxUse=1G
|
||||||
RuntimeMaxUse=128M
|
RuntimeMaxUse=128M
|
||||||
'';
|
'';
|
||||||
|
environment.pathsToLink = [ "/share" ];
|
||||||
}
|
}
|
||||||
|
@ -28,6 +28,7 @@ in
|
|||||||
|
|
||||||
windowManager = {
|
windowManager = {
|
||||||
awesome.enable = true;
|
awesome.enable = true;
|
||||||
|
awesome.noArgb = true;
|
||||||
awesome.luaModules = [ pkgs.luaPackages.vicious ];
|
awesome.luaModules = [ pkgs.luaPackages.vicious ];
|
||||||
default = "awesome";
|
default = "awesome";
|
||||||
};
|
};
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
users.users.makefu.packages = with pkgs;[ bat direnv ];
|
users.users.makefu.packages = with pkgs;[ bat direnv clipit ];
|
||||||
home-manager.users.makefu = {
|
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.browserpass = { browsers = [ "firefox" ] ; enable = true; };
|
||||||
programs.firefox.enable = true;
|
programs.firefox.enable = true;
|
||||||
programs.obs-studio.enable = true;
|
programs.obs-studio.enable = true;
|
||||||
@ -36,6 +37,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Service = {
|
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";
|
ExecStart = "${pkgs.clipit}/bin/clipit";
|
||||||
Restart = "on-abort";
|
Restart = "on-abort";
|
||||||
};
|
};
|
||||||
|
15
makefu/2configs/hw/malduino_elite.nix
Normal file
15
makefu/2configs/hw/malduino_elite.nix
Normal file
@ -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"
|
||||||
|
'';
|
||||||
|
}
|
@ -6,7 +6,8 @@ in {
|
|||||||
services.printing = {
|
services.printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = with pkgs; [
|
drivers = with pkgs; [
|
||||||
samsungUnifiedLinuxDriver
|
# samsungUnifiedLinuxDriver
|
||||||
|
splix # scx 3200
|
||||||
cups-dymo # dymo labelwriter
|
cups-dymo # dymo labelwriter
|
||||||
foo2zjs # magicolor 1690mf
|
foo2zjs # magicolor 1690mf
|
||||||
cups-zj-58
|
cups-zj-58
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
nixpkgs.config.android_sdk.accept_license = true;
|
||||||
users.users.makefu.packages = with pkgs; [
|
users.users.makefu.packages = with pkgs; [
|
||||||
mitmproxy
|
mitmproxy
|
||||||
nmap
|
nmap
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
cdrtools
|
cdrtools
|
||||||
# nix related
|
# nix related
|
||||||
nix-index
|
nix-index
|
||||||
|
nix-review
|
||||||
# git-related
|
# git-related
|
||||||
tig
|
tig
|
||||||
];
|
];
|
||||||
|
23
makefu/5pkgs/baidudl/default.nix
Normal file
23
makefu/5pkgs/baidudl/default.nix
Normal file
@ -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;
|
||||||
|
};
|
||||||
|
}
|
@ -74,7 +74,7 @@
|
|||||||
(lib.mkIf ( host-src.home-manager ) {
|
(lib.mkIf ( host-src.home-manager ) {
|
||||||
home-manager.git = {
|
home-manager.git = {
|
||||||
url = https://github.com/rycee/home-manager;
|
url = https://github.com/rycee/home-manager;
|
||||||
ref = "f947faf";
|
ref = "4aa07c3";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user