dotfiles

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

flake.nix (1322B)


      1 {
      2   description = "Linus' nix-darwin system flake";
      3 
      4   inputs = {
      5     nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
      6     nix-darwin.url = "github:nix-darwin/nix-darwin/master";
      7     nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
      8   };
      9 
     10   outputs = inputs@{ self, nix-darwin, nixpkgs }:
     11   let
     12     configuration = { pkgs, ... }: {
     13       # List packages installed in system profile. To search by name, run:
     14       # $ nix-env -qaP | grep wget
     15       environment.systemPackages =
     16         [ pkgs.vim
     17         ];
     18 
     19       # Necessary for using flakes on this system.
     20       nix.settings.experimental-features = "nix-command flakes";
     21 
     22       # Enable alternative shell support in nix-darwin.
     23       # programs.fish.enable = true;
     24 
     25       # Set Git commit hash for darwin-version.
     26       system.configurationRevision = self.rev or self.dirtyRev or null;
     27 
     28       # Used for backwards compatibility, please read the changelog before changing.
     29       # $ darwin-rebuild changelog
     30       system.stateVersion = 6;
     31 
     32       # The platform the configuration will be used on.
     33       nixpkgs.hostPlatform = "aarch64-darwin";
     34     };
     35   in
     36   {
     37     # Build darwin flake using:
     38     # $ darwin-rebuild build --flake .#simple
     39     darwinConfigurations."MacBook-Pro-von-Linus" = nix-darwin.lib.darwinSystem {
     40       modules = [ configuration ];
     41     };
     42   };
     43 }