nixos-config/flake.nix
Kabbone c4dc2c17d5
microvm initial try definition
microvm first running version

microvm first running version
2023-10-15 08:38:51 +02:00

56 lines
2.4 KiB
Nix

# My first run with nix. The config is based on Matthias Benaets config and youtube tutorial
# https://github.com/MatthiasBenaets/nixos-config
# https://www.youtube.com/watch?v=AGVXJ-TIv3Y
#
# flake.nix *
# ├─ ./hosts
# │ └─ default.nix
{
description = "Kabbone's peronal NixOS Flake config";
inputs = # All flake references used to build my NixOS setup. These are dependencies.
{
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Nix Packages
nixpkgs-stable.url = "github:NixOS/nIxpkgs/nixos-23.05";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
microvm.url = "github:astro/microvm.nix";
microvm.inputs.nixpkgs.follows = "nixpkgs";
home-manager = { # User Package Management
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nur = {
url = "github:nix-community/NUR"; # NUR Packages
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
jovian-nixos = {
url = "github:Jovian-Experiments/Jovian-NixOS/development";
flake = false;
};
};
outputs = inputs @ { self, nixpkgs, nixpkgs-stable, nixos-hardware, home-manager, nur, agenix, jovian-nixos, microvm, ... }: # Function that tells my flake which to use and what do what to do with the dependencies.
let # Variables that can be used in the config files
user = "kabbone";
location = "$HOME/.setup";
in # Use above variables in ...
{
nixosConfigurations = ( # NixOS configurations
import ./hosts { # Imports ./hosts/default.nix
inherit (nixpkgs) lib;
inherit inputs nixpkgs nixpkgs-stable nixos-hardware home-manager nur user location agenix jovian-nixos microvm; # Also inherit home-manager so it does not need to be defined here.
nix.allowedUsers = [ "@wheel" ];
security.sudo.execWheelOnly = true;
}
);
};
}