summaryrefslogtreecommitdiff
path: root/nixos/flake.nix
blob: b9c91145b7250a4caae4086e90c90efd9c4e7ed5 (plain)
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
44
45
46
47
48
49
50
51
52
53
54
55
56
{
  description = "Flake";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
    nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
    intelfetch.url = "git+https://git.sr.ht/~coasteen/intelfetch";
    home-manager.url = "github:nix-community/home-manager/release-25.05";
    home-manager.inputs.nixpkgs.follows = "nixpkgs";
  };

  outputs = { nixpkgs, nixpkgs-unstable, home-manager, intelfetch, ... }: let
    system = "x86_64-linux";
    pkgs = import nixpkgs {
      inherit system;
      config = { allowUnfree = true; };
    };
    pkgsUnstable = import nixpkgs-unstable { inherit system; };
  in {
    nixosConfigurations.gloria = nixpkgs.lib.nixosSystem {
      inherit system;

      modules = [
        (import ./configuration/configuration.nix { inherit pkgs pkgsUnstable; })
        ./configuration/sys/coreutils-configuration.nix
		./configuration/sys/swap.nix
        ./hardware-configuration.nix

        {
          environment.systemPackages = [
            intelfetch.packages.${system}.intelfetch
          ];
        }

        home-manager.nixosModules.home-manager {
          home-manager = {
            useGlobalPkgs = true;
            useUserPackages = true;
            backupFileExtension = "home-backup";

            users.coast = { ... }: {
              imports = [
                ./home-configuration/configuration.nix
                ./home-configuration/apps/sway.nix
                ./home-configuration/apps/zsh.nix
                ./home-configuration/apps/nushell.nix
				./home-configuration/apps/alacritty.nix
				./home-configuration/apps/foot.nix
              ];
            };
          };
        }
      ];
    };
  };
}