79 lines
2.2 KiB
Nix
79 lines
2.2 KiB
Nix
{
|
|
description = "A simple NixOS flake";
|
|
|
|
inputs = {
|
|
|
|
# NixOS official package source, using the nixos-23.11 branch here
|
|
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-23.11";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
hardware.url = "github:nixos/nixos-hardware";
|
|
|
|
# Declarative dotfile management
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# Declarative partitioning and formatting
|
|
disko = {
|
|
url = "github:nix-community/disko";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
# # Secrets management. See ./docs/secretsmgmt.md
|
|
# sops-nix = {
|
|
# url = "github:mic92/sops-nix";
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
|
# };
|
|
|
|
};
|
|
|
|
outputs = { self, nixpkgs, home-manager, disko, ... }@inputs:
|
|
let
|
|
inherit (self) outputs;
|
|
forAllSystems = nixpkgs.lib.genAttrs [
|
|
"x86_64-linux"
|
|
];
|
|
inherit (nixpkgs) lib;
|
|
configVars = import /home/willifan/.nix-config/vars { inherit inputs lib; };
|
|
specialArgs = { inherit inputs outputs configVars nixpkgs; };
|
|
in
|
|
{
|
|
# Please replace my-nixos with your hostname
|
|
nixosConfigurations = {
|
|
|
|
Lenni = lib.nixosSystem {
|
|
inherit specialArgs;
|
|
modules = [
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
#home-manager.users.willifan = import ./users/willifan/home;
|
|
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
|
}
|
|
disko.nixosModules.disko
|
|
./hosts
|
|
./users/willifan
|
|
];
|
|
};
|
|
|
|
Puenktchen = lib.nixosSystem {
|
|
inherit specialArgs;
|
|
modules = [
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
#home-manager.users.willifan = import ./users/willifan/home;
|
|
# Optionally, use home-manager.extraSpecialArgs to pass arguments to home.nix
|
|
}
|
|
disko.nixosModules.disko
|
|
./hosts
|
|
./users/willifan
|
|
];
|
|
};
|
|
|
|
};
|
|
};
|
|
}
|