2023-02-18 15:24:54 +00:00
|
|
|
# The Swan
|
|
|
|
# System configuration for my home NAS server
|
|
|
|
|
|
|
|
{ inputs, globals, overlays, ... }:
|
|
|
|
|
|
|
|
with inputs;
|
|
|
|
|
|
|
|
nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
specialArgs = { };
|
|
|
|
modules = [
|
|
|
|
./hardware-configuration.nix
|
2023-02-21 01:37:37 +00:00
|
|
|
../../modules/common
|
|
|
|
../../modules/nixos
|
2023-02-25 14:57:58 +00:00
|
|
|
(removeAttrs globals [ "mail.server" ])
|
2023-02-18 15:24:54 +00:00
|
|
|
wsl.nixosModules.wsl
|
|
|
|
home-manager.nixosModules.home-manager
|
2023-02-25 14:45:49 +00:00
|
|
|
disko.nixosModules.disko
|
2023-02-18 15:24:54 +00:00
|
|
|
{
|
|
|
|
server = true;
|
2023-02-25 16:22:31 +00:00
|
|
|
zfs.enable = true;
|
2023-02-26 13:23:31 +00:00
|
|
|
|
2023-02-27 00:53:51 +00:00
|
|
|
disko = {
|
|
|
|
enableConfig = true;
|
2023-02-27 01:49:46 +00:00
|
|
|
devices = (import ../../disks/root.nix { disk = "/dev/nvme0n1"; });
|
|
|
|
# // (import ../../disks/zfs.nix {
|
|
|
|
# pool = "tank";
|
|
|
|
# disks = [ "/dev/sda" "/dev/sdb" "/dev/sdc" ];
|
|
|
|
# });
|
2023-02-27 00:53:51 +00:00
|
|
|
};
|
|
|
|
|
2023-02-26 13:23:31 +00:00
|
|
|
# head -c 8 /etc/machine-id
|
|
|
|
networking.hostId = "600279f4"; # Random ID required for ZFS
|
|
|
|
|
2023-02-18 15:24:54 +00:00
|
|
|
gui.enable = false;
|
|
|
|
theme = { colors = (import ../../colorscheme/gruvbox).dark; };
|
|
|
|
nixpkgs.overlays = overlays;
|
|
|
|
wsl.enable = false;
|
|
|
|
caddy.enable = true;
|
|
|
|
|
|
|
|
networking.hostName = "swan";
|
|
|
|
|
|
|
|
# Disable passwords, only use SSH key
|
|
|
|
publicKey =
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB+AbmjGEwITk5CK9y7+Rg27Fokgj9QEjgc9wST6MA3s";
|
|
|
|
|
|
|
|
# Clone dotfiles
|
|
|
|
dotfiles.enable = true;
|
|
|
|
|
|
|
|
neovim.enable = true;
|
|
|
|
|
2023-02-25 16:22:31 +00:00
|
|
|
# boot.zfs.enabled = true;
|
|
|
|
# boot.kernelPackages =
|
|
|
|
# config.boot.zfs.package.latestCompatibleLinuxPackages;
|
2023-02-25 14:45:49 +00:00
|
|
|
# boot.zfs.extraPools = [ "mypool" ];
|
|
|
|
# services.zfs.autoScrub.enable = true;
|
|
|
|
# services.zfs.autoScrub.interval = "daily";
|
2023-02-18 15:24:54 +00:00
|
|
|
|
2023-02-25 14:45:49 +00:00
|
|
|
# services.nfs.server.enable = true;
|
2023-02-18 15:24:54 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
];
|
|
|
|
}
|