From 700fe012a1dbf956f5d5b585f32292bf9b60da87 Mon Sep 17 00:00:00 2001 From: Chris Kruining Date: Thu, 31 Jul 2025 20:25:28 +0200 Subject: [PATCH] alright, figured out the build command I need also removed the justfile for now, will take a look at that again in the future, less dependencies for now --- README.md | 15 +++++++- flake.lock | 37 +++++++++++++++++++ flake.nix | 5 +++ justfile | 29 --------------- .../x86_64-install-iso/minimal/default.nix | 15 ++++---- 5 files changed, 64 insertions(+), 37 deletions(-) delete mode 100644 justfile diff --git a/README.md b/README.md index 66ef62f..2eb75c9 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,21 @@ # My nix flake for my systems +## Commands + +### Show the output of the flake + +```sh +nix flake show +``` + +### Create install iso + +```sh +nix build .#install-isoConfigurations.minimal +``` + ## Inpirations - [dafitt/dotfiles](https://github.com/dafitt/dotfiles/) - [khaneliman/khanelinix](https://github.com/khaneliman/khanelinix) -- [alex007sirois/nix-config](https://github.com/alex007sirois/nix-config) (justfile) - [hmajid2301/nixicle](https://gitlab.com/hmajid2301/nixicle) (the GOAT, he did what I am aiming for!) \ No newline at end of file diff --git a/flake.lock b/flake.lock index edac429..1935971 100644 --- a/flake.lock +++ b/flake.lock @@ -562,6 +562,21 @@ "type": "github" } }, + "nixlib": { + "locked": { + "lastModified": 1736643958, + "narHash": "sha256-tmpqTSWVRJVhpvfSN9KXBvKEXplrwKnSZNAoNPf/S/s=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "1418bc28a52126761c02dd3d89b2d8ca0f521181", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixos-boot": { "locked": { "lastModified": 1722927293, @@ -577,6 +592,27 @@ "type": "github" } }, + "nixos-generators": { + "inputs": { + "nixlib": "nixlib", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751903740, + "narHash": "sha256-PeSkNMvkpEvts+9DjFiop1iT2JuBpyknmBUs0Un0a4I=", + "owner": "nix-community", + "repo": "nixos-generators", + "rev": "032decf9db65efed428afd2fa39d80f7089085eb", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixos-generators", + "type": "github" + } + }, "nixos-wsl": { "inputs": { "flake-compat": [], @@ -855,6 +891,7 @@ "jovian": "jovian", "nix-minecraft": "nix-minecraft", "nixos-boot": "nixos-boot", + "nixos-generators": "nixos-generators", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs_6", "nvf": "nvf", diff --git a/flake.nix b/flake.nix index 08e767a..d696f4b 100644 --- a/flake.nix +++ b/flake.nix @@ -20,6 +20,11 @@ inputs.home-manager.follows = "home-manager"; }; + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + # neovim nvf.url = "github:notashelf/nvf"; diff --git a/justfile b/justfile deleted file mode 100644 index e436695..0000000 --- a/justfile +++ /dev/null @@ -1,29 +0,0 @@ -default: - @just --list --unsorted - -flake := justfile_directory() -determinate-flags := "--option extra-substituters https://install.determinate.systems --option extra-trusted-public-keys cache.flakehub.com-3:hJuILl5sVK4iKm86JzgdXW12Y2Hwd5G07qKtHTOcDCM=" - -update *inputs: - nix flake update {{inputs}} - -update-all: - nix flake update - -build host: - nh os build {{flake}} -H {{host}} -- {{determinate-flags}} - -test: - nh os test {{flake}} -- {{determinate-flags}} - -switch: - nh os boot --ask {{flake}} -- {{determinate-flags}} - -prepare-deploy-ssh target: - ssh-copy-id {{target}} - -prepare-deploy-kexec target: (prepare-deploy-ssh target) - ssh {{target}} "(curl -L https://github.com/nix-community/nixos-images/releases/download/nixos-unstable/nixos-kexec-installer-noninteractive-x86_64-linux.tar.gz | tar -xzf- -C /root) && /root/kexec/run" - -deploy target hostname: (prepare-deploy-ssh target) - nix run github:nix-community/nixos-anywhere -- --flake '.#{{hostname}}' {{target}} \ No newline at end of file diff --git a/systems/x86_64-install-iso/minimal/default.nix b/systems/x86_64-install-iso/minimal/default.nix index f3ba5e1..7d80104 100644 --- a/systems/x86_64-install-iso/minimal/default.nix +++ b/systems/x86_64-install-iso/minimal/default.nix @@ -10,7 +10,7 @@ in }; networking = { - wireless.enable = true; + wireless.enable = mkForce false; networkmanager.enable = true; }; @@ -35,16 +35,17 @@ in }; services = { - ssh.enable = true; qemuGuest.enable = true; - openssh.settings.PermitRootLogin = mkForce "yes"; + openssh = { + enable = true; + settings.PermitRootLogin = mkForce "yes"; + }; }; - system.locale.enable = true; - - user = { - name = "nixos"; + users.users.nixos = { initialPassword = "kaas"; + initialHashedPassword = mkForce null; + extraGroups = [ "networkmanager" ]; }; environment.systemPackages = with pkgs; [