feat(configurations)!: flatten down, introduce meta.nix

Flatten down directory structure:
- From: `./hosts/${configuration-type}/${system}/{configuration,deploy}.nix`
-   To: `./hosts/${configuration-type}/{meta,configuration}.nix`
Keep `system` and `deploy-rs` config in `meta.nix`
Update `flake.lock`
This commit is contained in:
reo101 2024-08-13 15:53:14 +03:00
parent 29738555b1
commit 9b8f894a1a
Signed by: reo101
GPG key ID: 675AA7EF13964ACB
43 changed files with 459 additions and 344 deletions

View file

@ -0,0 +1,3 @@
{
system = "x86_64-linux";
}

View file

@ -20,7 +20,7 @@
# Zig
zigpkgs.master
inputs.zls-overlay.packages.x86_64-darwin.default
# inputs.zls-overlay.packages.x86_64-darwin.default
];
programs.git = {

View file

@ -0,0 +1,3 @@
{
system = "x86_64-darwin";
}

View file

@ -66,7 +66,7 @@
nurl
# Mail
# himalaya
himalaya
# Java
graalvm-ce
@ -87,7 +87,7 @@
# Zig
zigpkgs.master
inputs.zls-overlay.packages.${pkgs.system}.default
# inputs.zls-overlay.packages.${pkgs.system}.default
# Android
android-tools

View file

@ -0,0 +1,15 @@
{
system = "aarch64-darwin";
deploy = {
hostname = "localhost";
sshUser = "pavelatanasov";
user = "pavelatanasov";
sudo = "sudo -u";
sshOpts = [ ];
fastConnection = false;
autoRollback = true;
magicRollback = true;
tempPath = "/Users/pavelatanasov/.deploy-rs";
remoteBuild = true;
};
}

View file

@ -0,0 +1,3 @@
{
system = "x86_64-darwin";
}

View file

@ -0,0 +1,3 @@
{
system = "aarch64-linux";
}

View file

@ -0,0 +1,3 @@
{
system = "x86_64-linux";
}

View file

@ -0,0 +1,3 @@
{
system = "x86_64-linux";
}

View file

@ -23,6 +23,7 @@
# services.kanidm = { };
age.rekey = {
# TODO: store in `meta`
hostPubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPopSTZ81UyKp9JSljCLp+Syk51zacjh9fLteqxQ6/aB";
# masterIdentities = [ "${inputs.self}/secrets/privkey.age" ];
# storageMode = "local";
@ -74,7 +75,10 @@
environment.systemPackages = with pkgs; [
git
neovim
# FIXME: cannot deploy neovim-nightly
# V neovim source
# > error: cannot add path '/nix/store/rhjznh5jdzdkzbnn0fhhvcf9rys0s59d-source' because it lacks a signature by a trusted key
# neovim
];
# NOTE: made with `mkpasswd -m sha-512`

View file

@ -16,7 +16,7 @@
home.packages = with pkgs; [
## Core
neovim
# neovim
git
gnupg
pciutils # lspci

View file

@ -0,0 +1,48 @@
{
# The `system` of the host
system = "x86_64-linux";
# `deploy-rs` configuration
deploy = {
# This is the hostname by which you'll refer to this machine using reploy-rs
hostname = "jeeves.reo101.xyz";
# This is the user that deploy-rs will use when connecting.
# This will default to your own username if not specified anywhere
sshUser = "jeeves";
# This is the user that the profile will be deployed to (will use sudo if not the same as above).
# If `sshUser` is specified, this will be the default (though it will _not_ default to your own username)
user = "root";
# Which sudo command to use. Must accept at least two arguments:
# the user name to execute commands as and the rest is the command to execute
# This will default to "sudo -u" if not specified anywhere.
sudo = "sudo -u";
# This is an optional list of arguments that will be passed to SSH.
sshOpts = [ "-p" "727" ];
# Fast connection to the node. If this is true, copy the whole closure instead of letting the node substitute.
# This defaults to `false`
fastConnection = false;
# If the previous profile should be re-activated if activation fails.
# This defaults to `true`
autoRollback = true;
# See the earlier section about Magic Rollback for more information.
# This defaults to `true`
magicRollback = true;
# The path which deploy-rs will use for temporary files, this is currently only used by `magicRollback` to create an inotify watcher in for confirmations
# If not specified, this will default to `/tmp`
# (if `magicRollback` is in use, this _must_ be writable by `user`)
tempPath = "/tmp";
# Build the derivation on the target system
# Will also fetch all external dependencies from the target system's substituters.
# This default to `false`
remoteBuild = true;
};
}

View file

@ -1,42 +0,0 @@
{
# This is the hostname by which you'll refer to this machine using reploy-rs
hostname = "jeeves.reo101.xyz";
# This is the user that deploy-rs will use when connecting.
# This will default to your own username if not specified anywhere
sshUser = "jeeves";
# This is the user that the profile will be deployed to (will use sudo if not the same as above).
# If `sshUser` is specified, this will be the default (though it will _not_ default to your own username)
user = "root";
# Which sudo command to use. Must accept at least two arguments:
# the user name to execute commands as and the rest is the command to execute
# This will default to "sudo -u" if not specified anywhere.
sudo = "sudo -u";
# This is an optional list of arguments that will be passed to SSH.
sshOpts = [ "-p" "727" ];
# Fast connection to the node. If this is true, copy the whole closure instead of letting the node substitute.
# This defaults to `false`
fastConnection = false;
# If the previous profile should be re-activated if activation fails.
# This defaults to `true`
autoRollback = true;
# See the earlier section about Magic Rollback for more information.
# This defaults to `true`
magicRollback = true;
# The path which deploy-rs will use for temporary files, this is currently only used by `magicRollback` to create an inotify watcher in for confirmations
# If not specified, this will default to `/tmp`
# (if `magicRollback` is in use, this _must_ be writable by `user`)
tempPath = "/tmp";
# Build the derivation on the target system
# Will also fetch all external dependencies from the target system's substituters.
# This default to `false`
remoteBuild = true;
}