2022-03-07 16:01:52 +01:00
|
|
|
{
|
|
|
|
inputs = {
|
2022-11-26 22:50:17 +01:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-22.11";
|
2022-11-19 16:14:18 +01:00
|
|
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
2022-03-07 16:01:52 +01:00
|
|
|
|
|
|
|
home-manager = {
|
2022-11-26 22:50:17 +01:00
|
|
|
url = "github:nix-community/home-manager/release-22.11";
|
2022-03-07 16:01:52 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-04-03 18:03:55 +02:00
|
|
|
|
2022-11-19 16:35:01 +01:00
|
|
|
home-manager-local = {
|
|
|
|
url = "git+file:///home/h7x4/git/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
2022-03-22 16:37:19 +01:00
|
|
|
dotfiles = {
|
2022-11-20 17:10:12 +01:00
|
|
|
url = "git+https://git.nani.wtf/h7x4/dotfiles?ref=master";
|
2022-03-22 16:37:19 +01:00
|
|
|
flake = false;
|
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
|
2022-11-26 17:14:38 +01:00
|
|
|
nix-attr-search ={
|
|
|
|
url = "github:h7x4/nix-attr-search";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
inputs.home-manager.follows = "home-manager";
|
|
|
|
};
|
|
|
|
|
2022-04-03 18:03:55 +02:00
|
|
|
fonts = {
|
|
|
|
url = "path:/home/h7x4/git/fonts";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2023-01-04 14:32:11 +01:00
|
|
|
osuchan = {
|
|
|
|
url = "git+file:///home/h7x4/git/osuchan-line-bot";
|
|
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
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";
|
2023-01-04 01:31:11 +01:00
|
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
2022-03-22 23:05:42 +01:00
|
|
|
};
|
|
|
|
|
2023-01-03 22:45:41 +01:00
|
|
|
maunium-stickerpicker = {
|
|
|
|
url = "git+file:///home/h7x4/git/maunium-stickerpicker-nix";
|
|
|
|
};
|
|
|
|
|
2023-01-16 16:06:34 +01:00
|
|
|
minecraft = {
|
|
|
|
url = "github:infinidoge/nix-minecraft";
|
|
|
|
};
|
|
|
|
|
2023-01-20 19:52:04 +01:00
|
|
|
matrix-synapse-next = {
|
|
|
|
url = "github:dali99/nixos-matrix-modules";
|
|
|
|
};
|
|
|
|
|
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,
|
2022-11-19 16:14:18 +01:00
|
|
|
nixpkgs-unstable,
|
2022-03-22 23:05:42 +01:00
|
|
|
home-manager,
|
2022-11-19 16:35:01 +01:00
|
|
|
home-manager-local,
|
2023-01-20 19:52:04 +01:00
|
|
|
|
|
|
|
dotfiles,
|
2022-04-03 18:03:55 +02:00
|
|
|
fonts,
|
2023-01-20 19:52:04 +01:00
|
|
|
matrix-synapse-next,
|
2023-01-03 22:45:41 +01:00
|
|
|
maunium-stickerpicker,
|
2023-01-16 16:06:34 +01:00
|
|
|
minecraft,
|
2023-01-20 19:52:04 +01:00
|
|
|
nix-attr-search,
|
|
|
|
osuchan,
|
|
|
|
secrets,
|
|
|
|
vscode-server,
|
2022-11-19 16:14:18 +01:00
|
|
|
website
|
2022-03-22 23:05:42 +01:00
|
|
|
}: let
|
2022-03-07 16:01:52 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
|
2022-11-19 16:14:18 +01:00
|
|
|
pkgs-config = {
|
2022-03-07 16:01:52 +01:00
|
|
|
inherit system;
|
|
|
|
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
android_sdk.accept_license = true;
|
|
|
|
};
|
|
|
|
|
2023-01-04 14:32:11 +01:00
|
|
|
overlays = [ osuchan.overlays.default ];
|
2022-08-18 23:15:50 +02:00
|
|
|
};
|
|
|
|
|
2022-11-19 16:14:18 +01:00
|
|
|
pkgs = import nixpkgs pkgs-config;
|
|
|
|
unstable-pkgs = import nixpkgs-unstable pkgs-config;
|
2022-03-07 16:01:52 +01:00
|
|
|
in {
|
2022-11-19 16:14:18 +01:00
|
|
|
extendedLib = import ./lib { stdlib = pkgs.lib; };
|
2022-04-03 18:03:55 +02:00
|
|
|
|
2023-02-25 17:53:55 +01:00
|
|
|
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 = [
|
2022-08-19 01:54:13 +02:00
|
|
|
./home/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"
|
2022-08-19 14:50:03 +02:00
|
|
|
|
|
|
|
secrets.outputs.nixos-config
|
2023-01-04 14:32:11 +01:00
|
|
|
osuchan.outputs.nixosModules.default
|
2023-01-16 16:06:34 +01:00
|
|
|
minecraft.outputs.nixosModules.minecraft-servers
|
2023-01-20 19:52:04 +01:00
|
|
|
matrix-synapse-next.nixosModules.synapse
|
2022-08-19 14:50:03 +02:00
|
|
|
|
2022-08-18 23:15:50 +02:00
|
|
|
{
|
|
|
|
config._module.args = {
|
|
|
|
inherit inputs;
|
|
|
|
inherit unstable-pkgs;
|
2022-11-19 16:14:18 +01:00
|
|
|
inherit (self) extendedLib;
|
2022-08-19 14:50:03 +02:00
|
|
|
secrets = secrets.outputs.settings;
|
2022-08-18 23:15:50 +02:00
|
|
|
};
|
|
|
|
}
|
2022-08-19 14:50:03 +02:00
|
|
|
|
|
|
|
({ config, ... }:
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
2022-11-19 16:14:18 +01:00
|
|
|
extraSpecialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
inherit (self) extendedLib;
|
|
|
|
secrets = secrets.outputs.settings;
|
|
|
|
};
|
2022-08-19 14:50:03 +02:00
|
|
|
|
|
|
|
users.h7x4 = import ./home/home.nix {
|
|
|
|
inherit pkgs;
|
|
|
|
inherit inputs;
|
2022-11-19 16:14:18 +01:00
|
|
|
inherit (pkgs) lib;
|
2022-08-19 14:50:03 +02:00
|
|
|
inherit (config) machineVars colors;
|
2022-11-19 16:14:18 +01:00
|
|
|
inherit (self) extendedLib;
|
2022-08-19 14:50:03 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
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-11-19 21:27:31 +01:00
|
|
|
home-manager-tester = nixpkgs-unstable.lib.nixosSystem {
|
2022-11-19 16:35:01 +01:00
|
|
|
inherit system;
|
|
|
|
pkgs = unstable-pkgs;
|
|
|
|
inherit (unstable-pkgs) lib;
|
|
|
|
modules = [
|
|
|
|
"${home-manager-local}/nixos"
|
|
|
|
./hosts/special/home-manager-tester/configuration.nix
|
|
|
|
{
|
|
|
|
config._module.args = {
|
|
|
|
pkgs = unstable-pkgs;
|
|
|
|
# inherit (self) extendedLib;
|
|
|
|
# secrets = secrets.outputs.settings;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|