{ 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" ]; 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; }; 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 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; }; 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; }; go = { path = ./templates/go; }; rust = { path = ./templates/rust; }; cpp = { path = ./templates/cpp; }; }; } // flake-utils.lib.eachDefaultSystem (system: { packages = { neovim-ide = import ./pkgs/nixvim { inherit inputs system flakeLib nixpkgs vars overlays; }; }; }); inputs = { # System nixpkgs.url = "github:nixos/nixpkgs"; # Use master #nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; # Use unstable nur.url = "github:nix-community/NUR"; nix-colors.url = "github:misterio77/nix-colors"; systems.url = "github:nix-systems/default"; flake-parts.url = "github:hercules-ci/flake-parts"; 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"; }; nixos-wsl = { url = "github:nix-community/NixOS-WSL"; inputs.nixpkgs.follows = "nixpkgs"; }; nixgl = { url = "github:nix-community/nixGL"; inputs.nixpkgs.follows = "nixpkgs"; }; catppuccin.url = "github:catppuccin/nix"; # Neovim nixvim = { url = "github:nix-community/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; }; neovim-nightly-overlay = { url = "github:nix-community/neovim-nightly-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; nvim-spell-de-utf8-dictionary = { url = "http://ftp.vim.org/vim/runtime/spell/de.utf-8.spl"; flake = false; }; nvim-spell-de-utf8-suggestions = { url = "http://ftp.vim.org/vim/runtime/spell/de.utf-8.sug"; flake = false; }; nvim-spell-de-latin1-dictionary = { url = "http://ftp.vim.org/vim/runtime/spell/de.latin1.spl"; flake = false; }; nvim-spell-de-latin1-suggestions = { url = "http://ftp.vim.org/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"; norg-meta.url = "github:nvim-neorg/tree-sitter-norg-meta"; neorg = { url = "github:nvim-neorg/neorg"; flake = false; }; neorg-telescope = { url = "github:nvim-neorg/neorg-telescope"; flake = false; }; # Games nix-minecraft = { url = "github:Infinidoge/nix-minecraft"; inputs = { flake-utils.follows = "flake-utils"; }; }; minecraft-server-flake = { url = "git+ssh://git@git.gaja-group.com/gaja-group/minecraft-server-flake.git"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; systems.follows = "systems"; nix-minecraft.follows = "nix-minecraft"; }; }; # 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"; }; }; }; }