blob: be45d5b13ed8ccd638c8e67fb1c0e2dbca5e199f [file] [log] [blame]
Skyler Turner32dbfb42021-12-24 15:50:22 +00001{
2 description = "Minion3665's NixFiles (@Python)";
3
4 inputs = {
5 # Set our release channels
6 nixpkgs.url = "nixpkgs/nixos-21.11";
7 home-manager.url = "github:nix-community/home-manager/release-21.11";
8
9 # Make sure flakes we depend on use the same version of nixpkgs as we do
10 home-manager.inputs.nixpkgs.follows = "nixpkgs";
11 };
12
13 outputs = { nixpkgs, home-manager, ... }:
14 let
15 system = "x86_64-linux";
16
17 # Convert nixpkgs to pkgs
18 pkgs = import nixpkgs {
19 inherit system;
20
21 config = { allowUnfree = true; };
22 };
23
24 # Nixpkgs helper functions
25 lib = nixpkgs.lib;
26 in {
27 # Create a system config from our old config file
28 nixosConfigurations = {
29 python = lib.nixosSystem {
30 inherit system;
31
32 modules = [
33 ./system/configuration.nix
34 ];
35 };
36 };
37
38 # This doesn't have to be called this; home-manager doesn't have a specified way to do this
39 # This solution is from https://www.youtube.com/watch?v=mJbQ--iBc1U
40 homeManagerConfigurations = {
41 minion = home-manager.lib.homeManagerConfiguration {
42 inherit system pkgs;
43
44 username = "minion";
45 homeDirectory = "/home/minion";
46
47 configuration = {
48 imports = [
49 ./users/minion/home.nix
50 ];
51 };
52
53 stateVersion = "21.11";
54 };
55 };
56 };
57}