added installer
This commit is contained in:
parent
f0c18ba7ee
commit
0ae6778ebb
26
installer/installer.nix
Normal file
26
installer/installer.nix
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
{
|
||||||
|
config = {
|
||||||
|
systemd.services.custom-install = {
|
||||||
|
description = "Custom installation script";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "network.target" ];
|
||||||
|
path = [ pkgs.util-linux pkgs.parted pkgs.nixos-install-tools pkgs.nixos-anywhere pkgs.diskco ];
|
||||||
|
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
RemainAfterExit = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
script = ''
|
||||||
|
# Your installation commands here
|
||||||
|
if [ ! -f /etc/installation-completed ]; then
|
||||||
|
# Run your installation steps
|
||||||
|
|
||||||
|
# Mark as completed
|
||||||
|
touch /etc/installation-completed
|
||||||
|
fi
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -1,7 +1,10 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ../quickly.nix ];
|
imports = [
|
||||||
|
../quickly.nix
|
||||||
|
../installer/installer.nix
|
||||||
|
];
|
||||||
config = {
|
config = {
|
||||||
users.users.nixos = {
|
users.users.nixos = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user