Commit bfdfb77b authored by fpletz's avatar fpletz 🚧
Browse files

luftschleuse: add lockd

parent 04853b7d
......@@ -2,11 +2,11 @@
"nodes": {
"flake-utils": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
......@@ -22,11 +22,11 @@
]
},
"locked": {
"lastModified": 1645796113,
"narHash": "sha256-s1WSYeOSIO/I/rII6H9o68naHAWieLzvtqrp8w4ggbI=",
"lastModified": 1645867939,
"narHash": "sha256-p3vHHMM5W6ojmStJqKpLvdnzxxKGG015U7OK6PJE8lo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "662350bee2090edc82b4c162b1415f76b4eee2f3",
"rev": "c7a13f76a78bb5c225ca5e08e9a109347d130792",
"type": "github"
},
"original": {
......@@ -35,9 +35,35 @@
"type": "github"
}
},
"luftschleuse2": {
"inputs": {
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1645883623,
"narHash": "sha256-qEVHqsxF0wMcaWfJFGEASWLcuYXMXE6LMdGoYW5KmcA=",
"owner": "muccc",
"repo": "luftschleuse2",
"rev": "7aec79221fb6e388e9d946fca56bea2ff56e5349",
"type": "github"
},
"original": {
"owner": "muccc",
"ref": "luftschleuse3",
"repo": "luftschleuse2",
"type": "github"
}
},
"muccc-api": {
"inputs": {
"flake-utils": "flake-utils",
"flake-utils": [
"flake-utils"
],
"nixpkgs": [
"nixpkgs"
]
......@@ -94,11 +120,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1645839661,
"narHash": "sha256-qk1oUISso1GeK4GMbEOoaEfKa6OKZhMwi145e5SdQgg=",
"lastModified": 1645883541,
"narHash": "sha256-rEyWMCwPKz/gOE3cchfgybcG/dDMKaV6jdG/hPtTiv0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9da97cd05ab519d0d293157ac33756dae3f3a1d6",
"rev": "064765b8ebaa6d894cdc1603fb7d2f35f297a2dd",
"type": "github"
},
"original": {
......@@ -110,26 +136,12 @@
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"luftschleuse2": "luftschleuse2",
"muccc-api": "muccc-api",
"nixos-generators": "nixos-generators",
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"utils": {
"locked": {
"lastModified": 1644229661,
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
"nixpkgs": "nixpkgs"
}
}
},
......
......@@ -3,10 +3,16 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/master";
utils.url = "github:numtide/flake-utils";
flake-utils.url = "github:numtide/flake-utils";
muccc-api = {
url = "git+https://gitlab.muc.ccc.de/muCCC/api";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
luftschleuse2 = {
url = "github:muccc/luftschleuse2/luftschleuse3";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
home-manager = {
url = "github:nix-community/home-manager";
......@@ -18,9 +24,9 @@
};
};
outputs = { self, nixpkgs, utils, muccc-api, home-manager, nixos-generators, ... }: let
supportedSystems = utils.lib.defaultSystems;
in utils.lib.eachSystem supportedSystems (system: let
outputs = { self, nixpkgs, flake-utils, muccc-api, luftschleuse2, home-manager, nixos-generators, ... }: let
supportedSystems = flake-utils.lib.defaultSystems;
in flake-utils.lib.eachSystem supportedSystems (system: let
pkgs = import nixpkgs { inherit system; };
in rec {
defaultPackage = pkgs.colmena;
......@@ -37,7 +43,7 @@
meta = {
nixpkgs = import nixpkgs { };
specialArgs.flakes = {
inherit self nixpkgs muccc-api home-manager;
inherit self nixpkgs muccc-api luftschleuse2 home-manager;
};
};
......
......@@ -75,4 +75,59 @@
channel = 7;
wpa = false;
};
systemd.services.lockd = let lockdCfg = pkgs.writeText "lockd.cfg" ''
[Front Door]
type = door
address = A
key = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
inital_unlock = False
sequence_number_container_file = /tmp/front_door_rx_seq.log
rx_sequence_leap = 32768
timeout = 2
[Back Door]
type = door
address = B
key = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
inital_unlock = True
sequence_number_container_file = /tmp/back_door_rx_seq.log
rx_sequence_leap = 32768
timeout = 2
[Master Controller]
serialdevice = /dev/null
baudrate = 115200
[Master Controller Buttons]
down = 2
closed = 1
member = 4
public = 8
[Master Controller LEDs]
down = 0
closed = 1
member = 2
[Logging]
host = 127.0.0.1
port = 23514
level = debug
[Display]
display_type = Nokia_1600
max_update_rate = .5
[Status Receiver]
host = 127.0.0.1
port = 2080
''; in {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
Restart = "always";
ExecStart = "${pkgs.luftschleuse2-lockd}/bin/lockd ${lockdCfg}";
};
};
}
......@@ -45,7 +45,10 @@
# little more prio then mkDefault because this is set by eval-config for currentSystem
nixpkgs.system = lib.mkOverride 999 "x86_64-linux";
nixpkgs.overlays = [ flakes.muccc-api.overlay ];
nixpkgs.overlays = [
flakes.muccc-api.overlay
flakes.luftschleuse2.overlay
];
# include git rev of this repo/flake into the nixos-version
system.configurationRevision = flakes.nixpkgs.lib.mkIf (flakes.self ? rev) flakes.self.rev;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment