nix-starter-configs/configuration.nix

38 lines
1.4 KiB
Nix
Raw Normal View History

2021-12-16 13:05:07 -08:00
# This is your system's configuration file.
{ inputs, lib, config, pkgs, ... }: {
2021-12-16 12:48:46 -08:00
imports = [
2021-12-16 13:05:07 -08:00
# If you want to use modules from other flakes (such as nixos-hardware), use something like:
2021-12-16 12:48:46 -08:00
# inputs.hardware.nixosModules.common-cpu-amd
2021-12-16 13:05:07 -08:00
# inputs.hardware.nixosModules.common-ssd
# It's extremely recommended you take a look at https://github.com/nixos/nixos-hardware
# and import modules relevant to your hardware (the above examples are for AMD CPUs and SSDs).
# Import your generated hardware configuration
2021-12-16 12:48:46 -08:00
./hardware-configuration.nix
2021-12-16 13:05:07 -08:00
# Feel free to split up your configuration and import pieces of it here.
2021-12-16 12:48:46 -08:00
];
2021-12-16 13:05:07 -08:00
# Set your hostname
networking.hostName = "cool-computer";
# Comment out to disable unfree packages for your system
nixpkgs.config.allowUnfree = true;
2021-12-16 12:28:43 -08:00
# This will make all users source .nix-profile on login, activating home
# manager automatically. Will allow you to use home-manager standalone on
# setups with opt-in persistance.
environment.loginShellInit = ''
[ -d "$HOME/.nix-profile" ] || /nix/var/nix/profiles/per-user/$USER/home-manager/activate &> /dev/null
'';
2021-12-16 13:05:07 -08:00
# This will add your inputs as registries, making operations with them
# consistent with your flake inputs.
nix.registry = lib.mapAttrs' (n: v:
lib.nameValuePair ("${n}") ({ flake = inputs."${n}"; })
) inputs;
system.stateVersion = "21.11";
2021-12-16 12:28:43 -08:00
}