NixOS-Configuration/flake.nix

67 lines
2.0 KiB
Nix
Raw Normal View History

2024-01-09 17:29:12 +00:00
{
description = "My nixos config as a flake";
inputs = {
2024-01-16 02:25:58 +00:00
# Stable
nixpkgs.url = "nixpkgs/nixos-23.11";
home-manager.url = "github:nix-community/home-manager/release-23.11";
2024-01-29 04:50:40 +00:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2024-01-16 02:25:58 +00:00
# Unstable
2024-01-15 05:16:28 +00:00
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
2024-01-29 04:50:40 +00:00
home-manager-unstable.url = "github:nix-community/home-manager";
home-manager-unstable.inputs.nixpkgs.follows = "nixpkgs-unstable";
2024-01-30 04:25:16 +00:00
nvim-config.url = "git+https://gitea.cam123.dev/CameronReed/Neovim-Config";
nvim-config.flake = false;
nix-colors.url = "github:misterio77/nix-colors";
2024-01-30 04:25:16 +00:00
lf-icons.url = "github:gokcehan/lf";
lf-icons.flake = false;
2024-01-09 17:29:12 +00:00
};
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, home-manager-unstable, nvim-config, nix-colors, lf-icons }:
2024-01-30 04:25:16 +00:00
let
common_dir = ./common;
inputs = { inherit common_dir nvim-config nix-colors lf-icons; };
2024-01-16 02:25:58 +00:00
in {
2024-01-09 17:29:12 +00:00
nixosConfigurations = {
2024-01-15 05:16:28 +00:00
nixos = nixpkgs-unstable.lib.nixosSystem {
2024-01-09 17:29:12 +00:00
system = "x86_64-linux";
2024-01-16 02:25:58 +00:00
specialArgs = { inherit common_dir; };
2024-01-09 17:29:12 +00:00
modules = [
2024-01-10 00:41:10 +00:00
./hosts/nixos/configuration.nix
2024-01-29 04:50:40 +00:00
home-manager-unstable.nixosModules.home-manager {
2024-01-16 02:25:58 +00:00
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cameron = import ./hosts/nixos/home-manager/cameron.nix;
2024-01-22 07:36:11 +00:00
home-manager.extraSpecialArgs = { inherit inputs; };
2024-01-16 02:25:58 +00:00
}
2024-01-09 17:29:12 +00:00
];
};
2024-01-15 05:16:28 +00:00
nixserver = nixpkgs.lib.nixosSystem {
2024-01-10 23:07:25 +00:00
system = "x86_64-linux";
2024-01-16 02:25:58 +00:00
specialArgs = { inherit common_dir; };
2024-01-10 23:07:25 +00:00
modules = [
./hosts/nixserver/configuration.nix
2024-01-29 04:05:46 +00:00
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cameron = import ./hosts/nixserver/home-manager/cameron.nix;
home-manager.extraSpecialArgs = { inherit inputs; };
2024-01-29 04:05:46 +00:00
}
2024-01-10 23:07:25 +00:00
];
};
2024-01-09 17:29:12 +00:00
};
};
}