55 lines
1.5 KiB
Nix
55 lines
1.5 KiB
Nix
{ config, pkgs ? import <nixpkgs>, lib, ... }:
|
||
|
||
{
|
||
options.customPkgs.installFiles = lib.mkOption {
|
||
type = lib.types.package;
|
||
};
|
||
_module.args = {
|
||
installFiles = config.customPkgs.installFiles;
|
||
};
|
||
imports = [
|
||
../quickly.nix
|
||
## installer.nix is a system service to run a script on boot
|
||
../installer/installer.nix
|
||
];
|
||
##uncomment to pass installFiles to modules
|
||
config = {
|
||
customPkgs.installFiles = pkgs.runCommand "installFiles" {} ''
|
||
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
|
||
pkgs.nixos-facter
|
||
config.customPkgs.installFiles
|
||
];
|
||
|
||
system.autoUpgrade.channel = "https://nixos.org/channels/nixos-24.11/";
|
||
system.stateVersion = "24.11";
|
||
};
|
||
} |