nixos-config/live-disk/flake.nix

118 lines
4.0 KiB
Nix

{
description = "Live Disk Flake";
inputs = {
nixpkgs.url = "nixpkgs/nixos-23.05";
fudo-home = {
url = "git+https://git.fudo.org/fudo-nix/home.git";
inputs.nixpkgs.follows = "nixpkgs";
};
# This MUST be a clean git repo, because we use the timestamp.
fudo-entities = {
url = "git+https://git.fudo.org/fudo-nix/entities.git";
inputs.nixpkgs.follows = "nixpkgs";
};
fudo-lib.url = "git+https://git.fudo.org/fudo-nix/lib.git";
fudo-pkgs.url = "git+https://git.fudo.org/fudo-nix/pkgs.git";
};
outputs = { self, nixpkgs, fudo-home, fudo-entities, fudo-lib, fudo-pkgs, ...
}@inputs: {
nixosConfigurations.live-disk-x86_64-linux = let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ fudo-pkgs.overlays.default ];
};
in nixpkgs.lib.nixosSystem {
inherit system;
modules = [
({ config, ... }: {
imports = [
fudo-home.nixosModules.nonfudo
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
"${nixpkgs}/nixos/modules/installer/cd-dvd/channel.nix"
];
config = with pkgs.lib; {
environment.etc.nixos-live.source = ./.;
hardware.enableAllFirmware = true;
environment.systemPackages = with pkgs; [
bcache-tools
bcachefs-tools
btrfs-progs
emacs
git
parted
gparted
nix-prefetch-scripts
wget
];
fudo.home-manager = {
enable-gui = false;
local-domain = "fudo.org";
users.niten.user-email = "niten@fudo.org";
};
nixpkgs.config.allowUnfree = true;
services.openssh = {
enable = true;
startWhenNeeded = true;
permitRootLogin = mkDefault "prohibit-password";
};
i18n.defaultLocale = "en_US.UTF-8";
console.useXkbConfig = true;
services.xserver = {
layout = "us";
xkbVariant = "dvp";
xkbOptions = "ctrl:nocaps";
};
nix = {
package = pkgs.nixFlakes;
extraOptions = "experimental-features = nix-command flakes";
};
programs = {
ssh = {
startAgent = true;
extraConfig = ''
GSSAPIAuthentication yes
GSSAPIDelegateCredentials yes
'';
};
};
krb5.libdefaults.default_realm = "FUDO.ORG";
users.users = {
niten = {
isNormalUser = true;
createHome = true;
hashedPassword =
"$6$a1q2Duoe35hd5$IaZGXPfqyGv9uq5DQm7DZq0vIHsUs39sLktBiBBqMiwl/f/Z4jSvNZLJp9DZJYe5u2qGBYh1ca.jsXvQA8FPZ/";
extraGroups = [ "wheel" ];
uid = 10000;
};
root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILkbTj6x4GmbqcAhs01wBBz+uP7BHbLgFpeUx18zLy7t"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCyFFV286npHAsnA1OCprLSZgdx/auUaldnNxB2MFE0iJX7R8ps1M9VkaxXdxIKB8x4PkKRTEkroouu+UmRBfKh3/QebRrKlvrElkc/d7CfIOJmssz4jRGa4t8rQEeB02ccl8Zb5ree2b3d6lbQl1QjyIwsrwpkqqw5znhD7N7fcfxg3PWnqyR2p0sy5CS5g76br6cwpD5Lk8nO0RhKR9mD5vW3kWSORCM+lNshfIilYqDwQtvsj9WcbhDKzgcY25t4tfgsjzOoPq/1+9LRluk2aoqe98QuVov0RANnzrsQhIgs8Ye9C39G8Lvcjusidy3ZSBcBiiq2R0Rvk8eA/gjMkXZ79ASPO8JwoNWum2DVn3ogz6rt+EaoI/yFqqs7d8gSRIjHklQDLXL1/6jH0jnyNxHH0hWJ8Vx41DKAaASObYRCb6eN4gYrrR3c+ZtQe7wQTxouEnZrAjHJG9pZxi39PXvB0TPXzmXxjBwzuFGQdczfLTn5fQtVVYPhv0yAzJk="
];
};
};
})
];
};
};
}