merging this branch so I can start a clean one, gitbutler caused a lot of pain due to it failing to build

This commit is contained in:
Christoph Hollizeck 2024-11-08 01:14:39 +01:00
commit 2bd027e333
Signed by: Daholli
GPG key ID: 1763BB530F50279E
26 changed files with 1427 additions and 288 deletions

View file

@ -18,7 +18,7 @@ let
in
{
options.${namespace}.apps.cli-apps.helix = {
enable = mkEnableOption "Whether to enable nixvim or not";
enable = mkEnableOption "Whether to enable helix or not";
};
config = mkIf cfg.enable {
@ -30,124 +30,119 @@ in
};
${namespace} = {
home = {
extraOptions = {
programs.helix = {
enable = true;
package = helix-pkg;
defaultEditor = true;
settings = {
theme = "tokyonight";
editor = {
auto-format = true;
line-number = "relative";
home.extraOptions = {
programs.helix = {
enable = true;
package = helix-pkg;
defaultEditor = true;
settings = {
theme = "tokyonight";
editor = {
auto-format = true;
line-number = "relative";
lsp = {
display-inlay-hints = true;
display-messages = true;
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
indent-guides = {
render = true;
character = "|";
};
statusline = {
left = [
"mode"
"spinner"
];
center = [ "file-name" ];
right = [
"workspace-diagnostics"
"diagnostics"
"selections"
"position"
"total-line-numbers"
"spacer"
"file-encoding"
"file-line-ending"
"file-type"
];
separator = "";
};
lsp = {
display-inlay-hints = true;
display-messages = true;
};
keys = {
normal = {
esc = [
"collapse_selection"
"keep_primary_selection"
];
space = {
space = "file_picker";
};
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
C-j = [
"move_line_down"
"move_line_down"
"move_line_down"
"move_line_down"
"move_line_down"
];
C-k = [
"move_line_up"
"move_line_up"
"move_line_up"
"move_line_up"
"move_line_up"
];
};
indent-guides = {
render = true;
character = "|";
};
statusline = {
left = [
"mode"
"spinner"
];
center = [ "file-name" ];
right = [
"workspace-diagnostics"
"diagnostics"
"selections"
"position"
"total-line-numbers"
"spacer"
"file-encoding"
"file-line-ending"
"file-type"
];
separator = "";
};
};
languages = {
language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
language-servers = [
"nixd"
"nil"
];
}
{
# provided by the dev environment in the rust shell
name = "rust";
auto-format = true;
formatter.command = "cargo fmt";
language-servers = [ "rust-analyzer" ];
}
];
keys = {
normal = {
esc = [
"collapse_selection"
"keep_primary_selection"
];
space = {
space = "file_picker";
};
language-server = {
nil = {
command = "${pkgs.nil}/bin/nil";
};
nixd = {
command = "${pkgs.nixd}/bin/nixd";
};
marksman = {
command = "${pkgs.marksman}/bin/marksman";
};
vscode-json-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-json-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
config.json.validate.enable = true;
};
vscode-css-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
};
C-j = [
"move_line_down"
"move_line_down"
"move_line_down"
"move_line_down"
"move_line_down"
];
C-k = [
"move_line_up"
"move_line_up"
"move_line_up"
"move_line_up"
"move_line_up"
];
};
};
};
languages = {
language = [
{
name = "nix";
auto-format = true;
formatter.command = "${pkgs.nixfmt-rfc-style}/bin/nixfmt";
language-servers = [
"nixd"
"nil"
];
}
{
# provided by the dev environment in the rust shell
name = "rust";
auto-format = true;
formatter.command = "cargo fmt";
language-servers = [ "rust-analyzer" ];
}
];
language-server = {
nixd = {
command = "${pkgs.nixd}/bin/nixd";
};
marksman = {
command = "${pkgs.marksman}/bin/marksman";
};
vscode-json-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-json-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
config.json.validate.enable = true;
};
vscode-css-language-server = {
command = "${pkgs.vscode-langservers-extracted}/bin/vscode-css-language-server";
args = [ "--stdio" ];
config.provideFormatter = true;
};
};
};

View file

@ -0,0 +1,45 @@
{
config,
lib,
namespace,
...
}:
let
inherit (lib) mkIf mkEnableOption;
cfg = config.${namespace}.desktop.addons.hypridle;
username = config.${namespace}.user.name;
in
{
options.${namespace}.desktop.addons.hypridle = {
enable = mkEnableOption "Enable HyprIdle";
};
config = mkIf cfg.enable {
snowfallorg.users.${username}.home.config = {
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 900;
on-timeout = "loginctl lock-session";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
};
};
}

View file

@ -0,0 +1,614 @@
{
config,
lib,
namespace,
pkgs,
...
}:
let
inherit (lib)
mkIf
mkEnableOption
mkMerge
mkOption
literalExpression
;
cfg = config.${namespace}.desktop.addons.hyprpanel;
username = config.${namespace}.user.name;
settingsFormat = pkgs.formats.json { };
iconColor = "#242438";
light-cyan = "#73daca";
lightBlue = "#414868";
medium-blue = "#9aa5ce";
cyan-blue = "#7dcfff";
navy-blue = "#24283b";
dark-blue = "#1a1b26";
dark-blue-gray = "565f89";
dark-blue-yankees = "#272a3d";
blue-magenta = "#181825";
lightPurple = "#bb9af7";
lightRed = "#f7768e";
red = "#c0caf5";
lightGreen = "#9ece6a";
yellow = "#e0af68";
settings = {
tear = true;
scalingPriority = "hyprland";
font.name = "CodeNewRoman Nerd Font Mono";
bar = {
customModules = {
updates.pollingInterval = 1440000;
ram = {
labelType = "used/total";
icon = " ";
};
cpu = {
label = true;
leftClick = "kitty --hold btop";
icon = " ";
};
};
layouts = {
"0" = {
left = [
"workspaces"
];
middle = [
"windowtitle"
];
right = [
"clock"
];
};
"1" = {
left = [
"dashboard"
"workspaces"
];
middle = [
"windowtitle"
];
right = [
"volume"
"bluetooth"
"battery"
"systray"
"cpu"
"ram"
"clock"
"notifications"
];
};
};
workspaces = {
showAllActive = true;
show_icons = false;
numbered_active_indicator = "underline";
show_numbered = true;
showWsIcons = false;
showApplicationIcons = false;
hideUnoccupied = true;
};
launcher = {
icon = "󱄅";
rightClick = "hyprpanel -t settings-dialog";
};
scrollSpeed = 0;
windowtitle = {
class_name = false;
custom_title = false;
icon = false;
label = true;
title_map = [
];
truncation = true;
};
network = {
label = false;
truncation = false;
};
clock.format = "%a %b %d %H:%M:%S";
notifications.show_total = true;
};
menus = {
clock.time.military = true;
dashboard = {
powermenu.avatar.image = "/home/cholli/Pictures/profile.png";
shortcuts.enabled = false;
directories.left = {
directory1.command = "kitty $HOME/Downloads";
directory3.command = "kitty $HOME/projects";
};
stats = {
enable_gpu = true;
enabled = false;
};
controls.enabled = false;
};
bluetooth = {
showBattery = true;
batteryState = "always";
};
transition = "crossfade";
};
theme = {
bar = {
floating = true;
outer_spacing = "0.2em";
buttons = {
enableBorders = true;
workspaces = {
enableBorder = false;
fontSize = "1.2em";
smartHighlight = false;
active = "#f7768e";
occupied = "#f7768e";
available = "#7dcfff";
hover = "#f7768e";
background = "#272a3d";
numbered_active_highlighted_text_color = "#181825";
numbered_active_underline_color = "#c678dd";
border = "#f7768e";
};
modules = {
power = {
icon = "#181825";
icon_background = "#f7768e";
background = "#272a3d";
border = "#f7768e";
};
ram = {
enableBorder = false;
spacing = "0.45em";
icon = "#181825";
icon_background = "#e0af68";
text = "#e0af68";
background = "#272a3d";
border = "#e0af68";
};
cpu = {
enableBorder = false;
background = "#272a3d";
icon = "#181825";
icon_background = "#f7768e";
text = "#f7768e";
border = "#f7768e";
};
submap = {
background = "#272a3d";
text = "#73daca";
border = "#73daca";
icon = "#181825";
icon_background = "#73daca";
};
};
style = "split";
icon = "#242438";
icon_background = "#bb9af7";
text = "#bb9af7";
hover = "#414868";
background = "#272a3d";
dashboard = {
enableBorder = false;
icon = "#272a3d";
background = "#e0af68";
border = "#e0af68";
};
volume = {
icon = "#272a3d";
text = "#f7768e";
background = "#272a3d";
icon_background = "#f7768e";
border = "#f7768e";
};
notifications = {
total = "#bb9af7";
icon = "#272a3d";
background = "#272a3d";
icon_background = "#bb9af7";
border = "#bb9af7";
};
clock = {
icon = "#272a3d";
text = "#f7768e";
background = "#272a3d";
icon_background = "#f7768e";
border = "#f7768e";
};
systray = {
background = "#272a3d";
border = "#414868";
customIcon = "#c0caf5";
};
bluetooth = {
icon = "#272a3d";
text = "#7dcfff";
background = "#272a3d";
icon_background = "#7dcfff";
border = "#7dcfff";
};
windowtitle = {
icon = "#272a3d";
text = "#f7768e";
background = "#272a3d";
icon_background = "#f7768e";
border = "#f7768e";
enableBorder = false;
};
radius = "0.3em";
borderSize = "0.0em";
padding_x = "0.7rem";
padding_y = "0.2rem";
};
menus = {
monochrome = false;
opacity = 95;
menu = {
dashboard = {
powermenu = {
shutdown = "#f7768e";
confirmation = {
deny = "#f7768e";
confirm = "#9ece6a";
button_text = "#1a1b26";
body = "#c0caf5";
label = "#bb9af7";
border = "#414868";
background = "#1a1b26";
card = "#24283b";
};
sleep = "#7dcfff";
logout = "#9ece6a";
restart = "#e0af68";
};
monitors = {
ram = {
label = "#e0af68";
bar = "#e0af68";
icon = "#e0af68";
};
cpu = {
label = "#f7768e";
bar = "#f7768e";
icon = "#f7768e";
};
bar_background = "#414868";
};
directories = {
right = {
bottom.color = "#bb9af7";
middle.color = "#bb9af7";
top.color = "#73daca";
};
left = {
bottom.color = "#f7768e";
middle.color = "#e0af68";
top.color = "#f7768e";
};
};
controls = {
input = {
text = "#1a1b26";
background = "#f7768e";
};
volume = {
text = "#1a1b26";
background = "#f7768e";
};
notifications = {
text = "#1a1b26";
background = "#e0af68";
};
bluetooth = {
text = "#1a1b26";
background = "#7dcfff";
};
disabled = "#414868";
};
profile.name = "#f7768e";
border.color = "#414868";
background.color = "#1a1b26";
card.color = "#24283b";
};
notifications = {
switch = {
puck = "#565f89";
disabled = "#565f89";
enabled = "#bb9af7";
};
clear = "#f7768e";
switch_divider = "#414868";
border = "#414868";
card = "#24283b";
background = "#1a1b26";
no_notifications_label = "#414868";
label = "#bb9af7";
scrollbar.color = "#bb9af7";
pager = {
button = "#bb9af7";
label = "#565f89";
background = "#1a1b26";
};
};
clock = {
text = "#c0caf5";
border.color = "#414868";
background.color = "#1a1b26";
card.color = "#24283b";
calendar = {
contextdays = "#414868";
days = "#c0caf5";
currentday = "#f7768e";
paginator = "#f7768e";
weekdays = "#f7768e";
yearmonth = "#73daca";
};
time = {
timeperiod = "#73daca";
time = "#f7768e";
};
};
systray = {
dropdownmenu.divider = "#24283b";
dropdownmenu.text = "#c0caf5";
dropdownmenu.background = "#1a1b26";
};
bluetooth = {
iconbutton = {
active = "#7dcfff";
passive = "#c0caf5";
};
icons = {
active = "#7dcfff";
passive = "#565f89";
};
listitems = {
active = "#7dcfff";
passive = "#c0caf5";
};
switch = {
puck = "#565f89";
disabled = "#565f89";
enabled = "#7dcfff";
};
switch_divider = "#414868";
status = "#565f89";
text = "#c0caf5";
label.color = "#7dcfff";
border.color = "#414868";
background.color = "#1a1b26";
card.color = "#24283b";
};
volume = {
text = "#c0caf5";
card.color = "#24283b";
label.color = "#f7768e";
input_slider = {
puck = "#414868";
backgroundhover = "#414868";
background = "#565f89";
primary = "#f7768e";
};
audio_slider = {
puck = "#414868";
backgroundhover = "#414868";
background = "#565f89";
primary = "#f7768e";
};
icons = {
active = "#f7768e";
passive = "#565f89";
};
iconbutton = {
active = "#f7768e";
passive = "#c0caf5";
};
listitems = {
active = "#f7768e";
passive = "#c0caf5";
};
border.color = "#414868";
background.color = "#1a1b26";
};
media = {
card.color = "#24283b";
slider = {
puck = "#565f89";
backgroundhover = "#414868";
background = "#565f89";
primary = "#f7768e";
};
buttons = {
text = "#1a1b26";
background = "#bb9af7";
enabled = "#73daca";
inactive = "#414868";
};
border.color = "#414868";
background.color = "#1a1b26";
album = "#f7768e";
artist = "#73daca";
song = "#bb9af7";
};
power = {
border.color = "#414868";
buttons = {
sleep = {
icon_background = "#7dcfff";
text = "#7dcfff";
background = "#24283b";
icon = "#1a1b26";
};
restart = {
text = "#e0af68";
icon_background = "#e0af68";
icon = "#1a1b26";
background = "#24283b";
};
shutdown = {
icon = "#1a1b26";
background = "#24283b";
icon_background = "#f7768e";
text = "#f7768e";
};
logout = {
icon = "#1a1b26";
background = "#24283b";
text = "#9ece6a";
icon_background = "#9ece6a";
};
};
background.color = "#1a1b26";
scaling = 90;
};
};
background = "#1a1b26";
text = "#c0caf5";
border.color = "#414868";
popover = {
text = "#bb9af7";
background = "#1a1b26";
border = "#1a1b26";
};
tooltip = {
text = "#c0caf5";
background = "#1a1b26";
};
dropdownmenu = {
divider = "#24283b";
text = "#c0caf5";
background = "#1a1b26";
};
slider = {
puck = "#565f89";
backgroundhover = "#414868";
background = "#565f89";
primary = "#bb9af7";
};
progressbar = {
background = "#414868";
foreground = "#bb9af7";
};
iconbuttons = {
active = "#bb9af7";
passive = "#c0caf5";
};
buttons = {
text = "#1a1b26";
disabled = "#565f89";
active = "#f7768e";
default = "#bb9af7";
};
switch = {
puck = "#565f89";
disabled = "#565f89";
enabled = "#bb9af7";
};
icons = {
active = "#bb9af7";
passive = "#414868";
};
listitems = {
active = "#bb9af7";
passive = "#c0caf5";
};
label = "#bb9af7";
feinttext = "#414868";
dimtext = "#414868";
cards = "#24283b";
check_radio_button.background = "#3b4261";
check_radio_button.active = "#bb9af7";
};
transparent = true;
background = "#1a1b26";
margin_sides = "0.0em";
location = "top";
};
osd = {
monitor = 1;
muted_zero = true;
label = "#bb9af7";
icon = "#1a1b26";
bar_overflow_color = "#f7768e";
bar_empty_color = "#414868";
bar_color = "#bb9af7";
icon_container = "#bb9af7";
bar_container = "#1a1b26";
};
notification = {
close_button.label = "#1a1b26";
close_button.background = "#f7768e";
labelicon = "#bb9af7";
text = "#c0caf5";
time = "#9aa5ce";
border = "#565f89";
label = "#bb9af7";
actions.text = "#24283b";
actions.background = "#bb9af7";
background = "#1a1b26";
};
font.size = "1.3rem";
};
notifications = {
monitor = 1;
active_monitor = false;
};
wallpaper = {
pywal = false;
image = "/home/cholli/Pictures/firewatch.jpg";
enable = false;
};
};
in
{
options.${namespace}.desktop.addons.hyprpanel = {
enable = mkEnableOption "Enable HyprIdle";
extraSettings = mkOption {
default = { };
inherit (settingsFormat) type;
description = ''
Additional Options to pass to hyprpanel
'';
example = literalExpression ''
{
}
'';
};
};
config = mkIf cfg.enable {
snowfallorg.users.${username}.home.config = {
wayland.windowManager.hyprland.settings.exec-once = [
"${pkgs.hyprpanel}/bin/hyprpanel"
];
};
${namespace}.home.file = {
".cache/ags/hyprpanel/options_test.json" = {
# source = pkgs.formats.json.generate "options.json" settings;
text = builtins.toJSON settings;
};
};
};
}

View file

@ -1,20 +1,16 @@
{
config,
inputs,
lib,
namespace,
pkgs,
system,
...
}:
let
inherit (lib) mkIf mkEnableOption;
# hyprpaper-package = inputs.hyprpaper.packages.${system}.hyprpaper;
cfg = config.${namespace}.desktop.addons.hyprpaper;
username = config.${namespace}.user.name;
picture-path = "/home/${username}/Pictures/firewatch.jpg";
in
{
options.${namespace}.desktop.addons.hyprpaper = {
@ -28,13 +24,15 @@ in
"Pictures/firewatch.jpg".source = ./firewatch.jpg;
};
wayland.windowManager.hyprland.settings.exec-once = [
''hyprctl hyprpaper wallpaper "DP-2,${picture-path}"''
];
services.hyprpaper = {
enable = true;
settings = {
preload = [
"/home/${username}/Pictures/firewatch.jpg"
];
wallpaper = "monitor DP-2, /home/${username}/Pictures/firewatch.jpg";
preload = [ picture-path ];
wallpaper = "DP-2,${picture-path}";
};
};
};

View file

@ -6,10 +6,17 @@
...
}:
let
inherit (lib) mkIf mkEnableOption;
user = config.${namespace}.user.name;
cfg = config.${namespace}.desktop.hyprland;
in
{
config = {
options.${namespace}.desktop = {
enable = mkEnableOption "Whether to enable desktop theming";
};
config = mkIf cfg.enable {
${namespace}.home.extraOptions = {
dconf.settings = {
"org/gnome/desktop/interface" = {

View file

@ -30,7 +30,7 @@ let
hyprctl dispatch workspace $running
else
# always open on w/space 4
hyprctl dispatch workspace 4
hyprctl dispatch workspace 9
1password&
fi
'';
@ -47,19 +47,30 @@ in
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
polkit-kde-agent
# Auth Agent
hyprpolkitagent
# Notification daemon
libnotify
# Wayland Utilities
wl-clipboard
wl-screenrec
wlr-randr
grimblast
xfce.thunar
dunst
# Screenshot Utility
grimblast
# File Manager
xfce.thunar
# clean sddm theme
elegant-sddm
# json cli parser for bash script to focus 1password
jq
focus-1password
hyprpanel
];
programs = {
@ -79,14 +90,18 @@ in
};
${namespace} = {
desktop.addons = {
waybar = enabled;
rofi = {
enable = true;
package = pkgs.rofi-wayland-unwrapped;
desktop = {
enable = true;
addons = {
rofi = {
enable = true;
package = pkgs.rofi-wayland-unwrapped;
};
hypridle = enabled;
hyprlock = enabled;
hyprpanel = enabled;
hyprpaper = enabled;
};
hyprlock = enabled;
hyprpaper = enabled;
};
nix.extra-substituters.${cachix-url} = {
@ -109,20 +124,17 @@ in
];
exec-once = [
"hyprpaper"
"waybar"
"dunst"
"systemctl --user start plasma-polkit-agent"
"systemctl --user start hyprpolkitagent"
"[workspace 3 silent] steam"
"[workspace 2 silent] discord"
"[workspace 4 silent] 1password"
"[workspace 2 silent] steam --disable-gpu-compositing" # nvidia pls let me have nice things
"[workspace 8 silent] discord --disable-gpu-compositing"
"[workspace 9 silent] 1password"
"[workspace 1 silent] zen"
];
windowrulev2 = [
#stean is a bit wierd, since it opens in multiple phases, so just move the last window to the workspace
"workspace 3 silent, class:^(steam)$, title:^(Steam)"
"workspace 2 silent, class:^(steam)$, title:^(Steam)"
# make xwaylandvideobridge window invisible
"opacity 0.0 override, class:^(xwaylandvideobridge)$"

View file

@ -0,0 +1,75 @@
{
config,
lib,
namespace,
pkgs,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.security.acme;
in
{
options.${namespace}.security.acme = with lib.types; {
enable = mkEnableOption "Enable sops (Default true)";
email = mkOpt str config.${namespace}.user.email "The email to use.";
sopsFile = mkOption {
type = lib.types.path;
default = lib.snowfall.fs.get-file "secrets/secrets.yaml";
description = "SecretFile";
};
domainname = mkOpt str "christophhollizeck.dev" "domainname to use";
staging = mkOpt bool false "Use staging server for testing or not";
};
config = mkIf cfg.enable {
sops = {
secrets = {
netcup_customer_number = {
inherit (cfg) sopsFile;
};
netcup_api_key = {
inherit (cfg) sopsFile;
};
netcup_api_password = {
inherit (cfg) sopsFile;
};
};
templates = {
"netcup.env" = {
content = ''
NETCUP_CUSTOMER_NUMBER=${config.sops.placeholder.netcup_customer_number}
NETCUP_API_KEY=${config.sops.placeholder.netcup_api_key}
NETCUP_API_PASSWORD=${config.sops.placeholder.netcup_api_password}
NETCUP_PROPAGATION_TIMEOUT=1200
'';
};
};
};
security.acme = {
acceptTerms = true;
defaults = {
inherit (cfg) email;
group = mkIf config.services.nginx.enable "nginx";
reloadServices = optional config.services.nginx.enable "nginx.service";
dnsProvider = "netcup";
environmentFile = config.sops.templates."netcup.env".path;
};
certs."${cfg.domainname}" = {
server = mkIf cfg.staging "https://acme-staging-v02.api.letsencrypt.org/directory";
dnsResolver = "1.1.1.1:53";
extraDomainNames = [ "*.${cfg.domainname}" ];
};
};
};
}

View file

@ -8,30 +8,38 @@
with lib.${namespace};
let
cfg = config.${namespace}.services.factorio-server;
inherit (lib) mkIf mkEnableOption;
inherit (lib) mkIf mkOption mkEnableOption;
in
{
options.${namespace}.services.factorio-server = {
enable = mkEnableOption "Enable Factorio Headless Server";
sopsFile = mkOption {
type = lib.types.path;
default = lib.snowfall.fs.get-file "secrets/secrets.yaml";
description = "SecretFile";
};
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ factorio-headless ];
environment.systemPackages = [ pkgs.factorio-headless ];
sops = {
secrets = {
factorio_token = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
factorio_username = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
factorio_game_password = {
restartUnits = [ "factorio.service" ];
inherit (cfg) sopsFile;
};
};
templates."extraSettingsFile.json".content = ''
{
"name": "Alles Nix!",
"name": "SpaceAgeHolli",
"description": "Trying to run a factorio-headless-server on my nix system",
"tags": ["vanilla"],
"max_players": 10,
@ -40,7 +48,6 @@ in
"autosave_slots": 5,
"ignore_player_limit_for_returning_players": true,
"username" : "${config.sops.placeholder.factorio_username}",
"admins": ["${config.sops.placeholder.factorio_username}"],
"token": "${config.sops.placeholder.factorio_token}"
}
'';
@ -53,8 +60,13 @@ in
public = true;
lan = true;
nonBlockingSaving = true;
autosave-interval = 5;
loadLatestSave = true;
autosave-interval = 15;
saveName = "SpaceAge";
admins = [
"daholli"
"galbrain"
"geigeabc"
];
extraSettingsFile = config.sops.templates."extraSettingsFile.json".path;
};
};

View file

@ -13,7 +13,7 @@ let
in
{
options.${namespace}.submodules.basics = with types; {
enable = mkBoolOpt false "Whether or not to enable basic configuration.";
enable = mkEnableOption "Whether or not to enable basic configuration.";
};
config = mkIf cfg.enable {
@ -29,7 +29,7 @@ in
#optional
pciutils
usbutils
htop
btop
];
${namespace} = {

View file

@ -17,7 +17,7 @@ in
config = mkIf cfg.enable {
boot = {
kernelPackages = pkgs.linuxPackages_6_10;
kernelPackages = pkgs.linuxPackages_latest;
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;

View file

@ -24,7 +24,7 @@ in
environment.systemPackages = with pkgs; [
git
gitAndTools.gh
gitbutler
# gitbutler
];
${namespace}.home.extraOptions = {

View file

@ -48,6 +48,11 @@ in
icon = mkOpt (nullOr package) defaultIcon "The profile picture to use for the user.";
extraGroups = mkOpt (listOf str) [ ] "Groups for the user to be assigned.";
extraOptions = mkOpt attrs { } (mdDoc "Extra options passed to `users.users.<name>`.");
trustedPublicKeys = mkOption {
default = [ ];
type = nullOr (listOf str);
description = "Trusted public keys for this user for the machine";
};
};
config = {
@ -92,6 +97,8 @@ in
# system to select).
uid = 1000;
openssh.authorizedKeys.keys = cfg.trustedPublicKeys;
extraGroups = [ "steamcmd" ] ++ cfg.extraGroups;
} // cfg.extraOptions;
};