Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 1 | { |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 2 | description = "Minion3665's NixFiles (since 2022-03-24)"; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 3 | |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 4 | inputs = { |
Skyler Grey | a239bbe | 2022-05-30 23:08:02 +0100 | [diff] [blame] | 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05"; |
Skyler Grey | f8cca8f | 2022-05-24 20:17:21 +0100 | [diff] [blame] | 6 | nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; |
Skyler Grey | 2bad969 | 2022-06-06 19:03:16 +0100 | [diff] [blame^] | 7 | nixpkgs-mongodb-fix.url = "github:bryanasdev000/nixpkgs/mongodb-fixes"; |
Skyler Grey | a239bbe | 2022-05-30 23:08:02 +0100 | [diff] [blame] | 8 | home-manager.url = "github:nix-community/home-manager/release-22.05"; |
Skyler Grey | c721350 | 2022-05-21 21:12:24 +0100 | [diff] [blame] | 9 | nurpkgs.url = "github:nix-community/NUR"; |
| 10 | comma.url = "github:nix-community/comma"; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 11 | |
| 12 | # Make sure flakes we depend on use the same version of nixpkgs as we do |
| 13 | home-manager.inputs.nixpkgs.follows = "nixpkgs"; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 14 | }; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 15 | |
Skyler Grey | 9242551 | 2022-05-24 20:30:39 +0100 | [diff] [blame] | 16 | outputs = extraInputs@{ self, nixpkgs, nixpkgs-unstable, home-manager, ... }: |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 17 | let |
| 18 | system = "x86_64-linux"; # TOOD: Add options for MacOS |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 19 | |
Skyler Turner | b03a401 | 2022-03-04 22:38:22 +0000 | [diff] [blame] | 20 | pkgs = import nixpkgs { |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 21 | inherit system; |
| 22 | |
| 23 | config = { allowUnfree = true; }; |
| 24 | }; |
| 25 | |
Skyler Grey | 4e7e66e | 2022-05-24 20:29:52 +0100 | [diff] [blame] | 26 | pkgs-unstable = import nixpkgs-unstable { |
| 27 | inherit system; |
| 28 | |
| 29 | config = { allowUnfree = true; }; |
| 30 | }; |
| 31 | |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 32 | variables = import ./src/common/variables.nix; |
| 33 | in { |
Skyler Grey | 677635f | 2022-05-18 21:58:58 +0100 | [diff] [blame] | 34 | nixosConfigurations = { |
Skyler Grey | 16d536e | 2022-05-18 22:00:59 +0100 | [diff] [blame] | 35 | default = nixpkgs.lib.nixosSystem { |
Skyler Grey | 395d628 | 2022-05-19 06:56:49 +0100 | [diff] [blame] | 36 | inherit system; |
| 37 | |
Skyler Grey | e11b9a7 | 2022-05-31 14:29:27 +0100 | [diff] [blame] | 38 | specialArgs = extraInputs // { |
Skyler Grey | 395d628 | 2022-05-19 06:56:49 +0100 | [diff] [blame] | 39 | inherit nixpkgs; |
Skyler Grey | f93dd5a | 2022-05-19 06:56:58 +0100 | [diff] [blame] | 40 | }; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 41 | |
Skyler Grey | 677635f | 2022-05-18 21:58:58 +0100 | [diff] [blame] | 42 | modules = [ |
| 43 | src/system.nix |
| 44 | ]; |
| 45 | }; |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 46 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 47 | |
Skyler Grey | 1ec5461 | 2022-05-22 07:14:17 +0100 | [diff] [blame] | 48 | homeConfigurations = { |
Skyler Grey | b05fb74 | 2022-05-22 07:15:17 +0100 | [diff] [blame] | 49 | "${variables.username}" = home-manager.lib.homeManagerConfiguration rec { |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 50 | inherit system pkgs; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 51 | |
Skyler Grey | 4e7e66e | 2022-05-24 20:29:52 +0100 | [diff] [blame] | 52 | extraSpecialArgs = extraInputs // { inherit pkgs-unstable; }; |
Skyler Grey | c721350 | 2022-05-21 21:12:24 +0100 | [diff] [blame] | 53 | |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 54 | username = variables.username; |
| 55 | homeDirectory = "/home/${username}"; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 56 | stateVersion = variables.stateVersion; |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 57 | |
| 58 | configuration = { |
| 59 | imports = [ |
| 60 | src/home.nix |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 61 | ]; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 62 | |
| 63 | programs.home-manager.enable = true; |
| 64 | # Although I don't do any other configuration here directly, |
| 65 | # this is needed to make home-manager work and so *must* be |
| 66 | # present on every home manager configuration. |
Skyler Turner | 20445bd | 2022-03-04 22:22:57 +0000 | [diff] [blame] | 67 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 68 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 69 | }; |
| 70 | }; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 71 | } |