dotfiles/flake.nix

71 lines
2.1 KiB
Nix
Raw Normal View History

2022-04-27 01:36:16 +00:00
{
description = "My system";
2022-05-08 20:02:13 +00:00
# Other flakes that we want to pull from
2022-04-27 01:36:16 +00:00
inputs = {
2022-05-08 20:02:13 +00:00
# Used for system packages
2022-04-27 01:36:16 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
2022-05-08 20:02:13 +00:00
# Used for user packages
2022-04-27 01:36:16 +00:00
home-manager = {
url = "github:nix-community/home-manager/master";
2022-05-08 20:02:13 +00:00
inputs.nixpkgs.follows =
"nixpkgs"; # Use system packages list where available
2022-04-27 01:36:16 +00:00
};
2022-05-08 20:02:13 +00:00
# Community packages; used for Firefox extensions
2022-05-07 18:24:00 +00:00
nur.url = "github:nix-community/nur";
2022-04-27 01:36:16 +00:00
};
2022-05-07 18:24:00 +00:00
outputs = { self, nixpkgs, home-manager, nur }:
2022-05-16 00:46:17 +00:00
2022-04-27 01:36:16 +00:00
let
2022-05-08 20:02:13 +00:00
# Global configuration for my systems
globals = {
2022-04-30 16:07:58 +00:00
user = "noah";
fullName = "Noah Masur";
passwordHash =
2022-05-15 02:51:57 +00:00
"$6$PZYiMGmJIIHAepTM$Wx5EqTQ5GApzXx58nvi8azh16pdxrN6Qrv1wunDlzveOgawitWzcIxuj76X9V868fsPi/NOIEO8yVXqwzS9UF.";
2022-04-30 16:07:58 +00:00
gitEmail = "7386960+nmasur@users.noreply.github.com";
2022-05-11 03:45:50 +00:00
mailServer = "noahmasur.com";
2022-06-04 14:29:36 +00:00
dotfilesRepo = "https://github.com/nmasur/dotfiles";
gui = {
colorscheme = (import ./modules/colorscheme/gruvbox);
2022-05-15 02:38:26 +00:00
wallpaper = ./media/wallpaper/road.jpg;
2022-05-15 00:29:03 +00:00
gtk.theme = { name = "Adwaita-dark"; };
2022-04-30 16:07:58 +00:00
};
2022-04-29 00:54:37 +00:00
};
2022-05-08 20:02:13 +00:00
2022-05-16 00:46:17 +00:00
# System types to support.
supportedSystems =
[ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
# Helper function to generate an attrset '{ x86_64-linux = f "x86_64-linux"; ... }'.
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
2022-04-27 01:36:16 +00:00
in {
2022-05-08 20:02:13 +00:00
# Define my systems
2022-05-10 02:55:10 +00:00
# You can load it from an empty system with:
# nix-shell -p nixFlakes
# sudo nixos-rebuild switch --flake github:nmasur/dotfiles#desktop
2022-04-27 01:36:16 +00:00
nixosConfigurations = {
2022-05-08 20:02:13 +00:00
desktop =
import ./hosts/desktop { inherit nixpkgs home-manager nur globals; };
2022-04-27 01:36:16 +00:00
};
2022-05-08 20:02:13 +00:00
2022-05-19 12:48:23 +00:00
# Used to run commands and edit files in this repo
2022-05-16 00:46:17 +00:00
devShells = forAllSystems (system:
let pkgs = import nixpkgs { inherit system; };
2022-05-01 15:16:48 +00:00
in {
default = pkgs.mkShell {
2022-05-06 12:58:44 +00:00
buildInputs = with pkgs; [ git stylua nixfmt shfmt shellcheck ];
2022-05-01 15:16:48 +00:00
};
2022-05-16 00:46:17 +00:00
});
2022-04-27 13:23:26 +00:00
2022-04-27 01:36:16 +00:00
};
}