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, ... }: inputs @ { self, ... }:
let let
daniel = { daniel = system: {
home-manager.useGlobalPkgs = true; home-manager.users.daniel = {
home-manager.useUserPackages = true; nixpkgs.overlays = [ (final: prev: {
home-manager.users.daniel = import ./home/user.nix; 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 inputs.home-manager.nixosModules.home-manager
daniel (daniel system)
]; ];
disko = scheme: disks: [ disko = scheme: disks: [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
scheme scheme
{ _module.args.disks = disks; } { _module.args.disks = disks; }
]; ];
nixosSystem = modules: (inputs.nixpkgs.lib.nixosSystem { nixosSystem = system: modules: (inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; specialArgs = { inherit inputs system; };
specialArgs = { inherit inputs; };
modules = [ modules = [
inputs.sops-nix.nixosModules.sops inputs.sops-nix.nixosModules.sops
./nixos/common.nix ./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 in
{ {
# TODO: disko-fy rascal and beefcake? # TODO: disko-fy rascal and beefcake?
@ -33,7 +37,8 @@ in
]; ];
rascal = nixosSystem [ ./nixos/rascal.nix ]; 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 ]; # 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"; services.journald.extraConfig = "SystemMaxUse=1G";
environment = { environment = {