My NixOS dotfiles
1{
2 inputs = {
3 nixpkgs.url = "https://channels.nixos.org/nixpkgs-unstable/nixexprs.tar.xz";
4 };
5 outputs =
6 { self, ... }@inputs:
7 let
8 inherit (inputs) nixpkgs;
9 inherit (inputs.nixpkgs) lib;
10 specialArgs = { inherit inputs; };
11 forAllSystems =
12 function:
13 lib.genAttrs lib.systems.flakeExposed (
14 system:
15 function (
16 import nixpkgs {
17 inherit system;
18 config.allowUnfree = true;
19 }
20 )
21 );
22 dumb-manager = import ./lib/dumb-manager.nix;
23 in
24 {
25 nixosConfigurations = {
26 hetzner = nixpkgs.lib.nixosSystem {
27 inherit specialArgs;
28 modules = [
29 ./common
30 ./hetzner
31 ];
32 };
33 };
34 packages = forAllSystems (pkgs: {
35 # mac-home = (import ./home/mac) {inherit pkgs;};
36 mac-home = dumb-manager.configuration {
37 inherit pkgs nixpkgs;
38 module = ./home/mac;
39 };
40 });
41 # apps = forAllSystems (pkgs: {
42 # update-links = {
43 # type = "app";
44 # program = "${self.packages.${pkgs.system}.update-links}";
45 # };
46 # });
47 formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
48 };
49}