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

View file

@ -2,4 +2,4 @@
openssl passwd -6 $1 > dev_user_password.pw 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: # NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL # https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.services.forgejo; cfg = config.services.forgejo;
srv = cfg.settings.server; srv = cfg.settings.server;
in in
{ {
imports = [ imports = [
"shared/system.nix" ./shared/system.nix
"shared/dev_user.nix" ./shared/dev_user.nix
"shared/docker.nix" ./shared/docker.nix
"shared/ssh.nix" ./shared/ssh.nix
]; ];
programs = { programs = {
@ -86,10 +91,10 @@ in
persistRepoData = true; persistRepoData = true;
platform = "forgejo"; platform = "forgejo";
autodiscover = true; autodiscover = true;
onboardingConfig= { onboardingConfig = {
extends= ["config:recommended"]; 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: # NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL # https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let let
cfg = config.services.forgejo; cfg = config.services.forgejo;
srv = cfg.settings.server; srv = cfg.settings.server;
in in
{ {
imports = [ imports = [
"shared/system.nix" ./shared/system.nix
"shared/dev_user.nix" ./shared/dev_user.nix
"shared/docker.nix" ./shared/docker.nix
"shared/ssh.nix" ./shared/ssh.nix
]; ];
services = { services = {
@ -32,7 +37,8 @@ in
"ubuntu-22.04:docker://node:16-bullseye" "ubuntu-22.04:docker://node:16-bullseye"
"ubuntu-20.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 = { users.users = {
# connection only via hashed password; # connection only via hashed password;
@ -6,8 +12,12 @@
isNormalUser = true; isNormalUser = true;
home = "/home/dev"; home = "/home/dev";
description = "User used to manually connect to this system (e.g. for maintenance)"; description = "User used to manually connect to this system (e.g. for maintenance)";
extraGroups = [ "docker" "wheel" ]; extraGroups = [
hashedPasswordFile = "dev_user_password.pw"; "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"; system.stateVersion = "24.11";
nix = { nix = {
settings = { settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [
"nix-command"
"flakes"
];
}; };
}; };
@ -13,3 +21,4 @@
git git
]; ];
} }