feat: fix things mentioned by statix (nix linter)
This commit is contained in:
parent
e0f3e2fe79
commit
7600b36484
6 changed files with 190 additions and 153 deletions
|
@ -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
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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 = {
|
||||||
|
@ -101,3 +106,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
];
|
];
|
||||||
}
|
};
|
||||||
}
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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 = ./.;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue