2022-03-07 16:01:52 +01:00
|
|
|
{
|
|
|
|
inputs = {
|
2024-11-18 14:26:43 +01:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-24.11";
|
|
|
|
# nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable";
|
|
|
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/master";
|
2022-03-07 16:01:52 +01:00
|
|
|
|
|
|
|
home-manager = {
|
2024-11-18 14:26:43 +01:00
|
|
|
url = "github:nix-community/home-manager/release-24.11";
|
2022-03-07 16:01:52 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-04-03 18:03:55 +02:00
|
|
|
|
2024-12-04 23:00:57 +01:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
|
2022-03-22 16:37:19 +01:00
|
|
|
dotfiles = {
|
2024-06-02 16:22:38 +02:00
|
|
|
url = "git+https://git.pvv.ntnu.no/oysteikt/dotfiles?ref=master";
|
2022-03-22 16:37:19 +01:00
|
|
|
flake = false;
|
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
|
2024-06-25 21:34:43 +02:00
|
|
|
sops-nix = {
|
|
|
|
url = "github:Mic92/sops-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2023-03-07 23:08:39 +01:00
|
|
|
|
2023-01-04 14:32:11 +01:00
|
|
|
osuchan = {
|
|
|
|
url = "git+file:///home/h7x4/git/osuchan-line-bot";
|
2023-07-12 02:09:54 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-01-04 14:32:11 +01:00
|
|
|
};
|
|
|
|
|
2024-06-25 21:34:43 +02:00
|
|
|
# TODO: fix website
|
|
|
|
# website = {
|
|
|
|
# url = "git+https://git.pvv.ntnu.no/oysteikt/nani.wtf?ref=main";
|
2022-03-22 23:05:42 +01:00
|
|
|
# url = "path:/home/h7x4/git/nani.wtf";
|
2023-01-04 01:31:11 +01:00
|
|
|
# inputs.nixpkgs.follows = "nixpkgs";
|
2024-06-25 21:34:43 +02:00
|
|
|
# };
|
2022-03-22 23:05:42 +01:00
|
|
|
|
2023-01-03 22:45:41 +01:00
|
|
|
maunium-stickerpicker = {
|
2024-06-09 16:17:30 +02:00
|
|
|
url = "github:h7x4/maunium-stickerpicker-nix/0.1.0";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-01-03 22:45:41 +01:00
|
|
|
};
|
|
|
|
|
2023-01-16 16:06:34 +01:00
|
|
|
minecraft = {
|
|
|
|
url = "github:infinidoge/nix-minecraft";
|
2023-07-12 02:09:54 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2023-01-16 16:06:34 +01:00
|
|
|
};
|
|
|
|
|
2023-01-20 19:52:04 +01:00
|
|
|
matrix-synapse-next = {
|
2024-06-02 17:13:29 +02:00
|
|
|
url = "github:dali99/nixos-matrix-modules/v0.6.0";
|
2024-06-25 21:34:43 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2023-01-20 19:52:04 +01:00
|
|
|
};
|
|
|
|
|
2022-06-21 01:47:36 +02:00
|
|
|
vscode-server = {
|
2023-07-12 02:09:54 +02:00
|
|
|
url = "github:nix-community/nixos-vscode-server";
|
2024-06-25 21:34:43 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2022-06-21 01:47:36 +02:00
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
|
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,
|
2024-12-04 23:00:57 +01:00
|
|
|
nixos-hardware,
|
2023-01-20 19:52:04 +01:00
|
|
|
|
|
|
|
dotfiles,
|
|
|
|
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
|
|
|
osuchan,
|
2023-03-07 23:08:39 +01:00
|
|
|
sops-nix,
|
2023-01-20 19:52:04 +01:00
|
|
|
vscode-server,
|
2024-06-25 21:34:43 +02: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;
|
2024-06-26 20:37:40 +02:00
|
|
|
segger-jlink.acceptLicense = true;
|
|
|
|
permittedInsecurePackages = [
|
2024-11-18 14:26:43 +01:00
|
|
|
"segger-jlink-qt4-796s"
|
2024-06-26 20:37:40 +02:00
|
|
|
];
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
|
2023-07-12 02:09:54 +02:00
|
|
|
overlays = let
|
2024-06-08 12:25:15 +02:00
|
|
|
nonrecursive-unstable-pkgs = import nixpkgs-unstable {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
2024-09-25 13:00:06 +02:00
|
|
|
config.segger-jlink.acceptLicense = true;
|
|
|
|
config.permittedInsecurePackages = [
|
2024-11-18 14:26:43 +01:00
|
|
|
"segger-jlink-qt4-796s"
|
2024-09-25 13:00:06 +02:00
|
|
|
];
|
2024-06-08 12:25:15 +02:00
|
|
|
};
|
2023-03-17 00:54:36 +01:00
|
|
|
in [
|
2024-06-26 20:18:28 +02:00
|
|
|
(self: super: {
|
2024-09-25 13:00:06 +02:00
|
|
|
inherit (nonrecursive-unstable-pkgs)
|
2024-11-18 14:26:43 +01:00
|
|
|
fcitx5-mozc
|
2024-09-25 13:00:06 +02:00
|
|
|
;
|
2024-06-26 20:18:28 +02:00
|
|
|
})
|
2023-03-07 23:19:13 +01:00
|
|
|
];
|
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;
|
|
|
|
|
2024-12-05 10:06:36 +01:00
|
|
|
inputs = pkgs.lib.mapAttrs (_: src: src.outPath) inputs;
|
2023-07-28 17:59:34 +02:00
|
|
|
|
2023-03-07 23:08:39 +01:00
|
|
|
devShells.${system}.default = pkgs.mkShell {
|
|
|
|
packages = with pkgs; [ sops ];
|
|
|
|
};
|
|
|
|
|
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
|
2023-07-28 21:48:15 +02:00
|
|
|
./modules/machineVars.nix
|
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
|
2024-06-29 13:48:06 +02:00
|
|
|
nixSys = name: extraConfig:
|
|
|
|
nixpkgs.lib.nixosSystem
|
|
|
|
({
|
|
|
|
inherit system;
|
|
|
|
inherit pkgs;
|
|
|
|
inherit (pkgs) lib;
|
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
inherit unstable-pkgs;
|
|
|
|
inherit (self) extendedLib;
|
|
|
|
} // (extraConfig.specialArgs or { });
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
"${home-manager}/nixos"
|
|
|
|
|
|
|
|
./hosts/common
|
|
|
|
./hosts/${name}/configuration.nix
|
|
|
|
|
|
|
|
./modules/machineVars.nix
|
|
|
|
./modules/socketActivation.nix
|
|
|
|
|
|
|
|
sops-nix.nixosModules.sops
|
|
|
|
|
|
|
|
({ config, ... }:
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
extraSpecialArgs = {
|
|
|
|
inherit inputs;
|
2024-09-04 10:30:00 +02:00
|
|
|
inherit unstable-pkgs;
|
2024-06-29 13:48:06 +02:00
|
|
|
inherit (self) extendedLib;
|
|
|
|
inherit (config) machineVars;
|
|
|
|
};
|
|
|
|
|
|
|
|
sharedModules = [
|
|
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
|
|
];
|
|
|
|
|
2024-06-30 14:35:38 +02:00
|
|
|
users.h7x4.imports = [
|
|
|
|
./home/home.nix
|
|
|
|
./hosts/${name}/home
|
|
|
|
];
|
2022-08-19 14:50:03 +02:00
|
|
|
};
|
2024-06-29 13:48:06 +02:00
|
|
|
})
|
|
|
|
] ++ (extraConfig.modules or [ ]);
|
|
|
|
}
|
|
|
|
//
|
|
|
|
(builtins.removeAttrs extraConfig [
|
|
|
|
"modules"
|
|
|
|
"specialArgs"
|
|
|
|
]));
|
2022-03-07 16:01:52 +01:00
|
|
|
in {
|
2024-11-13 17:04:21 +01:00
|
|
|
dosei = nixSys "dosei" {
|
2024-12-05 10:07:23 +01:00
|
|
|
modules = [
|
|
|
|
{
|
|
|
|
home-manager.users.h7x4.home.uid = 1001;
|
|
|
|
}
|
|
|
|
|
|
|
|
nixos-hardware.nixosModules.common-pc
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
nixos-hardware.nixosModules.common-gpu-intel
|
|
|
|
];
|
2024-11-13 17:04:21 +01:00
|
|
|
};
|
2024-06-29 13:48:06 +02:00
|
|
|
kasei = nixSys "kasei" { };
|
2024-12-04 23:00:57 +01:00
|
|
|
xps16 = nixSys "xps16" {
|
|
|
|
modules = [
|
|
|
|
nixos-hardware.nixosModules.common-hidpi
|
|
|
|
nixos-hardware.nixosModules.common-pc-laptop
|
|
|
|
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
nixos-hardware.nixosModules.common-gpu-intel
|
|
|
|
];
|
|
|
|
};
|
2024-12-05 10:07:23 +01:00
|
|
|
europa = nixSys "europa" {
|
|
|
|
modules = [
|
|
|
|
nixos-hardware.nixosModules.common-pc
|
|
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
nixos-hardware.nixosModules.common-gpu-intel
|
|
|
|
];
|
|
|
|
};
|
2024-06-29 13:48:06 +02:00
|
|
|
tsuki = nixSys "tsuki" {
|
|
|
|
modules = [
|
|
|
|
matrix-synapse-next.nixosModules.default
|
|
|
|
osuchan.outputs.nixosModules.default
|
|
|
|
vscode-server.nixosModules.default
|
|
|
|
maunium-stickerpicker.nixosModules.default
|
|
|
|
|
|
|
|
(args: import minecraft.outputs.nixosModules.minecraft-servers (args // {
|
|
|
|
pkgs = unstable-pkgs;
|
|
|
|
lib = unstable-pkgs.lib;
|
|
|
|
}))
|
|
|
|
];
|
|
|
|
};
|
2022-03-07 16:01:52 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|