diff --git a/packages/configuration.nix b/environments/nixos-container/configuration.nix similarity index 91% rename from packages/configuration.nix rename to environments/nixos-container/configuration.nix index ad78424..1bb21c3 100644 --- a/packages/configuration.nix +++ b/environments/nixos-container/configuration.nix @@ -20,7 +20,7 @@ with lib; ]; security.pam.loginLimits = [ # Prevent accidental fork bombs. - { domain = "*"; item = "nproc"; type = "hard"; value = "10"; } + { domain = "*"; item = "nproc"; type = "hard"; value = "200"; } ]; services.openssh = { enable = true; @@ -28,12 +28,10 @@ with lib; }; users.extraUsers.user = { name = "tlevine"; - group = "users"; uid = 1000; - createHome = true; + isNormalUser = true; home = "/home/tlevine"; extraGroups = [ "users" "wheel" ]; - isNormalUser = true; openssh.authorizedKeys.keys = [ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGvQyzr42/96acUTUedaeM2ee+DMt9bkxeurdeXji9sNE10MjjAUFtxPmSI8/BUZW2/a9ByblfaJEI+H+kFVPjVr+QGKXZluxcFMj2BLbH53fi9xLgoQRjb2aAXutb2Bp74/E8R1K+CuFfRRGQ5Spdnv44SLt04D6JbBLcLIcWTpQ4v5RaYr2U27jfiF9z0m+/opxvowEy2gnqlEXFxFk8jZHT4K0uLWm2ENjT6OpyOx8hWcKeAN2vRVRex3pJfSzswn0LpuCrM1rUZ4DRE+FABi8N21Q3MBaMRkwnZPwaZwKzv06q8bu23jYTqK5BrUPtOXeeVuroQXMc12H/6/Nh laptop" ]; diff --git a/packages/nixos-container.sh b/environments/nixos-container/run.sh similarity index 88% rename from packages/nixos-container.sh rename to environments/nixos-container/run.sh index 9b74d5b..3ca8e83 100755 --- a/packages/nixos-container.sh +++ b/environments/nixos-container/run.sh @@ -10,11 +10,11 @@ fi sudo cp configuration.nix \ /var/lib/containers/urchin/etc/nixos/configuration.nix sudo nixos-container update urchin +sudo nixos-container start urchin # Create the git repository. host="tlevine@$(nixos-container show-ip urchin)" -ssh "${host}" ' - if mkdir urchin 2> /dev/null; then +ssh "${host}" 'if mkdir urchin 2> /dev/null; then cd urchin git init git config --add receive.denyCurrentBranch ignore diff --git a/package.json b/packages/package.json similarity index 100% rename from package.json rename to packages/package.json