summaryrefslogtreecommitdiff
path: root/configurations/melian/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'configurations/melian/default.nix')
-rw-r--r--configurations/melian/default.nix116
1 files changed, 2 insertions, 114 deletions
diff --git a/configurations/melian/default.nix b/configurations/melian/default.nix
index 8540c24..a3dbe35 100644
--- a/configurations/melian/default.nix
+++ b/configurations/melian/default.nix
@@ -1,27 +1,9 @@
{
- config,
- inputs,
lib,
pkgs,
...
}:
with lib; {
- secrets = {
- wireguard-private-key-melian.file = "${inputs.self}/secrets/wireguard-private-key-melian";
-
- syncthing-cert-melian = with config.services.syncthing; {
- file = "${inputs.self}/secrets/syncthing-cert-melian";
- owner = user;
- inherit group;
- };
-
- syncthing-key-melian = with config.services.syncthing; {
- file = "${inputs.self}/secrets/syncthing-key-melian";
- owner = user;
- inherit group;
- };
- };
-
nixfiles.modules = {
profiles.dev = {
containers.enable = true;
@@ -34,16 +16,9 @@ with lib; {
steam.enable = true;
};
- wireguard = {
- privateKeyFile = config.secrets.wireguard-private-key-melian.path;
- client.enable = true;
- };
+ wireguard.client.enable = true;
- syncthing = with config.secrets; {
- enable = true;
- key = syncthing-key-melian.path;
- cert = syncthing-cert-melian.path;
- };
+ syncthing.enable = true;
beets.enable = true;
bluetooth.enable = true;
@@ -54,93 +29,6 @@ with lib; {
throttled.enable = true;
};
- # TODO Move to a separate module so that it could be reused on other desktops
- # in the future.
- hm = {
- home.packages = with pkgs; [
- (aspellWithDicts (p: with p; [en ru]))
- calibre
- kotatogram-desktop
- nheko
- tor-browser
- ];
-
- accounts.email = {
- maildirBasePath = "${config.my.home}/mail";
-
- accounts = let
- mkAccount = attrs:
- mkMerge [
- {
- mbsync = {
- enable = true;
- create = "both";
- expunge = "both";
- patterns = ["*"];
- };
- msmtp.enable = true;
- mu.enable = true;
- }
- attrs
- ];
-
- pass = path: "${pkgs.pass}/bin/pass show ${path}";
- in {
- shire = mkAccount {
- address = my.email;
- gpg = {
- inherit (my.pgp) key;
- signByDefault = true;
- encryptByDefault = false;
- };
-
- primary = true;
-
- imap.host = "shire.me";
- smtp.host = "shire.me";
- userName = "azahi@shire.me";
- passwordCommand = pass "email/shire.me/azahi";
- };
-
- yahoo = mkAccount {
- address = "a.gondor@yahoo.com";
-
- imap.host = "imap.yahoo.com";
- smtp.host = "smtp.yahoo.com";
- userName = "a.gondor@yahoo.com";
- passwordCommand = pass "email/yahoo.com/a.gondor";
- };
- };
- };
-
- programs = {
- mbsync.enable = true;
- msmtp.enable = true;
- mu.enable = true;
-
- ssh.matchBlocks = let
- mkBlock = {
- hostname,
- port ? 22022,
- user ? "azahi",
- }: {
- inherit hostname port user;
- identityFile = "${config.my.home}/.ssh/id_ed25519";
- };
- mkInternalHostname = hostname: "${hostname}.${my.domain.shire}";
- in
- with my.configurations; {
- # TODO Wrap this.
- manwe = mkBlock {hostname = mkInternalHostname "manwe";};
- manwe-init = mkBlock {hostname = manwe.ipv4.address;};
- varda = mkBlock {hostname = mkInternalHostname "varda";};
- varda-init = mkBlock {hostname = varda.ipv4.address;};
- yavanna = mkBlock {hostname = mkInternalHostname "yavanna";};
- yavanna-init = mkBlock {hostname = yavanna.ipv4.address;};
- };
- };
- };
-
networking = {
interfaces = {
eth0.useDHCP = true;