feat: fix things mentioned by statix (nix linter)

This commit is contained in:
aviac 2025-04-24 17:23:51 +02:00
parent e0f3e2fe79
commit 7600b36484
No known key found for this signature in database
GPG key ID: 644781002BDEA982
6 changed files with 190 additions and 153 deletions

View file

@ -5,17 +5,22 @@
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in
{
imports = [
"shared/system.nix"
"shared/dev_user.nix"
"shared/docker.nix"
"shared/ssh.nix"
./shared/system.nix
./shared/dev_user.nix
./shared/docker.nix
./shared/ssh.nix
];
users.users = {
@ -29,3 +34,4 @@ in
};
};
}

View file

@ -2,4 +2,4 @@
openssl passwd -6 $1 > dev_user_password.pw
colmena apply -f colmena.nix
colmena apply

View file

@ -5,17 +5,22 @@
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in
{
imports = [
"shared/system.nix"
"shared/dev_user.nix"
"shared/docker.nix"
"shared/ssh.nix"
./shared/system.nix
./shared/dev_user.nix
./shared/docker.nix
./shared/ssh.nix
];
programs = {
@ -86,10 +91,10 @@ in
persistRepoData = true;
platform = "forgejo";
autodiscover = true;
onboardingConfig= {
extends= ["config:recommended"];
onboardingConfig = {
extends = [ "config:recommended" ];
};
prCommitsPerRunLimit= 0;
prCommitsPerRunLimit = 0;
};
};
@ -101,3 +106,4 @@ in
};
};
}

View file

@ -5,17 +5,22 @@
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
in
{
imports = [
"shared/system.nix"
"shared/dev_user.nix"
"shared/docker.nix"
"shared/ssh.nix"
./shared/system.nix
./shared/dev_user.nix
./shared/docker.nix
./shared/ssh.nix
];
services = {
@ -32,7 +37,8 @@ in
"ubuntu-22.04:docker://node:16-bullseye"
"ubuntu-20.04:docker://node:16-bullseye"
];
}
}
};
};
};
}

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, modulesPath, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}:
{
users.users = {
# connection only via hashed password;
@ -6,8 +12,12 @@
isNormalUser = true;
home = "/home/dev";
description = "User used to manually connect to this system (e.g. for maintenance)";
extraGroups = [ "docker" "wheel" ];
hashedPasswordFile = "dev_user_password.pw";
}
extraGroups = [
"docker"
"wheel"
];
hashedPasswordFile = ./.;
};
};
}

View file

@ -1,11 +1,19 @@
{ config, lib, pkgs, modulesPath, ... }:
{
system = "x86_64-linux";
config,
lib,
pkgs,
modulesPath,
...
}:
{
system.stateVersion = "24.11";
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
experimental-features = [
"nix-command"
"flakes"
];
};
};
@ -13,3 +21,4 @@
git
];
}