mirror of
https://forgejo.merr.is/annika/nixos.git
synced 2025-12-17 20:51:05 -05:00
Switched To A New/Modified Structure
Based heavily on https://github.com/nmasur/dotfiles
This commit is contained in:
parent
634a129840
commit
99a16590b3
25 changed files with 495 additions and 703 deletions
6
modules/nixos/default.nix
Normal file
6
modules/nixos/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./hardware
|
||||
];
|
||||
}
|
||||
28
modules/nixos/hardware/boot.nix
Normal file
28
modules/nixos/hardware/boot.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
boot.loader = lib.mkIf (config.physical) {
|
||||
grub = {
|
||||
enable = true;
|
||||
efiSupport = true;
|
||||
useOSProber = true;
|
||||
gfxmodeEfi = "1920x1080";
|
||||
configurationLimit = 25;
|
||||
device = "nodev";
|
||||
|
||||
# Display menu indefinitely if holding shift key
|
||||
extraConfig = ''
|
||||
if keystatus --shift; then
|
||||
set timeout=-1
|
||||
else
|
||||
set timeout=3
|
||||
fi
|
||||
'';
|
||||
|
||||
};
|
||||
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
boot.supportedFilesystems = lib.mkIf config.physical [ "ntfs" ];
|
||||
boot.kernelPackages = lib.mkDefault pkgs.linuxPackages_latest;
|
||||
}
|
||||
11
modules/nixos/hardware/default.nix
Normal file
11
modules/nixos/hardware/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ lib, ... }:
|
||||
{
|
||||
imports = [
|
||||
./boot.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
physical = lib.mkEnableOption "Whether this machine is a physical device.";
|
||||
server = lib.mkEnableOption "Whether this machine is a server.";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue