forked from Fediversity/Fediversity
parent
3270cc89e7
commit
551e860b5b
7 changed files with 32 additions and 4 deletions
21
flake.lock
generated
21
flake.lock
generated
|
@ -571,6 +571,26 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"home-manager_2": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1743860185,
|
||||||
|
"narHash": "sha256-TkhfJ+vH+iGxLQL6RJLObMmldAQpysVJ+p1WnnKyIeQ=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "b5e29565131802cc8adee7dccede794226da8614",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"mk-naked-shell": {
|
"mk-naked-shell": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -1215,6 +1235,7 @@
|
||||||
"disko": "disko",
|
"disko": "disko",
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"git-hooks": "git-hooks",
|
"git-hooks": "git-hooks",
|
||||||
|
"home-manager": "home-manager_2",
|
||||||
"nixops4": "nixops4",
|
"nixops4": "nixops4",
|
||||||
"nixops4-nixos": "nixops4-nixos",
|
"nixops4-nixos": "nixops4-nixos",
|
||||||
"nixpkgs": "nixpkgs_7"
|
"nixpkgs": "nixpkgs_7"
|
||||||
|
|
|
@ -3,6 +3,8 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
git-hooks.url = "github:cachix/git-hooks.nix";
|
git-hooks.url = "github:cachix/git-hooks.nix";
|
||||||
|
home-manager.url = "github:nix-community/home-manager";
|
||||||
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
|
||||||
disko.url = "github:nix-community/disko";
|
disko.url = "github:nix-community/disko";
|
||||||
|
|
|
@ -34,6 +34,7 @@ in
|
||||||
imports = [
|
imports = [
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
inputs.disko.nixosModules.default
|
inputs.disko.nixosModules.default
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
./options.nix
|
./options.nix
|
||||||
./nixos
|
./nixos
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
config,
|
config,
|
||||||
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
|
@ -37,5 +37,8 @@ in
|
||||||
|
|
||||||
## FIXME: Remove direct root authentication once the NixOps4 NixOS provider
|
## FIXME: Remove direct root authentication once the NixOps4 NixOS provider
|
||||||
## supports users with password-less sudo.
|
## supports users with password-less sudo.
|
||||||
users.users.root.openssh.authorizedKeys.keys = attrValues keys.contributors;
|
users.users.root.openssh.authorizedKeys.keys = attrValues keys.contributors ++ [
|
||||||
|
# allow our panel vm access to the test machines
|
||||||
|
keys.systems.fedi201
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -186,7 +186,7 @@ in
|
||||||
'';
|
'';
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
User = name;
|
User = "root";
|
||||||
WorkingDirectory = "/var/lib/${name}";
|
WorkingDirectory = "/var/lib/${name}";
|
||||||
StateDirectory = name;
|
StateDirectory = name;
|
||||||
RuntimeDirectory = name;
|
RuntimeDirectory = name;
|
||||||
|
|
|
@ -103,7 +103,7 @@ class DeploymentStatus(ConfigurationForm):
|
||||||
# Check for deploy button
|
# Check for deploy button
|
||||||
if "deploy" in self.request.POST.keys():
|
if "deploy" in self.request.POST.keys():
|
||||||
deployment_result, deployment_params = self.deployment(obj)
|
deployment_result, deployment_params = self.deployment(obj)
|
||||||
deployment_succeeded = deployment_result.returncode == 0
|
deployment_succeeded = deployment_result == 0
|
||||||
|
|
||||||
return render(self.request, "partials/deployment_result.html", {
|
return render(self.request, "partials/deployment_result.html", {
|
||||||
"deployment_succeeded": deployment_succeeded,
|
"deployment_succeeded": deployment_succeeded,
|
||||||
|
@ -157,6 +157,6 @@ class DeploymentStatus(ConfigurationForm):
|
||||||
"--auto-approve",
|
"--auto-approve",
|
||||||
"-lock=false",
|
"-lock=false",
|
||||||
]
|
]
|
||||||
deployment_result = subprocess.run(cmd, cwd=cwd, env=env)
|
deployment_result = subprocess.run(cmd, cwd=cwd, env=env, user="root")
|
||||||
print(deployment_result)
|
print(deployment_result)
|
||||||
return deployment_result, deployment_params
|
return deployment_result, deployment_params
|
||||||
|
|
Loading…
Add table
Reference in a new issue