Add odyssey machine
This commit is contained in:
@ -59,6 +59,15 @@
|
|||||||
];
|
];
|
||||||
specialArgs = { inherit lib inputs; };
|
specialArgs = { inherit lib inputs; };
|
||||||
};
|
};
|
||||||
|
odyssey = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
(import ./modules)
|
||||||
|
./hosts/odyssey
|
||||||
|
];
|
||||||
|
specialArgs = { inherit lib inputs; };
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
36
hosts/odyssey/README.md
Normal file
36
hosts/odyssey/README.md
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
# Odyssey
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
Primary workstation.
|
||||||
|
|
||||||
|
## Specs
|
||||||
|
* CPU - Intel Core i7-5930K @ 4.10GHz
|
||||||
|
* Chipset - Intel X99
|
||||||
|
* Memory - 64 GB DDR4
|
||||||
|
* Motherboard - ASUS X99-A
|
||||||
|
* GPU - NVIDIA RTX 3090
|
||||||
|
* Case - Thermaltake A500
|
||||||
|
|
||||||
|
### Disks
|
||||||
|
Device | Partitions _(filesystem, size, usage)_
|
||||||
|
--- | ---
|
||||||
|
Samsung 980 Pro | `/dev/nvme0n1p1` (EFI, 512 MiB, NixOS Boot) <br> `/dev/nvme0n1p2` (ZFS, 2 TiB, NixOS Root)
|
||||||
|
|
||||||
|
#### ZFS pool layout
|
||||||
|
```
|
||||||
|
rpool/
|
||||||
|
├── local
|
||||||
|
│ ├── nix
|
||||||
|
│ └── tmp
|
||||||
|
├── system
|
||||||
|
│ ├── root
|
||||||
|
│ └── var
|
||||||
|
└── user
|
||||||
|
└── home
|
||||||
|
```
|
||||||
|
|
||||||
|
See [Graham Christensen's article](https://grahamc.com/blog/nixos-on-zfs/#datasets) for the motivation behind these datasets.
|
||||||
|
|
||||||
|
### Networks
|
||||||
|
- DHCP on `10.0.1.0/24` subnet.
|
||||||
|
- Tailscale on `100.64.0.0/10` subnet. FQDN: `odyssey.mesh.vimium.net`.
|
54
hosts/odyssey/default.nix
Normal file
54
hosts/odyssey/default.nix
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib.my;
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
../desktop.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.systemd-boot.graceful = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "odyssey";
|
||||||
|
networking.hostId = "c5e68d78";
|
||||||
|
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
nix.package = pkgs.nixFlakes;
|
||||||
|
nix.extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
users.defaultUserShell = pkgs.zsh;
|
||||||
|
|
||||||
|
system.stateVersion = "22.11";
|
||||||
|
|
||||||
|
modules = {
|
||||||
|
desktop = {
|
||||||
|
apps.qbittorrent.enable = true;
|
||||||
|
browsers = {
|
||||||
|
firefox.enable = true;
|
||||||
|
};
|
||||||
|
media.graphics = {
|
||||||
|
raster.enable = true;
|
||||||
|
vector.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
dev = {
|
||||||
|
node.enable = true;
|
||||||
|
};
|
||||||
|
editors = {
|
||||||
|
neovim.enable = true;
|
||||||
|
};
|
||||||
|
security = {
|
||||||
|
gpg.enable = true;
|
||||||
|
pass.enable = true;
|
||||||
|
};
|
||||||
|
shell = {
|
||||||
|
git.enable = true;
|
||||||
|
zsh.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
64
hosts/odyssey/hardware-configuration.nix
Normal file
64
hosts/odyssey/hardware-configuration.nix
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
# 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 + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "rpool/system/root";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "rpool/user/home";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var" =
|
||||||
|
{ device = "rpool/system/var";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/tmp" =
|
||||||
|
{ device = "rpool/local/tmp";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/log" =
|
||||||
|
{ device = "rpool/system/var/log";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/var/tmp" =
|
||||||
|
{ device = "rpool/system/var/tmp";
|
||||||
|
fsType = "zfs";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/E63E-8E75";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
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.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
# high-resolution display
|
||||||
|
hardware.video.hidpi.enable = lib.mkDefault true;
|
||||||
|
}
|
Reference in New Issue
Block a user