2023-09-15 14:53:38 +00:00
|
|
|
{
|
2023-09-25 18:05:07 +00:00
|
|
|
description = "Greg Burd's NixOS and Home Manager Configuration";
|
2023-09-15 14:53:38 +00:00
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05";
|
|
|
|
# You can access packages and modules from different nixpkgs revs at the
|
|
|
|
# same time. See 'unstable-packages' overlay in 'overlays/default.nix'.
|
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
|
2023-09-25 18:53:08 +00:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
2023-09-26 17:44:54 +00:00
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
2023-09-25 18:53:08 +00:00
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
disko.url = "github:nix-community/disko";
|
|
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
home-manager.url = "github:nix-community/home-manager/release-23.05";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
nixos-hardware.url = "github:nixos/nixos-hardware/master";
|
2023-09-15 14:53:38 +00:00
|
|
|
|
|
|
|
impermanence.url = "github:nix-community/impermanence";
|
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
nix-formatter-pack.url = "github:Gerschtli/nix-formatter-pack";
|
|
|
|
nix-formatter-pack.inputs.nixpkgs.follows = "nixpkgs";
|
2023-09-15 14:53:38 +00:00
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
|
|
|
vscode-server.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
sops-nix.url = "github:mic92/sops-nix";
|
|
|
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs";
|
|
|
|
|
|
|
|
nh.url = "github:viperml/nh";
|
|
|
|
nh.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
|
|
firefox-addons.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
};
|
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, nixpkgs
|
|
|
|
, nix-formatter-pack
|
|
|
|
, ...
|
|
|
|
} @ inputs:
|
2023-09-15 14:53:38 +00:00
|
|
|
let
|
|
|
|
inherit (self) outputs;
|
2023-09-25 18:05:07 +00:00
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
|
|
|
stateVersion = "23.05";
|
|
|
|
libx = import ./lib { inherit inputs outputs stateVersion; };
|
2023-09-15 14:53:38 +00:00
|
|
|
in
|
|
|
|
{
|
2023-09-25 18:05:07 +00:00
|
|
|
# home-manager switch -b backup --flake $HOME/ws/nix-config
|
|
|
|
# nix build .#homeConfigurations."gburd@floki".activationPackage
|
|
|
|
homeConfigurations = {
|
|
|
|
# .iso images
|
2023-09-26 17:44:54 +00:00
|
|
|
# "gburd@iso-console" = libx.mkHome { hostname = "iso-console"; username = "nixos"; };
|
|
|
|
# "gburd@iso-desktop" = libx.mkHome { hostname = "iso-desktop"; username = "nixos"; desktop = "pantheon"; };
|
2023-09-25 18:05:07 +00:00
|
|
|
# Workstations
|
|
|
|
"gburd@floki" = libx.mkHome { hostname = "floki"; username = "gburd"; desktop = "pantheon"; };
|
|
|
|
# Servers
|
2023-09-15 14:53:38 +00:00
|
|
|
};
|
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
nixosConfigurations = {
|
|
|
|
# .iso images
|
|
|
|
# - nix build .#nixosConfigurations.{iso-console|iso-desktop}.config.system.build.isoImage
|
2023-09-26 17:44:54 +00:00
|
|
|
# iso-console = libx.mkHost { hostname = "iso-console"; username = "nixos"; installer = nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"; };
|
|
|
|
# iso-desktop = libx.mkHost { hostname = "iso-desktop"; username = "nixos"; installer = nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares.nix"; desktop = "pantheon"; };
|
2023-09-25 18:05:07 +00:00
|
|
|
# Workstations
|
|
|
|
# Lenovo Carbon X1 Extreme Gen 5 - x86_64
|
|
|
|
floki = libx.mkHost { hostname = "floki"; username = "gburd"; desktop = "pantheon"; };
|
|
|
|
# Servers
|
2023-09-15 14:53:38 +00:00
|
|
|
};
|
2023-09-25 18:05:07 +00:00
|
|
|
|
|
|
|
# Devshell for bootstrapping; acessible via 'nix develop' or 'nix-shell' (legacy)
|
|
|
|
devShells = libx.forAllSystems (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in import ./shell.nix { inherit pkgs; }
|
|
|
|
);
|
|
|
|
|
|
|
|
# nix fmt
|
|
|
|
formatter = libx.forAllSystems (system:
|
|
|
|
nix-formatter-pack.lib.mkFormatter {
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
config.tools = {
|
|
|
|
alejandra.enable = false;
|
|
|
|
deadnix.enable = true;
|
|
|
|
nixpkgs-fmt.enable = true;
|
|
|
|
statix.enable = true;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
2023-09-26 17:44:54 +00:00
|
|
|
# Custom packages and modifications, exported as overlays
|
|
|
|
overlays = import ./overlays { inherit inputs outputs; };
|
|
|
|
|
2023-09-26 18:39:38 +00:00
|
|
|
homeManagerModules = import ./modules/home-manager;
|
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
# Custom packages; acessible via 'nix build', 'nix shell', etc
|
|
|
|
packages = libx.forAllSystems (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in import ./pkgs { inherit pkgs; }
|
|
|
|
);
|
2023-09-15 14:53:38 +00:00
|
|
|
};
|
|
|
|
}
|