test change Colmena
This commit is contained in:
parent
16c4e77524
commit
79504da0a5
5 changed files with 37 additions and 7 deletions
|
|
@ -21,3 +21,5 @@ Enable an ssh server on the remote host, then on the
|
||||||
local machine set `.ssh/config` to have a profile for
|
local machine set `.ssh/config` to have a profile for
|
||||||
your desired host and have a key pair that's authorised
|
your desired host and have a key pair that's authorised
|
||||||
to your desired user.
|
to your desired user.
|
||||||
|
|
||||||
|
NOTE: these keys must have permission 600 (only readable/writable by you)
|
||||||
|
|
|
||||||
|
|
@ -2,4 +2,4 @@
|
||||||
|
|
||||||
# Deploy to all Colmena hives
|
# Deploy to all Colmena hives
|
||||||
colmena build
|
colmena build
|
||||||
colmena apply
|
colmena apply --verbose
|
||||||
|
|
|
||||||
22
flake.nix
22
flake.nix
|
|
@ -48,13 +48,27 @@
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Colmena's latest stable version is
|
||||||
|
# unusable so get latest unstable version.
|
||||||
|
#pkgsColmena = import (builtins.fetchGit {
|
||||||
|
# name = "nixpkgs-unstable-colmena";
|
||||||
|
# url = "https://github.com/NixOS/nixpkgs/";
|
||||||
|
# ref = "refs/heads/nixpkgs-unstable";
|
||||||
|
# rev = "21808d22b1cda1898b71cf1a1beb524a97add2c4";
|
||||||
|
#}) {};
|
||||||
|
pkgsColmena = import (builtins.fetchTarball {
|
||||||
|
url = "https://github.com/NixOS/nixpkgs/archive/21808d22b1cda1898b71cf1a1beb524a97add2c4.tar.gz";
|
||||||
|
sha256 = "0v2z6jphhbk1ik7fqhlfnihcyff5np9wb3pv19j9qb9mpildx0cg";
|
||||||
|
}) {inherit system;};
|
||||||
|
|
||||||
|
# TODO: come back to this its really cool
|
||||||
# this is just something I'm experimenting with
|
# this is just something I'm experimenting with
|
||||||
PROJECT_ROOT = builtins.toString ./.;
|
PROJECT_ROOT = builtins.toString ./.;
|
||||||
in {
|
in {
|
||||||
# shell for `nix develop`
|
# `nix develop` shell
|
||||||
devShells."x86_64-linux".default = pkgs.mkShell {
|
devShells."x86_64-linux".default = pkgsColmena.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = [
|
||||||
colmena
|
pkgsColmena.colmena
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,8 @@
|
||||||
# (all we need is hyrule, everything else is through wishlist)
|
# (all we need is hyrule, everything else is through wishlist)
|
||||||
ssh = {
|
ssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
addKeysToAgent = "yes"; # always add keys to ssh-agent
|
||||||
|
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
hyrule = {
|
hyrule = {
|
||||||
hostname = "imbored.dev";
|
hostname = "imbored.dev";
|
||||||
|
|
@ -145,6 +147,9 @@
|
||||||
*/
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# enable OpenSSH private key agent
|
||||||
|
services.ssh-agent.enable = true;
|
||||||
|
|
||||||
# ----- SERVICES -----
|
# ----- SERVICES -----
|
||||||
# Nicely reload system units when changing configs
|
# Nicely reload system units when changing configs
|
||||||
systemd.user.startServices = "sd-switch";
|
systemd.user.startServices = "sd-switch";
|
||||||
|
|
|
||||||
|
|
@ -36,8 +36,17 @@ in {
|
||||||
# colmena deployment configuration
|
# colmena deployment configuration
|
||||||
deployment = {
|
deployment = {
|
||||||
targetHost = "imbored.dev";
|
targetHost = "imbored.dev";
|
||||||
targetPort = 22;
|
|
||||||
targetUser = "ae";
|
targetUser = "ae";
|
||||||
|
targetPort = 22;
|
||||||
|
sshOptions = "-i ~/.ssh/id_hyrule";
|
||||||
|
#keys = {
|
||||||
|
# "imbored.dev" = {
|
||||||
|
# # text, keyCommand, or keyFile must be set
|
||||||
|
# # text = "";
|
||||||
|
# #keyCommand = [ "" ];
|
||||||
|
# keyFile = "/home/me/.ssh/id_hyrule";
|
||||||
|
# };
|
||||||
|
#};
|
||||||
buildOnTarget = false; # build locally then deploy
|
buildOnTarget = false; # build locally then deploy
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -68,7 +77,7 @@ in {
|
||||||
# primary user
|
# primary user
|
||||||
ae = {
|
ae = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = ["wheel"];
|
extraGroups = ["wheel" "networkmanager"];
|
||||||
shell = pkgs.bash;
|
shell = pkgs.bash;
|
||||||
home = "/home/ae"; # TEMP: remove and replace with home-manager
|
home = "/home/ae"; # TEMP: remove and replace with home-manager
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue