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 = { |
| 5 | nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; |
| 6 | home-manager.url = "github:nix-community/home-manager/release-21.11"; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 7 | |
| 8 | # Make sure flakes we depend on use the same version of nixpkgs as we do |
| 9 | home-manager.inputs.nixpkgs.follows = "nixpkgs"; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 10 | }; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 11 | |
Skyler Turner | f410702 | 2022-03-04 22:22:28 +0000 | [diff] [blame] | 12 | outputs = { self, nixpkgs, home-manager }: |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 13 | let |
| 14 | system = "x86_64-linux"; # TOOD: Add options for MacOS |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 15 | |
Skyler Turner | b03a401 | 2022-03-04 22:38:22 +0000 | [diff] [blame] | 16 | pkgs = import nixpkgs { |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 17 | inherit system; |
| 18 | |
| 19 | config = { allowUnfree = true; }; |
| 20 | }; |
| 21 | |
| 22 | variables = import ./src/common/variables.nix; |
| 23 | in { |
| 24 | nixosConfigurations = { |
| 25 | default = pkgs.lib.nixosSystem { |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 26 | inherit system; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 27 | |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 28 | modules = [ |
| 29 | src/system.nix |
| 30 | ]; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 31 | }; |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 32 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 33 | |
Skyler Turner | 138b6f7 | 2022-03-04 22:35:15 +0000 | [diff] [blame] | 34 | homeManagerConfigurations = { |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 35 | minion = home-manager.lib.homeManagerConfiguration rec { |
| 36 | inherit system pkgs; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 37 | |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 38 | username = variables.username; |
| 39 | homeDirectory = "/home/${username}"; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 40 | stateVersion = variables.stateVersion; |
Skyler Turner | c7a1e2f | 2022-03-04 22:23:50 +0000 | [diff] [blame] | 41 | |
| 42 | configuration = { |
| 43 | imports = [ |
| 44 | src/home.nix |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 45 | ]; |
Skyler Turner | 0ab3b7f | 2022-03-04 23:24:10 +0000 | [diff] [blame] | 46 | |
| 47 | programs.home-manager.enable = true; |
| 48 | # Although I don't do any other configuration here directly, |
| 49 | # this is needed to make home-manager work and so *must* be |
| 50 | # present on every home manager configuration. |
Skyler Turner | 20445bd | 2022-03-04 22:22:57 +0000 | [diff] [blame] | 51 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 52 | }; |
Skyler Turner | 62330c1 | 2022-03-04 22:10:16 +0000 | [diff] [blame] | 53 | }; |
| 54 | }; |
Skyler Turner | 85ddd89 | 2022-03-04 10:21:38 +0000 | [diff] [blame] | 55 | } |