5 files changed,
5 insertions(+),
114 deletions(-)
Author:
Oleksandr Smirnov
olexsmir@gmail.com
Committed at:
2026-08-15 10:51:09 +0300
Authored at:
2026-08-15 10:43:59 +0300
Parent:
cede8e6
M
nix/hosts/thought/configuration.nix
··· 1 1 { pkgs, ... }: { 2 2 imports = [ 3 - ./digitalocean.nix 4 3 ./disko-config.nix 5 4 ./hardware-configuration.nix 6 5 ]; ··· 10 9 boot.loader.grub = { 11 10 efiSupport = true; 12 11 efiInstallAsRemovable = true; 12 + # No device install: Azure VHD boots via the EFI-removable path (BOOTX64.EFI). 13 + device = "nodev"; 13 14 }; 14 15 15 16 swapDevices = [ {
D
nix/hosts/thought/digitalocean.nix
··· 1 -{ lib, modulesPath, ... }: 2 -{ 3 - imports = [ 4 - "${modulesPath}/virtualisation/digital-ocean-config.nix" 5 - ]; 6 - 7 - # do not use DHCP, as DigitalOcean provisions IPs using cloud-init 8 - networking.useDHCP = lib.mkForce false; 9 - 10 - # Disables all modules that do not work with NixOS 11 - services.cloud-init = { 12 - enable = true; 13 - network.enable = true; 14 - settings = { 15 - datasource_list = [ 16 - "ConfigDrive" 17 - "Digitalocean" 18 - ]; 19 - datasource.ConfigDrive = { }; 20 - datasource.Digitalocean = { }; 21 - # Based on https://github.com/canonical/cloud-init/blob/main/config/cloud.cfg.tmpl 22 - cloud_init_modules = [ 23 - "seed_random" 24 - "bootcmd" 25 - "write_files" 26 - "growpart" 27 - "resizefs" 28 - "set_hostname" 29 - "update_hostname" 30 - # Not support on NixOS 31 - #"update_etc_hosts" 32 - # throws error 33 - #"users-groups" 34 - # tries to edit /etc/ssh/sshd_config 35 - #"ssh" 36 - "set_password" 37 - ]; 38 - cloud_config_modules = [ 39 - "ssh-import-id" 40 - "keyboard" 41 - # doesn't work with nixos 42 - #"locale" 43 - "runcmd" 44 - "disable_ec2_metadata" 45 - ]; 46 - ## The modules that run in the 'final' stage 47 - cloud_final_modules = [ 48 - "write_files_deferred" 49 - "puppet" 50 - "chef" 51 - "ansible" 52 - "mcollective" 53 - "salt_minion" 54 - "reset_rmc" 55 - # install dotty agent fails 56 - #"scripts_vendor" 57 - "scripts_per_once" 58 - "scripts_per_boot" 59 - # /var/lib/cloud/scripts/per-instance/machine_id.sh has broken shebang 60 - #"scripts_per_instance" 61 - "scripts_user" 62 - "ssh_authkey_fingerprints" 63 - "keys_to_console" 64 - "install_hotplug" 65 - "phone_home" 66 - "final_message" 67 - ]; 68 - }; 69 - }; 70 -}
M
nix/hosts/thought/disko-config.nix
··· 1 -{ lib, ... }: 2 -{ 1 +{ lib, ... }: { 3 2 disko.devices = { 4 3 disk.disk1 = { 5 - device = lib.mkDefault "/dev/vda"; 4 + device = lib.mkDefault "/dev/sda"; 6 5 type = "disk"; 7 6 content = { 8 7 type = "gpt"; 9 8 partitions = { 10 - boot = { 11 - name = "boot"; 12 - size = "1M"; 13 - type = "EF02"; 14 - }; 15 9 esp = { 16 10 name = "ESP"; 17 11 size = "500M"; ··· 26 20 name = "root"; 27 21 size = "100%"; 28 22 content = { 29 - type = "lvm_pv"; 30 - vg = "pool"; 31 - }; 32 - }; 33 - }; 34 - }; 35 - }; 36 - lvm_vg = { 37 - pool = { 38 - type = "lvm_vg"; 39 - lvs = { 40 - root = { 41 - size = "100%FREE"; 42 - content = { 43 23 type = "filesystem"; 44 24 format = "ext4"; 45 25 mountpoint = "/"; 46 - mountOptions = [ 47 - "defaults" 48 - ]; 26 + mountOptions = [ "defaults" ]; 49 27 }; 50 28 }; 51 29 };
D
nix/modules/services/music.nix
··· 1 -{ config, ... }: { 2 - services.caddy.virtualHosts."music.olexsmir.xyz".extraConfig = '' 3 - reverse_proxy localhost:4533 4 - ''; 5 - 6 - services.navidrome = { 7 - enable = true; 8 - settings = { 9 - MusicFolder = "/mnt/music"; 10 - }; 11 - }; 12 - 13 - # services.slskd= { 14 - # enable = true; 15 - # 16 - # }; 17 -}