1
0
Fork 0
This commit is contained in:
Lukas Wurzinger 2025-05-11 22:49:04 +02:00
parent be9fb9278e
commit b8af0e9761
No known key found for this signature in database
165 changed files with 1815 additions and 1431 deletions

View file

@ -1,4 +1,5 @@
{inputs, ...}: {
{ inputs, ... }:
{
imports = [
inputs.agenix.nixosModules.default
];

View file

@ -1,5 +1,6 @@
{ config, ... }:
{
fileSystems."/boot" = {
fileSystems.${config.boot.loader.efi.efiSysMountPoint} = {
label = "BOOT";
fsType = "vfat";
};
@ -16,6 +17,12 @@
efiSysMountPoint = "/boot";
};
};
tmp.cleanOnBoot = true;
# TODO
tmp = {
useTmpfs = true;
tmpfsSize = "50%";
cleanOnBoot = true;
};
};
}

View file

@ -1,3 +1,4 @@
{pkgs, ...}: {
environment.systemPackages = [pkgs.bottom];
{ pkgs, ... }:
{
environment.systemPackages = [ pkgs.bottom ];
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
programs.fish.enable = true;
users.defaultUserShell = pkgs.fish;

View file

@ -1,7 +0,0 @@
{
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 7d";
};
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.gitui
];

View file

@ -1,16 +1,21 @@
{
inputs,
lib,
pkgs,
...
}: let
package = pkgs.helix;
in {
environment.systemPackages = [package];
}:
let
package = inputs.hxwrap.packages.${pkgs.system}.default;
in
{
environment.systemPackages = [ package ];
environment.sessionVariables = let
exe = builtins.baseNameOf (lib.getExe package);
in {
EDITOR = exe;
VISUAL = exe;
};
environment.sessionVariables =
let
exe = builtins.baseNameOf (lib.getExe package);
in
{
EDITOR = exe;
VISUAL = exe;
};
}

View file

@ -1,5 +1,9 @@
{pkgs, ...}: {
networking.nftables.enable = true;
{ attrName, pkgs, ... }:
{
networking = {
hostName = attrName;
nftables.enable = true;
};
environment.systemPackages = [
pkgs.nixos-firewall-tool

17
common/nh.nix Normal file
View file

@ -0,0 +1,17 @@
{
pkgs,
self,
...
}:
{
programs.nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep 5 --keep-since 1w";
dates = "weekly";
};
};
environment.sessionVariables.NH_FLAKE = "git+https://forgejo@forgejo.helveticanonstandard.net/helvetica/puter.git"; # TODO
}

View file

@ -1,4 +1,5 @@
{inputs, ...}: {
{ inputs, ... }:
{
imports = [
inputs.nix-index-database.nixosModules.nix-index
];

View file

@ -3,16 +3,17 @@
inputs,
lib,
...
}: {
}:
{
nix = {
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
registry = lib.mapAttrs (_: value: { flake = value; }) inputs;
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
optimise.automatic = true;
settings = {
trusted-users = ["root"] ++ config.users.normalUsers;
trusted-users = [ "root" ] ++ config.users.normalUsers;
experimental-features = [
"nix-command"
"flakes"
@ -24,5 +25,4 @@
};
nixpkgs.config.allowUnfree = true;
hardware.enableAllFirmware = true;
}

View file

@ -2,10 +2,12 @@
lib,
self,
...
}: {
options.pubkeys = let
inherit (lib) types;
in
}:
{
options.pubkeys =
let
inherit (lib) types;
in
lib.mkOption {
type = types.attrsOf (types.attrsOf types.str);
description = ''

View file

@ -1,12 +0,0 @@
{
pkgs,
self,
...
}: {
environment = {
systemPackages = [
self.packages.${pkgs.system}.puter
];
sessionVariables.PUTER_FLAKEREF = "git+https://forgejo@tea.wrz.one/lukas/puter.git";
};
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.ripgrep
];

25
common/rsync.nix Normal file
View file

@ -0,0 +1,25 @@
{
lib,
pkgs,
...
}:
{
#services.rsync = {
# enable = true;
# commonArgs = let
# rsh = "${lib.getExe pkgs.openssh} -i /etc/ssh/ssh_host_ed25519_key -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null";
# in [
# "--verbose"
# "--verbose"
# "--archive"
# "--update"
# "--delete"
# "--mkpath"
# "--exclude"
# "lost+found"
# "--rsh"
# rsh
# ];
#};
}

6
common/shpool.nix Normal file
View file

@ -0,0 +1,6 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.shpool
];
}

View file

@ -1,5 +1,5 @@
{
age.identityPaths = ["/etc/ssh/ssh_host_ed25519_key"];
age.identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
services.openssh = {
enable = true;

View file

@ -1,6 +1,8 @@
{config, ...}: let
{ config, ... }:
let
inherit (config.networking) hostName;
in {
in
{
services.syncthing = {
enable = true;
systemService = true;

View file

@ -1,4 +1,5 @@
{config, ...}: {
{ config, ... }:
{
services.tailscale = {
enable = true;
openFirewall = true;

View file

@ -2,10 +2,12 @@
config,
lib,
...
}: let
}:
let
inherit (config.users) mainUser;
in {
age.secrets = lib.mkSecrets {"user-${mainUser}" = {};};
in
{
age.secrets = lib.mkSecrets { "user-${mainUser}" = { }; };
users = {
mutableUsers = false;
@ -20,7 +22,7 @@ in {
isNormalUser = true;
hashedPasswordFile = config.age.secrets."user-${mainUser}".path;
openssh.authorizedKeys.keys = builtins.attrValues config.pubkeys.users;
extraGroups = ["wheel"]; #TODO remove
extraGroups = [ "wheel" ]; # TODO remove
};
};
};

View file

@ -1,3 +1,4 @@
{config, ...}: {
{ config, ... }:
{
users.groups.wheel.members = config.users.normalUsers;
}

View file

@ -1,4 +1,5 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.zellij
];