This commit is contained in:
Gregory Burd 2023-09-25 14:53:08 -04:00
parent 86706b1fc7
commit 7994ec1418
Signed by: greg
GPG key ID: AEFACC3FC495AF89
5 changed files with 111 additions and 25 deletions

View file

@ -1,5 +1,47 @@
{ {
"nodes": { "nodes": {
"agenix": {
"inputs": {
"darwin": "darwin",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1695384796,
"narHash": "sha256-TYlE4B0ktPtlJJF9IFxTWrEeq+XKG8Ny0gc2FGEAdj0=",
"owner": "ryantm",
"repo": "agenix",
"rev": "1f677b3e161d3bdbfd08a939e8f25de2568e0ef4",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1673295039,
"narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "87b9d090ad39b25b2400029c64825fc2a8868943",
"type": "github"
},
"original": {
"owner": "lnl7",
"ref": "master",
"repo": "nix-darwin",
"type": "github"
}
},
"disko": { "disko": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -95,6 +137,27 @@
} }
}, },
"home-manager": { "home-manager": {
"inputs": {
"nixpkgs": [
"agenix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1682203081,
"narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -207,16 +270,16 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1695559356, "lastModified": 1677676435,
"narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=", "narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=",
"owner": "nixos", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0", "rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "NixOS",
"ref": "nixos-23.05", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -255,6 +318,22 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": {
"locked": {
"lastModified": 1695559356,
"narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nmd": { "nmd": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -289,14 +368,15 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"agenix": "agenix",
"disko": "disko", "disko": "disko",
"firefox-addons": "firefox-addons", "firefox-addons": "firefox-addons",
"home-manager": "home-manager", "home-manager": "home-manager_2",
"impermanence": "impermanence", "impermanence": "impermanence",
"nh": "nh", "nh": "nh",
"nix-formatter-pack": "nix-formatter-pack", "nix-formatter-pack": "nix-formatter-pack",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"vscode-server": "vscode-server" "vscode-server": "vscode-server"

View file

@ -7,6 +7,9 @@
# same time. See 'unstable-packages' overlay in 'overlays/default.nix'. # same time. See 'unstable-packages' overlay in 'overlays/default.nix'.
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
agenix.url = "github:ryantm/agenix";
agenix.inputs.ixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko"; disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs"; disko.inputs.nixpkgs.follows = "nixpkgs";

View file

@ -5,7 +5,7 @@
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs outputs desktop hostname platform username stateVersion; inherit inputs outputs desktop hostname platform username stateVersion;
}; };
modules = [ "../home/${username}/${hostname}.nix" ]; modules = [ ../home/${username}/${hostname}.nix ];
}; };
# Helper function for generating host configs # Helper function for generating host configs
@ -14,7 +14,7 @@
inherit inputs outputs desktop hostname username stateVersion; inherit inputs outputs desktop hostname username stateVersion;
}; };
modules = [ modules = [
"../nixos/${hostname}" ../nixos/${hostname}
inputs.agenix.nixosModules.default inputs.agenix.nixosModules.default
] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]); ] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]);
}; };

View file

@ -1,4 +1,4 @@
{ pkgs, inputs, ... }: { { inputs, lib, pkgs, ... }: {
imports = [ imports = [
inputs.nixos-hardware.nixosModules.common-cpu-amd inputs.nixos-hardware.nixosModules.common-cpu-amd
inputs.nixos-hardware.nixosModules.common-gpu-amd inputs.nixos-hardware.nixosModules.common-gpu-amd
@ -15,8 +15,6 @@
../_mixins/users/gburd ../_mixins/users/gburd
]; ];
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/470152b6-16cc-4dcf-b1e9-c684c1589e33";
fileSystems."/swap" = fileSystems."/swap" =
{ {
device = "/dev/disk/by-uuid/bf75af76-49b0-41fa-a4e5-9a52a6a0a667"; device = "/dev/disk/by-uuid/bf75af76-49b0-41fa-a4e5-9a52a6a0a667";
@ -43,17 +41,22 @@
}]; }];
boot = { boot = {
initrd.availableKernelModules = [ initrd = {
"ahci" availableKernelModules = [
"nvme" "ahci"
"rtsx_pci_sdmmc" "nvme"
"sd_mod" "rtsx_pci_sdmmc"
"sdhci_pci" "sd_mod"
"uas" "sdhci_pci"
"usbhid" "uas"
"usb_storage" "usbhid"
"xhci_pci" "usb_storage"
]; "xhci_pci"
];
luks.devices."enc".device = "/dev/disk/by-uuid/470152b6-16cc-4dcf-b1e9-c684c1589e33";
};
kernelModules = [ "kvm-intel" ]; kernelModules = [ "kvm-intel" ];
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
}; };

View file

@ -1,4 +1,4 @@
{ inputs }: { inputs, ... }:
let let
addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: { addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or [ ]) ++ patches; patches = (oldAttrs.patches or [ ]) ++ patches;