home-mgr syncthin
This commit is contained in:
parent
072bdf5c57
commit
b1003f722f
3 changed files with 62 additions and 58 deletions
|
|
@ -32,7 +32,7 @@
|
||||||
# options: production, beta, vulkan_beta, latest
|
# options: production, beta, vulkan_beta, latest
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||||||
open = true;
|
open = true;
|
||||||
nvidiaSettings = false;
|
nvidiaSettings = true;
|
||||||
};
|
};
|
||||||
systemd.services.nvpl = {
|
systemd.services.nvpl = {
|
||||||
description = "Increase GPU power limit to 400w";
|
description = "Increase GPU power limit to 400w";
|
||||||
|
|
|
||||||
|
|
@ -84,60 +84,6 @@
|
||||||
# enableExtensionPack = true;
|
# enableExtensionPack = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
|
|
||||||
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
|
|
||||||
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
|
|
||||||
services.syncthing = {
|
|
||||||
enable = true;
|
|
||||||
user = "tao";
|
|
||||||
dataDir = "/home/tao/sync";
|
|
||||||
configDir = "/home/tao/.config/syncthing";
|
|
||||||
overrideDevices = true;
|
|
||||||
overrideFolders = true;
|
|
||||||
openDefaultPorts = true;
|
|
||||||
settings = {
|
|
||||||
devices = {
|
|
||||||
# we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern
|
|
||||||
# bootstrap by commenting out devices first and rebuild switch impurely
|
|
||||||
"nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path;
|
|
||||||
"nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path;
|
|
||||||
"uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path;
|
|
||||||
};
|
|
||||||
folders = let
|
|
||||||
devs = [
|
|
||||||
"nocomputer"
|
|
||||||
"nolaptop"
|
|
||||||
"uwuraid"
|
|
||||||
];
|
|
||||||
in {
|
|
||||||
# "documents" = {
|
|
||||||
# path = "/home/tao/documents";
|
|
||||||
# devices = devs;
|
|
||||||
# };
|
|
||||||
"pictures" = {
|
|
||||||
path = "/home/tao/pictures";
|
|
||||||
devices = devs;
|
|
||||||
};
|
|
||||||
"projects" = {
|
|
||||||
path = "/home/tao/projects";
|
|
||||||
devices = devs;
|
|
||||||
};
|
|
||||||
"school" = {
|
|
||||||
path = "/home/tao/school";
|
|
||||||
devices = devs;
|
|
||||||
};
|
|
||||||
"sync" = {
|
|
||||||
path = "/home/tao/sync";
|
|
||||||
devices = devs;
|
|
||||||
};
|
|
||||||
# "work" = {
|
|
||||||
# path = "/home/tao/work";
|
|
||||||
# devices = devs;
|
|
||||||
# };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# nixpkgs.overlays = [
|
# nixpkgs.overlays = [
|
||||||
# (final: prev: {
|
# (final: prev: {
|
||||||
# options.services.snapper.configs = prev.options.services.snapper.configs.overrideAttrs (old: {
|
# options.services.snapper.configs = prev.options.services.snapper.configs.overrideAttrs (old: {
|
||||||
|
|
@ -191,17 +137,20 @@
|
||||||
|
|
||||||
documentation.enable = true;
|
documentation.enable = true;
|
||||||
|
|
||||||
age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age;
|
# age.secrets.password-tao.file = ../secrets/syncthing-uwuraid.age;
|
||||||
users.users.tao = {
|
users.users.tao = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
hashedPasswordFile = config.age.secrets.password-tao.path;
|
# hashedPasswordFile = config.age.secrets.password-tao.path;
|
||||||
extraGroups = ["audio" "video" "wheel" "libvirtd" "dialout" "game"];
|
extraGroups = ["audio" "video" "wheel" "libvirtd" "dialout" "game"];
|
||||||
shell = pkgs.nushell;
|
shell = pkgs.nushell;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
|
||||||
|
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
|
||||||
|
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.verbose = true;
|
home-manager.verbose = true;
|
||||||
home-manager.backupFileExtension = ".hm-bak";
|
home-manager.backupFileExtension = ".hm-bak";
|
||||||
home-manager.users.tao = import ./tao/HOME.nix {inherit inputs pkgs lib;};
|
home-manager.users.tao = import ./tao/HOME.nix {inherit inputs pkgs lib config;};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
lib,
|
lib,
|
||||||
|
|
@ -6,6 +7,9 @@
|
||||||
}: let
|
}: let
|
||||||
cargoFile = builtins.readFile ./cargo.toml;
|
cargoFile = builtins.readFile ./cargo.toml;
|
||||||
cargoConfig = builtins.replaceStrings ["/path/to/sccache" "/path/to/mold"] ["${pkgs.sccache}/bin/sccache" "${pkgs.mold}/bin/mold}"] cargoFile;
|
cargoConfig = builtins.replaceStrings ["/path/to/sccache" "/path/to/mold"] ["${pkgs.sccache}/bin/sccache" "${pkgs.mold}/bin/mold}"] cargoFile;
|
||||||
|
age.secrets.syncthing-NOcomputer.file = ../secrets/syncthing-NOcomputer.age;
|
||||||
|
age.secrets.syncthing-NOlaptop.file = ../secrets/syncthing-NOlaptop.age;
|
||||||
|
age.secrets.syncthing-uwuraid.file = ../secrets/syncthing-uwuraid.age;
|
||||||
in {
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./boxxy.nix
|
./boxxy.nix
|
||||||
|
|
@ -151,6 +155,57 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.syncthing = {
|
||||||
|
enable = true;
|
||||||
|
# user = "tao";
|
||||||
|
# dataDir = "/home/tao/sync";
|
||||||
|
# configDir = "/home/tao/.config/syncthing";
|
||||||
|
overrideDevices = true;
|
||||||
|
overrideFolders = true;
|
||||||
|
# openDefaultPorts = true;
|
||||||
|
settings = {
|
||||||
|
devices = {
|
||||||
|
# we do a lil anti-patterns https://github.com/ryantm/agenix?tab=readme-ov-file#builtinsreadfile-anti-pattern
|
||||||
|
# bootstrap by commenting out devices first and rebuild switch impurely
|
||||||
|
"nocomputer".id = builtins.readFile config.age.secrets.syncthing-NOcomputer.path;
|
||||||
|
"nolaptop".id = builtins.readFile config.age.secrets.syncthing-NOlaptop.path;
|
||||||
|
"uwuraid".id = builtins.readFile config.age.secrets.syncthing-uwuraid.path;
|
||||||
|
};
|
||||||
|
folders = let
|
||||||
|
devs = [
|
||||||
|
"nocomputer"
|
||||||
|
"nolaptop"
|
||||||
|
"uwuraid"
|
||||||
|
];
|
||||||
|
in {
|
||||||
|
# "documents" = {
|
||||||
|
# path = "/home/tao/documents";
|
||||||
|
# devices = devs;
|
||||||
|
# };
|
||||||
|
"pictures" = {
|
||||||
|
path = "/home/tao/pictures";
|
||||||
|
devices = devs;
|
||||||
|
};
|
||||||
|
"projects" = {
|
||||||
|
path = "/home/tao/projects";
|
||||||
|
devices = devs;
|
||||||
|
};
|
||||||
|
"school" = {
|
||||||
|
path = "/home/tao/school";
|
||||||
|
devices = devs;
|
||||||
|
};
|
||||||
|
"sync" = {
|
||||||
|
path = "/home/tao/sync";
|
||||||
|
devices = devs;
|
||||||
|
};
|
||||||
|
# "work" = {
|
||||||
|
# path = "/home/tao/work";
|
||||||
|
# devices = devs;
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
xdg.userDirs = {
|
xdg.userDirs = {
|
||||||
desktop = "desktop";
|
desktop = "desktop";
|
||||||
documents = "documents";
|
documents = "documents";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue