Customized for serial port monitor.

This commit is contained in:
Bailey 2023-08-16 10:03:37 -04:00
parent 498cd41c10
commit bd3c3ff221
4 changed files with 62 additions and 131 deletions

View file

@ -1,3 +1,6 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTsm2cnF/gFmJz3ogClVCq/qZP7L0lK+cFH7IQ/mEj6 mtxyz@jellydonut
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINN+E/BTYS7sV0dXi7RL3xfb2sMz4el1GfKqhSbbayNb termux
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINN+E/BTYS7sV0dXi7RL3xfb2sMz4el1GfKqhSbbayNb mtxyz@termux
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGBu4rmDrPAsVNArCMkgqjOSVWOtTaD6ZvWQYtJzUT8u mtxyz@mikenike
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHCneoJ09IQ1t7QhBo6LWMSvTf5OC1fmc4hyvK/k8sja hive
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzPSKBOexcYmNNvgn5jcGO6URm5m4F/q1LoZJmdolJvbtPKuMMxFtSSbAG0DEVUcMOEQ1jwk/s0J8kudQSJcSpD95jOvIN5kKe7el2fTMxq9Fsv/6Nvqdlmh39GCMaYEeb4L+c+yEy+F6QV7/DdhPaPwC1t6tWJQ4yM1AX6iL7ARXQQGjtJ6R7QHS/1p6sUd5quhHBhcNgBuwgi6sKDiRRCvCvHatwMAXFJPUlw8Xf4LL3U4DhWuMPlssmmY23NXsXT2Q7xUe3Nn9EZryzZgelkdATDNj4t20aF54pVJsPN2IdQBAUN0Py6XdaK19y0R4ol5/3AiiVW08RciwPE5cCXPWrZBwB+ImpOMx4F0LFHyXLrx+tNQIh/puhK58/Ci8OXh0N/CfmKrls/R54a532Hi+mZNZtQr/NUDf1olJvRBS9JQcsptRxyALuALA9CaqjbC88RQ+087pHsarIkTruVo9C3/ePimPgGuzE/1CLPOhdOq2wYQicuDQFZ1Hwqt8= hive
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCwgRUYUqma6NLP+64l8rIObb4CqNaCe/N40tXeQlPKEHjgw9DEPAKd/bnXON8bmeVxmgVyvzIvliaOON7LGjBxya8w9Ak9Dqw/Wy568snXQlzgv6V3oWNaCEsbVkVQuRlTp4WWhTDYBRCReoG6T/aaCj89SSwYZfpDOosIAM6Zd7YXHPhj7FKkzxEtADuot5B4Jmu1icKVgo8/hULi1PhqmX4sHu+v/FodC8ugSei4D7pk4hG25zwK2vg9iiEAvWIHnD6UvlNn+2T4+z2zP302VpPugKvUArVHnlEX9JeLfDq3i9D6ugfW0AWwZnfBcTaquRipzZjVJnEst+XjulsVEoJH/9qIr0fQwuUuJjOekNJy8vmCsKYehTmCdDMRxoZKztbM3pQ9REdL2S7DV0w9kUhRJ1rBtGK7+9mDFARwtlIPAUsbjy1MxHurXUa2E+6T0EIV4tp9G8VOwZV8IXbuFIoKAx3sNYzWrwC9gfDpkLTtLydUB/sGF/YuVOECYls= hive

View file

@ -5,36 +5,22 @@
# Enables flakes and the updated `nix` command
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Enables opengl support
hardware.opengl.enable = true;
sound.enable = true;
services.jack.jackd.enable = true;
services.jack.alsa.enable = true;
# Includes packages needed for startx
services.xserver = {
enable = true;
displayManager.autoLogin.user = "appuser";
windowManager.fluxbox.enable = true;
};
environment.systemPackages = with pkgs; [
tmux minicom tio lrzsz
];
programs.fish.enable = true;
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 = {
geekygay = {
shell = pkgs.fish;
isNormalUser = true;
extraGroups = [ "jackaudio" ];
extraGroups = [ "wheel" "dialout" ];
password = "";
packages = with pkgs; [
graphfix puredata
openssh.authorizedKeys.keyFiles = [
./authorized_keys
];
};
};
@ -46,4 +32,3 @@
settings.PasswordAuthentication = false;
};
}

View file

@ -70,45 +70,6 @@
"type": "github"
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1681202837,
"narHash": "sha256-H+Rh19JDwRtpVPAWp64F+rlEtxUWBAQW28eAi3SRSzg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "cfacdce06f30d2b68473a46042957675eebb3401",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"graphfix": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1690515455,
"narHash": "sha256-w3/DoZfCyRCIYHg2nmrVr3tCH8t0pJm5rHVQoRb6O/M=",
"owner": "~mtxyz",
"repo": "graphfix",
"rev": "01952f288fac16266c6a8e56150d4429d95b4100",
"type": "sourcehut"
},
"original": {
"owner": "~mtxyz",
"repo": "graphfix",
"type": "sourcehut"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1683408522,
@ -145,7 +106,6 @@
"inputs": {
"colmena": "colmena",
"flake-utils": "flake-utils_2",
"graphfix": "graphfix",
"nixpkgs": "nixpkgs_2"
}
},
@ -179,21 +139,6 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

100
flake.nix
View file

@ -5,61 +5,59 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
flake-utils.url = "github:numtide/flake-utils";
colmena.url = "github:zhaofengli/colmena";
graphfix.url = "sourcehut:~mtxyz/graphfix";
graphfix.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs@{self, nixpkgs, flake-utils, ...}:
flake-utils.lib.eachDefaultSystem (system:
let
# nixpkgs for native system.
pkgs = import nixpkgs {
inherit system;
overlays = [
inputs.graphfix.overlay
inputs.colmena.overlay
];
};
# Native VM config.
clementine = nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [
./citrus.nix
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
./platforms/clementine.nix
];
};
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;
flake-utils.lib.eachDefaultSystem (system:
let
# nixpkgs for native system.
pkgs = import nixpkgs {
inherit system;
overlays = [
inputs.colmena.overlay
];
};
};
# SD card image build.
orange = (nixpkgs.lib.nixosSystem {
# Native VM config.
clementine = nixpkgs.lib.nixosSystem {
inherit pkgs;
modules = [
{ nix.registry.nixconf.flake = self; }
./citrus.nix
"${nixpkgs}/nixos/modules/virtualisation/qemu-vm.nix"
./platforms/clementine.nix
];
};
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";
};
# Modules for colmena and sd card image are the same.
modules = [
{ nix.registry.nixconf.flake = self; }
./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;
});
});
}