chore: clean up nixos configurations
Some checks are pending
Continuous Integration / Checks (push) Waiting to run
Some checks are pending
Continuous Integration / Checks (push) Waiting to run
Consolidate nixpkgs instances into once for all x86 systems
This commit is contained in:
parent
712cca5909
commit
578d4526e5
13 changed files with 92 additions and 161 deletions
|
@ -8,127 +8,92 @@
|
|||
nixos-hardware,
|
||||
nixos-generators,
|
||||
nixpkgs,
|
||||
nixpkgs-small,
|
||||
...
|
||||
}@inputs:
|
||||
let
|
||||
nixosSystem =
|
||||
# create a new instance allowing some unfree packages
|
||||
nixpkgsx86 = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
config.allowUnfreePredicate =
|
||||
pkg:
|
||||
builtins.elem (nixpkgs.lib.getName pkg) [
|
||||
"aspell-dict-en-science"
|
||||
"brgenml1lpr"
|
||||
"saleae-logic-2"
|
||||
"spotify"
|
||||
];
|
||||
};
|
||||
nixosSystem = nixpkgs.lib.nixosSystem;
|
||||
baseModule =
|
||||
{ lib, ... }:
|
||||
{
|
||||
nixpkgs,
|
||||
system ? "x86_64-linux",
|
||||
extraModules ? [ ],
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
|
||||
modules = [
|
||||
{
|
||||
nixpkgs.overlays = nixpkgs.lib.attrValues self.overlays;
|
||||
}
|
||||
_module.args.inputs = inputs;
|
||||
imports = [
|
||||
inputs.agenix.nixosModules.age
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
dadada.homepage.package = homepage;
|
||||
dadada.pkgs = inputs.self.packages.${pkgs.system};
|
||||
dadada.inputs = inputs // {
|
||||
dadada = inputs.self;
|
||||
};
|
||||
}
|
||||
)
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
]
|
||||
++ (nixpkgs.lib.attrValues self.nixosModules)
|
||||
++ [ agenix.nixosModules.age ]
|
||||
++ extraModules;
|
||||
++ (lib.attrValues inputs.self.nixosModules);
|
||||
};
|
||||
homeModule = ./modules/profiles/home.nix;
|
||||
in
|
||||
{
|
||||
stolas =
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
nixosSystem {
|
||||
inherit nixpkgs system;
|
||||
stolas = nixosSystem {
|
||||
modules = [
|
||||
{ nixpkgs.pkgs = nixpkgsx86; }
|
||||
baseModule
|
||||
nixos-hardware.nixosModules.framework-amd-ai-300-series
|
||||
homeModule
|
||||
./stolas
|
||||
];
|
||||
};
|
||||
|
||||
extraModules = [
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
disko.nixosModules.disko
|
||||
{
|
||||
nixpkgs.overlays = nixpkgs.lib.attrValues self.overlays;
|
||||
dadada.pkgs = self.packages.${system};
|
||||
dadada.inputs = inputs // {
|
||||
dadada = self;
|
||||
};
|
||||
}
|
||||
nixos-hardware.nixosModules.framework-amd-ai-300-series
|
||||
home-manager.nixosModules.home-manager
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = (nixpkgs.lib.attrValues self.hmModules) ++ [
|
||||
{ dadada.home.helix.package = pkgs.helix; }
|
||||
];
|
||||
home-manager.users.dadada = import ../home;
|
||||
}
|
||||
)
|
||||
./stolas
|
||||
];
|
||||
};
|
||||
|
||||
gorgon =
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
in
|
||||
nixosSystem {
|
||||
inherit nixpkgs system;
|
||||
|
||||
extraModules = [
|
||||
{
|
||||
nixpkgs.overlays = nixpkgs.lib.attrValues self.overlays;
|
||||
dadada.pkgs = self.packages.${system};
|
||||
dadada.inputs = inputs // {
|
||||
dadada = self;
|
||||
};
|
||||
}
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-t14s-amd-gen1
|
||||
home-manager.nixosModules.home-manager
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = (nixpkgs.lib.attrValues self.hmModules) ++ [
|
||||
{ dadada.home.helix.package = pkgs.helix; }
|
||||
{ manual.manpages.enable = false; }
|
||||
];
|
||||
home-manager.users.dadada = import ../home;
|
||||
}
|
||||
)
|
||||
./gorgon/configuration.nix
|
||||
];
|
||||
};
|
||||
gorgon = nixosSystem {
|
||||
modules = [
|
||||
{ nixpkgs.pkgs = nixpkgsx86; }
|
||||
baseModule
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-t14s-amd-gen1
|
||||
homeModule
|
||||
./gorgon/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
surgat = nixosSystem {
|
||||
nixpkgs = nixpkgs-small;
|
||||
system = "x86_64-linux";
|
||||
extraModules = [
|
||||
{
|
||||
dadada.homepage.package = homepage;
|
||||
}
|
||||
./modules/profiles/server.nix
|
||||
modules = [
|
||||
{ nixpkgs.pkgs = nixpkgsx86; }
|
||||
baseModule
|
||||
./surgat/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
agares = nixosSystem {
|
||||
nixpkgs = nixpkgs-small;
|
||||
extraModules = [
|
||||
modules = [
|
||||
{ nixpkgs.pkgs = nixpkgsx86; }
|
||||
baseModule
|
||||
./agares/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
installer =
|
||||
let
|
||||
nixpkgs = nixpkgs-small;
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
nixos-generators.nixosModules.install-iso
|
||||
self.nixosModules.admin
|
||||
installer = nixosSystem {
|
||||
modules = [
|
||||
nixos-generators.nixosModules.install-iso
|
||||
inputs.self.nixosModules.admin
|
||||
(
|
||||
{ lib, ... }:
|
||||
{
|
||||
isoImage.isoName = nixpkgs.lib.mkForce "dadada-nixos-installer.iso";
|
||||
nixpkgs.pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
isoImage.isoName = lib.mkForce "dadada-nixos-installer.iso";
|
||||
networking.tempAddresses = "disabled";
|
||||
dadada.admin.enable = true;
|
||||
documentation.enable = true;
|
||||
|
@ -139,12 +104,14 @@ in
|
|||
keyMap = "us";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
ninurta = nixosSystem {
|
||||
nixpkgs = nixpkgs-small;
|
||||
extraModules = [
|
||||
modules = [
|
||||
{ nixpkgs.pkgs = nixpkgsx86; }
|
||||
baseModule
|
||||
./ninurta/configuration.nix
|
||||
];
|
||||
};
|
||||
|
|
|
@ -52,8 +52,6 @@ in
|
|||
age.secrets."${config.networking.hostName}-backup-passphrase-gs".file =
|
||||
"${secretsPath}/${config.networking.hostName}-backup-passphrase-gs.age";
|
||||
|
||||
nixpkgs.config.android_sdk.accept_license = true;
|
||||
|
||||
programs.ssh.startAgent = true;
|
||||
|
||||
nix.extraOptions = ''
|
||||
|
@ -85,7 +83,7 @@ in
|
|||
networking.hostName = "gorgon";
|
||||
|
||||
dadada = {
|
||||
steam.enable = true;
|
||||
steam.enable = false;
|
||||
yubikey.enable = true;
|
||||
};
|
||||
|
||||
|
@ -154,7 +152,6 @@ in
|
|||
#];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-studio
|
||||
ghostscript
|
||||
smartmontools
|
||||
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
{
|
||||
nixpkgs.config.allowUnfreePredicate = pkg: true;
|
||||
}
|
|
@ -4,6 +4,10 @@ let
|
|||
initrdHostKey = "${config.networking.hostName}-ssh_host_ed25519_key";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./server.nix
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "virtio-pci" ];
|
||||
|
||||
boot.kernelParams = [
|
||||
|
|
7
nixos/modules/profiles/home.nix
Normal file
7
nixos/modules/profiles/home.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, inputs, ... }:
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.sharedModules = pkgs.lib.attrValues inputs.self.hmModules;
|
||||
home-manager.users.dadada = inputs.self.hmConfigurations.dadada;
|
||||
}
|
|
@ -12,11 +12,6 @@
|
|||
./paperless.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
hostPlatform = "x86_64-linux";
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
|
||||
boot = {
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
|
@ -58,7 +53,7 @@
|
|||
# NOTE: hardware.framework.enableKmod requires kernel patching, but enables access to some EC features
|
||||
bluetooth.enable = true;
|
||||
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
enableAllFirmware = true;
|
||||
enableRedistributableFirmware = true;
|
||||
framework.laptop13.audioEnhancement.enable = true;
|
||||
graphics = {
|
||||
enable = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue