219 lines
7.9 KiB
Nix
219 lines
7.9 KiB
Nix
{
|
|
nixConfig = {
|
|
experimental-features = "nix-command flakes";
|
|
substitute = "true";
|
|
extra-substituters = "https://cache.nixos.org https://nixpkgs-wayland.cachix.org https://nix-community.cachix.org https://statix.cachix.org https://nixpkgs-update.cachix.org https://colmena.cachix.org https://cache.ngi0.nixos.org/ https://cache.mrhedgehog.xyz";
|
|
extra-trusted-public-keys = "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= statix.cachix.org-1:Z9E/g1YjCjU117QOOt07OjhljCoRZddiAm4VVESvais= nixpkgs-update.cachix.org-1:6y6Z2JdoL3APdu6/+Iy8eZX2ajf09e4EE9SnxSML1W8= colmena.cachix.org-1:7BzpDnjjH8ki2CT3f6GdOk7QAzPOl+1t3LvTLXqYcSg= cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA= cache.mrhedgehog.xyz:Zf7CGFz5FvGTS6nTpyCxLd5U5mGvLqy+3HafvGywy7k=";
|
|
};
|
|
description = "Mr Hedgehog's Nix config with flakes";
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
nixos.url = "github:nixos/nixpkgs?rev=42948b300670223ca8286aaf916bc381f66a5313";
|
|
nixos-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
nixos-hardware.url = "github:nixos/nixos-hardware";
|
|
# my-nixpkgs.url = "github:ModdedGamers/nixpkgs/python-gasp-init";
|
|
# my-nixpkgs.url = "path:/home/mrhedgehog/software/nixpkgs/coq_nvim-patches/";
|
|
agenix.url = "github:ryantm/agenix";
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
alejandra.url = "github:kamadorueda/alejandra";
|
|
alejandra.inputs.nixpkgs.follows = "nixpkgs";
|
|
doom-emacs.url = "github:nix-community/nix-doom-emacs";
|
|
doom-emacs.inputs.nixpkgs.follows = "nixpkgs";
|
|
emacs.url = "github:nix-community/emacs-overlay?rev=16262a84ef07fb0e8cfc592b65d786b086840065";
|
|
emacs.inputs.nixpkgs.follows = "nixos";
|
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
home-manager-nixos.url = "github:nix-community/home-manager";
|
|
home-manager-nixos.inputs.nixpkgs.follows = "nixos-unstable";
|
|
hydra-updated.url = "github:mayflower/nixpkgs/hydra-updates";
|
|
neovim.url = "github:nix-community/neovim-nightly-overlay";
|
|
nix-colors.url = "sourcehut:~misterio/nix-colors";
|
|
nixgl.url = "github:guibou/nixGL";
|
|
nixgl.inputs.nixpkgs.follows = "nixpkgs";
|
|
nixos-generators.url = "github:nix-community/nixos-generators/kexec-bundle";
|
|
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
|
|
nixpkgs-update.url = "github:ryantm/nixpkgs-update";
|
|
nur.url = "github:nix-community/nur";
|
|
nur.inputs.nixpkgs.follows = "nixpkgs";
|
|
statix.url = "github:NerdyPepper/statix";
|
|
statix.inputs.nixpkgs.follows = "nixpkgs";
|
|
tokyo-night-ff.url = "github:rototrash/tokyo-night-fox";
|
|
tokyo-night-ff.flake = false;
|
|
vim-plugins.url = "github:m15a/nixpkgs-vim-extra-plugins";
|
|
vim-plugins.inputs.nixpkgs.follows = "nixpkgs";
|
|
wayland.url = "github:nix-community/nixpkgs-wayland";
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
self,
|
|
nixpkgs,
|
|
nixos,
|
|
nixos-unstable,
|
|
nixos-hardware,
|
|
# my-nixpkgs,
|
|
agenix,
|
|
alejandra,
|
|
doom-emacs,
|
|
emacs,
|
|
home-manager,
|
|
home-manager-nixos,
|
|
hydra-updated,
|
|
neovim,
|
|
nix-colors,
|
|
nixgl,
|
|
nixos-generators,
|
|
nixpkgs-update,
|
|
nur,
|
|
statix,
|
|
tokyo-night-ff,
|
|
vim-plugins,
|
|
wayland,
|
|
}: let
|
|
nixos-overlay = final: prev: {
|
|
nixos = import nixos {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
overlays = [
|
|
emacs.overlay
|
|
];
|
|
};
|
|
};
|
|
|
|
alejandra-overlay = final: prev: {alejandra = alejandra.defaultPackage.${prev.system};};
|
|
# my-nixpkgs-overlay = final: prev: {my-nixpkgs = import my-nixpkgs {inherit system;};};
|
|
nixpkgs-update-overlay = final: prev: {nixpkgs-update = nixpkgs-update.defaultPackage.${prev.system};};
|
|
my-pkgs = final: prev: {my-pkgs = self.packages."${prev.system}";};
|
|
|
|
system = "x86_64-linux";
|
|
|
|
pkgs = import nixpkgs {
|
|
# inherit system;
|
|
localSystem = "x86_64-linux";
|
|
config = {
|
|
allowUnfree = true;
|
|
input-fonts.acceptLicense = true;
|
|
};
|
|
overlays = [
|
|
# (import ./pkgs/default.nix {inherit inputs;})
|
|
(import ./overlays/sumneko.nix)
|
|
# my-nixpkgs-overlay
|
|
my-pkgs
|
|
alejandra-overlay
|
|
nixos-overlay
|
|
neovim.overlay
|
|
nixgl.overlay
|
|
nixpkgs-update-overlay
|
|
nur.overlay
|
|
statix.overlay
|
|
vim-plugins.overlay
|
|
wayland.overlay
|
|
];
|
|
};
|
|
|
|
lib = nixpkgs.lib;
|
|
|
|
nixos-gen-config = {
|
|
pkgs = pkgs;
|
|
modules = [
|
|
./hosts/zaphod/configuration.nix
|
|
inputs.home-manager-nixos.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.mrhedgehog = lib.mkMerge [
|
|
./home.nix
|
|
doom-emacs.hmModule
|
|
];
|
|
home-manager.extraSpecialArgs = {inherit pkgs system inputs;};
|
|
}
|
|
];
|
|
};
|
|
in {
|
|
packages.${system} = {
|
|
"nerdfont-symbols" = pkgs.callPackage ./pkgs/nerdfont-symbols.nix {};
|
|
"sway-launcher-desktop" = pkgs.callPackage ./pkgs/sway-launcher-desktop.nix {};
|
|
"taskwarrior-tui" = pkgs.callPackage ./pkgs/taskwarrior-tui.nix {};
|
|
"tokyo-night-gtk" = pkgs.callPackage ./pkgs/tokyo-night-gtk.nix {};
|
|
|
|
# NixOS image builders
|
|
iso = nixos-generators.nixosGenerate {
|
|
inherit (nixos-gen-config) pkgs modules;
|
|
format = "iso";
|
|
};
|
|
kexec = nixos-generators.nixosGenerate {
|
|
inherit (nixos-gen-config) pkgs modules;
|
|
format = "kexec-bundle";
|
|
};
|
|
vm = nixos-generators.nixosGenerate {
|
|
inherit (nixos-gen-config) pkgs modules;
|
|
format = "vm";
|
|
};
|
|
qemu-img = nixos-generators.nixosGenerate {
|
|
inherit (nixos-gen-config) pkgs modules;
|
|
format = "qcow";
|
|
};
|
|
};
|
|
|
|
nixosConfigurations.marvin = lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/marvin/configuration.nix
|
|
./hosts/marvin/bootloader.nix
|
|
./modules/caddy.nix
|
|
];
|
|
specialArgs = { inherit self inputs; };
|
|
};
|
|
nixosConfigurations.zaphod = lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/zaphod/configuration.nix
|
|
./hosts/zaphod/bootloader.nix
|
|
inputs.home-manager-nixos.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.mrhedgehog = lib.mkMerge [
|
|
./home.nix
|
|
doom-emacs.hmModule
|
|
nix-colors.homeManagerModule
|
|
];
|
|
home-manager.extraSpecialArgs = {inherit pkgs system inputs nix-colors;};
|
|
}
|
|
];
|
|
specialArgs = { inherit self inputs nix-colors; };
|
|
};
|
|
nixosConfigurations.zaphod-iso = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
./hosts/zaphod/configuration.nix
|
|
"${nixos-unstable}/nixos/modules/installer/cd-dvd/installation-cd-base.nix"
|
|
inputs.home-manager-nixos.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.mrhedgehog = lib.mkMerge [
|
|
./home.nix
|
|
doom-emacs.hmModule
|
|
nix-colors.homeManagerModule
|
|
];
|
|
home-manager.extraSpecialArgs = {inherit pkgs system inputs nix-colors;};
|
|
}
|
|
];
|
|
specialArgs = { inherit inputs nix-colors; };
|
|
};
|
|
|
|
homeConfigurations.mrhedgehog = home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs system;
|
|
username = "mrhedgehog";
|
|
stateVersion = "22.05";
|
|
homeDirectory = "/home/mrhedgehog";
|
|
configuration.imports = [
|
|
./home.nix
|
|
doom-emacs.hmModule
|
|
nix-colors.homeManagerModule
|
|
];
|
|
extraSpecialArgs = {inherit nix-colors;};
|
|
};
|
|
};
|
|
}
|