setup flake

This commit is contained in:
♥ Minnie ♥ 2023-04-05 23:18:54 +08:00
parent 5a491e5f7c
commit cc23051475

View file

@ -1,5 +1,5 @@
{
description = "Your new nix config";
description = "NixOS + Home Manager configuration with flakes";
inputs = {
# Nixpkgs
@ -13,12 +13,8 @@
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# TODO: Add any other flake you might need
# hardware.url = "github:nixos/nixos-hardware";
# Shameless plug: looking for a way to nixify your themes and make
# everything match nicely? Try nix-colors!
# nix-colors.url = "github:misterio77/nix-colors";
# Add any other flake you might need
nixpkgs-f2k.url = "github:fortuneteller2k/nixpkgs-f2k";
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
@ -32,7 +28,7 @@
"x86_64-darwin"
];
in
rec {
{
# Your custom packages
# Acessible through 'nix build', 'nix shell', etc
packages = forAllSystems (system:
@ -58,8 +54,7 @@
# NixOS configuration entrypoint
# Available through 'nixos-rebuild --flake .#your-hostname'
nixosConfigurations = {
# FIXME replace with your hostname
your-hostname = nixpkgs.lib.nixosSystem {
fuchsia = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs outputs; };
modules = [
# > Our main nixos configuration file <
@ -71,8 +66,7 @@
# Standalone home-manager configuration entrypoint
# Available through 'home-manager --flake .#your-username@your-hostname'
homeConfigurations = {
# FIXME replace with your username@hostname
"your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
"sajenim@fuchsia" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs outputs; };
modules = [