Extreme cleaup + new nix rice + commit hooks
This commit is contained in:
parent
bc28d964d3
commit
c9eeeb9dc4
59 changed files with 319 additions and 400 deletions
70
flake.nix
70
flake.nix
|
|
@ -2,36 +2,18 @@
|
|||
description = "Thor system configuration";
|
||||
|
||||
inputs = {
|
||||
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/release-22.05";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-22.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
home-manager = { url = "github:nix-community/home-manager/release-22.05"; inputs.nixpkgs.follows = "nixpkgs"; };
|
||||
|
||||
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager-unstable = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "unstable";
|
||||
};
|
||||
home-manager-unstable = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "unstable"; };
|
||||
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
|
||||
rust-overlay = {
|
||||
url = "github:oxalica/rust-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
|
||||
tex2nix = {
|
||||
url = github:Mic92/tex2nix;
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.flake-utils.follows = "flake-utils";
|
||||
};
|
||||
nix-rice = { url = "github:bertof/nix-rice"; inputs.inxpkgs.follows = "unstable"; inputs.flake-utils.follows = "flake-utils"; };
|
||||
pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
|
||||
tex2nix = { url = github:Mic92/tex2nix; inputs.nixpkgs.follows = "nixpkgs"; inputs.flake-utils.follows = "flake-utils"; };
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
@ -42,24 +24,26 @@
|
|||
, home-manager-unstable
|
||||
, flake-utils
|
||||
, nixos-hardware
|
||||
, rust-overlay
|
||||
, tex2nix
|
||||
, nix-rice
|
||||
, pre-commit-hooks
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
overlays = [
|
||||
overlaysBuilder = system: [
|
||||
(nix-rice.overlays.default)
|
||||
(import ./rice.nix)
|
||||
(rust-overlay.overlay)
|
||||
(final: prev: { inherit (tex2nix.packages.${system}) tex2nix; })
|
||||
(final: prev: {
|
||||
(_: _: { inherit (tex2nix.packages.${system}) tex2nix; })
|
||||
(final: _: {
|
||||
update-background = final.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; };
|
||||
lockscreen = final.callPackage ./custom/lockscreen { palette = final.rice.colorPalette; font = final.rice.font.normal; };
|
||||
})
|
||||
(final: prev: { stable = pkgs; })
|
||||
(final: prev: { unstable = unstablePkgs; })
|
||||
(_: _: { stable = pkgs; })
|
||||
(_: _: { unstable = unstablePkgs; })
|
||||
];
|
||||
nixpkgsSettings = {
|
||||
inherit overlays system;
|
||||
inherit system;
|
||||
overlays = overlaysBuilder system;
|
||||
config = {
|
||||
extraOptions = "experimental-features = nix-command flakes";
|
||||
allowUnfree = true;
|
||||
|
|
@ -156,7 +140,7 @@
|
|||
nixosConfigurations = rec {
|
||||
|
||||
thor = thor-unstable;
|
||||
thor-stable = thorStable [ ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix];
|
||||
thor-stable = thorStable [ ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||
thor-unstable = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||
# thor-big-data = thorUnstable [ ./nixos_modules/pro_audio.nix ./nixos_modules/big_data.nix ./nixos_modules/sesar.nix ];
|
||||
|
||||
|
|
@ -168,9 +152,25 @@
|
|||
odin-nvidia-stable = odinStable [ ./odin/configuration-nvidia.nix ./nixos_modules/pro_audio.nix ./nixos_modules/sesar.nix ];
|
||||
|
||||
loki = loki-unstable;
|
||||
loki-stable = lokiStable [];
|
||||
loki-stable = lokiStable [ ];
|
||||
loki-unstable = lokiUnstable [ ];
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
} // (flake-utils.lib.eachDefaultSystem (system:
|
||||
let unstablePkgs = import unstable { inherit system; overlays = overlaysBuilder system; };
|
||||
in
|
||||
rec {
|
||||
checks = {
|
||||
pre-commit-check = pre-commit-hooks.lib.${system}.run {
|
||||
src = ./.;
|
||||
hooks = { nixpkgs-fmt.enable = true; nix-linter.enable = true; };
|
||||
};
|
||||
};
|
||||
|
||||
devShells.default = unstablePkgs.mkShell {
|
||||
shellHook = ''
|
||||
${self.checks.${system}.pre-commit-check.shellHook}
|
||||
'';
|
||||
};
|
||||
}));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue