Nix configurations for my personal machines (Linux & macOS)
1{
2 inputs = {
3 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
4 nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
5 # nur.url = "github:nix-community/NUR";
6
7 nix-darwin = {
8 url = "github:LnL7/nix-darwin";
9 inputs.nixpkgs.follows = "nixpkgs";
10 };
11
12 home-manager = {
13 url = "github:nix-community/home-manager";
14 inputs.nixpkgs.follows = "nixpkgs";
15 };
16
17 nix-index-database = {
18 url = "github:nix-community/nix-index-database";
19 inputs.nixpkgs.follows = "nixpkgs";
20 };
21
22 iosevka-solai = {
23 url = "github:ovyerus/iosevka-solai";
24 inputs.nixpkgs.follows = "nixpkgs";
25 };
26
27 niri-flake = {
28 url = "github:sodiboo/niri-flake";
29 inputs.nixpkgs.follows = "nixpkgs";
30 };
31
32 lix-module = {
33 url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-2.tar.gz";
34 inputs.nixpkgs.follows = "nixpkgs";
35 };
36
37 denix = {
38 url = "github:yunfachi/denix";
39 inputs.nixpkgs.follows = "nixpkgs";
40 inputs.home-manager.follows = "home-manager";
41 };
42
43 # ags = {
44 # url = "github:Aylur/ags";
45 # inputs.nixpkgs.follows = "nixpkgs";
46 # };
47 };
48
49 outputs = {
50 # ags,
51 denix,
52 home-manager,
53 lix-module,
54 niri-flake,
55 nix-darwin,
56 nix-index-database,
57 nixpkgs,
58 self,
59 ...
60 } @ inputs: let
61 system = "x86_64-linux";
62 pkgs = nixpkgs.legacyPackages.${system};
63 # agsPkgs = ags.packages.${system};
64 mkConfigurations = moduleSystem:
65 denix.lib.configurations (let
66 homeManagerUser = "ovy";
67 in {
68 inherit moduleSystem homeManagerUser;
69
70 paths = [./hosts ./modules]; #./rices];
71 specialArgs = {inherit inputs moduleSystem homeManagerUser;};
72 });
73 in {
74 packages.${system} = {
75 iconifydl = pkgs.callPackage ./pkgs/iconifydl.nix {};
76
77 # default = ags.lib.bundle {
78 # inherit pkgs;
79 # src = ./files/astal;
80 # name = "ovy-shell";
81 # entry = "app.ts";
82 # };
83 };
84
85 # devShells.x86_64-linux.default = pkgs.mkShell {
86 # buildInputs = [agsPkgs.agsFull agsPkgs.io agsPkgs.apps agsPkgs.tray self.packages.${system}.iconifydl];
87 # };
88
89 nixosConfigurations = mkConfigurations "nixos";
90 darwinConfigurations = mkConfigurations "darwin";
91
92 # nixosModules.serverHomeManager = {...}: {
93 # imports = [home-manager.nixosModules.home-manager];
94
95 # home-manager = {
96 # useGlobalPkgs = true;
97 # useUserPackages = true;
98 # backupFileExtension = "backup";
99 # users.ovy = import ./home/server.nix;
100 # extraSpecialArgs = {inherit inputs;};
101 # };
102 # };
103
104 formatter = {
105 aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra;
106 aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra;
107 x86_64-darwin = nixpkgs.legacyPackages.x86_64-darwin.alejandra;
108 x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
109 };
110 };
111}