First commit

This commit is contained in:
2025-07-22 02:30:15 +02:00
commit e9441f563b
66 changed files with 4401 additions and 0 deletions

59
flake.nix Normal file
View File

@@ -0,0 +1,59 @@
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
mysecrets = {
url = "git+ssh://gitea@git.unixyourbrain.org/beastie/nixos-secrets.git?ref=main&shallow=1";
flake = false;
};
};
outputs =
{ ... }@inputs:
let
mkSystem =
pkgs: system: hostname: username:
pkgs.lib.nixosSystem {
inherit system;
pkgs = import pkgs {
inherit system;
config.allowUnfree = true;
};
specialArgs = {
inherit hostname username inputs;
#hostname = hostname;
#username = username;
}; # For system modules
modules = [
# General configuration, for all machines
inputs.sops-nix.nixosModules.sops
inputs.disko.nixosModules.disko
./hosts/${hostname}/disk-config.nix
./hosts/${hostname}/hardware-configuration.nix
./modules
];
};
in
{
nixosConfigurations = {
#nixos-anywhere -- --flake './#test-kvm' --generate-hardware-config nixos-generate-config ./hosts/test-kvm/hardware-configuration.nix --target-host root@192.168.122.204
test-kvm = mkSystem inputs.nixpkgs "x86_64-linux" "test-kvm" "beastie";
#live-usb = mkSystem inputs.nixpkgs "x86_64-linux" "live-usb" "beastie";
#nixos-rebuild switch --flake ./#home-nix --sudo
home-nix = mkSystem inputs.nixpkgs "x86_64-linux" "home-nix" "beastie";
};
};
}