Skip to content

Commit

Permalink
host: add sakhalin
Browse files Browse the repository at this point in the history
  • Loading branch information
ocfox committed Feb 1, 2024
1 parent c9a04f1 commit f6d1ef7
Show file tree
Hide file tree
Showing 7 changed files with 78 additions and 1 deletion.
19 changes: 18 additions & 1 deletion hosts/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@ let
};
transformer = inputs.haumea.lib.transformers.liftDefault;
};

sakhalin-module = { pkgs, ... }@args: inputs.haumea.lib.load {
src = ./sakhalin;
inputs = args // {
inherit inputs;
};
transformer = inputs.haumea.lib.transformers.liftDefault;
};
in
{
whitefox = nixpkgs.lib.nixosSystem {
Expand Down Expand Up @@ -67,6 +75,15 @@ in
inputs.bin.nixosModules.default
redfox-module
];
specialArgs = { inherit inputs username home; };
specialArgs = { inherit inputs; };
};

sakhalin = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./sakhalin/_hardware.nix
sakhalin-module
];
specialArgs = { inherit inputs; };
};
}
8 changes: 8 additions & 0 deletions hosts/sakhalin/_hardware.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{ modulesPath, ... }:
{
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
boot.loader.grub.device = "/dev/nvme0n1";
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ];
boot.initrd.kernelModules = [ "nvme" ];
fileSystems."/" = { device = "/dev/nvme0n1p1"; fsType = "ext4"; };
}
16 changes: 16 additions & 0 deletions hosts/sakhalin/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{ pkgs, ... }: {

environment.systemPackages = with pkgs; [
curl
htop
wget
git
];

users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOqoRDiXXxBKU0FjnT2YcFnczYBKMKXGPgD9IVfBg5gq"
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIHnLWTS5/vPyPFY+tCVYn3Ejf3NQpQzcGnWLQTyE7lbzAAAAC3NzaDpwYXNzZm94"
];

system.stateVersion = "24.05";
}
9 changes: 9 additions & 0 deletions hosts/sakhalin/networking.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
hostName = "sakhalin";
firewall.allowedTCPPorts = [ 80 443 ];
firewall.allowedUDPPorts = [ 443 11111 ];
firewall.enable = false;

useDHCP = true;
useNetworkd = true;
}
17 changes: 17 additions & 0 deletions hosts/sakhalin/nix.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{ inputs }:
{
registry = {
nixpkgs.flake = inputs.nixpkgs;
};

extraOptions = ''
experimental-features = nix-command flakes
'';

channel.enable = false;

settings = {
nix-path = [ "nixpkgs=${inputs.nixpkgs}" ];
auto-optimise-store = true;
};
}
6 changes: 6 additions & 0 deletions hosts/sakhalin/nixpkgs.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
config = {
allowUnfree = true;
allowBroken = true;
};
}
4 changes: 4 additions & 0 deletions hosts/sakhalin/services.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{ pkgs }:
{
openssh.enable = true;
}

0 comments on commit f6d1ef7

Please sign in to comment.