2022-03-07 16:01:52 +01:00
|
|
|
{
|
|
|
|
description = "Mmmmmh, Spaghetti™";
|
|
|
|
|
|
|
|
inputs = {
|
2022-06-12 00:23:10 +02:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-22.05";
|
2022-03-07 16:01:52 +01:00
|
|
|
|
|
|
|
home-manager = {
|
2022-06-12 00:23:10 +02:00
|
|
|
url = "github:nix-community/home-manager/release-22.05";
|
2022-03-07 16:01:52 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-04-03 18:03:55 +02:00
|
|
|
|
2022-03-22 16:37:19 +01:00
|
|
|
dotfiles = {
|
|
|
|
url = "github:h7x4abk3g/dotfiles";
|
|
|
|
flake = false;
|
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
|
2022-04-03 18:03:55 +02:00
|
|
|
fonts = {
|
|
|
|
url = "path:/home/h7x4/git/fonts";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2022-03-22 23:05:42 +01:00
|
|
|
website = {
|
|
|
|
url = "git+https://git.nani.wtf/h7x4/nani.wtf?ref=main";
|
|
|
|
# url = "path:/home/h7x4/git/nani.wtf";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
2022-06-21 01:47:36 +02:00
|
|
|
vscode-server = {
|
|
|
|
url = "github:msteen/nixos-vscode-server";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2022-03-07 16:01:52 +01:00
|
|
|
# Nix expressions and keys (TODO: move keys to another solution like agenix)
|
|
|
|
# which should be kept from the main repo for privacy reasons.
|
|
|
|
#
|
|
|
|
# Includes stuff like usernames, emails, ports, other server users, ssh hosts, etc.
|
|
|
|
secrets = {
|
|
|
|
# TODO: Push this to a remote.
|
|
|
|
url = "git+file:///home/h7x4/git/nix-secrets";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-06-21 01:47:36 +02:00
|
|
|
outputs = inputs@{
|
2022-03-22 23:05:42 +01:00
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
2022-06-21 01:47:36 +02:00
|
|
|
vscode-server,
|
2022-03-22 23:05:42 +01:00
|
|
|
secrets,
|
2022-04-03 18:03:55 +02:00
|
|
|
fonts,
|
2022-03-22 23:05:42 +01:00
|
|
|
dotfiles,
|
|
|
|
website,
|
|
|
|
...
|
|
|
|
}: let
|
2022-03-07 16:01:52 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
android_sdk.accept_license = true;
|
|
|
|
};
|
|
|
|
|
2022-04-03 18:03:55 +02:00
|
|
|
overlays = [ self.overlays.lib ];
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
in {
|
|
|
|
overlays = {
|
|
|
|
lib = import ./overlays/lib;
|
|
|
|
};
|
|
|
|
|
2022-04-03 18:03:55 +02:00
|
|
|
lib = (pkgs.extend self.overlays.lib).lib;
|
|
|
|
|
2022-04-12 02:50:53 +02:00
|
|
|
packages.${system} = import ./pkgs { inherit pkgs; };
|
|
|
|
|
2022-03-07 16:01:52 +01:00
|
|
|
homeConfigurations = {
|
|
|
|
h7x4 = home-manager.lib.homeManagerConfiguration {
|
|
|
|
inherit system;
|
|
|
|
inherit pkgs;
|
|
|
|
|
|
|
|
username = "h7x4";
|
|
|
|
homeDirectory = "/home/h7x4";
|
2022-06-12 00:23:10 +02:00
|
|
|
stateVersion = "22.05";
|
2022-03-07 16:01:52 +01:00
|
|
|
configuration = {
|
|
|
|
imports = [
|
|
|
|
./home.nix
|
2022-06-21 01:47:36 +02:00
|
|
|
./modules
|
2022-03-07 16:01:52 +01:00
|
|
|
];
|
2022-06-21 01:47:36 +02:00
|
|
|
|
|
|
|
machineVars = {
|
|
|
|
headless = false;
|
|
|
|
fixDisplayCommand = "echo 'not available'";
|
|
|
|
gaming = true;
|
|
|
|
development = true;
|
|
|
|
laptop = false;
|
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations = let
|
2022-06-21 01:47:36 +02:00
|
|
|
nixSys = name:
|
2022-03-07 16:01:52 +01:00
|
|
|
nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
inherit pkgs;
|
2022-04-03 18:03:55 +02:00
|
|
|
inherit (pkgs) lib;
|
2022-03-07 16:01:52 +01:00
|
|
|
modules = [
|
2022-04-03 18:03:55 +02:00
|
|
|
"${home-manager}/nixos"
|
2022-06-21 01:47:36 +02:00
|
|
|
./modules
|
2022-04-03 18:03:55 +02:00
|
|
|
./hosts/common.nix
|
2022-03-07 16:01:52 +01:00
|
|
|
./hosts/${name}/configuration.nix
|
2022-06-21 01:47:36 +02:00
|
|
|
"${vscode-server}/default.nix"
|
|
|
|
{ config._module.args = { inherit inputs; secrets = secrets.outputs.default; }; }
|
2022-03-07 16:01:52 +01:00
|
|
|
];
|
2022-06-21 01:47:36 +02:00
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
in {
|
2022-06-21 01:47:36 +02:00
|
|
|
Tsuki = nixSys "tsuki";
|
|
|
|
Eisei = nixSys "eisei";
|
|
|
|
kasei = nixSys "kasei";
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|