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-25.05-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 = {
23 url = "https://git.lix.systems/lix-project/lix/archive/release-2.93.tar.gz";
24 flake = false;
25 };
26 lix-module = {
27 url = "https://git.lix.systems/lix-project/nixos-module/archive/release-2.93.tar.gz";
28 inputs.nixpkgs.follows = "nixpkgs";
29 inputs.lix.follows = "lix";
30 };
31
32 neorg-overlay = {
33 url = "github:nvim-neorg/nixpkgs-neorg-overlay";
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 legacyPackages = inputs'.darwin-stable.legacyPackages.callPackage ./pkgs {};
93
94 packages =
95 (pkgs.callPackage ./pkgs {})
96 // {
97 default = pkgs.writeScriptBin "activate" ''
98 #!/bin/sh
99 ${pkgs.lib.getExe self'.packages.system} switch
100 '';
101
102 system = let
103 builder =
104 if pkgs.stdenv.isDarwin
105 then pkgs.lib.getExe' inputs'.darwin.packages.darwin-rebuild "darwin-rebuild"
106 else pkgs.lib.getExe pkgs.nixos-rebuild;
107 in
108 pkgs.writeScriptBin "activate-system" ''
109 #!/bin/sh
110 exec ${builder} --flake "${self}" "$@"
111 '';
112 };
113
114 devShells = let
115 globalShells = pkgs.callPackage ./dev_shells.nix {};
116 default = pkgs.mkShell {
117 packages = [
118 pkgs.fnlfmt
119 # TODO: Remove it and manage all configuration from Nix
120 pkgs.stow
121 ];
122 };
123 in
124 globalShells // {inherit default;};
125 };
126 };
127}