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";
|
|
|
|
inputs = {
|
2024-06-06 15:17:28 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
2023-09-25 18:05:07 +00:00
|
|
|
# You can access packages and modules from different nixpkgs revs at the
|
2024-05-23 19:02:20 +00:00
|
|
|
# same time. See 'unstable-packages' overlay in 'overlays/default.nix'.
|
2023-09-25 18:05:07 +00:00
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-05-23 19:02:20 +00:00
|
|
|
nixpkgs-trunk.url = "github:nixos/nixpkgs/master";
|
2023-09-25 18:05:07 +00:00
|
|
|
|
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";
|
|
|
|
|
2024-06-06 15:17:28 +00:00
|
|
|
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
2024-05-23 19:02:20 +00:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2023-09-25 18:05:07 +00:00
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
# Chaotic's Nyx provides many additional packages like NordVPN
|
|
|
|
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
|
|
|
chaotic.inputs.nixpkgs.follows = "nixpkgs";
|
2023-09-15 14:53:38 +00:00
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
nix-doom-emacs.url = "github:nix-community/nix-doom-emacs";
|
|
|
|
nix-doom-emacs.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2023-09-15 14:53:38 +00:00
|
|
|
|
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
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
|
|
|
|
vscode-server.url = "github:msteen/nixos-vscode-server";
|
2023-09-25 18:05:07 +00:00
|
|
|
vscode-server.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
devshells.url = "github:gburd/devshells";
|
|
|
|
devshells.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
2024-06-06 15:17:28 +00:00
|
|
|
# Android support with nix-on-droid. Currently not updated for 24.05
|
2024-05-23 19:02:20 +00:00
|
|
|
nix-on-droid.url = "github:nix-community/nix-on-droid/release-23.05";
|
|
|
|
nix-on-droid.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
|
|
# Darwin support with nix-darwin
|
|
|
|
nix-darwin.url = "github:LnL7/nix-darwin";
|
|
|
|
nix-darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
|
|
|
|
# nixos-generators for sdcard and raw disk install generation
|
|
|
|
nixos-generators.url = "github:tcarrio/nixos-generators";
|
|
|
|
nixos-generators.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
sops-nix.url = "github:mic92/sops-nix";
|
|
|
|
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
sops-nix.inputs.nixpkgs-stable.follows = "nixpkgs";
|
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
# TODO... review below here
|
|
|
|
impermanence.url = "github:nix-community/impermanence";
|
2023-09-25 18:05:07 +00:00
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
#nh.url = "github:viperml/nh";
|
|
|
|
#nh.inputs.nixpkgs.follows = "nixpkgs";
|
2023-09-25 18:05:07 +00:00
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
#firefox-addons.url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
|
|
|
#firefox-addons.inputs.nixpkgs.follows = "nixpkgs";
|
2023-09-25 18:05:07 +00:00
|
|
|
};
|
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, nix-formatter-pack
|
2024-05-23 19:02:20 +00:00
|
|
|
, nixpkgs
|
2023-09-25 18:05:07 +00:00
|
|
|
, ...
|
|
|
|
} @ inputs:
|
2023-09-15 14:53:38 +00:00
|
|
|
let
|
2023-09-25 18:05:07 +00:00
|
|
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
2024-06-06 15:17:28 +00:00
|
|
|
stateVersion = "24.05";
|
2024-05-23 19:02:20 +00:00
|
|
|
|
|
|
|
inherit (self) outputs;
|
|
|
|
libx = import ./lib { inherit self 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
|
2024-05-03 01:36:17 +00:00
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
# Workstations
|
2024-06-02 19:22:07 +00:00
|
|
|
"gburd@floki" = libx.mkHome { hostname = "floki"; username = "gburd"; desktop = "gnome"; };
|
2024-05-03 01:36:17 +00:00
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
# Servers
|
2023-09-15 14:53:38 +00:00
|
|
|
};
|
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
# Support for nix-darwin workstations
|
|
|
|
# - darwin-rebuild build --flake .#sktc0
|
|
|
|
# darwinConfigurations = {
|
|
|
|
# "antanes" = libx.mkDarwin { username = "gburd"; hostname = "antanes"; stateVersion = 4; };
|
|
|
|
# };
|
|
|
|
|
|
|
|
# Expose the package set, including overlays, for convenience.
|
|
|
|
# darwinPackages = self.darwinConfigurations."antanes".pkgs;
|
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
nixosConfigurations = {
|
|
|
|
# .iso images
|
|
|
|
# - nix build .#nixosConfigurations.{iso-console|iso-desktop}.config.system.build.isoImage
|
2024-05-03 01:36:17 +00:00
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
# Workstations
|
|
|
|
# Lenovo Carbon X1 Extreme Gen 5 - x86_64
|
2024-06-02 19:22:07 +00:00
|
|
|
floki = libx.mkHost { systemType = "workstation"; hostname = "floki"; username = "gburd"; desktop = "gnome"; };
|
2024-05-23 19:02:20 +00:00
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
# Servers
|
2024-05-23 19:02:20 +00:00
|
|
|
# Can be executed locally:
|
|
|
|
# - sudo nixos-rebuild switch --flake $HOME/ws/nix-config
|
|
|
|
#
|
|
|
|
# Or remotely:
|
|
|
|
# - nixos-rebuild switch --fast --flake .#${HOST} \
|
|
|
|
# --target-host ${USERNAME}@${HOST}.${TAILNET} \
|
|
|
|
# --build-host ${USERNAME}@${HOST}.${TAILNET}
|
2023-09-15 14:53:38 +00:00
|
|
|
};
|
2023-09-25 18:05:07 +00:00
|
|
|
|
2024-05-23 19:02:20 +00:00
|
|
|
# nixOnDroidConfigurations = {
|
|
|
|
# pixel6a-legacy = nix-on-droid.lib.nixOnDroidConfiguration {
|
|
|
|
# modules = [ ./android/pixel6a/config.nix ];
|
|
|
|
# };
|
|
|
|
# pixel6a = libx.mkDroid { hostname = "pixel6a"; username = "gburd"; };
|
|
|
|
# };
|
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
# Devshell for bootstrapping; acessible via 'nix develop' or 'nix-shell' (legacy)
|
2024-05-23 19:02:20 +00:00
|
|
|
#inherit (devshells) devShells;
|
2023-09-25 18:05:07 +00:00
|
|
|
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
|
2024-05-23 19:02:20 +00:00
|
|
|
overlays = import ./overlays { inherit inputs; };
|
2023-09-26 18:39:38 +00:00
|
|
|
|
2023-09-25 18:05:07 +00:00
|
|
|
# Custom packages; acessible via 'nix build', 'nix shell', etc
|
2024-05-23 19:02:20 +00:00
|
|
|
packages = libx.forAllSystems
|
|
|
|
(system:
|
|
|
|
let
|
|
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in
|
|
|
|
(import ./pkgs { inherit pkgs; })
|
|
|
|
//
|
|
|
|
{
|
|
|
|
# nuc-init = mkNuc "nixos" "nuc-init";
|
|
|
|
# system-image-nuc0 = mkNuc "archon" "nuc0";
|
|
|
|
# system-image-nuc1 = mkNuc "archon" "nuc1";
|
|
|
|
# system-image-nuc2 = mkNuc "archon" "nuc2";
|
|
|
|
# system-image-nuc3 = mkNuc "archon" "nuc3";
|
|
|
|
# system-image-nuc4 = mkNuc "archon" "nuc4";
|
|
|
|
# system-image-nuc5 = mkNuc "archon" "nuc5";
|
|
|
|
# system-image-nuc6 = mkNuc "archon" "nuc6";
|
|
|
|
# system-image-nuc7 = mkNuc "archon" "nuc7";
|
|
|
|
# system-image-nuc8 = mkNuc "archon" "nuc8";
|
|
|
|
# system-image-nuc9 = mkNuc "archon" "nuc9";
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
# homeManagerModules = import ./modules/home-manager;
|
2023-09-15 14:53:38 +00:00
|
|
|
};
|
|
|
|
}
|