Compare commits
3
Commits
3e1e1c809d
...
13ba070eda
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
13ba070eda
|
||
|
|
b94d83164c
|
||
|
|
91ab0f9902
|
No files matched your search
@@ -158,7 +158,9 @@
|
||||
};
|
||||
};
|
||||
|
||||
apps.${system}.colmena = inputs.colmena.apps.${system}.default // {
|
||||
apps.${system}.colmena = {
|
||||
type = "app";
|
||||
program = lib.getExe inputs.colmena.packages.${system}.colmena;
|
||||
meta.description = "colmena";
|
||||
};
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
nvim.enable = true;
|
||||
pandoc.enable = true;
|
||||
photography.enable = true;
|
||||
reference-manager.enable = true;
|
||||
reference-manager.enable = false;
|
||||
scripts.enable = true;
|
||||
secrets.enable = true;
|
||||
shell = {
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
deploy.enable = true;
|
||||
taskwarrior.enable = true;
|
||||
terminal.enable = true;
|
||||
reference-manager.enable = true;
|
||||
reference-manager.enable = false;
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
|
||||
+47
-10
@@ -1,5 +1,6 @@
|
||||
{
|
||||
inputs,
|
||||
lib,
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
@@ -9,6 +10,8 @@
|
||||
|
||||
let
|
||||
meta = import ./meta.nix;
|
||||
bios = config.bootloader.firmware == "bios";
|
||||
uefi = config.bootloader.firmware == "uefi";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
@@ -23,6 +26,10 @@ in
|
||||
|
||||
hardware.facter.reportPath = ./facter.json;
|
||||
|
||||
bootloader = {
|
||||
enable = true;
|
||||
firmware = "uefi";
|
||||
};
|
||||
docker.enable = true;
|
||||
hardening = {
|
||||
enable = true;
|
||||
@@ -61,22 +68,56 @@ in
|
||||
|
||||
networking.hostName = config.host.name;
|
||||
|
||||
fileSystems."/" = {
|
||||
boot.loader.grub.device = lib.mkIf bios "/dev/sda";
|
||||
boot.loader.systemd-boot.bootCounting.enable = lib.mkIf uefi true;
|
||||
|
||||
fileSystems = lib.mkIf bios {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
"/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "ext4";
|
||||
};
|
||||
swapDevices = [
|
||||
};
|
||||
swapDevices = lib.mkIf bios [
|
||||
{
|
||||
device = "/dev/disk/by-label/swap";
|
||||
}
|
||||
];
|
||||
|
||||
boot.loader.grub.enable = true;
|
||||
boot.loader.grub.device = "/dev/sda";
|
||||
disko.devices.disk.main = lib.mkIf uefi {
|
||||
type = "disk";
|
||||
device = "/dev/sda";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "512M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "4G";
|
||||
content.type = "swap";
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
users.users = {
|
||||
root.hashedPassword = "!";
|
||||
@@ -88,11 +129,7 @@ in
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "-d";
|
||||
};
|
||||
nix.gc.options = "--delete-older-than 14d";
|
||||
|
||||
virtualisation.docker.autoPrune = {
|
||||
enable = true;
|
||||
|
||||
+530
-182
File diff suppressed because it is too large.
Load diff
@@ -1,17 +1,31 @@
|
||||
{ lib, config, ... }:
|
||||
|
||||
{
|
||||
options.bootloader.enable = lib.mkOption {
|
||||
options.bootloader = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
};
|
||||
firmware = lib.mkOption {
|
||||
default = "uefi";
|
||||
type = lib.types.enum [
|
||||
"bios"
|
||||
"uefi"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.bootloader.enable {
|
||||
boot = {
|
||||
loader = {
|
||||
config = lib.mkIf config.bootloader.enable (
|
||||
lib.mkMerge [
|
||||
(lib.mkIf (config.bootloader.firmware == "uefi") {
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
(lib.mkIf (config.bootloader.firmware == "bios") {
|
||||
boot.loader.grub.enable = true;
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user