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, ...}: {
|
{lib, ...}: {
|
||||||
options.assets = lib.mkOption {
|
options.assets = lib.mkOption {
|
||||||
type = lib.types.unspecified;
|
type = lib.types.unspecified;
|
||||||
|
readOnly = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
config.assets = {
|
config.assets = {
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
hijiri-vm = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP6tfXLB6xhcl3rtI5x9NXSs12U4LVy06RRlyZxiORa0 nikodem@rabulinski.com";
|
hijiri-vm = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP6tfXLB6xhcl3rtI5x9NXSs12U4LVy06RRlyZxiORa0 nikodem@rabulinski.com";
|
||||||
kazuki = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIImsFb9qRxX0n2Bmy00T8iPam+Fc3mgKkm7dfM7AQRHN nikodem@rabulinski.com";
|
kazuki = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIImsFb9qRxX0n2Bmy00T8iPam+Fc3mgKkm7dfM7AQRHN nikodem@rabulinski.com";
|
||||||
|
legion = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILHX2MNGZGSTedYAepZHgcx+KK0A6ASulwSrpf9ytb5h nikodem@rabulinski.com";
|
||||||
};
|
};
|
||||||
|
|
||||||
system = {
|
system = {
|
||||||
|
|
|
@ -51,13 +51,7 @@
|
||||||
time.timeZone = lib.mkDefault "Europe/Warsaw";
|
time.timeZone = lib.mkDefault "Europe/Warsaw";
|
||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
nixos = name: module: let
|
nixos = name: module:
|
||||||
defaultOptions = {
|
|
||||||
_file = ./default.nix;
|
|
||||||
|
|
||||||
i18n.defaultLocale = lib.mkDefault "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
in
|
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
modules = [
|
modules = [
|
||||||
inputs.agenix.nixosModules.age
|
inputs.agenix.nixosModules.age
|
||||||
|
@ -68,17 +62,12 @@
|
||||||
self.nixosModules.settei
|
self.nixosModules.settei
|
||||||
self.nixosModules.common
|
self.nixosModules.common
|
||||||
sharedOptions
|
sharedOptions
|
||||||
defaultOptions
|
|
||||||
module
|
module
|
||||||
];
|
];
|
||||||
specialArgs.configurationName = name;
|
specialArgs.configurationName = name;
|
||||||
};
|
};
|
||||||
|
|
||||||
darwin = name: module: let
|
darwin = name: module:
|
||||||
defaultOptions = {
|
|
||||||
_file = ./default.nix;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
inputs.darwin.lib.darwinSystem {
|
inputs.darwin.lib.darwinSystem {
|
||||||
modules = [
|
modules = [
|
||||||
inputs.agenix.darwinModules.age
|
inputs.agenix.darwinModules.age
|
||||||
|
@ -87,7 +76,6 @@
|
||||||
self.darwinModules.settei
|
self.darwinModules.settei
|
||||||
self.darwinModules.common
|
self.darwinModules.common
|
||||||
sharedOptions
|
sharedOptions
|
||||||
defaultOptions
|
|
||||||
module
|
module
|
||||||
];
|
];
|
||||||
specialArgs.configurationName = name;
|
specialArgs.configurationName = name;
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
{
|
{
|
||||||
|
imports = [
|
||||||
|
../../shared/common
|
||||||
|
];
|
||||||
|
|
||||||
system.stateVersion = 4;
|
system.stateVersion = 4;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,17 @@
|
||||||
{
|
{lib, ...}: {
|
||||||
imports = [
|
imports = [
|
||||||
|
../../shared/common
|
||||||
./hercules.nix
|
./hercules.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
system.stateVersion = "22.05";
|
||||||
system.stateVersion = "22.05";
|
|
||||||
|
|
||||||
# https://github.com/NixOS/nixpkgs/issues/254807
|
# https://github.com/NixOS/nixpkgs/issues/254807
|
||||||
boot.swraid.enable = false;
|
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}";
|
home = "/home/${username}";
|
||||||
group = username;
|
group = username;
|
||||||
extraGroups = ["wheel"];
|
extraGroups = ["wheel"];
|
||||||
|
# TODO: Probably move this out into common
|
||||||
openssh.authorizedKeys.keys = let
|
openssh.authorizedKeys.keys = let
|
||||||
configName' =
|
configName' =
|
||||||
args.configurationName
|
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")
|
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 = {
|
nix = {
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = ["nix-command" "flakes" "repl-flake" "auto-allocate-uids"];
|
experimental-features = ["nix-command" "flakes" "repl-flake" "auto-allocate-uids"];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue