Add cherry
This commit is contained in:
parent
7b502cc207
commit
87f2efe3ce
4 changed files with 68 additions and 0 deletions
|
@ -51,6 +51,14 @@
|
|||
specialArgs = args;
|
||||
};
|
||||
|
||||
# Raspberry Pi hosting my website
|
||||
"cherry" = lib.nixosSystem {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
./system/cherry/core.nix
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# Configurations for non-NixOS machines.
|
||||
|
|
|
@ -6,6 +6,7 @@ in with lib; {
|
|||
|
||||
options.custom.nix = {};
|
||||
|
||||
# TODO: Add strawberry as a build machine here
|
||||
config = {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nix.extraOptions = ''
|
||||
|
|
50
system/cherry/core.nix
Normal file
50
system/cherry/core.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{ pkgs, ... }: {
|
||||
|
||||
boot.loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "cherry";
|
||||
interfaces.eth0.useDHCP = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
# TODO: Set up strawberry as a substituter
|
||||
# TODO: Set up nixbuild.net
|
||||
# TODO: Figure out how to make it safe to use other machines as remote
|
||||
# builders.
|
||||
distributedBuilds = false;
|
||||
buildMachines = [];
|
||||
};
|
||||
|
||||
documentation.enable = false;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# User for running the website service
|
||||
users.users."website" = {
|
||||
isSystemUser = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
git
|
||||
] ++ (import ../../shared/env.nix pkgs);
|
||||
|
||||
users.users."root" = {
|
||||
# Allow access to this server from all the machines
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
../dev-lt-63/riley.pub
|
||||
../strawberry/riley.pub
|
||||
../lime/riley.pub
|
||||
];
|
||||
};
|
||||
|
||||
}
|
|
@ -13,6 +13,15 @@
|
|||
interfaces."enp9s0".useDHCP = true;
|
||||
};
|
||||
|
||||
nix = {
|
||||
sshServe.enable = true;
|
||||
sshServe.keys = [
|
||||
(builtins.readFile ../cherry/keys/root.pub)
|
||||
# (builtins.readFile ../dev-lt-63/keys/riley.pub)
|
||||
# (builtins.readFile ../lime/keys/riley.pub)
|
||||
];
|
||||
};
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
|
|
Loading…
Reference in a new issue