Skip to content

Commit

Permalink
close #12
Browse files Browse the repository at this point in the history
  • Loading branch information
schonfinkel committed Nov 26, 2024
1 parent 965cbe7 commit 84e90f1
Show file tree
Hide file tree
Showing 10 changed files with 384 additions and 905 deletions.
101 changes: 0 additions & 101 deletions .terraform.lock.hcl

This file was deleted.

2 changes: 2 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,5 @@ deploys can be done in pure Nix.

+ The Terraform-based bootstrap is a modification from the great setup found in the
[[https://github.com/Gabriella439/nixos-in-production][NixOS in Production]] book.
+ Many thanks to @Misterio77 for [[https://jaxy.discourse.group/t/criando-um-servidor-de-factorio-100-declarativo-com-nixos-e-terraform/48][figuring it out]] how to run this on Magalu cloud.

33 changes: 24 additions & 9 deletions configuration.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,29 @@
{ modulesPath, ... }:
{ modulesPath, pkgs, ... }:

{
imports = [ "${modulesPath}/virtualisation/amazon-image.nix" ];
imports = [
./hardware-configuration.nix
];

zramSwap.enable = true;
# Nix configuration
nix.settings.trusted-users = ["@wheel"];
nix = {
package = pkgs.nixVersions.stable;
extraOptions = ''
experimental-features = nix-command flakes
'';
# Clean up /nix/store/ after a week
gc = {
automatic = true;
dates = "weekly UTC";
options = "--delete-older-than 7d";
};
};
nixpkgs = {
hostPlatform = "x86_64-linux";
config.allowUnfree = true;
};

swapDevices = [
{
device = "/swapfile";
size = 8 * 1024;
}
];
# Don't change this!
system.stateVersion = "24.11";
}
Loading

0 comments on commit 84e90f1

Please sign in to comment.