Compare commits

...

2 commits

Author SHA1 Message Date
c3eab3b1ae
chore: Prepare for first install attempt 2025-05-05 14:07:27 -04:00
0585138161
flake.lock: Update
Flake lock file updates:

• Updated input 'disko':
    'github:nix-community/disko/51d33bbb7f1e74ba5f9d9a77357735149da99081?narHash=sha256-TNoetfICvd29DhxRPpmyKItQBDlqSvKcV%2BwGNkn14jk%3D' (2025-04-18)
  → 'github:nix-community/disko/b5d1320ebc2f34dbea4655f95167f55e2130cdb3?narHash=sha256-mLlkVX1kKbAa/Ns5u26wDYw4YW4ziMFM21fhtRmfirU%3D' (2025-05-05)
• Updated input 'disko/nixpkgs':
    follows 'nixpkgs-unstable'
  → 'github:NixOS/nixpkgs/f21e4546e3ede7ae34d12a84602a22246b31f7e0?narHash=sha256-thYTdWqCRipwPRxWiTiH1vusLuAy0okjOyzRx4hLWh4%3D' (2025-05-03)
• Removed input 'emacs-overlay'
• Removed input 'emacs-overlay/nixpkgs'
• Removed input 'emacs-overlay/nixpkgs-stable'
• Removed input 'home-manager'
• Removed input 'home-manager/nixpkgs'
• Updated input 'nh':
    'github:viperML/nh/9e9a4590b38b62b28f07a1fae973ce7b6ca0687a?narHash=sha256-bg%2BaAN8K90r3m/I%2BxXiXG0gawpbkshwlk93wxUN7KEk%3D' (2025-04-03)
  → 'github:viperML/nh/4eb1941c2e30f3dabbf24619c7ca7303c448983d?narHash=sha256-lFUHQdnDqnXXzigQn6Kd4aVrDDjg80HAb7DfThQNC/I%3D' (2025-05-05)
• Updated input 'nh/nixpkgs':
    follows 'nixpkgs-unstable'
  → 'github:NixOS/nixpkgs/537ee98218704e21ea465251de512ab6bbb9012e?narHash=sha256-5odz%2BNZszRya//Zd0P8h%2BsIwOnV35qJi%2B73f4I%2Biv1M%3D' (2025-05-03)
• Removed input 'nix-gaming'
• Removed input 'nix-gaming/flake-parts'
• Removed input 'nix-gaming/flake-parts/nixpkgs-lib'
• Removed input 'nix-gaming/nixpkgs'
• Added input 'nix-secrets':
    'git+https://git.terah.dev/imterah/sops?ref=main&rev=c07d110d71e32ff5fabf0219bc9cadab47d3d2a7&shallow=1' (2025-05-05)
• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/26d499fc9f1d567283d5d56fcf367edd815dba1d?narHash=sha256-FHlSkNqFmPxPJvy%2B6fNLaNeWnF1lZSgqVCl/eWaJRc4%3D' (2025-04-12)
  → 'github:nixos/nixpkgs/5b35d248e9206c1f3baf8de6a7683fee126364aa?narHash=sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc%3D' (2025-05-05)
• Removed input 'nixpkgs-unstable'
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/61154300d945f0b147b30d24ddcafa159148026a?narHash=sha256-pXyanHLUzLNd3MX9vsWG%2B6Z2hTU8niyphWstYEP3/GU%3D' (2025-04-14)
  → 'github:Mic92/sops-nix/5e3e92b16d6fdf9923425a8d4df7496b2434f39c?narHash=sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA%3D' (2025-04-22)
• Updated input 'sops-nix/nixpkgs':
    'github:NixOS/nixpkgs/f6db44a8daa59c40ae41ba6e5823ec77fe0d2124?narHash=sha256-QAd1L37eU7ktL2WeLLLTmI6P9moz9%2Ba/ONO8qNBYJgM%3D' (2025-04-12)
  → 'github:NixOS/nixpkgs/ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c?narHash=sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs%3D' (2025-04-17)
• Removed input 'zen-browser'
• Removed input 'zen-browser/nixpkgs'
2025-05-05 14:06:11 -04:00
6 changed files with 122 additions and 222 deletions

38
SETUP.md Normal file
View file

@ -0,0 +1,38 @@
# Bootstrapping a New Device
This guide assumes you have a somewhat sane sops setup.
1. First, boot the NixOS live environment (minimal ISO is recommended).
2. Then, get the harddrive ID using `lsblk` or `fdisk -l`:
```bash
sudo fdisk -l
ls -lah /dev/disk/by-id | grep -i <drive disk ID ie. sda>
```
Example output:
```bash
[nix-shell:~]$ sudo fdisk -l
Disk /dev/loop0: 1.14 GiB, 1221455872 bytes, 2385656 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 256 GiB, 274877906944 bytes, 536870912 sectors
Disk model: QEMU HARDDISK
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[nix-shell:~]$ ls -lah /dev/disk/by-id | grep -i sda
lrwxrwxrwx 1 root root 9 May 5 13:20 scsi-0QEMU_QEMU_HARDDISK_drive-scsi0 -> ../../sda
[nix-shell:~]$ # disk path: /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0
```
3. Manually create a host configuration by modifying/duplicating `hosts/<target_host_to_base_off_of>` to `hosts/<new_host_name>`. Be sure to modify the hostname in `hosts/<new_host_name>/configuration.nix`.
4. Add the host to `flake.nix`.
5. Modify the disko configuration for our host to use the correct disk ID that we found earlier.
6. Make any other additional modifications if needed.

254
flake.lock generated
View file

@ -2,16 +2,14 @@
"nodes": {
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1744940522,
"narHash": "sha256-TNoetfICvd29DhxRPpmyKItQBDlqSvKcV+wGNkn14jk=",
"lastModified": 1746411114,
"narHash": "sha256-mLlkVX1kKbAa/Ns5u26wDYw4YW4ziMFM21fhtRmfirU=",
"owner": "nix-community",
"repo": "disko",
"rev": "51d33bbb7f1e74ba5f9d9a77357735149da99081",
"rev": "b5d1320ebc2f34dbea4655f95167f55e2130cdb3",
"type": "github"
},
"original": {
@ -20,45 +18,6 @@
"type": "github"
}
},
"emacs-overlay": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
],
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1745169495,
"narHash": "sha256-e9+CfVIrI/iGZVjUeS/h/bOG/55MdvGwOP6m9ncz27Q=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "d24224780e6cb41af7b46a17d39306e5e982aa15",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"flake-utils": "flake-utils_2"
@ -95,27 +54,6 @@
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1744743431,
"narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"repo": "home-manager",
"type": "github"
}
},
"impermanence": {
"locked": {
"lastModified": 1737831083,
@ -133,16 +71,14 @@
},
"nh": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1743682999,
"narHash": "sha256-bg+aAN8K90r3m/I+xXiXG0gawpbkshwlk93wxUN7KEk=",
"lastModified": 1746442382,
"narHash": "sha256-lFUHQdnDqnXXzigQn6Kd4aVrDDjg80HAb7DfThQNC/I=",
"owner": "viperML",
"repo": "nh",
"rev": "9e9a4590b38b62b28f07a1fae973ce7b6ca0687a",
"rev": "4eb1941c2e30f3dabbf24619c7ca7303c448983d",
"type": "github"
},
"original": {
@ -151,97 +87,31 @@
"type": "github"
}
},
"nix-gaming": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": [
"nixpkgs-unstable"
]
},
"nix-secrets": {
"flake": false,
"locked": {
"lastModified": 1745114168,
"narHash": "sha256-x+HdFBsfRznwWPpnqXM3yaTVz2CcK5X/ThY6BA3PgcI=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "05b70003daf802fd5c0af3903fab5f23fef3c47c",
"type": "github"
"lastModified": 1746456167,
"narHash": "sha256-wOfe72o2Su+GcuHO6JERTzgCeo7O3mGtjgvfiD/KjGQ=",
"ref": "main",
"rev": "c07d110d71e32ff5fabf0219bc9cadab47d3d2a7",
"shallow": true,
"type": "git",
"url": "https://git.terah.dev/imterah/sops"
},
"original": {
"owner": "fufexan",
"repo": "nix-gaming",
"type": "github"
"ref": "main",
"shallow": true,
"type": "git",
"url": "https://git.terah.dev/imterah/sops"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1744440957,
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1743296961,
"narHash": "sha256-b1EdN3cULCqtorQ4QeWgLMrd5ZGOjLSLemfa00heasc=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "e4822aea2a6d1cdd36653c134cacfd64c97ff4fa",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1744440957,
"narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=",
"lastModified": 1746300365,
"narHash": "sha256-thYTdWqCRipwPRxWiTiH1vusLuAy0okjOyzRx4hLWh4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1744932701,
"narHash": "sha256-fusHbZCyv126cyArUwwKrLdCkgVAIaa/fQJYFlCEqiU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b024ced1aac25639f8ca8fdfc2f8c4fbd66c48ef",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1744502386,
"narHash": "sha256-QAd1L37eU7ktL2WeLLLTmI6P9moz9+a/ONO8qNBYJgM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f6db44a8daa59c40ae41ba6e5823ec77fe0d2124",
"rev": "f21e4546e3ede7ae34d12a84602a22246b31f7e0",
"type": "github"
},
"original": {
@ -251,18 +121,50 @@
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1746301764,
"narHash": "sha256-5odz+NZszRya//Zd0P8h+sIwOnV35qJi+73f4I+iv1M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "537ee98218704e21ea465251de512ab6bbb9012e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1736344531,
"narHash": "sha256-8YVQ9ZbSfuUk2bUf2KRj60NRraLPKPS0Q4QFTbc+c2c=",
"lastModified": 1746422338,
"narHash": "sha256-NTtKOTLQv6dPfRe00OGSywg37A1FYqldS6xiNmqBUYc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "bffc22eb12172e6db3c5dde9e3e5628f8e3e7912",
"rev": "5b35d248e9206c1f3baf8de6a7683fee126364aa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"ref": "nixos-24.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1744868846,
"narHash": "sha256-5RJTdUHDmj12Qsv7XOhuospjAjATNiTMElplWnJE9Hs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ebe4301cbd8f81c4f8d3244b3632338bbeb6d49c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
@ -270,28 +172,24 @@
"root": {
"inputs": {
"disko": "disko",
"emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils",
"home-manager": "home-manager",
"impermanence": "impermanence",
"nh": "nh",
"nix-gaming": "nix-gaming",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix",
"zen-browser": "zen-browser"
"nix-secrets": "nix-secrets",
"nixpkgs": "nixpkgs_3",
"sops-nix": "sops-nix"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": "nixpkgs_2"
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1744669848,
"narHash": "sha256-pXyanHLUzLNd3MX9vsWG+6Z2hTU8niyphWstYEP3/GU=",
"lastModified": 1745310711,
"narHash": "sha256-ePyTpKEJTgX0gvgNQWd7tQYQ3glIkbqcW778RpHlqgA=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "61154300d945f0b147b30d24ddcafa159148026a",
"rev": "5e3e92b16d6fdf9923425a8d4df7496b2434f39c",
"type": "github"
},
"original": {
@ -314,24 +212,6 @@
"repo": "default",
"type": "github"
}
},
"zen-browser": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1742688375,
"narHash": "sha256-yVsET+na0V2edU+5xZTchrZqbN7+uMOOtZ7FfZc79bg=",
"owner": "valnyx17",
"repo": "zen-browser-flake",
"rev": "05e9fd204ae043ceb1ed056460b4ca03fa413c12",
"type": "github"
},
"original": {
"owner": "valnyx17",
"repo": "zen-browser-flake",
"type": "github"
}
}
},
"root": "root",

View file

@ -5,13 +5,11 @@
flake-utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
sops-nix.url = "github:Mic92/sops-nix";
impermanence.url = "github:nix-community/impermanence";
nh = {
url = "github:viperML/nh";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
nix-secrets = {
url = "git+https://git.terah.dev/imterah/sops?shallow=1&ref=main";
@ -28,30 +26,23 @@
mkApp = flake-utils.lib.mkApp;
mkFlake = flake-utils.lib.mkFlake;
in mkFlake {
inherit self inputs nixpkgs;
overlays = import ./overlays.nix {inherit inputs;};
inherit self inputs nixpkgs;
sharedOverlays = [
self.overlays.additions
self.overlays.modifications
self.overlays.unstable-packages
hostDefaults.extraArgs = {inherit flake-utils;};
hostDefaults.specialArgs = {
inherit inputs;
inherit (self) outputs;
};
# Main Docker-based host
hosts.andromeda = {
system = "x86_64-linux";
modules = [
inputs.disko.nixosModules.default
(import ./hosts/andromeda/disko.nix {device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_drive-scsi0";})
inputs.impermanence.nixosModules.impermanence
./hosts/andromeda/configuration.nix
];
hostDefaults.extraArgs = {inherit flake-utils;};
hostDefaults.specialArgs = {
inherit inputs;
inherit (self) outputs;
};
# Main Docker-based host
hosts.andromeda = {
system = "x86_64-linux";
modules = [
inputs.disko.nixosModules.default
(import ./hosts/andromeda/disko.nix {device = "/dev/disk/by-id/nvme-Samsung_SSD_979_PRO_with_Heatsink_1TB_S6WSNJ0T900943T";})
inputs.impermanence.nixosModules.impermanence
./hosts/andromeda/configuration.nix
];
};
};
};
}

View file

@ -30,10 +30,7 @@
extraGroups = [
"wheel"
"networkmanager"
"audio"
"docker"
"input"
"plugdev"
];
openssh.authorizedKeys.keys = [

View file

@ -21,8 +21,6 @@
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp193s0f3u2u3.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -10,11 +10,7 @@
allowUnfreePredicate = _: true;
cudaSupport = true;
};
nixpkgs.overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
];
nix = let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
in {