|
13 | 13 |
|
14 | 14 | nixinate = {
|
15 | 15 | # url = "github:MatthewCroughan/nixinate";
|
16 |
| - url = "github:J-Swift/nixinate/feature/allow-ssh-config-hostnames"; |
| 16 | + url = "github:J-Swift/nixinate/fix/macos-shm"; |
17 | 17 | inputs.nixpkgs.follows = "nixpkgs";
|
18 | 18 | };
|
19 | 19 | };
|
|
28 | 28 | apps = nixinate.nixinate.${eachSystem} self;
|
29 | 29 | devShell = import ./shell.nix { inherit pkgs; };
|
30 | 30 | }
|
31 |
| - ) // { |
| 31 | + ) // |
| 32 | + { |
32 | 33 | nixosConfigurations =
|
33 | 34 | let
|
34 | 35 | bato-system = "x86_64-linux";
|
35 |
| - stateVersion = "23.11"; |
| 36 | + hostname = "bato-nix"; |
| 37 | + stateVersion = "24.11"; |
36 | 38 | in
|
37 | 39 | {
|
38 |
| - bato-nix = |
| 40 | + ${hostname} = |
39 | 41 | let
|
40 | 42 | in nixpkgs.lib.nixosSystem
|
41 | 43 | rec {
|
|
49 | 51 |
|
50 | 52 | modules = [
|
51 | 53 | {
|
| 54 | + _module.args.nixinate = { |
| 55 | + host = "192.168.64.9"; |
| 56 | + sshUser = "root"; |
| 57 | + buildOn = "remote"; |
| 58 | + substituteOnTarget = true; |
| 59 | + hermetic = false; |
| 60 | + }; |
| 61 | + } |
| 62 | + |
| 63 | + { |
| 64 | + imports = [ |
| 65 | + nixos-generators.nixosModules.all-formats |
| 66 | + ]; |
| 67 | + } |
| 68 | + |
| 69 | + # boot loader |
| 70 | + { |
| 71 | + boot.initrd.availableKernelModules = [ "xhci_pci" "uhci_hcd" "ehci_pci" "ahci" "usbhid" "sd_mod" ]; |
| 72 | + boot.initrd.kernelModules = [ ]; |
| 73 | + boot.kernelModules = [ ]; |
| 74 | + boot.extraModulePackages = [ ]; |
| 75 | + |
| 76 | + boot.growPartition = true; |
| 77 | + |
| 78 | + boot.loader.grub = { |
| 79 | + enable = true; |
| 80 | + device = "nodev"; |
| 81 | + efiSupport = true; |
| 82 | + efiInstallAsRemovable = true; |
| 83 | + |
| 84 | + useOSProber = false; |
| 85 | + configurationLimit = 10; |
| 86 | + }; |
| 87 | + } |
| 88 | + |
| 89 | + { |
| 90 | + fileSystems."/" = { |
| 91 | + device = "/dev/disk/by-label/nixos"; |
| 92 | + fsType = "ext4"; |
| 93 | + autoResize = true; |
| 94 | + }; |
| 95 | + |
| 96 | + fileSystems."/boot" = { |
| 97 | + device = "/dev/disk/by-label/ESP"; |
| 98 | + fsType = "vfat"; |
| 99 | + }; |
| 100 | + |
| 101 | + swapDevices = [ ]; |
| 102 | + |
| 103 | + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking |
| 104 | + # (the default) this is the recommended approach. When using systemd-networkd it's |
| 105 | + # still possible to use this option, but it's recommended to use it in conjunction |
| 106 | + # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. |
| 107 | + networking.useDHCP = true; |
| 108 | + # networking.interfaces.enp0s1.useDHCP = lib.mkDefault true; |
| 109 | + |
| 110 | + nixpkgs.hostPlatform = "x86_64-linux"; |
| 111 | + |
| 112 | + boot.loader.grub.enable = true; |
| 113 | + |
52 | 114 | system.stateVersion = stateVersion;
|
53 | 115 | boot.kernelPackages = pkgs.linuxPackages_6_10;
|
54 | 116 |
|
55 |
| - users.users.root.password = "linux"; |
| 117 | + users.users.root = { |
| 118 | + password = "linux"; |
56 | 119 |
|
57 |
| - time.timeZone = "America/New_York"; |
58 |
| - services.openssh = { |
59 |
| - enable = true; |
60 |
| - settings.PermitRootLogin = "yes"; |
| 120 | + openssh.authorizedKeys.keys = [ |
| 121 | + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINpmysyMziDLKjj2Faps0jl0aTZETR67zlJmeuSLOR75 [email protected]" |
| 122 | + ]; |
61 | 123 | };
|
62 |
| - networking.hostName = "bato-nix"; |
| 124 | + |
| 125 | + services.openssh.enable = true; |
| 126 | + time.timeZone = "America/New_York"; |
| 127 | + networking.hostName = hostname; |
63 | 128 |
|
64 | 129 | i18n.defaultLocale = "en_US.UTF-8";
|
65 | 130 |
|
|
98 | 163 | what = "http://localhost:9843";
|
99 | 164 | where = "/mnt/utm-shared";
|
100 | 165 |
|
101 |
| - wantedBy = [ "multi-user.target" ]; |
| 166 | + after = [ "network-online.target" ]; |
| 167 | + wants = [ "network-online.target" ]; |
102 | 168 |
|
103 | 169 | type = "davfs";
|
104 |
| - # options = "noauto,_netdev,x-systemd.automount,cache=none,credentials=/etc/davfs${secretsPath}/cifs-credentials.txt"; |
105 |
| - options = "noauto,x-systemd.automount"; |
| 170 | + options = "x-systemd.automount"; |
106 | 171 |
|
107 | 172 | mountConfig = {
|
108 | 173 | DirectoryMode = "0777";
|
|
115 | 180 | {
|
116 | 181 | where = "/mnt/utm-shared";
|
117 | 182 |
|
118 |
| - after = [ "remote-fs-pre.target" ]; |
119 |
| - wants = [ "remote-fs-pre.target" ]; |
120 |
| - conflicts = [ "umount.target" ]; |
121 |
| - before = [ "umount.target" ]; |
122 |
| - wantedBy = [ "remote-fs.target" ]; |
| 183 | + after = [ "network-online.target" ]; |
| 184 | + wants = [ "network-online.target" ]; |
| 185 | + wantedBy = [ "multi-user.target" ]; |
123 | 186 |
|
124 | 187 | unitConfig = {
|
125 | 188 | DefaultDependencies = "no";
|
|
133 | 196 | ];
|
134 | 197 | }
|
135 | 198 |
|
136 |
| - { |
137 |
| - imports = [ |
138 |
| - nixos-generators.nixosModules.all-formats |
139 |
| - ]; |
140 |
| - |
141 |
| - formatConfigs.qcow = { config, lib, ... }: { }; |
142 |
| - } |
143 |
| - |
144 | 199 | {
|
145 | 200 | services.displayManager.autoLogin = {
|
146 | 201 | enable = true;
|
|
0 commit comments