starting point
This commit is contained in:
commit
279f90bfb8
77 changed files with 5757 additions and 0 deletions
84
hosts/bootstrap/configuration.nix
Executable file
84
hosts/bootstrap/configuration.nix
Executable file
|
@ -0,0 +1,84 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page, on
|
||||
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
|
||||
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
{
|
||||
# This is where you specify all .nix files to import
|
||||
imports =
|
||||
[
|
||||
# Hardware configuration that you generated in earlier steps
|
||||
./hardware-configuration.nix
|
||||
|
||||
(import ../../modules/disko/delete-on-boot.nix {
|
||||
inherit lib;
|
||||
persistExtraDirectories = [ ];
|
||||
persistExtraFiles = [ ];
|
||||
users = {};
|
||||
})
|
||||
];
|
||||
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.timeout = 0;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
# System wide packages goes here
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
vim
|
||||
];
|
||||
|
||||
users.users."snorre" = {
|
||||
isNormalUser = true;
|
||||
|
||||
# Unsafe and resets every boot, use hashedPassword after installation
|
||||
initialPassword = "1234";
|
||||
# hashedPassword = "Generate hash with `mkpasswd` and place result here";
|
||||
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"audio"
|
||||
"wheel" # Allows this user to use `sudo`
|
||||
];
|
||||
};
|
||||
|
||||
networking.hostName = "bootstrap"; # Define your hostname.
|
||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# Ssh configuration here
|
||||
services.openssh = {
|
||||
enable = false; # Set to true to allow ssh connections
|
||||
settings = {
|
||||
# Require public key authentication
|
||||
# Set to true to allow connecting with username+password
|
||||
PasswordAuthentication = false;
|
||||
KbdInteractiveAuthentication = false;
|
||||
# Users who can be connected to from ssh. Set to null to allow all users
|
||||
AllowUsers = null;
|
||||
# Disallow ssh connections to root user. DONT ENABLE THIS
|
||||
PermitRootLogin = "no";
|
||||
};
|
||||
};
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||
#
|
||||
# Most users should NEVER change this value after the initial install, for any reason,
|
||||
# even if you've upgraded your system to a new NixOS release.
|
||||
#
|
||||
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
|
||||
# so changing it will NOT upgrade your system.
|
||||
#
|
||||
# This value being lower than the current NixOS release does NOT mean your system is
|
||||
# out of date, out of support, or vulnerable.
|
||||
#
|
||||
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
|
||||
# and migrated your data accordingly.
|
||||
#
|
||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue