first commit
This commit is contained in:
56
flake.nix
Normal file
56
flake.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
modules = [
|
||||
# General configuration, for all machines
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.disko.nixosModules.disko
|
||||
./hosts/${hostname}
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
#nixos-anywhere -- --flake './#generic' --generate-hardware-config nixos-generate-config ./hosts/generic/hardware-configuration.nix --target-host beastie@192.168.122.204
|
||||
generic = mkSystem inputs.nixpkgs "x86_64-linux" "generic" "beastie";
|
||||
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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user