mirror of
https://github.com/callumio/nixfiles.git
synced 2026-08-06 20:49:17 +01:00
use nixfmt
This commit is contained in:
parent
262f069d7d
commit
d97ae3b090
1 changed files with 69 additions and 67 deletions
42
flake.nix
42
flake.nix
|
|
@ -1,24 +1,26 @@
|
||||||
{
|
{
|
||||||
description = "C's Nix-Config";
|
description = "C's Nix-Config";
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-parts,
|
flake-parts,
|
||||||
...
|
...
|
||||||
} @ inputs: let
|
}@inputs:
|
||||||
cLib = import ./lib {inherit (nixpkgs) lib;};
|
let
|
||||||
mkLinuxSystem = mod: ovl:
|
cLib = import ./lib { inherit (nixpkgs) lib; };
|
||||||
|
mkLinuxSystem =
|
||||||
|
mod: ovl:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs cLib;};
|
specialArgs = { inherit inputs cLib; };
|
||||||
modules =
|
modules = [
|
||||||
[
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
{
|
{
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.overlays = [self.overlays.default] ++ ovl;
|
nixpkgs.overlays = [ self.overlays.default ] ++ ovl;
|
||||||
}
|
}
|
||||||
self.nixosModules.nix-config
|
self.nixosModules.nix-config
|
||||||
self.nixosModules.boot
|
self.nixosModules.boot
|
||||||
|
|
@ -32,7 +34,7 @@
|
||||||
++ mod;
|
++ mod;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
flake-parts.lib.mkFlake {inherit self inputs;} {
|
flake-parts.lib.mkFlake { inherit self inputs; } {
|
||||||
imports = [
|
imports = [
|
||||||
inputs.flake-parts.flakeModules.easyOverlay
|
inputs.flake-parts.flakeModules.easyOverlay
|
||||||
inputs.pre-commit-hooks.flakeModule
|
inputs.pre-commit-hooks.flakeModule
|
||||||
|
|
@ -45,29 +47,29 @@
|
||||||
flake = {
|
flake = {
|
||||||
# TODO: use ./hosts/
|
# TODO: use ./hosts/
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
artemis = mkLinuxSystem [./hosts/artemis] [];
|
artemis = mkLinuxSystem [ ./hosts/artemis ] [ ];
|
||||||
hermes =
|
hermes =
|
||||||
mkLinuxSystem
|
mkLinuxSystem
|
||||||
[./hosts/hermes inputs.nocodb.nixosModules.nocodb inputs.copyparty.nixosModules.default]
|
[ ./hosts/hermes inputs.nocodb.nixosModules.nocodb inputs.copyparty.nixosModules.default ]
|
||||||
[inputs.copyparty.overlays.default];
|
[ inputs.copyparty.overlays.default ];
|
||||||
};
|
};
|
||||||
diskoConfigurations = {}; # maybe?
|
diskoConfigurations = { }; # maybe?
|
||||||
om.health.default = {
|
om.health.default = {
|
||||||
nix-version.min-required = "2.18.5";
|
nix-version.min-required = "2.18.5";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
perSystem = {
|
perSystem =
|
||||||
|
{
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
final,
|
final,
|
||||||
inputs',
|
inputs',
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
_module.args.pkgs = inputs'.nixpkgs.legacyPackages.extend self.overlays.default;
|
_module.args.pkgs = inputs'.nixpkgs.legacyPackages.extend self.overlays.default;
|
||||||
overlayAttrs =
|
overlayAttrs = config.packages // {
|
||||||
config.packages
|
|
||||||
// {
|
|
||||||
unstable = inputs'.unstable.legacyPackages;
|
unstable = inputs'.unstable.legacyPackages;
|
||||||
scenics = inputs'.scenics.packages;
|
scenics = inputs'.scenics.packages;
|
||||||
};
|
};
|
||||||
|
|
@ -80,7 +82,7 @@
|
||||||
|
|
||||||
treefmt.config = {
|
treefmt.config = {
|
||||||
projectRootFile = "flake.nix";
|
projectRootFile = "flake.nix";
|
||||||
programs.alejandra.enable = true;
|
programs.nixfmt.enable = true;
|
||||||
programs.deadnix.enable = true;
|
programs.deadnix.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -107,7 +109,7 @@
|
||||||
inputs'.nixinate.packages self
|
inputs'.nixinate.packages self
|
||||||
);
|
);
|
||||||
|
|
||||||
packages = import ./packages {inherit pkgs inputs inputs';};
|
packages = import ./packages { inherit pkgs inputs inputs'; };
|
||||||
};
|
};
|
||||||
|
|
||||||
debug = false;
|
debug = false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue