A new start
This commit is contained in:
commit
72271e8cae
78 changed files with 2472 additions and 0 deletions
183
flake.nix
Normal file
183
flake.nix
Normal file
|
@ -0,0 +1,183 @@
|
|||
{
|
||||
description = "A highly structured configuration database.";
|
||||
|
||||
inputs =
|
||||
{
|
||||
stable.url = "github:nixos/nixpkgs/release-21.05";
|
||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
||||
digga.url = "github:divnix/digga";
|
||||
digga.inputs.nixpkgs.follows = "stable";
|
||||
digga.inputs.nixlib.follows = "stable";
|
||||
digga.inputs.home-manager.follows = "home";
|
||||
|
||||
bud.url = "github:divnix/bud";
|
||||
bud.inputs.nixpkgs.follows = "unstable";
|
||||
bud.inputs.devshell.follows = "digga/devshell";
|
||||
|
||||
home.url = "github:nix-community/home-manager/release-21.05";
|
||||
home.inputs.nixpkgs.follows = "stable";
|
||||
|
||||
darwin.url = "github:LnL7/nix-darwin";
|
||||
darwin.inputs.nixpkgs.follows = "unstable";
|
||||
|
||||
deploy.follows = "digga/deploy";
|
||||
|
||||
nvfetcher.url = "github:berberman/nvfetcher";
|
||||
nvfetcher.inputs.nixpkgs.follows = "unstable";
|
||||
nvfetcher.inputs.flake-compat.follows = "digga/deploy/flake-compat";
|
||||
nvfetcher.inputs.flake-utils.follows = "digga/flake-utils-plus/flake-utils";
|
||||
|
||||
emacs-overlay.url = github:nix-community/emacs-overlay;
|
||||
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
pinebook-pro = {
|
||||
url = "github:samueldr/wip-pinebook-pro/7df87f4f3baecccba79807c291b3bbd62ac61e0f";
|
||||
flake = false;
|
||||
};
|
||||
pinebook-pro-kernel-latest.url = github:nixos/nixpkgs/755db9a1e9a35c185f7d6c0463025e94ef44622e;
|
||||
|
||||
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
||||
# nixpkgs-wayland.inputs.nixpkgs.follows = "unstable";
|
||||
# nixpkgs-wayland.inputs.cachix.follows = "stable";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, digga
|
||||
, bud
|
||||
, nixos
|
||||
, home
|
||||
, nixos-hardware
|
||||
, pinebook-pro
|
||||
, pinebook-pro-kernel-latest
|
||||
, nixpkgs-wayland
|
||||
, emacs-overlay
|
||||
, nur
|
||||
, nvfetcher
|
||||
, deploy
|
||||
, ...
|
||||
} @ inputs:
|
||||
|
||||
digga.lib.mkFlake
|
||||
{
|
||||
inherit self inputs;
|
||||
|
||||
channelsConfig = { allowUnfree = true; };
|
||||
|
||||
channels =
|
||||
let
|
||||
commonOverlays = [
|
||||
digga.overlays.patchedNix
|
||||
nur.overlay
|
||||
emacs-overlay.overlay
|
||||
nvfetcher.overlay
|
||||
deploy.overlay
|
||||
nixpkgs-wayland.overlay
|
||||
./pkgs/default.nix
|
||||
];
|
||||
in
|
||||
{
|
||||
stable = {
|
||||
imports = [ (digga.lib.importOverlays ./overlays) ];
|
||||
overlays = commonOverlays;
|
||||
};
|
||||
unstable = {
|
||||
imports = [ (digga.lib.importOverlays ./overlays) ];
|
||||
overlays = commonOverlays;
|
||||
};
|
||||
};
|
||||
|
||||
lib = import ./lib { lib = digga.lib // nixos.lib; };
|
||||
|
||||
sharedOverlays = [
|
||||
(
|
||||
final: prev: {
|
||||
__dontExport = true;
|
||||
lib = prev.lib.extend (
|
||||
lfinal: lprev: {
|
||||
our = self.lib;
|
||||
}
|
||||
);
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
nixos = {
|
||||
hostDefaults = {
|
||||
channelName = "unstable";
|
||||
imports = [ (digga.lib.importModules ./modules) ];
|
||||
externalModules = [
|
||||
{ lib.our = self.lib; }
|
||||
digga.nixosModules.bootstrapIso
|
||||
digga.nixosModules.nixConfig
|
||||
home.nixosModules.home-manager
|
||||
bud.nixosModules.bud
|
||||
];
|
||||
};
|
||||
hosts = {
|
||||
pc = {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
pbp = {
|
||||
system = "aarch64-linux";
|
||||
modules = [
|
||||
"${pinebook-pro}/pinebook_pro.nix"
|
||||
];
|
||||
};
|
||||
};
|
||||
imports = [ (digga.lib.importHosts ./hosts) ];
|
||||
importables = rec {
|
||||
profiles = digga.lib.rakeLeaves ./profiles // {
|
||||
users = digga.lib.rakeLeaves ./users;
|
||||
};
|
||||
suites = with profiles; rec {
|
||||
base = [ core users.ccr users.root ];
|
||||
};
|
||||
pbpKernelLatest = (
|
||||
import pinebook-pro-kernel-latest {
|
||||
system = "aarch64-linux";
|
||||
overlays = [
|
||||
(import "${pinebook-pro}/overlay.nix")
|
||||
];
|
||||
config.allowUnfree = true;
|
||||
}
|
||||
).pkgs.linuxPackages_pinebookpro_latest;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
imports = [ (digga.lib.importModules ./users/modules) ];
|
||||
externalModules = [];
|
||||
importables = rec {
|
||||
profiles = digga.lib.rakeLeaves ./users/profiles;
|
||||
suites = with profiles; rec {
|
||||
base = [ direnv git zsh gpg password-store ];
|
||||
shell = [ zsh exa fzf ];
|
||||
gui = [ sway xdg gtk foot bat ];
|
||||
browser = [ firefox chromium qutebrowser ];
|
||||
multimedia = [ mpv zathura ];
|
||||
dev = [ vim emacs vscode lorri direnv ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
devshell = ./shell;
|
||||
|
||||
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
|
||||
|
||||
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {};
|
||||
|
||||
defaultTemplate = self.templates.bud;
|
||||
templates.bud.path = ./.;
|
||||
templates.bud.description = "bud template";
|
||||
|
||||
}
|
||||
// {
|
||||
budModules = { devos = import ./bud; };
|
||||
# checks.aarch64-linux = { }; # this line will be uncommented by Github Action in order since it can't build aarch64 derivations
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue