refactor(flake-parts): initial flake-parts configuration
This commit is contained in:
parent
8f67be9e68
commit
5603001d65
230 changed files with 380 additions and 717 deletions
10
inputs/system/modules/base/nix/default.nix
Normal file
10
inputs/system/modules/base/nix/default.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./nh
|
||||
./nix
|
||||
./nixpkgs
|
||||
./subs
|
||||
];
|
||||
}
|
||||
22
inputs/system/modules/base/nix/nh/default.nix
Normal file
22
inputs/system/modules/base/nix/nh/default.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
host = config.systemModules.host;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (host.type != "phone") {
|
||||
# TODO: i dont't want to hardcode this.
|
||||
environment.variables.FLAKE = "/home/ooks/.config/ooknix/";
|
||||
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
package = pkgs.nh;
|
||||
clean = {
|
||||
enable = true;
|
||||
extraArgs = "--keep-since 30d";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
23
inputs/system/modules/base/nix/nix/default.nix
Normal file
23
inputs/system/modules/base/nix/nix/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{ config, lib, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf mapAttrs mkDefault;
|
||||
host = config.systemModules.host;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (host.type != "phone") {
|
||||
nix = {
|
||||
settings = {
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
auto-optimise-store = mkDefault true;
|
||||
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||
warn-dirty = false;
|
||||
system-features = [ "kvm" "big-parallel" "nixos-test" ];
|
||||
flake-registry = "";
|
||||
};
|
||||
registry = mapAttrs (_: value: { flake = value; }) inputs;
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
26
inputs/system/modules/base/nix/nixpkgs/default.nix
Normal file
26
inputs/system/modules/base/nix/nixpkgs/default.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ lib, config, inputs, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
host = config.systemModules.host;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (host.type != "phone") {
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"openssl-1.1.1u"
|
||||
"electron-25.9.0"
|
||||
];
|
||||
};
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
waybar = inputs.nixpkgs-wayland.packages.${prev.system}.waybar;
|
||||
zjstatus = inputs.zjstatus.packages.${prev.system}.default;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
33
inputs/system/modules/base/nix/subs/default.nix
Normal file
33
inputs/system/modules/base/nix/subs/default.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
host = config.systemModules.host;
|
||||
in
|
||||
|
||||
{
|
||||
config = mkIf (host.type != "phone") {
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://cache.nixos.org?priority=10"
|
||||
"https://fufexan.cachix.org"
|
||||
"https://helix.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nix-gaming.cachix.org"
|
||||
"https://anyrun.cachix.org"
|
||||
"https://nixpkgs-wayland.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
||||
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
|
||||
"nixpkgs-wayland.cachix.org-1:3lwxaILxMRkVhehr5StQprHdEo4IrE8sRho9R9HOLYA="
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue