From a2dc4024e086a6a18a44e36ab3d921cf535a9e88 Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Mon, 12 Aug 2024 16:12:03 +0100 Subject: [PATCH 1/3] syncthing: add extra shares --- README.md | 7 ++++--- hosts/tohru/syncthing.nix | 31 ++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e70385b..0b0fb40 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,15 @@ The canonical location for this repository is https://git.qenya.tel/qenya/nixfil ## Machines -### In this config +### Managed * `tohru`: Dell Latitude 5300, personal laptop -* `yevaud`: Oracle Cloud free AMD VM, hosts a Forgejo instance -* `orm`: Oracle Cloud free AMD VM, WireGuard server for the other machines in the network +* `yevaud`: Oracle Cloud free AMD VM, hosts a Forgejo instance and WireGuard server for the other machines in the network +* `orm`: Oracle Cloud free AMD VM, currently idling ### Referenced only * `kilgharrah`: Custom-built personal desktop, currently running Arch * `shaw`: [My girlfriend's NAS](https://github.com/randomnetcat/nix-configs/tree/main/hosts/shaw) +* `latias`: My Steam Deck ## Usage diff --git a/hosts/tohru/syncthing.nix b/hosts/tohru/syncthing.nix index 0bd239c..a7820bd 100644 --- a/hosts/tohru/syncthing.nix +++ b/hosts/tohru/syncthing.nix @@ -11,12 +11,41 @@ settings = { devices = { "kilgharrah" = { id = "RDT7IGD-76FZ6LY-37PPB2W-DWPQRPR-LZ4AXF7-4GIIHYJ-RVXUUSG-ZXPN3AZ"; }; + "latias" = { id = "EN4W2SB-LB4AAZQ-6AQIE7G-S3BSCSP-V2EUNMM-KAQEHW3-PPAPGBO-PXRPWAL"; }; + "shaw" = { id = "NC7WMZS-GQETJYR-IAYGD65-GHTSTVP-VAAG43K-W7N3LO5-C5OQMZ2-DTK6YA7"; }; }; folders = { + "Sync" = { + id = "uln2v-zwzwj"; + path = "~/Sync"; + devices = [ "kilgharrah" "shaw" ]; + }; + "Documents" = { id = "alp59-7gs9s"; path = "~/Documents"; - devices = [ "kilgharrah" ]; + devices = [ "kilgharrah" "shaw" ]; + }; + "Music" = { + id = "7xvkf-y62s7"; + path = "~/Music"; + devices = [ "kilgharrah" "shaw" ]; + }; + "Pictures" = { + id = "tbmhx-ep7wk"; + path = "~/Pictures"; + devices = [ "kilgharrah" "shaw" ]; + }; + + "ES-DE" = { + id = "c1cbh-llw94"; + path = "~/ES-DE"; + devices = [ "kilgharrah" "latias" "shaw" ]; + }; + "ROMs" = { + id = "dcze4-v6act"; + path = "~/ROMs"; + devices = [ "kilgharrah" "latias" "shaw" ]; }; }; }; From 6e2d30751bb27f86eb877f7afb706ea8f780f5bf Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Mon, 12 Aug 2024 19:31:00 +0100 Subject: [PATCH 2/3] npins update --- npins/sources.json | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/npins/sources.json b/npins/sources.json index 96e2f3f..2865bf3 100644 --- a/npins/sources.json +++ b/npins/sources.json @@ -22,9 +22,9 @@ "url": "https://git.qenya.tel/qenya/birdsong.git" }, "branch": "main", - "revision": "752faa333d5686b5457e6c956d015bd6ec4e3eca", + "revision": "2fd6d96a00ef69a2afe72a2fe9d18d759c1cc8f3", "url": null, - "hash": "1zl4zwkqapwmghbmzcpfzm4sfmmfxvp8j5bk241zmkvi8frlx1jf" + "hash": "100l0mjfikv3sjphjb9aw2qhvqz7p616px1rl2gm1f5z9iljy7fp" }, "home-manager": { "type": "Git", @@ -46,15 +46,15 @@ "repo": "nix-vscode-extensions" }, "branch": "master", - "revision": "500be2a1404429cfccdb4bf71e515cc38f206a25", - "url": "https://github.com/nix-community/nix-vscode-extensions/archive/500be2a1404429cfccdb4bf71e515cc38f206a25.tar.gz", - "hash": "0w01kcnjpwb9zfsw066lnq0l84w28nbryfrdbddnl768l30rbz63" + "revision": "7270c841614adb30d02e97cdb1a81e3757cef092", + "url": "https://github.com/nix-community/nix-vscode-extensions/archive/7270c841614adb30d02e97cdb1a81e3757cef092.tar.gz", + "hash": "0y86hbymlz41vmgs9h1f2lgyb8vlchvdrgrx1jpw9brfshnxy6d6" }, "nixpkgs": { "type": "Channel", "name": "nixos-24.05", - "url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.3268.d0907b75146a/nixexprs.tar.xz", - "hash": "1j40g3ms1pqldmx9pfhw4mslhxnrnklj0phwhzgk5g3m5hczb1j6" + "url": "https://releases.nixos.org/nixos/24.05/nixos-24.05.3787.a781ff33ae25/nixexprs.tar.xz", + "hash": "1kjpxcxgf9nd6a18kdq5y2l379mb1rg57imxdx46rbl0aif7w12x" }, "nur": { "type": "Git", @@ -64,9 +64,9 @@ "repo": "NUR" }, "branch": "master", - "revision": "f769fc25d19d5521a997686ffd66c08a3d23334f", - "url": "https://github.com/nix-community/NUR/archive/f769fc25d19d5521a997686ffd66c08a3d23334f.tar.gz", - "hash": "1jrllqirq1jig9v7f7r9h5jmywcia7h7qdfn58z8gq24vbp8j0h4" + "revision": "a4f1c6cf98a629c082edc90fd84be7cc4525e244", + "url": "https://github.com/nix-community/NUR/archive/a4f1c6cf98a629c082edc90fd84be7cc4525e244.tar.gz", + "hash": "0c7j5px26vasr9r9xx4r4s7hkwfc31rcsqivn5cal0zwjyvbdg3z" } }, "version": 3 From e2f5407c757fdfb9d5205b9f0ba276c673b6b4bd Mon Sep 17 00:00:00 2001 From: Katherina Walshe-Grey Date: Mon, 12 Aug 2024 19:37:39 +0100 Subject: [PATCH 3/3] hosts: add kalessin --- hive.nix | 11 +++++ hosts/kalessin/configuration.nix | 12 ++++++ hosts/kalessin/hardware-configuration.nix | 52 +++++++++++++++++++++++ 3 files changed, 75 insertions(+) create mode 100644 hosts/kalessin/configuration.nix create mode 100644 hosts/kalessin/hardware-configuration.nix diff --git a/hive.nix b/hive.nix index 43603b8..23baf32 100644 --- a/hive.nix +++ b/hive.nix @@ -59,4 +59,15 @@ in { ./hosts/orm/configuration.nix ]; }; + + kalessin = { name, nodes, ... }: { + networking.hostId = "534b538e"; + time.timeZone = "Etc/UTC"; + deployment.buildOnTarget = true; + + imports = [ + ./deployment/remote.nix + ./hosts/kalessin/configuration.nix + ]; + }; } diff --git a/hosts/kalessin/configuration.nix b/hosts/kalessin/configuration.nix new file mode 100644 index 0000000..84c9f82 --- /dev/null +++ b/hosts/kalessin/configuration.nix @@ -0,0 +1,12 @@ +{ config, lib, pkgs, ... }: + +{ + imports = [ + ./hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + system.stateVersion = "23.11"; +} diff --git a/hosts/kalessin/hardware-configuration.nix b/hosts/kalessin/hardware-configuration.nix new file mode 100644 index 0000000..53ff439 --- /dev/null +++ b/hosts/kalessin/hardware-configuration.nix @@ -0,0 +1,52 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/profiles/qemu-guest.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "virtio_scsi" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "rpool_kalessin/root"; + fsType = "zfs"; + }; + + fileSystems."/nix" = + { device = "rpool_kalessin/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = + { device = "rpool_kalessin/var"; + fsType = "zfs"; + }; + + fileSystems."/data" = + { device = "rpool_kalessin/data"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2ADE-A033"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s6.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; +}