Added legion's user key. Added git signing. Started moving to common

This commit is contained in:
Nikodem Rabuliński 2023-10-04 20:57:18 +02:00
parent 4feb1095ed
commit d9fe2b30ee
No known key found for this signature in database
GPG key ID: FF629AA9E08138DB
8 changed files with 46 additions and 19 deletions

View file

@ -1,3 +1,7 @@
{
imports = [
../../shared/common
];
system.stateVersion = 4;
}

View file

@ -1,12 +1,17 @@
{
{lib, ...}: {
imports = [
../../shared/common
./hercules.nix
];
config = {
system.stateVersion = "22.05";
system.stateVersion = "22.05";
# https://github.com/NixOS/nixpkgs/issues/254807
boot.swraid.enable = false;
# https://github.com/NixOS/nixpkgs/issues/254807
boot.swraid.enable = false;
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
settei.user.config = {
services.ssh-agent.enable = true;
};
}

View file

@ -21,6 +21,7 @@ in {
home = "/home/${username}";
group = username;
extraGroups = ["wheel"];
# TODO: Probably move this out into common
openssh.authorizedKeys.keys = let
configName' =
args.configurationName

View file

@ -0,0 +1,24 @@
{
config,
configurationName,
lib,
...
}: {
settei.user.config = {
programs.git = {
enable = true;
difftastic.enable = true;
lfs.enable = true;
userName = "Nikodem Rabuliński";
userEmail = lib.mkDefault "nikodem@rabulinski.com";
signing = {
key = config.settei.sane-defaults.allSshKeys.${configurationName};
signByDefault = true;
};
extraConfig = {
gpg.format = "ssh";
push.followTags = true;
};
};
};
}

View file

@ -36,6 +36,9 @@
or (throw "pass configurationName to module arguments or set networking.hostName yourself")
);
# Flakes are unusable without git present so pull it into the environment by default
settei.user.config.programs.git.enable = lib.mkDefault true;
nix = {
settings = {
experimental-features = ["nix-command" "flakes" "repl-flake" "auto-allocate-uids"];