syncthing
This commit is contained in:
parent
da80e76c8d
commit
bb7f4afae3
16 changed files with 158 additions and 57 deletions
|
|
@ -11,6 +11,7 @@
|
|||
file
|
||||
htop
|
||||
btop
|
||||
git
|
||||
jq
|
||||
yq
|
||||
du-dust
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ in {
|
|||
./ssh.nix
|
||||
./steam.nix
|
||||
./stylix.nix
|
||||
./syncthing.nix
|
||||
./wayland.nix
|
||||
./zsh.nix
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{...}: {
|
||||
{conf, ...}: {
|
||||
environment.variables = {
|
||||
EDITOR = "hx";
|
||||
VISUAL = "hx";
|
||||
FLAKE = "/persist/data" + conf.home + "/nixos";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,11 @@
|
|||
{lib, ...}: {
|
||||
options.gaming.enable = lib.mkEnableOption "Enable gaming";
|
||||
config.gaming.enable = lib.mkDefault false;
|
||||
|
||||
options.hyprlandOverrides = lib.mkOption {
|
||||
# type = lib.types.attributeSet;
|
||||
default = {};
|
||||
example = lib.literalExpression ''{ }'';
|
||||
description = lib.mdDoc ''Override default Hyprland options in hm'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{impermanence, ...}: {
|
||||
{impermanence, conf, lib, config, ...}: {
|
||||
imports = [impermanence.nixosModule];
|
||||
|
||||
environment.persistence."/persist/data" = {
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
];
|
||||
files = [];
|
||||
|
||||
# users.${conf.user} = (import ../home/persist.nix).data;
|
||||
users.${conf.user} = (import ../home/persist.nix { inherit config lib; }).data;
|
||||
};
|
||||
|
||||
environment.persistence."/persist/cache" = {
|
||||
|
|
@ -27,6 +27,6 @@
|
|||
"/etc/machine-id"
|
||||
];
|
||||
|
||||
# users.${conf.user} = (import ../home/persist.nix).cache;
|
||||
users.${conf.user} = (import ../home/persist.nix { inherit config lib; }).cache;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
{sops-nix, ...}: {
|
||||
{sops-nix, conf, ...}: {
|
||||
imports = [sops-nix.nixosModules.sops];
|
||||
sops = {
|
||||
age.keyFile = /persist/data${conf.home}/.config/sops/age/keys.txt;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
45
system/syncthing.nix
Normal file
45
system/syncthing.nix
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
{ conf, config, ...}: {
|
||||
|
||||
sops.secrets."syncthing/key.pem" = {
|
||||
sopsFile = ../hosts/${conf.hostname}/secrets/default.yaml
|
||||
};
|
||||
sops.secrets."syncthing/cert.pem" = {
|
||||
sopsFile = ../hosts/${conf.hostname}/secrets/default.yaml
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
user = conf.user;
|
||||
dataDir = "$(conf.home)/sync";
|
||||
configDir = "$(conf.home)/.config/syncthing";
|
||||
|
||||
overrideDevices = true;
|
||||
overrideFolders = true;
|
||||
|
||||
settings = {
|
||||
key = config.sops.secrets."syncthing/key.pem".path;
|
||||
cert = config.sops.secrets."syncthing/cert.pem".path;
|
||||
|
||||
devices = {
|
||||
"phone" = {id = "C2CKYRP-72UNJRX-MUPZIUY-CCHQYGF-6T4NA6B-MO7AEZB-RSN5EAG-CN2JCAF";};
|
||||
"nixserver" = {id = "DW6GTZ3-3JPAHLO-UEB3LBL-AWOX3BT-QPI7ODT-OZ6Q4YR-K3KK22C-5RY3XQZ";};
|
||||
"lilith-pc" = {id = "ZXFUFLA-MJJCNE4-SJTGTYD-SEJZUCX-3KIFTL6-LFIWBBU-HD2LX2F-7FQ5VAF";};
|
||||
"lilith-pad" = {id = "GQJA6WA-G5YZZSN-4OOQMVE-JPIR22N-VFHPY4O-XMRG37D-DALH4R2-7DCTMQK";};
|
||||
"lilith-old" = {id = "MSUZJ6K-4CIFE5D-ILO6FE4-SPRPTZI-VEWZQ7F-ECARCCF-2VLVMDQ-2HQUAAS";};
|
||||
};
|
||||
folders = {
|
||||
"rdcj2-mfyb4" = {
|
||||
path = "/home/spectre/sync";
|
||||
devices = ["phone" "nixserver" "lilith-pad" "lilith-pc" "lilith-old"];
|
||||
};
|
||||
"sdpfs-2beqd" = {
|
||||
path = "/home/spectre/.keepass";
|
||||
devices = ["phone" "nixserver" "lilith-pad" "lilith-pc" "lilith-old"];
|
||||
};
|
||||
"7qim7-yzqpn" = {
|
||||
path = "/home/spectre/obsidian";
|
||||
devices = ["phone" "nixserver" "lilith-pad" "lilith-pc" "lilith-old"];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
default_session = initial_session;
|
||||
initial_session = {
|
||||
user = conf.user;
|
||||
command = "Hyprland; hyprlock";
|
||||
command = "Hyprland";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
# programs.zsh.enable = true;
|
||||
# users.defaultUserShell = pkgs.zsh;
|
||||
programs.zsh.enable = true;
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue