8 Commits

Author SHA1 Message Date
9d3abd60fc fix deploy input 2025-04-10 16:00:54 +02:00
412bc59408 fix systemrebuild on add services 2025-04-10 14:43:19 +02:00
40d32b7133 fix systemrebuild on add services 2025-04-10 13:56:42 +02:00
9a258602a2 Basic config input update 2025-04-10 13:25:37 +02:00
ae316fb7f6 Basic config input update 2025-04-10 13:00:36 +02:00
fc512b0248 Bugfix installer: SSH config port 2025-04-10 12:46:24 +02:00
2d22b15e85 Bugfix flake.nix 2025-04-10 12:32:08 +02:00
e93f2a634a Merge v0.1.0 development 2025-04-09 16:11:40 +02:00
4 changed files with 13 additions and 14 deletions

14
flake.lock generated
View File

@ -6,11 +6,11 @@
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs-unstable": "nixpkgs-unstable"
}, },
"locked": { "locked": {
"lastModified": 1741872348, "lastModified": 1744286132,
"narHash": "sha256-4d0S59c/rR5lcfqeqw3z+k4FlDwyci6dwrwMPgKuO/g=", "narHash": "sha256-b+QaraEq2KS6X3PeAcm2J0afIQjvUEJ61Oj1OHiELzA=",
"ref": "stable", "ref": "stable",
"rev": "50af8d01fb5d5d5616bd1d5c38ced9946f863ca4", "rev": "dd405780a03515688101b0b66c8757ce817f1ad7",
"revCount": 6, "revCount": 9,
"type": "git", "type": "git",
"url": "https://code.m3tam3re.com/m3tam3re/self-host-playbook-base" "url": "https://code.m3tam3re.com/m3tam3re/self-host-playbook-base"
}, },
@ -27,11 +27,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1741786315, "lastModified": 1744145203,
"narHash": "sha256-VT65AE2syHVj6v/DGB496bqBnu1PXrrzwlw07/Zpllc=", "narHash": "sha256-I2oILRiJ6G+BOSjY+0dGrTPe080L3pbKpc+gCV3Nmyk=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "0d8c6ad4a43906d14abd5c60e0ffe7b587b213de", "rev": "76c0a6dba345490508f36c1aa3c7ba5b6b460989",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -16,7 +16,6 @@
}; };
deploy-rs = { deploy-rs = {
url = "github:serokell/deploy-rs"; url = "github:serokell/deploy-rs";
follows = "nixpkgs";
}; };
}; };
@ -29,7 +28,7 @@
} @ inputs: let } @ inputs: let
jsonConfig = builtins.fromJSON (builtins.readFile ./config.json); jsonConfig = builtins.fromJSON (builtins.readFile ./config.json);
in { in {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations.server = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
(base-config.nixosModules.default { (base-config.nixosModules.default {
@ -43,7 +42,7 @@
inherit self; inherit self;
}; };
}; };
deploy.nodes.nixos = { deploy.nodes.server = {
hostname = "self-host-playbook"; hostname = "self-host-playbook";
profiles.system = { profiles.system = {
sshUser = jsonConfig.username; sshUser = jsonConfig.username;
@ -51,7 +50,7 @@
interactiveSudo = true; interactiveSudo = true;
path = path =
deploy-rs.lib.x86_64-linux.activate.nixos deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.nixos; self.nixosConfigurations.server;
}; };
}; };
}; };

View File

@ -207,6 +207,7 @@ setup_ssh_config() {
local config_entry="Host self-host-playbook local config_entry="Host self-host-playbook
HostName $ip_address HostName $ip_address
User $username User $username
Port 2222
IdentityFile $ssh_key_file" IdentityFile $ssh_key_file"
# Check if entry already exists # Check if entry already exists

View File

@ -133,6 +133,7 @@ setup_ssh_config() {
local config_entry="Host self-host-playbook local config_entry="Host self-host-playbook
HostName $ip_address HostName $ip_address
User $username User $username
Port 2222
IdentityFile $ssh_key_file" IdentityFile $ssh_key_file"
# Check if entry already exists # Check if entry already exists
@ -265,9 +266,7 @@ if [[ $REPLY =~ ^[Yy]$ ]]; then
setup_ssh_config "$USERNAME" "$IP_ADDRESS" setup_ssh_config "$USERNAME" "$IP_ADDRESS"
echo echo
install_deploy_rs install_deploy_rs
echo echo "🚀 Applying the update to your system..."
echo "To apply the changes, run:"
echo "sudo nixos-rebuild switch"
echo echo
echo "If you encounter any issues, your backup is available in $backup_dir" echo "If you encounter any issues, your backup is available in $backup_dir"
else else