From 7994ec14185767b446f6ca2e6f9b64eee7ff9984 Mon Sep 17 00:00:00 2001 From: Greg Burd Date: Mon, 25 Sep 2023 14:53:08 -0400 Subject: [PATCH] fixes --- flake.lock | 96 +++++++++++++++++++++++++++++++++++++---- flake.nix | 3 ++ lib/helpers.nix | 4 +- nixos/floki/default.nix | 31 +++++++------ overlays/default.nix | 2 +- 5 files changed, 111 insertions(+), 25 deletions(-) diff --git a/flake.lock b/flake.lock index 8b73e18..82e3ddb 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,47 @@ { "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": { "inputs": { "nixpkgs": [ @@ -95,6 +137,27 @@ } }, "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": { "nixpkgs": [ "nixpkgs" @@ -207,16 +270,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1695559356, - "narHash": "sha256-kXZ1pUoImD9OEbPCwpTz4tHsNTr4CIyIfXb3ocuR8sI=", - "owner": "nixos", + "lastModified": 1677676435, + "narHash": "sha256-6FxdcmQr5JeZqsQvfinIMr0XcTyTuR7EXX0H3ANShpQ=", + "owner": "NixOS", "repo": "nixpkgs", - "rev": "261abe8a44a7e8392598d038d2e01f7b33cf26d0", + "rev": "a08d6979dd7c82c4cef0dcc6ac45ab16051c1169", "type": "github" }, "original": { - "owner": "nixos", - "ref": "nixos-23.05", + "owner": "NixOS", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -255,6 +318,22 @@ "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": { "flake": false, "locked": { @@ -289,14 +368,15 @@ }, "root": { "inputs": { + "agenix": "agenix", "disko": "disko", "firefox-addons": "firefox-addons", - "home-manager": "home-manager", + "home-manager": "home-manager_2", "impermanence": "impermanence", "nh": "nh", "nix-formatter-pack": "nix-formatter-pack", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs", + "nixpkgs": "nixpkgs_2", "nixpkgs-unstable": "nixpkgs-unstable", "sops-nix": "sops-nix", "vscode-server": "vscode-server" diff --git a/flake.nix b/flake.nix index 7936ad0..466f701 100644 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,9 @@ # same time. See 'unstable-packages' overlay in 'overlays/default.nix'. 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.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/lib/helpers.nix b/lib/helpers.nix index a599ff3..32fb62a 100644 --- a/lib/helpers.nix +++ b/lib/helpers.nix @@ -5,7 +5,7 @@ extraSpecialArgs = { inherit inputs outputs desktop hostname platform username stateVersion; }; - modules = [ "../home/${username}/${hostname}.nix" ]; + modules = [ ../home/${username}/${hostname}.nix ]; }; # Helper function for generating host configs @@ -14,7 +14,7 @@ inherit inputs outputs desktop hostname username stateVersion; }; modules = [ - "../nixos/${hostname}" + ../nixos/${hostname} inputs.agenix.nixosModules.default ] ++ (inputs.nixpkgs.lib.optionals (installer != null) [ installer ]); }; diff --git a/nixos/floki/default.nix b/nixos/floki/default.nix index 0a4dea0..68d00a7 100644 --- a/nixos/floki/default.nix +++ b/nixos/floki/default.nix @@ -1,4 +1,4 @@ -{ pkgs, inputs, ... }: { +{ inputs, lib, pkgs, ... }: { imports = [ inputs.nixos-hardware.nixosModules.common-cpu-amd inputs.nixos-hardware.nixosModules.common-gpu-amd @@ -15,8 +15,6 @@ ../_mixins/users/gburd ]; - boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/470152b6-16cc-4dcf-b1e9-c684c1589e33"; - fileSystems."/swap" = { device = "/dev/disk/by-uuid/bf75af76-49b0-41fa-a4e5-9a52a6a0a667"; @@ -43,17 +41,22 @@ }]; boot = { - initrd.availableKernelModules = [ - "ahci" - "nvme" - "rtsx_pci_sdmmc" - "sd_mod" - "sdhci_pci" - "uas" - "usbhid" - "usb_storage" - "xhci_pci" - ]; + initrd = { + availableKernelModules = [ + "ahci" + "nvme" + "rtsx_pci_sdmmc" + "sd_mod" + "sdhci_pci" + "uas" + "usbhid" + "usb_storage" + "xhci_pci" + ]; + + luks.devices."enc".device = "/dev/disk/by-uuid/470152b6-16cc-4dcf-b1e9-c684c1589e33"; + }; + kernelModules = [ "kvm-intel" ]; kernelPackages = pkgs.linuxPackages_latest; }; diff --git a/overlays/default.nix b/overlays/default.nix index 86e7135..b5a0f8f 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,4 @@ -{ inputs }: +{ inputs, ... }: let addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: { patches = (oldAttrs.patches or [ ]) ++ patches;