mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 00:29:43 -04:00
cont
This commit is contained in:
parent
b126c84401
commit
8258e82891
25 changed files with 36 additions and 15 deletions
|
|
@ -6,7 +6,6 @@
|
|||
home-manager.users.${config.user.name} = {
|
||||
imports = [
|
||||
../../../user
|
||||
../../../user/modules
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
home-manager.users.${config.user.name} = {
|
||||
imports = [
|
||||
../../../user
|
||||
../../../user/modules
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
home-manager.users.${config.user.name} = {
|
||||
imports = [
|
||||
../../../user
|
||||
../../../user/modules
|
||||
];
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.bitcoin;
|
||||
cfg = config.modules.system.bitcoin;
|
||||
|
||||
in
|
||||
{ options.modules.bitcoin = { enable = mkEnableOption "bitcoin"; };
|
||||
{ options.modules.system.bitcoin = { enable = mkEnableOption "system.bitcoin"; };
|
||||
|
||||
imports = [
|
||||
./core-lightning
|
||||
|
|
|
|||
|
|
@ -1,11 +1,12 @@
|
|||
{ lib, pkgs, config, ... }:
|
||||
|
||||
with lib;
|
||||
let cfg = config.modules.bitcoin.core-lightning;
|
||||
let cfg = config.modules.system.bitcoin.core-lightning;
|
||||
|
||||
in
|
||||
{ options.modules.bitcoin.core-lightning = { enable = mkEnableOption "bitcoin.core-lightning"; };
|
||||
{ options.modules.system.bitcoin.core-lightning = { enable = mkEnableOption "system.bitcoin.core-lightning"; };
|
||||
config = mkIf cfg.enable {
|
||||
imports = [ ./modules ];
|
||||
programs.bash.shellAliases = {
|
||||
cln = "lightningd";
|
||||
};
|
||||
|
|
@ -24,16 +25,33 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
systemd.services.clightning = {
|
||||
systemd.services.lightningd = {
|
||||
Unit = {
|
||||
after = [ "network.target" "bitcoind.service" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
Description = "Core Lightning daemon";
|
||||
Requires = [ "bitcoind.service" ];
|
||||
After = [ "bitcoind.service" "network-online.target" ];
|
||||
Wants = [ "network-online.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.clightning}/bin/lightningd --conf=...";
|
||||
Restart = "always";
|
||||
ExecStartPre = "/usr/bin/sleep 10";
|
||||
ExecStart = "${pkgs.clightning}/bin/lightningd --conf=/var/lib/clightning/.lightning/config";
|
||||
|
||||
RuntimeDirectory = "lightningd";
|
||||
|
||||
User = "clightning";
|
||||
Group = "bitcoin";
|
||||
|
||||
Type = "forking";
|
||||
PIDFile = "/run/lightningd/lightningd.pid";
|
||||
Restart = "on-failute";
|
||||
|
||||
PrivateTmp = true;
|
||||
ProtectSystem = "full";
|
||||
NoNetPrivileges = true;
|
||||
PrivateDevies = true;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.bitcoin.sparrow-server;
|
||||
cfg = config.modules.gui.bitcoin.sparrow-server;
|
||||
sparrow-server = import ./derivation.nix { inherit pkgs; };
|
||||
in
|
||||
{ options.modules.bitcoin.sparrow-server = { enable = mkEnableOption "bitcoin.sparrow-server"; };
|
||||
{ options.modules.gui.bitcoin.sparrow-server = { enable = mkEnableOption "gui.bitcoin.sparrow-server"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
sparrow-server
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
imports = [
|
||||
./corn
|
||||
./bitcoin
|
||||
./security
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue