357 lines
11 KiB
Nix
357 lines
11 KiB
Nix
{
|
|
description = "My Nix Configs";
|
|
|
|
outputs =
|
|
{ self
|
|
, nixpkgs
|
|
, flake-utils
|
|
, ...
|
|
}:
|
|
let
|
|
inherit (self) inputs outputs;
|
|
|
|
|
|
flakeLib = import ./lib;
|
|
|
|
neorgWorkspaces = [ "default" "general" "games" "btc" ];
|
|
genNeorgWorkspaces = root: workspaces: (builtins.listToAttrs (map (n: { name = n; value = "${root}/${n}"; }) workspaces));
|
|
|
|
vars = rec {
|
|
name = "Patrick Neff";
|
|
username = "odie";
|
|
extraGroups = [ ];
|
|
homeDirectory = "/home/${username}";
|
|
locale = "de_DE.UTF-8";
|
|
email = "odie86@gmail.com";
|
|
timeZone = "Europe/Berlin";
|
|
sshKeys = [
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByWNNmKhjVk5VEjk3aSKosOXzglCbiq7q8IQ8mA0qQe odie"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA1QZO6fF2RLcmjMKdG1eZi0RLw3joa+VBXaKvfmA7Tg odie"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINs89u4Kvwlmq67eV+H/n+x9M8gsKDxQU+dCPSEb2vJe odie"
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKoBcSKQSPmPo3Y/zvnaIaIpT6dHX4ZQYUirj4x7a8wB odie@pi0"
|
|
];
|
|
domain = "odie.home.arpa";
|
|
neorg.workspaces = genNeorgWorkspaces "${homeDirectory}/Notes" neorgWorkspaces;
|
|
};
|
|
|
|
overlays = import ./overlays { inherit inputs; };
|
|
in
|
|
{
|
|
nixosModules = {
|
|
base = import ./modules/nixos/base;
|
|
desktop = import ./modules/nixos/desktop;
|
|
wsl = import ./modules/nixos/wsl;
|
|
mediacenter = import ./modules/nixos/mediacenter;
|
|
qemu = import ./modules/nixos/qemu;
|
|
home-manager = import ./modules/nixos/home-manager;
|
|
server = import ./modules/nixos/server;
|
|
games = import ./modules/nixos/games;
|
|
sops = import ./modules/nixos/sops;
|
|
raspberry-pi = import ./modules/nixos/raspberry-pi;
|
|
};
|
|
nixosConfigurations =
|
|
flakeLib.mkNixosConfiguration
|
|
{
|
|
inherit inputs nixpkgs outputs vars flakeLib overlays;
|
|
system = "x86_64-linux";
|
|
hostName = "vm";
|
|
}
|
|
// flakeLib.mkNixosConfiguration {
|
|
inherit inputs nixpkgs outputs flakeLib overlays;
|
|
vars = vars // {
|
|
neorg.workspaces = genNeorgWorkspaces "/mnt/c/Users/odie/Sync/norg" neorgWorkspaces;
|
|
extraGroups = [ "minecraft" ];
|
|
};
|
|
system = "x86_64-linux";
|
|
hostName = "wsl-dev";
|
|
}
|
|
// flakeLib.mkNixosConfiguration {
|
|
inherit inputs nixpkgs outputs flakeLib overlays vars;
|
|
system = "x86_64-linux";
|
|
hostName = "pi-installer";
|
|
modules = [
|
|
inputs.raspberry-pi-nix.nixosModules.sd-image
|
|
];
|
|
}
|
|
// flakeLib.mkNixosConfiguration {
|
|
inherit inputs outputs nixpkgs vars flakeLib overlays;
|
|
system = "aarch64-linux";
|
|
hostName = "pi0";
|
|
}
|
|
// flakeLib.mkNixosConfiguration {
|
|
inherit inputs outputs nixpkgs vars flakeLib overlays;
|
|
system = "aarch64-linux";
|
|
hostName = "pi1";
|
|
}
|
|
// flakeLib.mkNixosConfiguration {
|
|
inherit inputs outputs nixpkgs vars flakeLib overlays;
|
|
system = "aarch64-linux";
|
|
hostName = "wanaheim";
|
|
}
|
|
// { };
|
|
homeManagerModules = {
|
|
base = import ./modules/home-manager/base;
|
|
desktop = import ./modules/home-manager/desktop;
|
|
shell = import ./modules/home-manager/shell;
|
|
development = import ./modules/home-manager/development;
|
|
games = import ./modules/home-manager/games;
|
|
mediacenter = import ./modules/home-manager/mediacenter;
|
|
user = import ./modules/home-manager/user;
|
|
binary-cache = import ./modules/home-manager/binary-cache;
|
|
sops = import ./modules/home-manager/sops;
|
|
};
|
|
homeConfigurations =
|
|
flakeLib.mkHomeConfiguration
|
|
{
|
|
inherit inputs outputs nixpkgs flakeLib overlays;
|
|
vars = vars // { hostName = "wanaheim"; };
|
|
system = "x86_64-linux";
|
|
}
|
|
// flakeLib.mkHomeConfiguration {
|
|
inherit inputs outputs nixpkgs flakeLib overlays;
|
|
vars = vars // { hostName = "asgard"; };
|
|
system = "x86_64-linux";
|
|
}
|
|
// flakeLib.mkHomeConfiguration {
|
|
inherit inputs outputs nixpkgs flakeLib overlays;
|
|
vars =
|
|
vars
|
|
// {
|
|
hostName = "odie-dev";
|
|
domain = "niederkassel.neff-steindesign.de";
|
|
};
|
|
system = "x86_64-linux";
|
|
};
|
|
templates = {
|
|
empty = {
|
|
path = ./templates/empty;
|
|
description = "";
|
|
};
|
|
go = {
|
|
path = ./templates/go;
|
|
description = "";
|
|
};
|
|
rust = {
|
|
path = ./templates/rust;
|
|
description = "";
|
|
};
|
|
cpp = {
|
|
path = ./templates/cpp;
|
|
description = "";
|
|
};
|
|
};
|
|
images = {
|
|
pi-installer = self.outputs.nixosConfigurations.pi-installer.config.system.build.sdImage;
|
|
};
|
|
}
|
|
// flake-utils.lib.eachDefaultSystem (system: let
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
};
|
|
in {
|
|
devShells.default = pkgs.mkShell {
|
|
packages = with pkgs; [(nixos{}).nixos-rebuild];
|
|
};
|
|
});
|
|
|
|
inputs = {
|
|
# System
|
|
nixpkgs.url = "github:nixos/nixpkgs"; # Use master
|
|
#nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Use unstable
|
|
nur = {
|
|
url = "github:nix-community/NUR";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-parts.follows = "flake-parts";
|
|
};
|
|
};
|
|
nix-colors.url = "github:misterio77/nix-colors";
|
|
systems.url = "github:nix-systems/default";
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
flake-compat.url = "github:edolstra/flake-compat";
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
flake-utils = {
|
|
url = "github:numtide/flake-utils";
|
|
inputs.systems.follows = "systems";
|
|
};
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixos-wsl = {
|
|
url = "github:nix-community/NixOS-WSL";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-compat.follows = "flake-compat";
|
|
};
|
|
};
|
|
raspberry-pi-nix = {
|
|
url = "github:nix-community/raspberry-pi-nix";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
nixgl = {
|
|
url = "github:nix-community/nixGL";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
catppuccin.url = "github:catppuccin/nix";
|
|
|
|
# Neovim
|
|
nixvim = {
|
|
url = "github:nix-community/nixvim";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
home-manager.follows = "home-manager";
|
|
flake-parts.follows = "flake-parts";
|
|
flake-compat.follows = "flake-compat";
|
|
};
|
|
};
|
|
neovim-nightly-overlay = {
|
|
url = "github:nix-community/neovim-nightly-overlay";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-parts.follows = "flake-parts";
|
|
flake-compat.follows = "flake-compat";
|
|
};
|
|
};
|
|
nvim-spell-de-utf8-dictionary = {
|
|
url = "https://ftp.uni-bayreuth.de/packages/editors/vim/runtime/spell/de.utf-8.spl";
|
|
flake = false;
|
|
};
|
|
nvim-spell-de-utf8-suggestions = {
|
|
url = "https://ftp.uni-bayreuth.de/packages/editors/vim/runtime/spell/de.utf-8.sug";
|
|
flake = false;
|
|
};
|
|
nvim-spell-de-latin1-dictionary = {
|
|
url = "https://ftp.uni-bayreuth.de/packages/editors/vim/runtime/spell/de.latin1.spl";
|
|
flake = false;
|
|
};
|
|
nvim-spell-de-latin1-suggestions = {
|
|
url = "https://ftp.uni-bayreuth.de/packages/editors/vim/runtime/spell/de.latin1.sug";
|
|
flake = false;
|
|
};
|
|
guihua = {
|
|
url = "github:ray-x/guihua.lua";
|
|
flake = false;
|
|
};
|
|
|
|
neorg-overlay = {
|
|
url = "github:nvim-neorg/nixpkgs-neorg-overlay";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
};
|
|
};
|
|
|
|
lazydev = {
|
|
url = "github:folke/lazydev.nvim";
|
|
flake = false;
|
|
};
|
|
luavit-meta = {
|
|
url = "github:Bilal2453/luvit-meta";
|
|
flake = false;
|
|
};
|
|
|
|
norg = {
|
|
url = "github:nvim-neorg/tree-sitter-norg/dev";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
flake-compat.follows = "flake-compat";
|
|
};
|
|
};
|
|
norg-meta = {
|
|
url = "github:nvim-neorg/tree-sitter-norg-meta";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
flake-compat.follows = "flake-compat";
|
|
};
|
|
};
|
|
neorg = {
|
|
url = "github:nvim-neorg/neorg";
|
|
flake = false;
|
|
};
|
|
neorg-telescope = {
|
|
url = "github:nvim-neorg/neorg-telescope";
|
|
flake = false;
|
|
};
|
|
vim-mcfunction = {
|
|
url = "github:CrystalAlpha358/vim-mcfunction";
|
|
flake = false;
|
|
};
|
|
|
|
# Games
|
|
nix-minecraft = {
|
|
url = "github:Infinidoge/nix-minecraft";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
flake-compat.follows = "flake-compat";
|
|
};
|
|
};
|
|
minecraft-server-flake = {
|
|
url = "git+ssh://git@git.gaja-group.com/gaja-group/minecraft-server-flake.git";
|
|
#url = "git+file:///home/odie/Code/nix/minecraft-server-flake?ref=update/1.21.4";
|
|
#url = "git+file:///home/odie/Code/nix/minecraft-server-flake?ref=master";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
systems.follows = "systems";
|
|
nix-minecraft.follows = "nix-minecraft";
|
|
};
|
|
};
|
|
|
|
gokosync = {
|
|
url = "git+ssh://git@git.gaja-group.com/odie/gokosync.git";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
systems.follows = "systems";
|
|
};
|
|
};
|
|
|
|
# Misc
|
|
csleeptimer = {
|
|
url = "git+ssh://gitea@git.niederkassel.neff-steindesign.de/odie/csleeptimer.git";
|
|
inputs = {
|
|
nixpkgs.follows = "nixpkgs";
|
|
flake-utils.follows = "flake-utils";
|
|
systems.follows = "systems";
|
|
};
|
|
};
|
|
|
|
|
|
yazi-plugins = {
|
|
url = "github:yazi-rs/plugins";
|
|
flake = false;
|
|
};
|
|
starship-yazi = {
|
|
url = "github:Rolv-Apneseth/starship.yazi";
|
|
flake = false;
|
|
};
|
|
mediainfo-yazi = {
|
|
url = "github:boydaihungst/mediainfo.yazi";
|
|
flake = false;
|
|
};
|
|
open-with-cmd-yazi = {
|
|
url = "github:Ape/open-with-cmd.yazi";
|
|
flake = false;
|
|
};
|
|
};
|
|
|
|
nixConfig = {
|
|
extra-substituters = [ "https://nix-community.cachix.org" ];
|
|
extra-trusted-public-keys = [
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
];
|
|
};
|
|
}
|