Finally working

This commit is contained in:
Daniel Flanagan 2023-09-14 17:12:13 -05:00
parent 7fd2b5d391
commit 55921810ee
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4
2 changed files with 26 additions and 14 deletions

View file

@ -1,28 +1,32 @@
inputs @ { self, ... }:
let
daniel = {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.daniel = import ./home/user.nix;
daniel = system: {
home-manager.users.daniel = {
nixpkgs.overlays = [ (final: prev: {
helix = prev.helix // inputs.helix.packages.${system}.helix;
rtx = prev.rtx // inputs.rtx.packages.${system}.rtx;
})
];
imports = [ ./home/user.nix ./home/linux.nix ];
};
hms = [
};
hms = system: [
inputs.home-manager.nixosModules.home-manager
daniel
(daniel system)
];
disko = scheme: disks: [
inputs.disko.nixosModules.disko
scheme
{ _module.args.disks = disks; }
];
nixosSystem = modules: (inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
nixosSystem = system: modules: (inputs.nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system; };
modules = [
inputs.sops-nix.nixosModules.sops
./nixos/common.nix
] ++ modules ++ hms;
] ++ modules ++ hms system;
});
diskoNixosSystem = scheme: disks: modules: (nixosSystem ((disko scheme disks) ++ modules));
diskoNixosSystem = system: scheme: disks: modules: (nixosSystem system ((disko scheme disks) ++ modules));
in
{
# TODO: disko-fy rascal and beefcake?
@ -33,7 +37,8 @@ in
];
rascal = nixosSystem [ ./nixos/rascal.nix ];
musicbox = diskoNixosSystem self.diskoConfigurations.unencrypted [ "/dev/sda" ] [ ./nixos/musicbox.nix ];
thinker = diskoNixosSystem self.diskoConfigurations.standard [ "/dev/nvme0n1" ] [ ./nixos/thinker.nix ];
musicbox = diskoNixosSystem "x86_64-linux" self.diskoConfigurations.unencrypted [ "/dev/sda" ] [ ./nixos/musicbox.nix ];
thinker = diskoNixosSystem "x86_64-linux" self.diskoConfigurations.standard [ "/dev/nvme0n1" ] [ ./nixos/thinker.nix ];
# dragon = diskoNixosSystem self.diskoConfigurations.standard [ "/dev/disk/by-uuid/asdf" ] [ ./nixos/dragon.nix ];
}

View file

@ -1,4 +1,11 @@
{ config, lib, pkgs, inputs, ... }: {
{ config, lib, inputs, system, ... }:
let
overlay = final: prev: {
helix = prev.helix // inputs.helix.packages.${system}.helix;
rtx = prev.rtx // inputs.rtx.packages.${system}.rtx;
};
pkgs = inputs.nixpkgs.legacyPackages.${system}.extend overlay;
in {
services.journald.extraConfig = "SystemMaxUse=1G";
environment = {