this repo has no description
1{
2 description = "Hauleth's configuration";
3
4 inputs = {
5 nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6 darwin-stable.url = "github:nixos/nixpkgs/nixpkgs-24.11-darwin";
7 flake-parts.url = "github:hercules-ci/flake-parts";
8
9 home-manager = {
10 url = "github:nix-community/home-manager";
11 inputs.nixpkgs.follows = "nixpkgs";
12 };
13 agnoster = {
14 url = "github:hauleth/agnoster";
15 inputs.nixpkgs.follows = "nixpkgs";
16 };
17 darwin = {
18 url = "github:lnl7/nix-darwin";
19 inputs.nixpkgs.follows = "nixpkgs";
20 };
21
22 lix-module = {
23 url = "https://git.lix.systems/lix-project/nixos-module/archive/2.92.0-3.tar.gz";
24 inputs.nixpkgs.follows = "nixpkgs";
25 };
26
27 neorg-overlay = {
28 url = "github:nvim-neorg/nixpkgs-neorg-overlay";
29 inputs.nixpkgs.follows = "nixpkgs";
30 };
31
32 git-branchless = {
33 url = "github:arxanas/git-branchless";
34 inputs.nixpkgs.follows = "nixpkgs";
35 };
36
37 lexical = {
38 url = "github:lexical-lsp/lexical";
39 };
40
41 # nixvim = {
42 # url = "github:nix-community/nixvim";
43 # inputs.nixpkgs.follows = "nixpkgs";
44 # };
45 };
46
47 nixConfig = {
48 extra-substituters = [
49 "https://cache.lix.systems"
50 ];
51 extra-trusted-public-keys = [
52 "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
53 ];
54 };
55
56 outputs = {
57 self,
58 flake-parts,
59 ...
60 } @ inputs:
61 flake-parts.lib.mkFlake {inherit inputs;} {
62 flake = {
63 lib = import ./lib.nix inputs;
64
65 # TODO: Automatically discover and build that
66 darwinConfigurations."NiunioBook" =
67 (import ./hosts/niuniobook.nix {inherit inputs;})
68 .system;
69
70 darwinConfigurations."Supadupa" =
71 (import ./hosts/supadupa.nix {inherit inputs;})
72 .system;
73
74 templates = {
75 elixir = {
76 path = ./templates/elixir;
77 description = "Basic requirements for Elixir applications";
78 };
79 };
80 };
81
82 systems = ["x86_64-darwin" "aarch64-darwin"];
83
84 perSystem = {
85 self',
86 pkgs,
87 inputs',
88 ...
89 }: {
90 formatter = pkgs.alejandra;
91
92 packages =
93 (pkgs.callPackage ./pkgs {})
94 // {
95 default = pkgs.writeScriptBin "activate" ''
96 #!/bin/sh
97 ${pkgs.lib.getExe self'.packages.system} switch
98 '';
99
100 system = let
101 builder =
102 if pkgs.stdenv.isDarwin
103 then pkgs.lib.getExe' inputs'.darwin.packages.darwin-rebuild "darwin-rebuild"
104 else pkgs.lib.getExe pkgs.nixos-rebuild;
105 in
106 pkgs.writeScriptBin "activate-system" ''
107 #!/bin/sh
108 exec ${builder} --flake "${self}" "$@"
109 '';
110 };
111
112 devShells = let
113 globalShells = pkgs.callPackage ./dev_shells.nix {};
114 default = pkgs.mkShell {
115 packages = [
116 pkgs.fnlfmt
117 # TODO: Remove it and manage all configuration from Nix
118 pkgs.stow
119 ];
120 };
121 in
122 globalShells // {inherit default;};
123 };
124 };
125}