summary refs log tree commit diff stats
path: root/flake.nix
blob: b1a06963a486248db54f7f306e5be8533ea9f874 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
{
  description = "My Nixos system configuration";
  inputs = {
    nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
    home-manager = {
      url = "github:nix-community/home-manager/master";
      inputs.nixpkgs.follows = "nixpkgs";
    };
  };
  outputs = {
    self,
    nixpkgs,
    home-manager,
    ...
  } @ attrs: let
    system = "x86_64-linux";
    pkgs = nixpkgs.legacyPackages."${system}";
  in {
    nixosConfigurations.thinklappi = nixpkgs.lib.nixosSystem {
      inherit system;
      specialArgs = attrs;
      modules = [
        ./hosts/thinklappi
        home-manager.nixosModules.home-manager
        {
          home-manager.useGlobalPkgs = true;
          home-manager.useUserPackages = true;
          home-manager.users.sils = import ./users/sils;
          home-manager.extraSpecialArgs = {inherit nixpkgs system;};
        }
      ];
    };
    devShells."${system}" = {
      default = pkgs.mkShell {
        packages = with pkgs; [
          nil
          statix
          alejandra
        ];
      };
    };
  };
}