-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: extend and use fonts update base images for linode and new DO s…
…erver definition
- Loading branch information
Showing
17 changed files
with
187 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
.direnv* | ||
/result | ||
*.img | ||
*.img | ||
*.iso | ||
*.*.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ lib, config, pkgs, ... }: | ||
let | ||
cfg = config.oxc.desktop.fonts; | ||
|
||
enabled = cfg.enable || cfg.ultraMode; | ||
in | ||
{ | ||
options.oxc.desktop.fonts = { | ||
enable = lib.mkOption { | ||
type = lib.types.bool; | ||
default = false; | ||
description = "Whether to enable the minimal suite of font configurations"; | ||
}; | ||
ultraMode = lib.mkOption { | ||
type = lib.types.bool; | ||
default = false; | ||
description = "Whether to enable the ultra, over the top suite of font configurations"; | ||
}; | ||
emoji = lib.mkOption { | ||
type = lib.types.bool; | ||
default = false; | ||
description = "Whether to enable emoji font sets"; | ||
}; | ||
japanese = lib.mkOption { | ||
type = lib.types.bool; | ||
default = false; | ||
description = "Whether to enable Japanese font sets"; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf cfg.ultraMode { | ||
fonts = { | ||
fontDir.enable = true; | ||
packages = with pkgs; lib.optional cfg.ultraMode [ | ||
(nerdfonts.override { fonts = [ "FiraCode" "SourceCodePro" "UbuntuMono" ]; }) | ||
fira | ||
fira-go | ||
liberation_ttf | ||
source-serif | ||
ubuntu_font_family | ||
work-sans | ||
] // lib.optional (cfg.ultraMode || cfg.japanese) [ | ||
ipafont | ||
kochi-substitute | ||
] // lib.optional (cfg.ultraMode || cfg.emoji) [ | ||
joypixels | ||
noto-fonts-emoji | ||
]; | ||
|
||
# Enable a basic set of fonts providing several font styles and families and reasonable coverage of Unicode. | ||
enableDefaultPackages = cfg.ultraMode; | ||
|
||
fontconfig = lib.mkIf cfg.ultraMode { | ||
antialias = true; | ||
defaultFonts = { | ||
serif = [ "Source Serif" "IPAPMincho" ]; | ||
sansSerif = [ "Work Sans" "Fira Sans" "FiraGO" "IPAGothic" ]; | ||
monospace = [ "FiraCode Nerd Font Mono" "SauceCodePro Nerd Font Mono" "IPAGothic" ]; | ||
emoji = [ "Joypixels" "Noto Color Emoji" ]; | ||
}; | ||
enable = true; | ||
hinting = { | ||
autohint = false; | ||
enable = true; | ||
style = "slight"; | ||
}; | ||
subpixel = { | ||
rgba = "rgb"; | ||
lcdfilter = "light"; | ||
}; | ||
}; | ||
}; | ||
|
||
nixpkgs.config = lib.mkIf (cfg.ultraMode || cfg.emoji) { | ||
joypixels.acceptLicense = true; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ config, lib, ... }: | ||
let | ||
cfg = config.oxc.services.networkmanager; | ||
in | ||
{ | ||
options.oxc.services.networkmanager = { | ||
enable = lib.mkOption { | ||
type = lib.types.bool; | ||
default = true; | ||
description = "Enable NetworkManager"; | ||
}; | ||
|
||
wireless = { | ||
enable = lib.mkOption { | ||
type = lib.types.bool; | ||
default = true; | ||
description = "Enable support for wireless networking with NetworkManager"; | ||
}; | ||
}; | ||
}; | ||
|
||
config = lib.mkIf cfg.enable { | ||
networking = { | ||
networkmanager = { | ||
enable = true; | ||
wifi = lib.mkIf cfg.wireless.enable { | ||
backend = "iwd"; | ||
}; | ||
}; | ||
wireless = lib.mkIf cfg.wireless.enable { | ||
enable = false; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ pkgs, lib, ... }: | ||
let | ||
webRootHostDir = "/etc/web-server/"; | ||
fqdn = "dotest.carrio.dev"; | ||
in | ||
{ | ||
imports = [ | ||
../../mixins/disks/digital-ocean.nix | ||
]; | ||
|
||
security.acme = { | ||
acceptTerms = true; | ||
defaults.email = "[email protected]"; | ||
}; | ||
services.nginx = { | ||
enable = true; | ||
virtualHosts = { | ||
"foo.carrio.dev" = { | ||
forceSSL = true; | ||
enableACME = true; | ||
# All serverAliases will be added as extra domain names on the certificate. | ||
serverAliases = [ "bar.carrio.dev" ]; | ||
locations."/" = { | ||
root = "/etc/web-server"; | ||
}; | ||
}; | ||
}; | ||
}; | ||
|
||
# Configure hosted web content directory | ||
environment.etc.web-server.source = ./webroot; | ||
|
||
# Now we need to open port 80 for the ACME challenge and port 443 for TLS itself | ||
networking.firewall.allowedTCPPorts = [ 80 443 ]; | ||
|
||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<html lang="en"> | ||
<head></head> | ||
<body><h1>Test Web Server</h1></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
# The base image does not define anything outside of the automatically inherited | ||
# configurations from the nixos/default.nix module. | ||
# After a system boots and you switch NixOS configurations, you must either | ||
# 1. Copy the /etc/nixos/hardware-configuration.nix file | ||
# 2. Include a disk definition for the platform | ||
# For #2, see the mixins/disks/digital-ocean.nix for an example configuration | ||
_: { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
_: { | ||
imports = [../generic-base-image]; | ||
|
||
oxc.services.networkmanager.enable = false; | ||
} |