mirror of
https://github.com/phfroidmont/self-hosting.git
synced 2025-12-25 05:36:59 +01:00
Update inputs to fix OpenSSH CVE-2024-6387
This commit is contained in:
parent
781d6dcfac
commit
053fd23097
8 changed files with 118 additions and 120 deletions
|
|
@ -1,9 +1,7 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.custom.services.gitlab-runner;
|
||||
in
|
||||
{
|
||||
let cfg = config.custom.services.gitlab-runner;
|
||||
in {
|
||||
options.custom.services.gitlab-runner = {
|
||||
enable = mkEnableOption "gitlab-runner";
|
||||
};
|
||||
|
|
@ -35,58 +33,52 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
hostConfig = config;
|
||||
in
|
||||
args@{ config, ... }: {
|
||||
config = let hostConfig = config;
|
||||
in args@{ config, ... }: {
|
||||
|
||||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
htop
|
||||
nload
|
||||
];
|
||||
|
||||
users.groups.gitlab-runner = { };
|
||||
users.users.gitlab-runner = {
|
||||
isSystemUser = true;
|
||||
group = config.users.groups.gitlab-runner.name;
|
||||
};
|
||||
|
||||
programs.ssh.extraConfig = ''
|
||||
StrictHostKeyChecking=no
|
||||
UserKnownHostsFile=/dev/null
|
||||
nix = {
|
||||
package = pkgs.nixVersions.latest;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
gitlab-runner = {
|
||||
enable = true;
|
||||
services = {
|
||||
shell = {
|
||||
registrationConfigFile = hostConfig.sops.secrets.runnerRegistrationConfig.path;
|
||||
executor = "shell";
|
||||
tagList = [ "nix" ];
|
||||
};
|
||||
environment.systemPackages = with pkgs; [ git htop nload ];
|
||||
|
||||
users.groups.gitlab-runner = { };
|
||||
users.users.gitlab-runner = {
|
||||
isSystemUser = true;
|
||||
group = config.users.groups.gitlab-runner.name;
|
||||
};
|
||||
|
||||
programs.ssh.extraConfig = ''
|
||||
StrictHostKeyChecking=no
|
||||
UserKnownHostsFile=/dev/null
|
||||
'';
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
gitlab-runner = {
|
||||
enable = true;
|
||||
services = {
|
||||
shell = {
|
||||
registrationConfigFile =
|
||||
hostConfig.sops.secrets.runnerRegistrationConfig.path;
|
||||
executor = "shell";
|
||||
tagList = [ "nix" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.gitlab-runner.serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
User = config.users.users.gitlab-runner.name;
|
||||
Group = config.users.groups.gitlab-runner.name;
|
||||
};
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
};
|
||||
|
||||
systemd.services.gitlab-runner.serviceConfig = {
|
||||
DynamicUser = lib.mkForce false;
|
||||
User = config.users.users.gitlab-runner.name;
|
||||
Group = config.users.groups.gitlab-runner.name;
|
||||
};
|
||||
|
||||
system.stateVersion = "22.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue