1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

feat: remove unused host-drvs

This commit is contained in:
oddlama 2023-02-04 01:51:10 +01:00
parent b6612ffa84
commit 4da937bcd0
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
7 changed files with 5 additions and 56 deletions

8
.envrc
View file

@ -1,8 +0,0 @@
#!/bin/sh
use flake
watch_file ./nix/checks.nix
watch_file ./nix/dev-shell.nix
eval "$shellHook"

View file

@ -55,15 +55,6 @@
checks = import ./nix/checks.nix inputs system;
devShells.default = import ./nix/dev-shell.nix inputs system;
packages = let
hostDrvs = import ./nix/host-drvs.nix inputs system;
default =
if builtins.hasAttr "${system}" hostDrvs
then {default = self.packages.${system}.${system};}
else {};
in
hostDrvs // default;
pkgs = import nixpkgs {
inherit system;
overlays = [

View file

@ -28,7 +28,6 @@
boot = {
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
kernelModules = [];
tmpOnTmpfs = true;
};
console = {

View file

@ -22,7 +22,6 @@
boot = {
initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci"];
kernelModules = ["kvm-intel"];
tmpOnTmpfs = true;
};
console = {

View file

@ -19,19 +19,20 @@ in {
./xdg.nix
];
boot.kernelParams = ["log_buf_len=10M"];
boot = {
kernelParams = ["log_buf_len=10M"];
tmpOnTmpfs = true;
};
environment.etc."nixos/configuration.nix".source = dummyConfig;
# Disable sudo which is entierly unnecessary.
security.sudo.enable = false;
# Setup to use Secrets
rekey.hostPubkey = ../../secrets/pubkeys + "/${config.networking.hostName}.pub";
rekey.masterIdentities = [../../secrets/yk1-nix-rage.pub];
rekey.extraEncryptionPubkeys = [../../secrets/backup.pub];
rekey.secrets.yolo.file = ./yolo.age;
environment.etc."YOLO".source = config.rekey.secrets.yolo.path;
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View file

@ -1,7 +0,0 @@
age-encryption.org/v1
-> X25519 saA0VOfRsGeQ7wIJ4SF80v3rvmf7rRbZcxTbRbWrRn4
NNs7fIU09lYiKZ1R5KE3fJhHM1MlNxC7H6Cz2oAOyus
-> piv-p256 xqSe8Q AgPVLX/r+nz6PWZFJW90BcPVU9kFrLV1PZge80Fyd0og
OGvcmxsXWqwxDOGUy9Slw7zEkgeiHblldbYw4UilPC0
--- wi4PRgJNO6O1TgA3qobLX0wP14vreWRccvuR9wWNN+k
@…�RFJ[½®—(I‡ªu½¯mLSÂ¨Š¾«|P&þð2ú—ævñŠŽ’×2ÓÙ(àüW¦�I^ÞR:¿p�|Zty0óÊ�?ãìivAÛ…§©$ˆ¤Œ‘ÆèÍZZüMÂ�LÂpÿÒÏ Éi›¥ë ø„½š<û‹àQÕÙ

View file

@ -1,26 +0,0 @@
{self, ...}: system: let
inherit (self.pkgs.${system}) lib linkFarm;
nixosDrvs = lib.mapAttrs (_: nixos: nixos.config.system.build.toplevel) self.nixosConfigurations;
homeDrvs = lib.mapAttrs (_: home: home.activationPackage) self.homeConfigurations;
hostDrvs = nixosDrvs // homeDrvs;
structuredHostDrvs =
lib.mapAttrsRecursiveCond
(hostAttr: !(hostAttr ? "type" && (lib.elem hostAttr.type ["homeManager" "nixos"])))
(path: _: hostDrvs.${lib.last path})
self.hosts;
structuredHostFarms =
lib.mapAttrsRecursiveCond
(as: !(lib.any lib.isDerivation (lib.attrValues as)))
(
path: values:
(linkFarm
(lib.concatStringsSep "-" path)
(lib.mapAttrsToList (name: path: {inherit name path;}) values))
// values
)
structuredHostDrvs;
in
structuredHostFarms