dotfiles/nixos/flake.nix

102 lines
3 KiB
Nix
Raw Normal View History

{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-20.09";
nixpkgs-unstable.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
2021-01-18 20:24:07 +01:00
nixpkgs-master.url = "github:NixOS/nixpkgs?ref=master";
ra-systems = {
url = "git+https://gitea.redalder.org/RedAlder/systems";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager?ref=release-20.09";
inputs.nixpkgs.follows = "nixpkgs";
};
2021-01-18 11:23:15 +01:00
2021-01-18 20:24:07 +01:00
# PACKAGES
## Rust Things
rust-overlay = {
inputs.nixpkgs.follows = "nixpkgs";
url = "github:oxalica/rust-overlay";
};
2021-01-18 20:24:07 +01:00
## sss-cli
2021-01-18 11:23:15 +01:00
sss-cli = {
flake = false;
url = "github:dsprenkels/sss-cli";
};
2021-01-18 20:24:07 +01:00
## Emacs
emacs-overlay = {
url = "git+https://github.com/nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs = {
2021-02-01 12:00:24 +01:00
# type = "git";
#url = "https://git.savannah.gnu.org/git/emacs.git";
url = "github:flatwhatson/emacs?ref=pgtk-nativecomp";
#ref = "feature/native-comp";
2021-01-18 20:24:07 +01:00
flake = false;
};
vtermModule = {
url = "git+https://github.com/akermu/emacs-libvterm";
flake = false;
};
};
outputs = { self, nixpkgs, home-manager, ... }@inputs:
2021-01-18 20:24:07 +01:00
with inputs; let
rlib = import ./rlib.nix {
inherit nixpkgs home-manager inputs;
pkgs = {
inherit nixpkgs nixpkgs-unstable nixpkgs-master;
};
custom = with rlib; {
sss-cli = callHalfFlake ./packages/sss-cli;
atom-shell = callHalfFlake ./packages/atom-shell;
emacs = callHalfFlake ./packages/emacs;
emacsclient-remote = callHalfFlake ./packages/emacsclient-remote;
enter-env = callHalfFlake ./packages/enter-env;
screenshot = callHalfFlake ./packages/screenshot;
rust =
system:
let
rustyPkgs = import inputs.nixpkgs {
overlays = [ inputs.rust-overlay.overlay ];
inherit system;
};
in
rustyPkgs.rust-bin;
};
self = rlib;
};
2020-12-29 17:58:07 +01:00
rmodules = {
klippy = ra-systems.flakes.klippy.nixosModules.klippy;
moonraker = ra-systems.flakes.moonraker.nixosModules.moonraker;
mainsail = ra-systems.flakes.mainsail.nixosModules.mainsail;
home-manager = inputs.home-manager.nixosModules.home-manager;
2020-12-29 17:58:07 +01:00
};
omen = rlib.nixosSystem (import ./systems/omen.nix inputs);
heater = rlib.nixosSystem (import ./systems/heater.nix inputs);
mark = rlib.nixosSystem (import ./systems/mark.nix inputs);
2021-01-10 20:05:04 +01:00
2021-02-02 20:35:29 +01:00
edge = rlib.homeManagerConfiguration (import ./systems/edge.nix);
in {
nixosConfigurations.omen = omen;
omen = omen.config.system.build.toplevel;
2021-01-18 11:23:42 +01:00
nixosConfigurations.heater = heater;
heater = heater.config.system.build.toplevel;
2021-01-24 17:43:50 +01:00
nixosConfigurations.mark = mark;
mark = mark.config.system.build.toplevel;
homeConfigurations.edge = edge;
edge = edge.activationPackage;
};
}