Compare commits
8 Commits
develop/v0
...
9d3abd60fc
Author | SHA1 | Date | |
---|---|---|---|
9d3abd60fc | |||
412bc59408 | |||
40d32b7133 | |||
9a258602a2 | |||
ae316fb7f6 | |||
fc512b0248 | |||
2d22b15e85 | |||
e93f2a634a |
14
flake.lock
generated
14
flake.lock
generated
@ -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": {
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user