♻️ config refactor cleanup
This commit is contained in:
parent
d4b4ba1d1e
commit
19a01e278e
23
flake.nix
23
flake.nix
@ -37,7 +37,6 @@
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
|
||||
# My stuff
|
||||
dotfiles = {
|
||||
url = "github:walkah/dotfiles";
|
||||
@ -55,16 +54,18 @@
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils, deploy-rs, pre-commit-hooks, workon, ... }@inputs:
|
||||
flake-utils.lib.eachDefaultSystem
|
||||
(system: {
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
checks = import ./nix/checks.nix { inherit self system pre-commit-hooks; };
|
||||
devShells = import ./nix/shells.nix { inherit self system; };
|
||||
formatter = self.pkgs.nixpkgs-fmt;
|
||||
})
|
||||
(system:
|
||||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [ self.overlays.default ];
|
||||
};
|
||||
in
|
||||
{
|
||||
checks = import ./nix/checks.nix { inherit self pkgs system pre-commit-hooks; };
|
||||
devShells = import ./nix/shells.nix { inherit self pkgs system; };
|
||||
formatter = pkgs.nixpkgs-fmt;
|
||||
})
|
||||
// {
|
||||
hosts = import ./nix/hosts.nix;
|
||||
overlays.default = nixpkgs.lib.composeManyExtensions [
|
||||
|
@ -11,8 +11,6 @@
|
||||
../../modules/sops
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ (import ../../overlays) ];
|
||||
|
||||
# Use the extlinux boot loader. (NixOS wants to enable GRUB by default)
|
||||
boot.loader.grub.enable = false;
|
||||
# Enables the generation of /boot/extlinux/extlinux.conf
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
@ -23,9 +23,6 @@
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.overlays = [ (import ../../overlays) ];
|
||||
|
||||
nix.extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
@ -18,8 +18,6 @@
|
||||
../../modules/sops
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [ (import ../../overlays) ];
|
||||
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
||||
# Set your time zone.
|
||||
|
@ -1,5 +1,4 @@
|
||||
{ self, system, pre-commit-hooks, ... }:
|
||||
with self.pkgs.${system};
|
||||
{ self, pkgs, system, pre-commit-hooks, ... }:
|
||||
{
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
@ -9,4 +8,4 @@ with self.pkgs.${system};
|
||||
statix.enable = true;
|
||||
};
|
||||
};
|
||||
} // (deploy-rs.lib.deployChecks self.deploy)
|
||||
} // (pkgs.deploy-rs.lib.deployChecks self.deploy)
|
||||
|
@ -10,7 +10,7 @@ let
|
||||
home-manager.darwinModules.home-manager
|
||||
(_: {
|
||||
networking.hostName = hostName;
|
||||
nixpkgs.pkgs = self.pkgs.${hostSystem};
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
})
|
||||
] ++ modules;
|
||||
specialArgs = { inherit dotfiles home-manager; };
|
||||
|
@ -10,7 +10,8 @@ let
|
||||
home-manager.nixosModules.home-manager
|
||||
(_: {
|
||||
networking.hostName = hostName;
|
||||
nixpkgs.pkgs = self.pkgs.${hostSystem};
|
||||
nixpkgs.overlays = [ self.overlays.default ];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
})
|
||||
] ++ modules;
|
||||
specialArgs = { inherit dotfiles nixos-hardware sops-nix; };
|
||||
|
@ -1,16 +1,13 @@
|
||||
{ system, self, ... }:
|
||||
|
||||
with self.pkgs.${system};
|
||||
|
||||
{ system, pkgs, self, ... }:
|
||||
let
|
||||
darwin-local = writeScriptBin "darwin-local" ''
|
||||
#!${stdenv.shell}
|
||||
darwin-local = pkgs.writeScriptBin "darwin-local" ''
|
||||
#!${pkgs.stdenv.shell}
|
||||
nix build .#darwinConfigurations.$(hostname -s).system
|
||||
./result/sw/bin/darwin-rebuild switch --flake .
|
||||
'';
|
||||
in
|
||||
{
|
||||
default = mkShell {
|
||||
default = pkgs.mkShell {
|
||||
name = "athens";
|
||||
buildInputs = with pkgs; [
|
||||
darwin-local
|
||||
|
Loading…
Reference in New Issue
Block a user