diff --git a/flake.nix b/flake.nix index 7a5d4b5..292c4e0 100644 --- a/flake.nix +++ b/flake.nix @@ -2,7 +2,6 @@ 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 { @@ -11,20 +10,12 @@ 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};}; @@ -38,12 +29,6 @@ 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 e9fa481..9ba50c5 100644 --- a/modules/system/boot/module.nix +++ b/modules/system/boot/module.nix @@ -1,11 +1,17 @@ -{pkgs, ...}: { +{lib, pkgs, ...}:let + +inherit (lib.modules) mkForce; +in { boot.loader = { efi.canTouchEfiVariables = true; - grub = { + systemd-boot = { enable = true; - efiSupport = true; - device = "nodev"; - configurationLimit = 5; + # 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; }; }; boot.plymouth = {