diff --git a/flake.nix b/flake.nix index 292c4e0..7a5d4b5 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,7 @@ description = "My NixOS config flake"; outputs = inputs: let pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux; + user = import ./modules/user {inherit pkgs;}; eachSystem = inputs.nixpkgs.lib.genAttrs (import inputs.systems); pkgsFor = inputs.nixpkgs.legacyPackages; in { @@ -10,12 +11,20 @@ devShells.x86_64-linux.default = pkgs.callPackage ./shell.nix {}; formatter.x86_64-linux = pkgs.alejandra; + # packages.x86_64-linux = {inherit (user) packages;}; packages = eachSystem ( system: { inherit (import ./packages pkgsFor.${system}) helix fish; } ); + # packages = eachSystem ( + # system: let + # user = import ./modules/user {pkgs = pkgsFor.${system};}; + # in { + # inherit (user) packages; + # } + # ); apps = eachSystem (system: let user = import ./modules/user {pkgs = pkgsFor.${system};}; @@ -29,6 +38,12 @@ program = "${user.packages.helix}/bin/hx"; }; }); + # nixosModules = eachSystem (system: let + # user = import ./modules/user {inherit inputs;}; + # in { + # user = user.module; + # }); + # nixosModules.user = user.module; }; inputs = { # Unstable nixpkgs baby! diff --git a/modules/system/boot/module.nix b/modules/system/boot/module.nix index 9ba50c5..e9fa481 100644 --- a/modules/system/boot/module.nix +++ b/modules/system/boot/module.nix @@ -1,17 +1,11 @@ -{lib, pkgs, ...}:let - -inherit (lib.modules) mkForce; -in { +{pkgs, ...}: { boot.loader = { efi.canTouchEfiVariables = true; - systemd-boot = { + grub = { enable = true; - # security risk, see - # https://github.com/NixOS/nixpkgs/blob/nixos-unstable/nixos/modules/system/boot/loader/systemd-boot/systemd-boot.nix#L208-L220 - editor = mkForce false; - - # device = "nodev"; - configurationLimit = 15; + efiSupport = true; + device = "nodev"; + configurationLimit = 5; }; }; boot.plymouth = {