Added legion's user key. Added git signing. Started moving to common
This commit is contained in:
parent
4feb1095ed
commit
d9fe2b30ee
8 changed files with 46 additions and 19 deletions
|
@ -1,6 +1,7 @@
|
|||
{lib, ...}: {
|
||||
options.assets = lib.mkOption {
|
||||
type = lib.types.unspecified;
|
||||
readOnly = true;
|
||||
};
|
||||
|
||||
config.assets = {
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
hijiri-vm = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP6tfXLB6xhcl3rtI5x9NXSs12U4LVy06RRlyZxiORa0 nikodem@rabulinski.com";
|
||||
kazuki = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIImsFb9qRxX0n2Bmy00T8iPam+Fc3mgKkm7dfM7AQRHN nikodem@rabulinski.com";
|
||||
legion = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILHX2MNGZGSTedYAepZHgcx+KK0A6ASulwSrpf9ytb5h nikodem@rabulinski.com";
|
||||
};
|
||||
|
||||
system = {
|
||||
|
|
|
@ -51,13 +51,7 @@
|
|||
time.timeZone = lib.mkDefault "Europe/Warsaw";
|
||||
};
|
||||
in {
|
||||
nixos = name: module: let
|
||||
defaultOptions = {
|
||||
_file = ./default.nix;
|
||||
|
||||
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
|
||||
};
|
||||
in
|
||||
nixos = name: module:
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
inputs.agenix.nixosModules.age
|
||||
|
@ -68,17 +62,12 @@
|
|||
self.nixosModules.settei
|
||||
self.nixosModules.common
|
||||
sharedOptions
|
||||
defaultOptions
|
||||
module
|
||||
];
|
||||
specialArgs.configurationName = name;
|
||||
};
|
||||
|
||||
darwin = name: module: let
|
||||
defaultOptions = {
|
||||
_file = ./default.nix;
|
||||
};
|
||||
in
|
||||
darwin = name: module:
|
||||
inputs.darwin.lib.darwinSystem {
|
||||
modules = [
|
||||
inputs.agenix.darwinModules.age
|
||||
|
@ -87,7 +76,6 @@
|
|||
self.darwinModules.settei
|
||||
self.darwinModules.common
|
||||
sharedOptions
|
||||
defaultOptions
|
||||
module
|
||||
];
|
||||
specialArgs.configurationName = name;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
{
|
||||
imports = [
|
||||
../../shared/common
|
||||
];
|
||||
|
||||
system.stateVersion = 4;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
24
modules/shared/common/default.nix
Normal file
24
modules/shared/common/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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"];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue