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 | 53aad5e | 2022-07-24 20:19:08 +0100 | [diff] [blame] | 5 | registry = { |
| 6 | url = "github:nixos/flake-registry"; |
| 7 | flake = false; |
| 8 | }; |
Skyler Grey | a239bbe | 2022-05-30 23:08:02 +0100 | [diff] [blame] | 9 | nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05"; |
Skyler Grey | f8cca8f | 2022-05-24 20:17:21 +0100 | [diff] [blame] | 10 | nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; |
Skyler Grey | f11bbb6 | 2022-07-29 08:55:08 +0100 | [diff] [blame] | 11 | nixpkgs-21-11.url = "github:nixos/nixpkgs/nixos-21.11"; |
Skyler Grey | a239bbe | 2022-05-30 23:08:02 +0100 | [diff] [blame] | 12 | home-manager.url = "github:nix-community/home-manager/release-22.05"; |
Skyler Grey | c721350 | 2022-05-21 21:12:24 +0100 | [diff] [blame] | 13 | nurpkgs.url = "github:nix-community/NUR"; |
| 14 | comma.url = "github:nix-community/comma"; |
Skyler Grey | cecd979 | 2022-07-27 14:38:47 +0100 | [diff] [blame] | 15 | fzf-tab = { |
| 16 | url = "github:Aloxaf/fzf-tab"; |
| 17 | flake = false; |
| 18 | }; |
Skyler Grey | d4c4867 | 2022-08-04 16:19:48 +0100 | [diff] [blame] | 19 | git-confirm = { |
| 20 | url = "github:pimterry/git-confirm"; |
| 21 | flake = false; |
| 22 | }; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 23 | |
| 24 | # Make sure flakes we depend on use the same version of nixpkgs as we do |
| 25 | home-manager.inputs.nixpkgs.follows = "nixpkgs"; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 26 | }; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 27 | |
Skyler Grey | f11bbb6 | 2022-07-29 08:55:08 +0100 | [diff] [blame] | 28 | outputs = extraInputs@{ self, nixpkgs, nixpkgs-unstable, nixpkgs-21-11, home-manager, ... }: |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 29 | let |
| 30 | system = "x86_64-linux"; # TOOD: Add options for MacOS |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 31 | |
Skyler Grey | 30817a7 | 2022-07-21 00:36:23 +0100 | [diff] [blame] | 32 | unstable-overlays = import ./src/utils/nixFilesIn.nix nixpkgs-unstable.lib ./src/unstable-overlays; |
| 33 | |
Skyler Turner | b03a401 | 2022-03-04 22:38:22 +0000 | [diff] [blame] | 34 | pkgs = import nixpkgs { |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 35 | inherit system; |
| 36 | |
Skyler Grey | 1e5be0e | 2022-07-25 13:34:13 +0100 | [diff] [blame] | 37 | config = { allowUnfree = true; }; |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 38 | }; |
| 39 | |
Skyler Grey | 4e7e66e | 2022-05-24 20:29:52 +0100 | [diff] [blame] | 40 | pkgs-unstable = import nixpkgs-unstable { |
| 41 | inherit system; |
| 42 | |
Skyler Grey | 30817a7 | 2022-07-21 00:36:23 +0100 | [diff] [blame] | 43 | overlays = map (f: import f) unstable-overlays; |
Skyler Grey | 1e5be0e | 2022-07-25 13:34:13 +0100 | [diff] [blame] | 44 | config = { allowUnfree = true; }; |
Skyler Grey | 4e7e66e | 2022-05-24 20:29:52 +0100 | [diff] [blame] | 45 | }; |
| 46 | |
Skyler Grey | f11bbb6 | 2022-07-29 08:55:08 +0100 | [diff] [blame] | 47 | pkgs-21-11 = import nixpkgs-21-11 { |
| 48 | inherit system; |
| 49 | |
| 50 | config = { allowUnfree = true; }; |
| 51 | }; |
| 52 | |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 53 | variables = import ./src/common/variables.nix; |
| 54 | in { |
Skyler Grey | 677635f | 2022-05-18 21:58:58 +0100 | [diff] [blame] | 55 | nixosConfigurations = { |
Skyler Grey | 16d536e | 2022-05-18 22:00:59 +0100 | [diff] [blame] | 56 | default = nixpkgs.lib.nixosSystem { |
Skyler Grey | 395d628 | 2022-05-19 06:56:49 +0100 | [diff] [blame] | 57 | inherit system; |
| 58 | |
Skyler Grey | e11b9a7 | 2022-05-31 14:29:27 +0100 | [diff] [blame] | 59 | specialArgs = extraInputs // { |
Skyler Grey | f11bbb6 | 2022-07-29 08:55:08 +0100 | [diff] [blame] | 60 | inherit nixpkgs nixpkgs-unstable home-manager pkgs-unstable pkgs-21-11 system; |
Skyler Grey | f93dd5a | 2022-05-19 06:56:58 +0100 | [diff] [blame] | 61 | }; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 62 | |
Skyler Grey | 677635f | 2022-05-18 21:58:58 +0100 | [diff] [blame] | 63 | modules = [ |
| 64 | src/system.nix |
| 65 | ]; |
| 66 | }; |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 67 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 68 | |
Skyler Grey | 1ec5461 | 2022-05-22 07:14:17 +0100 | [diff] [blame] | 69 | homeConfigurations = { |
Skyler Grey | b05fb74 | 2022-05-22 07:15:17 +0100 | [diff] [blame] | 70 | "${variables.username}" = home-manager.lib.homeManagerConfiguration rec { |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 71 | inherit system pkgs; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 72 | |
Skyler Grey | f11bbb6 | 2022-07-29 08:55:08 +0100 | [diff] [blame] | 73 | extraSpecialArgs = extraInputs // { inherit nixpkgs nixpkgs-unstable home-manager pkgs-unstable pkgs-21-11 system; }; |
Skyler Grey | c721350 | 2022-05-21 21:12:24 +0100 | [diff] [blame] | 74 | |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 75 | username = variables.username; |
| 76 | homeDirectory = "/home/${username}"; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 77 | stateVersion = variables.stateVersion; |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 78 | |
| 79 | configuration = { |
| 80 | imports = [ |
| 81 | src/home.nix |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 82 | ]; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 83 | |
| 84 | programs.home-manager.enable = true; |
| 85 | # Although I don't do any other configuration here directly, |
| 86 | # this is needed to make home-manager work and so *must* be |
| 87 | # present on every home manager configuration. |
Skyler Turner | 20445bd | 2022-03-04 22:22:57 +0000 | [diff] [blame] | 88 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 89 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 90 | }; |
| 91 | }; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 92 | } |