mirror of
https://github.com/srid/nixos-config.git
synced 2025-12-26 15:04:59 +08:00
rm uneeded
This commit is contained in:
parent
015321ff68
commit
75266b26ff
2 changed files with 0 additions and 39 deletions
|
|
@ -1,4 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
set -xe
|
||||
PROJECT=$(basename `pwd`)
|
||||
tmux new-session -A -s $PROJECT sh -c 'sudo nixos-rebuild switch; echo "Press enter to quit"; read '
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
let
|
||||
nixpkgs =
|
||||
(
|
||||
let
|
||||
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
||||
in
|
||||
fetchTarball {
|
||||
url = "https://github.com/NixOS/nixpkgs/archive/${lock.nodes.nixpkgs.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.nixpkgs.locked.narHash;
|
||||
}
|
||||
);
|
||||
pkgs = import nixpkgs { };
|
||||
config = {
|
||||
imports =
|
||||
[ "${nixpkgs}/nixos/modules/virtualisation/digital-ocean-image.nix" ];
|
||||
|
||||
# Headless - don't start a tty on the serial consoles.
|
||||
systemd.services."serial-getty@ttyS0".enable = false;
|
||||
systemd.services."serial-getty@hvc0".enable = false;
|
||||
systemd.services."getty@tty1".enable = false;
|
||||
systemd.services."autovt@".enable = false;
|
||||
|
||||
# sufficient swap for functioning nix-build on 1G droplets
|
||||
swapDevices = [{ device = "/swapfile"; size = 2048; }];
|
||||
|
||||
# Make sure that SSH is available
|
||||
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||
services.sshd.enable = true;
|
||||
users.users.root.openssh.authorizedKeys.keys = [ (builtins.readFile ../id_rsa.pub) ];
|
||||
|
||||
# Use more aggressive compression then the default.
|
||||
virtualisation.digitalOceanImage.compressionMethod = "bzip2";
|
||||
};
|
||||
in
|
||||
(pkgs.nixos config).digitalOceanImage
|
||||
Loading…
Add table
Add a link
Reference in a new issue