chore: reconfigure nix cloud
This commit is contained in:
parent
d5db6daa8c
commit
20e8bd96bd
3 changed files with 73 additions and 71 deletions
|
|
@ -1,16 +1,11 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
./networking.nix
|
||||
|
||||
./forgejo.nix
|
||||
];
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
efiSupport = true; # Enable EFI features
|
||||
|
|
@ -18,69 +13,37 @@
|
|||
};
|
||||
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
nix = {
|
||||
registry = (lib.mapAttrs (_: flake: { inherit flake; })) (
|
||||
(lib.filterAttrs (_: lib.isType "flake")) inputs
|
||||
);
|
||||
|
||||
nixPath = [ "/etc/nix/path" ];
|
||||
|
||||
settings = {
|
||||
download-buffer-size = "512M";
|
||||
experimental-features = "nix-command flakes";
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
shells = with pkgs; [ bash ];
|
||||
etc = lib.mapAttrs' (name: value: {
|
||||
name = "nix/path/${name}";
|
||||
value.source = value.flake;
|
||||
}) config.nix.registry;
|
||||
systemPackages = with pkgs; [
|
||||
git
|
||||
sops
|
||||
wget
|
||||
];
|
||||
};
|
||||
|
||||
zramSwap.enable = true;
|
||||
programs = {
|
||||
gnupg = {
|
||||
agent = {
|
||||
enableSSHSupport = true;
|
||||
enable = true;
|
||||
pinentryPackage = pkgs.pinentry-tty;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "srv1065175";
|
||||
networking.domain = "hstgr.cloud";
|
||||
|
||||
services.openssh.enable = true;
|
||||
|
||||
users.users = {
|
||||
root.openssh.authorizedKeys.keyFiles = [
|
||||
(builtins.fetchurl {
|
||||
url = "https://meta.sr.ht/~sposito.keys";
|
||||
name = "sposito-srht-keys";
|
||||
sha256 = "1a0qcpbdkmdhnhhqvcmf6rq7zmjap6kxiwrcmmgs0fbhrlcyhkmi";
|
||||
})
|
||||
];
|
||||
nimbus.isNormalUser = true;
|
||||
nimbus.openssh.authorizedKeys.keys = [
|
||||
(builtins.fetchurl {
|
||||
url = "https://meta.sr.ht/~sposito.keys";
|
||||
name = "sposito-srht-keys";
|
||||
sha256 = "1a0qcpbdkmdhnhhqvcmf6rq7zmjap6kxiwrcmmgs0fbhrlcyhkmi";
|
||||
})
|
||||
];
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCjC5EuxC6un3StoRkn1X1Mv09Mx1icGfN5fnlWRfqFPtiwAusJA+q0p2MktujY/+kDOpzExtjbXP5CtW7zcUfeitO26BY0WH106P4ttsq/0zzq5pmPXxGn9crN7JqFp3f9LMlL0F+3Oa0mJ6HcS2UgQEUYS6ofJBV1CLeMfkv75F+iy7AG1V9EaT4pvwdmAJ+6XXSo+UtadWOZGlWVRETyDcxa2H/aS/e+JrQfeAHM9f9cyeZqO9OHFWmuzHDc2T014+OhzzWnLUC/nUc1KUELvha1cT1ViMbcF62cjQXxip/5GGsIkw+7PdJFTn3ITwRO1+06qs6WnO4ceh8wIyOblUgTfRvIXkB7nnanC3CupqLbT+s/HeRiwnI4aih7lDrB717dPTy/ZfNXqxy1K51bZzRTXzkY+oUF1eqG37KvGoFZ6Zjf8KMrtTWBhqdIWV/kY4ZBTtvtiU81iXEWbobcyTzsIzKtZhCrGt+KxFUYV90u+ts3jrFdHIsN/tIzuEKz2ZZ8f749u2Q9jgIwe1KLtTwmSDjAV5gkbnE7ZDMB82pTzlwdrZ/VkCIu3/EtoWq3Y+NrKL4OzWL74Tzgsn28jvsegrnz5Lp24zPpNmBzCgbkwPStFjvp16G6pUiTLAAn9YiBqYbbvDbGxun55QMwYORGsdk5hISaC/cPzaUKkQ== thiago@sposito.ch''
|
||||
''ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCWstSULudWNwPQxyS2J7Qygw8CozDDy8WsPjsYzKPI9s0B/KLU0g1oX42bBvn4DgNpzGrpb6IGHpRQohStt7vcOxb9XpfhIOcIr45gU3k3lcPjh6vj8/ZoNQlRDIfxs83RDImvveYABuI/Hq42mLV1kI5qnQHaJxuW73AuYKNzE3Z3PUl5Kw6MgzSZ96QlpiQDn/js7ZTBF/YZ18kPh9E9O1y+EDhcJ4gn38rFIMYMG/KbJB22hYyYQHo0WkJlZ2jScnjv1op2yHPM4lfjOnnyL+LhOQLN8VrHayDWXtJcIW0nEKT+1R/7qkSH/5ELA2c/gznfkdTDzfG8+P3WAzNF openpgp:0xC25417F1''
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICRAJaRuXqVeAs/Y5CeTbyc9lSbyvchkVqiML/yl6wbh thiago@Nixbook''
|
||||
];
|
||||
users.users.nimbus = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
|
||||
security.sudo.extraRules = [
|
||||
{
|
||||
users = [ "nimbus" ];
|
||||
commands = [
|
||||
{
|
||||
command = "ALL";
|
||||
options = [ "NOPASSWD" ];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
system.stateVersion = "23.11";
|
||||
boot.kernelParams = [
|
||||
"console=tty1"
|
||||
"console=ttyS0,115200"
|
||||
];
|
||||
time.timeZone = "America/Sao_Paulo";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue