2020-12-26 23:36:50 +01:00
|
|
|
{
|
|
|
|
inputs = {
|
2021-12-22 23:54:05 +01:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-21.11";
|
2020-12-26 23:36:50 +01:00
|
|
|
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";
|
2021-11-04 00:01:27 +01:00
|
|
|
|
2021-01-18 20:24:07 +01:00
|
|
|
home-manager = {
|
2021-12-22 23:54:05 +01:00
|
|
|
url = "github:nix-community/home-manager?ref=release-21.11";
|
2021-04-11 00:25:36 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2021-01-18 20:24:07 +01:00
|
|
|
};
|
2021-01-18 11:23:15 +01:00
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
nixng = {
|
2021-07-31 13:25:40 +02:00
|
|
|
url = "github:MagicRB/NixNG";
|
2021-04-11 00:25:36 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2021-01-25 20:40:55 +01:00
|
|
|
};
|
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
fenix = {
|
|
|
|
url = "github:nix-community/fenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
2021-11-04 00:01:27 +01:00
|
|
|
|
2021-07-05 10:02:53 +02:00
|
|
|
yusdacra-dotfiles = {
|
|
|
|
url = "github:yusdacra/nixos-config";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2021-11-04 00:01:27 +01:00
|
|
|
# ====================== QMK ======================
|
|
|
|
poetry2nix = {
|
2021-11-04 19:42:27 +01:00
|
|
|
url = "github:nix-community/poetry2nix";
|
2021-11-04 00:01:27 +01:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
qmk = {
|
|
|
|
url = "https://github.com/qmk/qmk_firmware?ref=0.14.29";
|
|
|
|
type = "git";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
# ====================== --- ======================
|
|
|
|
|
2021-08-18 22:18:42 +02:00
|
|
|
dwarffs = {
|
|
|
|
url = "github:edolstra/dwarffs";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
inputs.nix.follows = "nix";
|
|
|
|
};
|
|
|
|
|
|
|
|
nix = {
|
|
|
|
url = "github:NixOS/nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
2021-08-19 18:14:15 +02:00
|
|
|
|
|
|
|
secret = {
|
2021-11-07 23:28:18 +01:00
|
|
|
url = "path:/home/main/dotfiles/secret";
|
2021-08-19 18:14:15 +02:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2021-12-22 23:54:05 +01:00
|
|
|
deploy-rs = {
|
|
|
|
url = "github:serokell/deploy-rs";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
# PACKAGES
|
2021-01-18 20:24:07 +01:00
|
|
|
|
2021-12-22 23:54:05 +01:00
|
|
|
nix-gaming = {
|
|
|
|
url = "github:fufexan/nix-gaming";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
2021-01-18 20:24:07 +01:00
|
|
|
## Emacs
|
|
|
|
emacs-overlay = {
|
2021-12-22 23:54:05 +01:00
|
|
|
url = "github:nix-community/emacs-overlay";
|
2021-04-11 00:25:36 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
2021-01-18 20:24:07 +01:00
|
|
|
};
|
|
|
|
emacs = {
|
2021-12-22 23:54:05 +01:00
|
|
|
url = "github:emacs-mirror/emacs";
|
2021-01-18 20:24:07 +01:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
vtermModule = {
|
2021-12-22 23:54:05 +01:00
|
|
|
url = "github:akermu/emacs-libvterm";
|
2021-01-18 20:24:07 +01:00
|
|
|
flake = false;
|
|
|
|
};
|
2020-12-26 23:36:50 +01:00
|
|
|
};
|
|
|
|
|
2021-07-25 00:40:41 +02:00
|
|
|
outputs = { self
|
|
|
|
, nixpkgs
|
|
|
|
, nixpkgs-unstable
|
|
|
|
, home-manager
|
2021-12-22 23:54:05 +01:00
|
|
|
, deploy-rs
|
2021-07-25 00:40:41 +02:00
|
|
|
, ...
|
|
|
|
}@inputs:
|
2021-04-11 00:25:36 +02:00
|
|
|
let
|
|
|
|
inherit (nixpkgs-unstable.lib) nixosSystem;
|
|
|
|
inherit (home-manager.lib) homeManagerConfiguration;
|
2021-01-10 20:05:04 +01:00
|
|
|
|
2021-07-25 00:40:41 +02:00
|
|
|
supportedSystems = [ "x86_64-linux" ]; # add "i686-linux" "aarch64-linux" back after hls is fixed
|
|
|
|
forAllSystems' = systems: f: nixpkgs.lib.genAttrs systems (system: f system);
|
|
|
|
forAllSystems = forAllSystems' supportedSystems;
|
2021-11-04 00:01:27 +01:00
|
|
|
pkgsForSystem =
|
|
|
|
system:
|
|
|
|
import nixpkgs
|
|
|
|
{ system = "x86_64-linux";
|
|
|
|
overlays =
|
|
|
|
[ inputs.poetry2nix.overlay
|
|
|
|
];
|
|
|
|
};
|
2021-12-22 23:54:05 +01:00
|
|
|
in with nixpkgs.lib; {
|
2021-04-11 00:25:36 +02:00
|
|
|
nixosConfigurations.omen = nixosSystem (import ./systems/omen.nix inputs);
|
|
|
|
omen = self.nixosConfigurations.omen.config.system.build.toplevel;
|
2021-01-18 11:23:42 +01:00
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
nixosConfigurations.heater = nixosSystem (import ./systems/heater.nix inputs);
|
|
|
|
heater = self.nixosConfigurations.heater.config.system.build.toplevel;
|
2021-01-24 17:43:50 +01:00
|
|
|
|
2021-05-30 11:19:34 +02:00
|
|
|
nixosConfigurations.tweedledee = nixosSystem (import ./systems/tweedledee.nix inputs);
|
|
|
|
tweedledee = self.nixosConfigurations.tweedledee.config.system.build.toplevel;
|
|
|
|
|
|
|
|
nixosConfigurations.tweedledum = nixosSystem (import ./systems/tweedledum.nix inputs);
|
|
|
|
tweedledum = self.nixosConfigurations.tweedledum.config.system.build.toplevel;
|
|
|
|
|
2021-07-03 20:40:29 +02:00
|
|
|
nixosConfigurations.toothpick = nixosSystem (import ./systems/toothpick.nix inputs);
|
|
|
|
toothpick = self.nixosConfigurations.toothpick.config.system.build.toplevel;
|
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
nixosConfigurations.mark = nixosSystem (import ./systems/mark.nix inputs);
|
|
|
|
mark = self.nixosConfigurations.mark.config.system.build.toplevel;
|
2021-02-05 12:05:42 +01:00
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
nixosConfigurations.recoveryUsb = nixosSystem (import ./systems/recovery-usb.nix inputs);
|
|
|
|
recoveryUsb = self.nixosConfigurations.recoveryUsb.config.system.build.toplevel;
|
2021-03-04 19:23:32 +01:00
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
homeConfigurations.edge = homeManagerConfiguration (import ./systems/edge.nix inputs);
|
|
|
|
edge = self.homeConfigurations.edge.activationPackage;
|
2021-03-04 19:23:32 +01:00
|
|
|
|
2021-09-14 21:58:37 +02:00
|
|
|
nixosConfigurations.blowhole = nixosSystem (import ./systems/blowhole.nix inputs);
|
|
|
|
blowhole = self.nixosConfigurations.blowhole.config.system.build.toplevel;
|
2021-03-08 08:57:08 +01:00
|
|
|
|
2021-07-31 13:22:43 +02:00
|
|
|
allSystems =
|
|
|
|
let
|
|
|
|
linkFarm = system: attrs:
|
|
|
|
let
|
2021-11-04 00:01:27 +01:00
|
|
|
pkgs = pkgsForSystem system;
|
2021-07-31 13:22:43 +02:00
|
|
|
in
|
2021-11-04 00:01:27 +01:00
|
|
|
pkgs.linkFarm "allSystems-${system}"
|
2021-12-22 23:54:05 +01:00
|
|
|
(mapAttrsToList (n: v: { name = n; path = v; }) attrs);
|
2021-07-31 13:22:43 +02:00
|
|
|
nixos = name: self.nixosConfigurations.${name}.config.system.build.toplevel;
|
|
|
|
hm = name: self.homeConfigurations.${name}.activationPackage;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
x86_64-linux = linkFarm "x86_64-linux"
|
|
|
|
{
|
|
|
|
omen = nixos "omen";
|
|
|
|
heater = nixos "heater";
|
|
|
|
tweedledee = nixos "tweedledee";
|
|
|
|
tweedledum = nixos "tweedledum";
|
|
|
|
toothpick = nixos "toothpick";
|
|
|
|
mark = nixos "mark";
|
|
|
|
recoveryUsb = nixos "recoveryUsb";
|
2021-12-22 23:54:05 +01:00
|
|
|
blowhole = nixos "blowhole";
|
2021-07-31 13:22:43 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
aarch64-linux = linkFarm "aarch64-linux"
|
|
|
|
{
|
|
|
|
edge = hm "edge";
|
|
|
|
};
|
|
|
|
};
|
2021-03-08 17:26:46 +01:00
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
overlays = {
|
2021-09-03 00:41:43 +02:00
|
|
|
emacs = import ./overlays/emacs-ng/default.nix inputs;
|
2021-04-11 00:25:36 +02:00
|
|
|
emacsclient-remote = import ./overlays/emacsclient-remote;
|
2021-12-22 23:54:05 +01:00
|
|
|
gpg-key = import ./overlays/gpg-key;
|
|
|
|
screenshot = import ./overlays/screenshot;
|
2021-11-04 00:01:27 +01:00
|
|
|
easy-hls-nix = import ./overlays/easy-hls-nix inputs.easy-hls-nix;
|
2021-12-22 23:54:05 +01:00
|
|
|
mainsail = import ./overlays/mainsail;
|
2021-07-31 13:22:43 +02:00
|
|
|
discord-canary = import "${inputs.yusdacra-dotfiles}/overlays/discord-canary-system.nix";
|
2021-08-18 22:16:54 +02:00
|
|
|
winetricks = import ./overlays/winetricks;
|
2021-08-18 22:18:42 +02:00
|
|
|
dwarffs = inputs.dwarffs.overlay;
|
2021-12-22 23:54:05 +01:00
|
|
|
deploy-rs = deploy-rs.overlay;
|
|
|
|
# nyxt = import ./overlays/nyxt inputs.nyxt.lib;
|
|
|
|
nix-gaming = final: prev: foldl (acc: x: acc // (x final prev)) {} (mapAttrsToList (_: v: v) inputs.nix-gaming.overlays);
|
|
|
|
nixng = inputs.nixng.overlay;
|
2021-04-11 00:25:36 +02:00
|
|
|
};
|
|
|
|
|
2021-05-09 23:28:36 +02:00
|
|
|
nixosModules = {
|
|
|
|
vault-agent = import ./nixos-modules/vault-agent.nix;
|
|
|
|
};
|
|
|
|
|
2021-04-11 00:25:36 +02:00
|
|
|
packages =
|
|
|
|
forAllSystems (system:
|
|
|
|
let
|
2021-11-04 00:01:27 +01:00
|
|
|
pkgs = pkgsForSystem system;
|
|
|
|
|
2021-07-25 00:40:41 +02:00
|
|
|
mkPkg'' =
|
|
|
|
pkgs: name: package:
|
|
|
|
(import pkgs { inherit system;
|
|
|
|
overlays =
|
2021-12-22 23:54:05 +01:00
|
|
|
mapAttrsToList
|
2021-07-25 00:40:41 +02:00
|
|
|
(_: v: v) self.overlays;
|
|
|
|
} ).magic_rb."${package}";
|
|
|
|
mkPkg' = mkPkg'' nixpkgs-unstable;
|
|
|
|
mkPkg = name: mkPkg'' nixpkgs-unstable name name;
|
2021-04-11 00:25:36 +02:00
|
|
|
in
|
2021-03-08 17:26:46 +01:00
|
|
|
{
|
2021-04-11 00:25:36 +02:00
|
|
|
emacs = mkPkg "emacs";
|
|
|
|
emacsclient-remote = mkPkg "emacsclient-remote";
|
|
|
|
gpg-key = mkPkg "gpg-key";
|
2021-06-27 18:55:28 +02:00
|
|
|
gpg-key-hs = mkPkg' "gpg-key" "gpg-key-hs";
|
2021-04-11 00:25:36 +02:00
|
|
|
screenshot = mkPkg "screenshot";
|
|
|
|
sss-cli = mkPkg "sss-cli";
|
2021-04-19 20:05:53 +02:00
|
|
|
shh = mkPkg "shh";
|
2021-08-08 00:03:02 +02:00
|
|
|
mainsail = mkPkg "mainsail";
|
2021-08-18 22:16:54 +02:00
|
|
|
winetricks = mkPkg "winetricks";
|
2021-11-04 00:01:27 +01:00
|
|
|
|
|
|
|
qmk-firmware = (pkgs.callPackage
|
|
|
|
(import ./extra/qmk/sp84.nix { inherit (inputs) qmk; }) {}).qmk-firmware;
|
2021-04-11 00:25:36 +02:00
|
|
|
});
|
2021-11-04 00:01:27 +01:00
|
|
|
|
|
|
|
devShells = forAllSystems (system:
|
|
|
|
let pkgs = pkgsForSystem system;
|
|
|
|
in
|
|
|
|
{ qmk =
|
|
|
|
(pkgs.callPackage
|
|
|
|
(import ./extra/qmk/sp84.nix { inherit (inputs) qmk; }) {}).shell;
|
|
|
|
}
|
|
|
|
);
|
2021-12-22 23:54:05 +01:00
|
|
|
|
|
|
|
deploy.nodes = {
|
|
|
|
blowhole = {
|
|
|
|
hostname = "blowhole.in.redalder.org";
|
|
|
|
sshOpts = [ "-t" ];
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.blowhole;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
toothpick = {
|
|
|
|
hostname = "redalder.org";
|
|
|
|
sshOpts = [ "-t" ];
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.toothpick;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
tweedledum = {
|
|
|
|
hostname = "tweedledum.redalder.org";
|
|
|
|
sshOpts = [ "-t" ];
|
|
|
|
profiles.system = {
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.tweedledum;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2021-03-08 08:57:08 +01:00
|
|
|
};
|
2020-12-26 23:36:50 +01:00
|
|
|
}
|