hosts/alyssum: init
This commit is contained in:
parent
cc43450dd1
commit
0f7393714f
6 changed files with 90 additions and 0 deletions
|
|
@ -80,6 +80,7 @@
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
nixosConfigurations."alyssum" = mkSystem nixpkgs "alyssum" "x86_64-linux" [];
|
||||||
nixosConfigurations."anemone" = mkSystem nixpkgs "anemone" "x86_64-linux" [];
|
nixosConfigurations."anemone" = mkSystem nixpkgs "anemone" "x86_64-linux" [];
|
||||||
nixosConfigurations."dandelion" = mkSystem nixpkgs "dandelion" "aarch64-linux" [];
|
nixosConfigurations."dandelion" = mkSystem nixpkgs "dandelion" "aarch64-linux" [];
|
||||||
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" [];
|
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" [];
|
||||||
|
|
|
||||||
28
hosts/alyssum/default.nix
Normal file
28
hosts/alyssum/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{ inputs, modules, modulesPath, ... }: {
|
||||||
|
networking.hostName = "alyssum";
|
||||||
|
system.stateVersion = "25.11";
|
||||||
|
time.timeZone = "Australia/Melbourne";
|
||||||
|
|
||||||
|
age.secrets = {
|
||||||
|
# acme_dns.file = ../../secrets/acme_dns.age;
|
||||||
|
};
|
||||||
|
|
||||||
|
imports = with modules.system; [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
home-manager
|
||||||
|
|
||||||
|
base
|
||||||
|
kernel
|
||||||
|
nix-stable
|
||||||
|
packages
|
||||||
|
security
|
||||||
|
|
||||||
|
./filesystem.nix
|
||||||
|
./kernel.nix
|
||||||
|
./networking.nix
|
||||||
|
|
||||||
|
../../users/hana
|
||||||
|
];
|
||||||
|
|
||||||
|
me.environment = "headless";
|
||||||
|
}
|
||||||
34
hosts/alyssum/filesystem.nix
Normal file
34
hosts/alyssum/filesystem.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{ ... }:
|
||||||
|
let
|
||||||
|
bind = src: {
|
||||||
|
depends = [ "/nix" ];
|
||||||
|
device = src;
|
||||||
|
fsType = "none";
|
||||||
|
neededForBoot = true;
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
mkLabelMount = label: type: {
|
||||||
|
device = "/dev/disk/by-label/${label}";
|
||||||
|
fsType = type;
|
||||||
|
options = [ "defaults" "relatime" ];
|
||||||
|
};
|
||||||
|
mkBtrfsMount = name: subvol: atime: mkLabelMount name "btrfs" // {
|
||||||
|
options = [ "autodefrag" "compress=zstd:3" "defaults" "discard=async" "space_cache=v2" "ssd" "subvol=${subvol}" (if atime then "relatime" else "noatime") ];
|
||||||
|
};
|
||||||
|
submount = mkBtrfsMount "alyssum";
|
||||||
|
in {
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "rootfs";
|
||||||
|
fsType = "tmpfs";
|
||||||
|
options = [ "defaults" "size=8G" "mode=755" ];
|
||||||
|
};
|
||||||
|
"/boot" = mkLabelMount "stem" "vfat";
|
||||||
|
|
||||||
|
"/nix" = submount "/@/nix" false;
|
||||||
|
"/persist" = (submount "/@/persist" true) // { neededForBoot = true; };
|
||||||
|
"/persist/.snapshots" = submount "/snap/persist" false;
|
||||||
|
"/var/log/journal" = bind "/persist/journal";
|
||||||
|
};
|
||||||
|
}
|
||||||
10
hosts/alyssum/kernel.nix
Normal file
10
hosts/alyssum/kernel.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }: {
|
||||||
|
boot = {
|
||||||
|
loader = {
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
};
|
||||||
|
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" ];
|
||||||
|
initrd.kernelModules = [ "nvme" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
3
hosts/alyssum/networking.nix
Normal file
3
hosts/alyssum/networking.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ ... }: {
|
||||||
|
networking.useDHCP = true;
|
||||||
|
}
|
||||||
14
hosts/alyssum/packages.nix
Normal file
14
hosts/alyssum/packages.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
git
|
||||||
|
htop
|
||||||
|
jq
|
||||||
|
neovim
|
||||||
|
rsync
|
||||||
|
sshfs
|
||||||
|
wget
|
||||||
|
|
||||||
|
kitty.terminfo
|
||||||
|
];
|
||||||
|
environment.variables.EDITOR = "nvim";
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue