nicks-nix-config/flake.nix

122 lines
3.5 KiB
Nix
Raw Normal View History

2022-10-08 15:40:33 -07:00
{
2022-11-08 19:08:54 -08:00
description = "Nick's NixOS Configuration";
2022-10-08 15:40:33 -07:00
inputs = {
2023-07-29 12:48:45 -07:00
nixvim.url = "github:nix-community/nixvim";
2022-10-08 15:40:33 -07:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2023-07-29 12:48:45 -07:00
kmonad.url = "github:kmonad/kmonad?dir=nix";
# dead code?
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/master";
2022-10-08 15:40:33 -07:00
home-manager = {
url = github:nix-community/home-manager;
inputs.nixpkgs.follows = "nixpkgs";
};
2022-10-08 15:40:33 -07:00
};
outputs = inputs@{ self, nixpkgs, home-manager, kmonad, simple-nixos-mailserver, ... }:
2022-10-08 15:40:33 -07:00
let
user = "nixolas";
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib;
2022-10-08 15:40:33 -07:00
in {
nixosConfigurations = {
2022-11-08 19:08:54 -08:00
inherit (nixpkgs) lib;
2023-07-29 12:48:45 -07:00
inherit inputs nixpkgs home-manager user kmonad;
2023-03-31 17:38:15 -07:00
# Home server
2023-03-31 18:55:21 -07:00
Alaska = lib.nixosSystem {
2023-03-31 17:38:15 -07:00
inherit system;
specialArgs = { inherit user; };
modules = [
simple-nixos-mailserver.nixosModule
2023-03-31 17:38:15 -07:00
{
networking.hostName = "Alaska";
}
./hosts/Alaska
./hosts/Alaska/configuration.nix
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit user; };
2023-08-05 08:52:27 -07:00
users.${user} = {
imports = [
(import ./users/${user}.nix)
# Add nixvim to the homemanager
inputs.nixvim.homeManagerModules.nixvim
];
};
2023-03-31 17:38:15 -07:00
};
}
];
};
NicksNixLaptop = lib.nixosSystem {
inherit system;
2023-02-16 12:14:10 -08:00
specialArgs = { inherit user; };
modules = [
{
networking.hostName = "NicksNixLaptop";
}
kmonad.nixosModules.default
./hosts/laptop
./hosts/configuration.nix
./modules/kmonad.nix
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit user; };
2023-08-05 08:52:27 -07:00
users.${user} = {
imports = [
(import ./users/${user}.nix)
# Add nixvim to the homemanager
inputs.nixvim.homeManagerModules.nixvim
];
};
};
}
];
};
2023-02-25 17:19:34 -08:00
NicksNixDesktop = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = [
{
networking.hostName = "NicksNixDesktop";
}
kmonad.nixosModules.default
./hosts/desktop
./hosts/configuration.nix
./modules/kmonad.nix
2023-03-17 15:18:18 -07:00
./modules/steam.nix
2023-02-25 17:19:34 -08:00
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit user; };
2023-07-29 12:48:45 -07:00
users.${user} = {
imports = [
(import ./users/${user}.nix)
2023-07-29 16:01:53 -07:00
# Add nixvim to the homemanager
2023-07-29 12:48:45 -07:00
inputs.nixvim.homeManagerModules.nixvim
];
};
2023-02-25 17:19:34 -08:00
};
}
];
};
2022-10-08 15:40:33 -07:00
};
};
}