add support for flakes in nixos config

This commit is contained in:
Alexander Navarro 2023-07-27 10:35:15 -04:00
parent bc5d182e1e
commit 4efdcd4e60
2 changed files with 32 additions and 0 deletions

View file

@ -10,6 +10,9 @@
./hardware-configuration.nix
];
# Enable Flakes and the new command-line tool
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

29
nixos/flake.nix Normal file
View file

@ -0,0 +1,29 @@
{
description = "aleidk NixOs Flake";
# Inputs
# https://nixos.org/manual/nix/unstable/command-ref/new-cli/nix3-flake.html#flake-inputs
# Add more sources
# https://nixos-and-flakes.thiscute.world/nixos-with-flakes/nixos-with-flakes-enabled#managing-system-packages-with-flakes
inputs = {
nixpkgs.url = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager/release-23.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations = {
"nixos" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
};
};
};
}