Flake is now modular and supports forgejo and forgejo-ci-runner #1
3 changed files with 36 additions and 48 deletions
|
@ -4,64 +4,18 @@
|
|||
./../../services/forgejo.nix
|
||||
./../../users/lyn
|
||||
./hardware-configuration.nix
|
||||
./../../meta/profiles/base.nix
|
||||
./../../meta/profiles/vm.nix
|
||||
];
|
||||
# Write path for borgbackup repos for backup.nix
|
||||
#_module.args.borgrepolistfile = ./borgrepos;
|
||||
|
||||
# Enable Flakes and the new command-line tool
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
# Set default editor to vim
|
||||
environment.variables.EDITOR = "vim";
|
||||
# Use UEFI
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
||||
# Use the GRUB 2 boot loader.
|
||||
#boot.loader.grub.enable = true;
|
||||
#boot.loader.grub.device = "/dev/sda";
|
||||
|
||||
networking.hostName = "forgejo"; # Define your hostname.
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
htop
|
||||
];
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
X11Forwarding = true;
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
#enable qemu-guestagent
|
||||
services.qemuGuest.enable = true;
|
||||
# Disable password checking for wheel group users so we can solely rely on ssh keys
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
# Firewall stuff:
|
||||
networking.firewall.enable = true;
|
||||
networking.firewall.allowPing = true;
|
||||
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# Copy the NixOS configuration file and link it from the resulting system
|
||||
# (/run/current-system/configuration.nix). This is useful in case you
|
||||
# accidentally delete configuration.nix.
|
||||
# system.copySystemConfiguration = true;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
|
|
29
meta/profiles/base.nix
Normal file
29
meta/profiles/base.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{lib, config, pkgs, ...}: {
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
environment.variables.EDITOR = "vim";
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
X11Forwarding = true;
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
# Disable password checking for wheel group users so we can solely rely on ssh keys
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
htop
|
||||
];
|
||||
}
|
5
meta/profiles/vm.nix
Normal file
5
meta/profiles/vm.nix
Normal file
|
@ -0,0 +1,5 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
#enable qemu-guestagent
|
||||
services.qemuGuest.enable = true;
|
||||
}
|
Loading…
Reference in a new issue