From 0a7e26455de46073a0866971838d4c3f57dd814e Mon Sep 17 00:00:00 2001 From: Doloro1978 Date: Sat, 18 Jul 2026 23:21:30 +0100 Subject: [PATCH] feat: added recovery nixos config --- config/hosts/aspects/doloro-bootable/home.nix | 33 ++++++++ config/hosts/aspects/doloro-bootable/host.nix | 77 +++++++++++++++++++ config/hosts/computers.nix | 7 ++ 3 files changed, 117 insertions(+) create mode 100644 config/hosts/aspects/doloro-bootable/home.nix create mode 100644 config/hosts/aspects/doloro-bootable/host.nix diff --git a/config/hosts/aspects/doloro-bootable/home.nix b/config/hosts/aspects/doloro-bootable/home.nix new file mode 100644 index 0000000..dc5d4c5 --- /dev/null +++ b/config/hosts/aspects/doloro-bootable/home.nix @@ -0,0 +1,33 @@ +{ + den, + modules, + inputs, + ... +}: +{ + den.aspects.doloro-bootable = { + includes = [ + + den.aspects.doloro-shared + modules.nixvim + ]; + homeManager = { + pkgs, + lib, + ... + }: { + home.packages = with pkgs; [ + btrfs-progs + chntpw + ddrescue + fd + gpart + ntfs3g + parted + ranger + rsync + testdisk + ]; + }; + }; +} diff --git a/config/hosts/aspects/doloro-bootable/host.nix b/config/hosts/aspects/doloro-bootable/host.nix new file mode 100644 index 0000000..0cbe475 --- /dev/null +++ b/config/hosts/aspects/doloro-bootable/host.nix @@ -0,0 +1,77 @@ +{ den, modules, ... }: +{ + den.aspects.doloro-bootable = { + nixos = { + pkgs, + lib, + ... + }: { + networking.hostName = "doloro-recovery"; + networking.networkmanager.enable = true; + services.openssh.enable = true; + + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/sda"; + boot.loader.grub.efiSupport = true; + boot.loader.grub.efiInstallAsRemovable = true; + + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "ehci_pci" + "xen_blkfront" + "sr_mod" + "nvme" + "virtio_pci" + "virtio_scsi" + ]; + + nixpkgs.config.allowUnfree = true; + + fileSystems."/" = { + device = "/dev/disk/by-label/nixos"; + fsType = "ext4"; + }; + + environment.systemPackages = with pkgs; [ + btrfs-progs + btop + chntpw + ddrescue + e2fsprogs + fastfetch + fd + gpart + git + ntfs3g + parted + pavucontrol + pciutils + ranger + rsync + testdisk + util-linux + wl-clipboard + ]; + + users.users.doloro = { + isNormalUser = true; + group = "doloro"; + extraGroups = [ "wheel" "networkmanager" ]; + initialPassword = "recovery"; + }; + + users.groups.doloro = {}; + + security.sudo.wheelNeedsPassword = false; + + services.getty.autologinUser = "doloro"; + systemd.services."getty@tty1".enable = false; + systemd.services."autovt@tty1".enable = false; + + services.xserver.enable = false; + + system.stateVersion = "25.11"; + }; + }; +} diff --git a/config/hosts/computers.nix b/config/hosts/computers.nix index 8bc92e6..0609fa8 100644 --- a/config/hosts/computers.nix +++ b/config/hosts/computers.nix @@ -37,6 +37,13 @@ }; }; + den.hosts.x86_64-linux.doloro-bootable = { + users.doloro = { + aspect = "doloro-bootable"; + homeManager.enable = true; + }; + }; + den.schema.user.classes = lib.mkDefault ["homeManager"]; # Fixes 'The option `flake.homeConfigurations' is defined multiple times while it's expected to be unique.'