Flake is now modular and supports forgejo and forgejo-ci-runner #1

Merged
lynatic merged 14 commits from debug into main 2024-09-06 07:08:01 +02:00
4 changed files with 14 additions and 15 deletions
Showing only changes of commit d45afe123a - Show all commits

View file

@ -5,14 +5,12 @@
sops-nix.url = "github:Mic92/sops-nix"; sops-nix.url = "github:Mic92/sops-nix";
}; };
outputs = { self, nixpkgs, sops-nix }@inputs: { outputs = { self, nixpkgs, sops-nix }@inputs: {
nixosConfigurations = { nixosConfigurations = {
"forgejo" = nixpkgs.lib.nixosSystem { "forgejo" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
# Import the configuration.nix here, so that the ./hosts/forgenite/default.nix
# old configuration file can still take effect.
# Note: configuration.nix itself is also a Nixpkgs Module,
./configuration.nix
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
]; ];
specialArgs = { specialArgs = {

View file

@ -1,14 +1,12 @@
{ config, pkgs, lib, inputs, ... }: with lib.meta; { { config, pkgs, lib, inputs, ... }: {
imports = imports =
[ [
./../../services/forgejo.nix
./../../users/lyn
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
# will this work?
users.lyn.enable = true;
services.forgejo.enable = true;
# Write path for borgbackup repos for backup.nix # Write path for borgbackup repos for backup.nix
_module.args.borgrepolistfile = ./borgrepos; #_module.args.borgrepolistfile = ./borgrepos;
# Enable Flakes and the new command-line tool # Enable Flakes and the new command-line tool
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];

View file

@ -1,8 +1,11 @@
{lib, config, ...}:{ {lib,pkgs, config, ...}:{
imports = [
./ssh.nix
];
users.users.lyn = { users.users.lyn = {
isNormalUser = true; isNormalUser = true;
extraGroups = [ "wheel"]; extraGroups = [ "wheel"];
packages = with pkgs; [ packages = with pkgs; [
]; ];
} };
} }

View file

@ -1,3 +1,3 @@
{lib, config, ...}: lib.mkLocalModule ./. "Lyn SSH user config" { {lib, config, ...}: {
users.users.lyn.openssh.authorizedKeys.keys = ["ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC7NUaBJOYgMnT2uUUUSB7gKaqqbgxXDghBkRqSGuZrAZzZYHlHH7nM6Re7+yOYMSoJGLaB4iaUDLSBBnyA6pLI= nixos_gitea@secretive.MacBook-Pro-(2).local"]; users.users.lyn.openssh.authorizedKeys.keys = ["ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBC7NUaBJOYgMnT2uUUUSB7gKaqqbgxXDghBkRqSGuZrAZzZYHlHH7nM6Re7+yOYMSoJGLaB4iaUDLSBBnyA6pLI= nixos_gitea@secretive.MacBook-Pro-(2).local"];
} }