Compare commits
4 Commits
876f728aa2
...
1195456bee
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1195456bee | ||
|
|
48de6b9821 | ||
|
|
d3a5b3e6ef | ||
|
|
3c4c6c7389 |
@@ -14,6 +14,28 @@ LOGO = "/etc/sovran/logo.png"
|
|||||||
LOG = "/tmp/sovran-install.log"
|
LOG = "/tmp/sovran-install.log"
|
||||||
FLAKE = "/etc/sovran/flake"
|
FLAKE = "/etc/sovran/flake"
|
||||||
|
|
||||||
|
DEPLOYED_FLAKE = """\
|
||||||
|
{
|
||||||
|
description = "Sovran_SystemsOS for the Sovran Pro from Sovran Systems";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
Sovran_Systems.url = "git+https://git.sovransystems.com/Sovran_Systems/Sovran_SystemsOS";
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, Sovran_Systems, ... }@inputs: {
|
||||||
|
nixosConfigurations."nixos" = Sovran_Systems.inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
modules = [
|
||||||
|
{ nixpkgs.hostPlatform = "x86_64-linux"; }
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./role-state.nix
|
||||||
|
./custom.nix
|
||||||
|
Sovran_Systems.nixosModules.Sovran_SystemsOS
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
logfile = open(LOG, "a")
|
logfile = open(LOG, "a")
|
||||||
atexit.register(logfile.close)
|
atexit.register(logfile.close)
|
||||||
@@ -933,6 +955,19 @@ class InstallerWindow(Adw.ApplicationWindow):
|
|||||||
path = os.path.join(nixos_dir, entry)
|
path = os.path.join(nixos_dir, entry)
|
||||||
run(["sudo", "rm", "-rf", path])
|
run(["sudo", "rm", "-rf", path])
|
||||||
|
|
||||||
|
GLib.idle_add(append_text, buf, "Writing deployed flake.nix...\n")
|
||||||
|
proc = subprocess.run(
|
||||||
|
["sudo", "tee", "/mnt/etc/nixos/flake.nix"],
|
||||||
|
input=DEPLOYED_FLAKE,
|
||||||
|
capture_output=True,
|
||||||
|
text=True,
|
||||||
|
)
|
||||||
|
log(proc.stdout)
|
||||||
|
if proc.returncode != 0:
|
||||||
|
log(proc.stderr)
|
||||||
|
raise RuntimeError(proc.stderr.strip() or "Failed to write deployed flake.nix")
|
||||||
|
run(["sudo", "rm", "-f", "/mnt/etc/nixos/flake.lock"])
|
||||||
|
|
||||||
GLib.idle_add(self.push_create_password)
|
GLib.idle_add(self.push_create_password)
|
||||||
|
|
||||||
# ── Step 5b: Create Password ──────────────────────────────────────────
|
# ── Step 5b: Create Password ──────────────────────────────────────────
|
||||||
|
|||||||
Reference in New Issue
Block a user