remove fup

This commit is contained in:
Callum Leslie 2024-09-05 10:37:59 +01:00 committed by Callum Leslie
parent 940ffd857b
commit 152ce6cfd2
4 changed files with 108 additions and 148 deletions

179
flake.nix
View file

@ -1,6 +1,91 @@
{
description = "C's Nix-Config";
outputs = {
self,
nixpkgs,
flake-parts,
...
} @ inputs: let
mods = import ./modules;
mkLinuxSystem = mod:
nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules =
[
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
inputs.agenix.nixosModules.default
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [self.overlays.default];
}
mod
]
++ mods.sharedModules;
};
in
flake-parts.lib.mkFlake {inherit self inputs;} {
imports = [
inputs.flake-parts.flakeModules.easyOverlay
inputs.pre-commit-hooks.flakeModule
inputs.treefmt-nix.flakeModule
];
systems = import inputs.systems;
flake = {
inherit (mods) homeManagerModules nixosModules;
# TODO: use ./hosts/
nixosConfigurations = {
artemis = mkLinuxSystem ./hosts/artemis;
hermes = mkLinuxSystem ./hosts/hermes;
};
};
perSystem = {
config,
pkgs,
final,
system,
inputs',
#self',
...
}: {
_module.args.pkgs = inputs'.nixpkgs.legacyPackages.extend self.overlays.default;
overlayAttrs = config.packages // {unstable = inputs.unstable.legacyPackages.${system};};
pre-commit.check.enable = false;
pre-commit.settings.hooks.alejandra.enable = true;
treefmt.config = {
projectRootFile = "flake.nix";
programs.alejandra.enable = true;
};
devShells.default = final.mkShell {
meta.description = "Default dev shell";
inputsFrom = [config.pre-commit.devShell config.treefmt.build.devShell];
packages = with final; [just git nixvim cachix jq devour-flake agenix deadnix];
};
apps = nixpkgs.lib.mapAttrs' (name: value: nixpkgs.lib.nameValuePair ("deploy-" + name) value) (inputs.nixinate.nixinate.${system} self).nixinate;
packages = {
nixvim = inputs.nixvim.packages.${system}.default;
agenix = inputs.agenix.packages.${system}.default;
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
devour-flake = pkgs.callPackage inputs.devour-flake {};
jellyfin-ffmpeg = pkgs.jellyfin-ffmpeg.override {
ffmpeg_6-full = pkgs.ffmpeg_6-full.override {
withMfx = false;
withVpl = true;
};
};
};
};
};
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
@ -28,8 +113,6 @@
inputs.darwin.follows = "";
};
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
home-manager = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
@ -59,100 +142,14 @@
flake-compat.follows = "flake-compat";
};
};
flake-compat.url = "github:edolstra/flake-compat";
flake-parts.url = "github:hercules-ci/flake-parts";
systems.url = "github:nix-systems/default";
#systems.url = "github:nix-systems/default-linux";
#systems.url = "github:nix-systems/x86_64-linux";
treefmt-nix.url = "github:numtide/treefmt-nix";
};
outputs = {
self,
disko,
nixpkgs,
flake-parts,
nixinate,
utils,
home-manager,
...
} @ inputs: let
mods = import ./modules {inherit utils;};
mkLinuxSystem = mod:
nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules =
[
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
inputs.agenix.nixosModules.default
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [self.overlays.default];
}
mod
]
++ mods.sharedModules;
};
in
flake-parts.lib.mkFlake {inherit self inputs;} {
imports = [
inputs.flake-parts.flakeModules.easyOverlay
inputs.pre-commit-hooks.flakeModule
inputs.treefmt-nix.flakeModule
];
systems = import inputs.systems;
flake = {
inherit (mods) homeManagerModules nixosModules;
nixosConfigurations = {
artemis = mkLinuxSystem ./hosts/artemis;
hermes = mkLinuxSystem ./hosts/hermes;
};
#nixosConfigurations.artemis = inputs.nixpkgs.lib.nixosSystem {};
};
perSystem = {
config,
pkgs,
final,
system,
inputs',
self',
...
}: {
_module.args.pkgs = inputs'.nixpkgs.legacyPackages.extend self.overlays.default;
overlayAttrs = config.packages // {unstable = inputs.unstable.legacyPackages.${system};};
pre-commit.check.enable = false;
pre-commit.settings.hooks.alejandra.enable = true;
treefmt.config = {
projectRootFile = "flake.nix";
programs.alejandra.enable = true;
};
devShells.default = final.mkShell {
meta.description = "Default dev shell";
inputsFrom = [config.pre-commit.devShell config.treefmt.build.devShell];
packages = with final; [just git nixvim cachix jq devour-flake agenix deadnix];
};
apps = nixpkgs.lib.mapAttrs' (name: value: nixpkgs.lib.nameValuePair ("deploy-" + name) value) (nixinate.nixinate.${system} self).nixinate;
packages = {
nixvim = inputs.nixvim.packages.${system}.default;
agenix = inputs.agenix.packages.${system}.default;
vaapiIntel = pkgs.vaapiIntel.override {enableHybridCodec = true;};
devour-flake = pkgs.callPackage inputs.devour-flake {};
jellyfin-ffmpeg = pkgs.jellyfin-ffmpeg.override {
ffmpeg_6-full = pkgs.ffmpeg_6-full.override {
withMfx = false;
withVpl = true;
};
};
};
};
};
}