netboot.nix/config/base.nix

56 lines
1.5 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{ config, pkgs, lib, ... }:
#let
# installFiles = pkgs.runCommand "install-files" {
# #inherit (pkgs) coreutils;
# } ''
# mkdir -p $out
# cp -rv ${./initrd-include}/* $out/
# '';
#in
## above is the olde installFiles Declaration.
{
options.myPackages.installFiles = lib.mkOption {
type = lib.types.package;
};
imports = [
../quickly.nix
## installer.nix is a system service to run a script on boot
../installer/installer.nix
];
#_module.args = { inherit installFiles; }; ##uncomment to pass installFiles to modules
config = {
myPackages.installFiles = pkgs.runCommand "install-files" {
#inherit (pkgs) coreutils;
} ''
mkdir -p $out
cp -rv ${./initrd-include}/* $out/
chmod +x -R $out/bin/
'';
services.getty.autologinUser = "nixos";
security.sudo.wheelNeedsPassword = false;
users.users.nixos = {
isNormalUser = true;
password = "password";
extraGroups = [ "wheel" ]; # Enable sudo for the user.
packages = with pkgs; [
tmux
htop
tree
];
};
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = [
pkgs.vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
pkgs.wget
pkgs.disko
pkgs.coreutils-full
pkgs.nixos-install
pkgs.nixos-install-tools
pkgs.util-linux
pkgs.nettools
config.myPackages.installFiles
];
system.stateVersion = "24.05";
};
}