From f3bc47f8df2aada734096fc5288c34d038f9cc41 Mon Sep 17 00:00:00 2001 From: "quentin@aristote.fr" Date: Sat, 7 Dec 2024 16:43:59 +0100 Subject: init: flake --- flake.nix | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..f127bc8 --- /dev/null +++ b/flake.nix @@ -0,0 +1,50 @@ +{ + description = "Minimal NixOS installation media"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + outputs = { + self, + nixpkgs, + }: { + packages.x86_64-linux.default = self.nixosConfigurations.exampleIso.config.system.build.isoImage; + nixosConfigurations.chaos = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ({ + config, + pkgs, + modulesPath, + ... + }: { + imports = [(modulesPath + "/installer/cd-dvd/installation-cd-minimal.nix")]; + + environment.systemPackages = with pkgs; [vim]; + + nix.settings.experimental-features = ["nix-command" "flakes"]; + programs.git = { + enable = true; + config.user = { + name = "Root user of ${config.networking.hostName}"; + email = "root@${config.networking.hostName}"; + }; + }; + + networking.hostName = "chaos"; + users.users.root.openssh.authorizedKeys.keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK4wGbl3++lqCjLUhoRyABBrVEeNhIXYO4371srkRoyq qaristote@latitude-7490" + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEvPsKWQXX/QsFQjJU0CjG4LllvUVZme45d9JeS/yhLt qaristote@precision-3571" + ]; + + time.time = "Europe/Paris"; + i18n = { + defaultLocal = "fr_FR.utf8"; + extraLocaleSettings.LANG = "en_US.utf8"; + }; + console = { + "font" = "Lat2-Terminus32"; + keyMap = "fr"; + }; + }) + ]; + }; + }; +} -- cgit v1.2.3