Adds comments.
This commit is contained in:
parent
00ad5f6c8c
commit
403edc9219
10
citrus.nix
10
citrus.nix
|
@ -2,20 +2,27 @@
|
|||
{
|
||||
system.stateVersion = "23.05";
|
||||
|
||||
# Enables flakes and the updated `nix` command
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# Enables opengl support
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
# Includes packages needed for startx
|
||||
environment.systemPackages = with pkgs; [
|
||||
xorg.xauth xorg.xinit
|
||||
];
|
||||
];
|
||||
|
||||
users = {
|
||||
# No need to edit users on a single-purpose system.
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
# My authorized keys are used for remote access
|
||||
# CHANGE THIS if forking
|
||||
root.openssh.authorizedKeys.keyFiles = [
|
||||
./authorized_keys
|
||||
];
|
||||
# Unprivledged user for running the application.
|
||||
appuser = {
|
||||
isNormalUser = true;
|
||||
group = "appuser";
|
||||
|
@ -27,6 +34,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Allow SSH with authorized keys only!
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PasswordAuthentication = false;
|
||||
|
|
12
flake.nix
12
flake.nix
|
@ -12,7 +12,8 @@
|
|||
|
||||
outputs = inputs@{self, nixpkgs, flake-utils, ...}:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
let
|
||||
# nixpkgs for native system.
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
|
@ -20,6 +21,7 @@
|
|||
inputs.colmena.overlay
|
||||
];
|
||||
};
|
||||
# Native VM config.
|
||||
clementine = nixpkgs.lib.nixosSystem {
|
||||
inherit pkgs;
|
||||
modules = [
|
||||
|
@ -27,28 +29,34 @@
|
|||
./platforms/clementine.nix
|
||||
];
|
||||
};
|
||||
in rec {
|
||||
in rec {
|
||||
# Install colmena in dev shell for deployment.
|
||||
devShell = pkgs.mkShell {
|
||||
packages = with pkgs; [ colmena ];
|
||||
};
|
||||
# Run testing VM using `nix run`
|
||||
packages.default = clementine.config.system.build.vm;
|
||||
}) // (let
|
||||
# Target device (RPi3 aarch64) nixpkgs.
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
overlays = [ inputs.graphfix.overlay ];
|
||||
};
|
||||
# Modules for colmena and sd card image are the same.
|
||||
modules = [
|
||||
./citrus.nix
|
||||
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||
./platforms/orange.nix
|
||||
];
|
||||
in {
|
||||
# Colmena deploy manifest
|
||||
colmena = {
|
||||
meta.nixpkgs = pkgs;
|
||||
orange = {
|
||||
imports = modules;
|
||||
};
|
||||
};
|
||||
# SD card image build.
|
||||
orange = (nixpkgs.lib.nixosSystem {
|
||||
inherit pkgs modules;
|
||||
}).config.system.build.sdImage;
|
||||
|
|
Loading…
Reference in a new issue