2022-09-18 19:42:30 +00:00
|
|
|
{
|
|
|
|
description = "My Nix Configuration";
|
|
|
|
|
|
|
|
inputs = {
|
2022-09-25 18:01:06 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2022-11-01 00:18:11 +00:00
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
2022-09-18 19:42:30 +00:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2022-11-01 00:21:58 +00:00
|
|
|
nur.url = github:nix-community/NUR;
|
2022-09-18 19:42:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
outputs = {
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
2022-11-01 00:21:58 +00:00
|
|
|
nur,
|
2022-09-18 19:42:30 +00:00
|
|
|
...
|
|
|
|
}: let
|
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
|
|
pkgs = import nixpkgs {
|
|
|
|
inherit system;
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
lib = nixpkgs.lib;
|
|
|
|
in {
|
|
|
|
homeManagerConfigurations = {
|
|
|
|
alejandro = home-manager.lib.homeManagerConfiguration {
|
2022-11-01 00:18:11 +00:00
|
|
|
inherit pkgs;
|
|
|
|
modules = [
|
|
|
|
./users/alejandro/home.nix
|
|
|
|
{
|
|
|
|
home = {
|
|
|
|
username = "alejandro";
|
|
|
|
homeDirectory = "/home/alejandro";
|
|
|
|
|
|
|
|
# This value determines the Home Manager release that your
|
|
|
|
# configuration is compatible with. This helps avoid breakage
|
|
|
|
# when a new Home Manager release introduces backwards
|
|
|
|
# incompatible changes.
|
|
|
|
#
|
|
|
|
# You can update Home Manager without changing this value. See
|
|
|
|
# the Home Manager release notes for a list of state version
|
|
|
|
# changes in each release.
|
|
|
|
stateVersion = "22.05";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2022-09-18 19:42:30 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
|
|
|
virtual = lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
./system/virtual/configuration.nix
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
carbon = lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
modules = [
|
|
|
|
./system/carbon/configuration.nix
|
2022-09-23 03:21:12 +00:00
|
|
|
./common/yubikey.nix
|
2022-09-18 19:42:30 +00:00
|
|
|
];
|
|
|
|
};
|
2022-09-18 22:41:17 +00:00
|
|
|
|
2022-09-18 19:42:30 +00:00
|
|
|
gospel = lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
|
|
|
|
modules = [
|
2022-11-01 00:21:58 +00:00
|
|
|
nur.nixosModules.nur
|
2022-09-18 19:42:30 +00:00
|
|
|
./system/gospel/configuration.nix
|
2022-09-23 03:21:12 +00:00
|
|
|
./common/yubikey.nix
|
2022-09-18 19:42:30 +00:00
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
devShells.${system} = {
|
|
|
|
default = pkgs.mkShell {
|
|
|
|
name = "nixosbuildshell";
|
|
|
|
buildInputs = with pkgs; [
|
|
|
|
git
|
|
|
|
git-crypt
|
2022-09-28 01:34:30 +00:00
|
|
|
nixVersions.stable
|
2022-09-18 19:42:30 +00:00
|
|
|
alejandra
|
|
|
|
pre-commit
|
2022-09-19 05:47:57 +00:00
|
|
|
direnv
|
2022-09-18 19:42:30 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
shellHook = ''
|
|
|
|
echo "You can apply this flake to your system with nixos-rebuild switch --flake .#"
|
|
|
|
|
|
|
|
PATH=${pkgs.writeShellScriptBin "nix" ''
|
2022-09-28 01:34:30 +00:00
|
|
|
${pkgs.nixVersions.stable}/bin/nix --experimental-features "nix-command flakes" "$@"
|
2022-09-18 19:42:30 +00:00
|
|
|
''}/bin:$PATH
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|