Skip to content

Commit

Permalink
feat(cache): add admin user
Browse files Browse the repository at this point in the history
  • Loading branch information
klarkc committed Dec 20, 2023
1 parent aa9d4f8 commit fdf563b
Showing 1 changed file with 18 additions and 9 deletions.
27 changes: 18 additions & 9 deletions setups/cache/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,27 @@ let
system.stateVersion = config.system.nixos.version;
fileSystems."/".device = "none";
boot.loader.grub.device = "nodev";
services.nix-serve = {
enable = true;
secretKeyFile = config.age.secrets.cache.path;
services = {
sshd.enable =true;
nix-serve = {
enable = true;
secretKeyFile = config.age.secrets.cache.path;
};
};
users.users.cache = {
password = "cache";
isNormalUser = true;
home = "/home/cache";
extraGroups = [ "wheel" ];
users = {
users.klarkc = {
isNormalUser = true;
inherit home;
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
(builtins.readFile ../../secrets/klarkc.pub)
];
};
mutableUsers = false;
};
networking.firewall.allowedTCPPorts = [ port ];
networking.firewall.enable = false;
virtualisation.forwardPorts = [
{ from = "host"; host.port = 2222; guest.port = 22; }
{ from = "host"; host.port = port; guest.port = port; }
];
# Web server
Expand Down

0 comments on commit fdf563b

Please sign in to comment.