blob: fb6ff68e345835c529f04873aada432e7c0586b3 [file] [log] [blame]
Skyler Turner85ddd892022-03-04 10:21:38 +00001{
Skyler Turner62330c12022-03-04 22:10:16 +00002 description = "Minion3665's NixFiles (since 2022-03-24)";
Skyler Turner85ddd892022-03-04 10:21:38 +00003
Skyler Turner62330c12022-03-04 22:10:16 +00004 inputs = {
Skyler Greya239bbe2022-05-30 23:08:02 +01005 nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
Skyler Greyf8cca8f2022-05-24 20:17:21 +01006 nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
Skyler Greya239bbe2022-05-30 23:08:02 +01007 home-manager.url = "github:nix-community/home-manager/release-22.05";
Skyler Greyc7213502022-05-21 21:12:24 +01008 nurpkgs.url = "github:nix-community/NUR";
9 comma.url = "github:nix-community/comma";
Skyler Turner0ab3b7f2022-03-04 23:24:10 +000010
11 # Make sure flakes we depend on use the same version of nixpkgs as we do
12 home-manager.inputs.nixpkgs.follows = "nixpkgs";
Skyler Turner62330c12022-03-04 22:10:16 +000013 };
Skyler Turner85ddd892022-03-04 10:21:38 +000014
Skyler Grey92425512022-05-24 20:30:39 +010015 outputs = extraInputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, ... }:
Skyler Turnerc7a1e2f2022-03-04 22:23:50 +000016 let
17 system = "x86_64-linux"; # TOOD: Add options for MacOS
Skyler Turner85ddd892022-03-04 10:21:38 +000018
Skyler Turnerb03a4012022-03-04 22:38:22 +000019 pkgs = import nixpkgs {
Skyler Turnerc7a1e2f2022-03-04 22:23:50 +000020 inherit system;
21
22 config = { allowUnfree = true; };
23 };
24
Skyler Grey4e7e66e2022-05-24 20:29:52 +010025 pkgs-unstable = import nixpkgs-unstable {
26 inherit system;
27
28 config = { allowUnfree = true; };
29 };
30
Skyler Turnerc7a1e2f2022-03-04 22:23:50 +000031 variables = import ./src/common/variables.nix;
32 in {
Skyler Grey677635f2022-05-18 21:58:58 +010033 nixosConfigurations = {
Skyler Grey16d536e2022-05-18 22:00:59 +010034 default = nixpkgs.lib.nixosSystem {
Skyler Grey395d6282022-05-19 06:56:49 +010035 inherit system;
36
Skyler Grey22c372c2022-05-30 23:39:40 +010037 specialArgs = {
Skyler Grey395d6282022-05-19 06:56:49 +010038 inherit nixpkgs;
Skyler Greyf93dd5a2022-05-19 06:56:58 +010039 };
Skyler Turner85ddd892022-03-04 10:21:38 +000040
Skyler Grey677635f2022-05-18 21:58:58 +010041 modules = [
42 src/system.nix
43 ];
44 };
Skyler Turnerc7a1e2f2022-03-04 22:23:50 +000045 };
Skyler Turner62330c12022-03-04 22:10:16 +000046
Skyler Grey1ec54612022-05-22 07:14:17 +010047 homeConfigurations = {
Skyler Greyb05fb742022-05-22 07:15:17 +010048 "${variables.username}" = home-manager.lib.homeManagerConfiguration rec {
Skyler Turnerc7a1e2f2022-03-04 22:23:50 +000049 inherit system pkgs;
Skyler Turner62330c12022-03-04 22:10:16 +000050
Skyler Grey4e7e66e2022-05-24 20:29:52 +010051 extraSpecialArgs = extraInputs // { inherit pkgs-unstable; };
Skyler Greyc7213502022-05-21 21:12:24 +010052
Skyler Turnerc7a1e2f2022-03-04 22:23:50 +000053 username = variables.username;
54 homeDirectory = "/home/${username}";
Skyler Turner0ab3b7f2022-03-04 23:24:10 +000055 stateVersion = variables.stateVersion;
Skyler Turnerc7a1e2f2022-03-04 22:23:50 +000056
57 configuration = {
58 imports = [
59 src/home.nix
Skyler Turner62330c12022-03-04 22:10:16 +000060 ];
Skyler Turner0ab3b7f2022-03-04 23:24:10 +000061
62 programs.home-manager.enable = true;
63 # Although I don't do any other configuration here directly,
64 # this is needed to make home-manager work and so *must* be
65 # present on every home manager configuration.
Skyler Turner20445bd2022-03-04 22:22:57 +000066 };
Skyler Turner62330c12022-03-04 22:10:16 +000067 };
Skyler Turner62330c12022-03-04 22:10:16 +000068 };
69 };
Skyler Turner85ddd892022-03-04 10:21:38 +000070}