From 4085835b01490c059b54d360bbfbee4ee8e75b5b Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Fri, 12 Jul 2024 12:42:50 +0200 Subject: [PATCH] Add live ISO --- .gitignore | 3 +++ flake.nix | 11 ++++++++++ hosts/fruesos-live/default.nix | 39 ++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 .gitignore create mode 100644 hosts/fruesos-live/default.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f6f3fcc --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +# Ignore ISO builds and whatever +result/ +result \ No newline at end of file diff --git a/flake.nix b/flake.nix index 0f850ee..afff2d5 100644 --- a/flake.nix +++ b/flake.nix @@ -75,6 +75,17 @@ inherit self inputs username; }; }; + fruesos-live = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix") + (import ./hosts/fruesos-live) + ]; + specialArgs = { + host = "fruesos-live"; + inherit self inputs username; + }; + }; }; }; } diff --git a/hosts/fruesos-live/default.nix b/hosts/fruesos-live/default.nix new file mode 100644 index 0000000..526b409 --- /dev/null +++ b/hosts/fruesos-live/default.nix @@ -0,0 +1,39 @@ +{ + pkgs, + username, + lib, + ... +}: { + imports = [ + ./../../modules/core + ]; + + networking.hostName = "fruesos-live"; + + powerManagement.cpuFreqGovernor = "balanced"; + + systemd.services.sshd.wantedBy = pkgs.lib.mkForce ["multi-user.target"]; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJji4h4bgzgmp7YoRX/8ePN0TcCYRfI2wlrEeZkBQ/y2 personal@peprolinbot.com" + ]; + + # Less compression, but faster build + # isoImage.squashfsCompression = "gzip -Xcompression-level 1"; + + # You can not use networking.networkmanager with networking.wireless. + networking.wireless.enable = false; + + # Automatically log in at the virtual consoles. + services.getty.autologinUser = lib.mkForce "pedro"; + + # Allow the user to log in as pedro without a password. + users.users.${username}.initialHashedPassword = ""; + + # Autologin + services.greetd.settings.initial_session = { + command = "Hyprland"; + user = "pedro"; + }; + + home-manager.users.${username}.services.nextcloud-client.enable = lib.mkForce false; +}