❄️ Nix configurations
1{
2 description = "Home Manager configuration of alex";
3
4 inputs = {
5 # Specify the source of Home Manager and Nixpkgs.
6 nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
7 catppuccin.url = "github:catppuccin/nix";
8 nixos-hardware.url = "github:NixOS/nixos-hardware";
9 home-manager = {
10 url = "github:nix-community/home-manager";
11 inputs.nixpkgs.follows = "nixpkgs";
12 };
13 agenix = {
14 url = "github:ryantm/agenix";
15 inputs.nixpkgs.follows = "nixpkgs";
16 };
17 };
18
19 outputs = inputs @ { nixpkgs, catppuccin, home-manager, agenix, nixos-hardware, ... }:
20 let
21 system = "x86_64-linux";
22 pkgs = nixpkgs.legacyPackages.${system};
23 in {
24
25 # TODO optimize HM config (currently just otter / Framework)
26 homeConfigurations."alex" = home-manager.lib.homeManagerConfiguration {
27 inherit pkgs;
28
29 # Specify your home configuration modules here, for example,
30 # the path to your home.nix.
31 modules = [
32 ./home/otter
33 catppuccin.homeManagerModules.catppuccin
34 ];
35
36 # Optionally use extraSpecialArgs
37 # to pass through arguments to home.nix
38 };
39
40 nixosConfigurations = let
41 username = "alex";
42 #system = "x86_64-linux";
43 nixosSystem = import ./lib/nixosSystem.nix;
44 home-module = import ./home/ferret;
45 nixos-modules =./nixos/ferret;
46 ferret_modules = {
47 inherit nixos-modules;
48 inherit home-module;
49 };
50
51 otter_modules = {
52 nixos-modules = ./nixos/otter;
53 home-module = ./home/otter;
54 };
55 args = {
56 inherit inputs;
57 inherit nixpkgs;
58 inherit home-manager;
59 inherit system;
60 specialArgs = {
61 inherit inputs;
62 inherit username;
63 };
64 };
65 in {
66 ferret = nixosSystem (ferret_modules // args);
67 otter = nixosSystem (otter_modules // args);
68 };
69 };
70}