reformat --> alejandra
This commit is contained in:
parent
f4e15b7e90
commit
e6e258feeb
89 changed files with 875 additions and 901 deletions
|
@ -6,8 +6,7 @@
|
||||||
osConfig,
|
osConfig,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib.hm.gvariant;
|
with lib.hm.gvariant; {
|
||||||
{
|
|
||||||
config = lib.mkIf osConfig.mySystem.de.gnome.enable {
|
config = lib.mkIf osConfig.mySystem.de.gnome.enable {
|
||||||
# add user packages
|
# add user packages
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
networking.hostId = "ad4380db";
|
networking.hostId = "ad4380db";
|
||||||
networking.hostName = "durincore";
|
networking.hostName = "durincore";
|
||||||
|
@ -48,6 +47,5 @@
|
||||||
"wlp4s0"
|
"wlp4s0"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
"core.https_address" = "10.1.1.15:8445"; # Need quotes around key
|
"core.https_address" = "10.1.1.15:8445"; # Need quotes around key
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
global = {
|
global = {
|
||||||
"workgroup" = "WORKGROUP";
|
"workgroup" = "WORKGROUP";
|
||||||
"server string" = "gandalf";
|
"server string" = "gandalf";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
outputs = {
|
outputs = {
|
||||||
# ZFS automated snapshots
|
# ZFS automated snapshots
|
||||||
templates = {
|
templates = {
|
||||||
|
|
|
@ -6,9 +6,7 @@
|
||||||
lib,
|
lib,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{ lib, config, ... }:
|
{
|
||||||
with lib;
|
lib,
|
||||||
let
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
app = "lego-auto";
|
app = "lego-auto";
|
||||||
image = "ghcr.io/bjw-s/lego-auto:v0.3.0";
|
image = "ghcr.io/bjw-s/lego-auto:v0.3.0";
|
||||||
user = "999"; # string
|
user = "999"; # string
|
||||||
|
@ -8,8 +11,7 @@ let
|
||||||
port = 9898; # int
|
port = 9898; # int
|
||||||
cfg = config.mySystem.services.${app};
|
cfg = config.mySystem.services.${app};
|
||||||
appFolder = "/eru/containers/volumes/${app}";
|
appFolder = "/eru/containers/volumes/${app}";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.${app} = {
|
options.mySystem.services.${app} = {
|
||||||
enable = mkEnableOption "${app}";
|
enable = mkEnableOption "${app}";
|
||||||
dnsimpleTokenPath = mkOption {
|
dnsimpleTokenPath = mkOption {
|
||||||
|
@ -56,9 +58,11 @@ in
|
||||||
DNSIMPLE_OAUTH_TOKEN_FILE = "/config/dnsimple-token";
|
DNSIMPLE_OAUTH_TOKEN_FILE = "/config/dnsimple-token";
|
||||||
};
|
};
|
||||||
|
|
||||||
volumes = [
|
volumes =
|
||||||
|
[
|
||||||
"${appFolder}/cert:/cert"
|
"${appFolder}/cert:/cert"
|
||||||
] ++ optionals (cfg.provider == "dnsimple") [ "${cfg.dnsimpleTokenPath}:/config/dnsimple-token" ];
|
]
|
||||||
|
++ optionals (cfg.provider == "dnsimple") ["${cfg.dnsimpleTokenPath}:/config/dnsimple-token"];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
{ lib, config, ... }:
|
{
|
||||||
with lib;
|
lib,
|
||||||
let
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
app = "unifi";
|
app = "unifi";
|
||||||
# renovate: depName=goofball222/unifi datasource=github-releases
|
# renovate: depName=goofball222/unifi datasource=github-releases
|
||||||
version = "8.4.62";
|
version = "8.4.62";
|
||||||
|
|
|
@ -3,24 +3,27 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.de.gnome;
|
cfg = config.mySystem.de.gnome;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options = {
|
options = {
|
||||||
mySystem.de.gnome = {
|
mySystem.de.gnome = {
|
||||||
enable = lib.mkEnableOption "GNOME" // {
|
enable =
|
||||||
|
lib.mkEnableOption "GNOME"
|
||||||
|
// {
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
systrayicons = lib.mkEnableOption "Enable systray icons" // {
|
systrayicons =
|
||||||
|
lib.mkEnableOption "Enable systray icons"
|
||||||
|
// {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
gsconnect = lib.mkEnableOption "Enable gsconnect (KDEConnect for GNOME)" // {
|
gsconnect =
|
||||||
|
lib.mkEnableOption "Enable gsconnect (KDEConnect for GNOME)"
|
||||||
|
// {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
@ -55,8 +58,7 @@ in
|
||||||
# systyray icons
|
# systyray icons
|
||||||
# extra pkgs and extensions
|
# extra pkgs and extensions
|
||||||
environment = {
|
environment = {
|
||||||
systemPackages =
|
systemPackages = with pkgs;
|
||||||
with pkgs;
|
|
||||||
[
|
[
|
||||||
wl-clipboard # ls ~/Downloads | wl-copy or wl-paste > clipboard.txt
|
wl-clipboard # ls ~/Downloads | wl-copy or wl-paste > clipboard.txt
|
||||||
playerctl # gsconnect play/pause command
|
playerctl # gsconnect play/pause command
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.de.kde;
|
cfg = config.mySystem.de.kde;
|
||||||
flameshotOverride = pkgs.unstable.flameshot.override {enableWlrSupport = true;};
|
flameshotOverride = pkgs.unstable.flameshot.override {enableWlrSupport = true;};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options = {
|
options = {
|
||||||
mySystem.de.kde = {
|
mySystem.de.kde = {
|
||||||
enable = lib.mkEnableOption "KDE" // {
|
enable =
|
||||||
|
lib.mkEnableOption "KDE"
|
||||||
|
// {
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.cockpit;
|
cfg = config.mySystem.services.cockpit;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.cockpit.enable = mkEnableOption "Cockpit";
|
options.mySystem.services.cockpit.enable = mkEnableOption "Cockpit";
|
||||||
|
|
||||||
config.services.cockpit = mkIf cfg.enable {
|
config.services.cockpit = mkIf cfg.enable {
|
||||||
|
|
|
@ -3,11 +3,9 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.vault;
|
cfg = config.mySystem.services.vault;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.vault = {
|
options.mySystem.services.vault = {
|
||||||
enable = lib.mkEnableOption "vault";
|
enable = lib.mkEnableOption "vault";
|
||||||
address = lib.mkOption {
|
address = lib.mkOption {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# Support windows partition
|
# Support windows partition
|
||||||
mySystem = {
|
mySystem = {
|
||||||
security.wheelNeedsSudoPassword = false;
|
security.wheelNeedsSudoPassword = false;
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
boot = {
|
boot = {
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
loader = {
|
loader = {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
# Enable module for NVIDIA graphics
|
# Enable module for NVIDIA graphics
|
||||||
mySystem = {
|
mySystem = {
|
||||||
hardware.nvidia.enable = true;
|
hardware.nvidia.enable = true;
|
||||||
|
@ -35,5 +38,4 @@
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./global.nix
|
./global.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./firefox
|
./firefox
|
||||||
];
|
];
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.myHome.programs.thunderbird;
|
cfg = config.myHome.programs.thunderbird;
|
||||||
|
|
||||||
policies = {
|
policies = {
|
||||||
|
@ -25,8 +24,7 @@ let
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.myHome.programs.thunderbird.enable = lib.mkEnableOption "Thunderbird";
|
options.myHome.programs.thunderbird.enable = lib.mkEnableOption "Thunderbird";
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./ssh
|
./ssh
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ config, lib, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.myHome.security.ssh;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.myHome.security.ssh;
|
||||||
|
in {
|
||||||
options.myHome.security.ssh = {
|
options.myHome.security.ssh = {
|
||||||
enable = mkEnableOption "ssh";
|
enable = mkEnableOption "ssh";
|
||||||
matchBlocks = mkOption {
|
matchBlocks = mkOption {
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.myHome.shell.atuind;
|
cfg = config.myHome.shell.atuind;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.myHome.shell.atuind = {
|
options.myHome.shell.atuind = {
|
||||||
enable = mkEnableOption "atuind";
|
enable = mkEnableOption "atuind";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./atuind
|
./atuind
|
||||||
./fish
|
./fish
|
||||||
|
|
|
@ -3,11 +3,9 @@
|
||||||
config,
|
config,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.myHome.shell.starship;
|
cfg = config.myHome.shell.starship;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.myHome.shell.starship = {
|
options.myHome.shell.starship = {
|
||||||
enable = mkEnableOption "starship";
|
enable = mkEnableOption "starship";
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.myHome.shell.wezterm;
|
cfg = config.myHome.shell.wezterm;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.myHome.shell.wezterm = {
|
options.myHome.shell.wezterm = {
|
||||||
enable = mkEnableOption "wezterm";
|
enable = mkEnableOption "wezterm";
|
||||||
configPath = mkOption {
|
configPath = mkOption {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
config = {
|
config = {
|
||||||
"core.https_address" = "10.1.1.61:8443"; # Need quotes around key
|
"core.https_address" = "10.1.1.61:8443"; # Need quotes around key
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
outputs = {
|
outputs = {
|
||||||
# ZFS automated snapshots
|
# ZFS automated snapshots
|
||||||
templates = {
|
templates = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ config, ... }:
|
{config, ...}: ''
|
||||||
''
|
|
||||||
include "${config.sops.secrets."bind/rndc-keys/externaldns".path}";
|
include "${config.sops.secrets."bind/rndc-keys/externaldns".path}";
|
||||||
|
|
||||||
acl trusted {
|
acl trusted {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: ''
|
||||||
''
|
|
||||||
global
|
global
|
||||||
log /dev/log local0
|
log /dev/log local0
|
||||||
log /dev/log local1 notice
|
log /dev/log local1 notice
|
||||||
|
|
|
@ -7,9 +7,7 @@
|
||||||
modulesPath,
|
modulesPath,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: {
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,11 +1,8 @@
|
||||||
{ pkgs, ... }:
|
{pkgs, ...}: let
|
||||||
|
|
||||||
let
|
|
||||||
cleanupScript = pkgs.writeShellScriptBin "cleanup-backups.sh" (
|
cleanupScript = pkgs.writeShellScriptBin "cleanup-backups.sh" (
|
||||||
builtins.readFile ./prune-backups.sh
|
builtins.readFile ./prune-backups.sh
|
||||||
);
|
);
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
systemd.timers.cleanup-backups = {
|
systemd.timers.cleanup-backups = {
|
||||||
wantedBy = ["timers.target"];
|
wantedBy = ["timers.target"];
|
||||||
timerConfig = {
|
timerConfig = {
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
{ lib, config, ... }:
|
{
|
||||||
with lib;
|
lib,
|
||||||
let
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
app = "scrutiny";
|
app = "scrutiny";
|
||||||
# renovate: depName=AnalogJ/scrutiny datasource=github-releases
|
# renovate: depName=AnalogJ/scrutiny datasource=github-releases
|
||||||
version = "v0.8.1";
|
version = "v0.8.1";
|
||||||
cfg = config.mySystem.services.${app};
|
cfg = config.mySystem.services.${app};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.${app} = {
|
options.mySystem.services.${app} = {
|
||||||
enable = mkEnableOption "${app}";
|
enable = mkEnableOption "${app}";
|
||||||
|
|
||||||
|
|
|
@ -3,15 +3,15 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.de.kde;
|
cfg = config.mySystem.de.kde;
|
||||||
flameshotOverride = pkgs.unstable.flameshot.override {enableWlrSupport = true;};
|
flameshotOverride = pkgs.unstable.flameshot.override {enableWlrSupport = true;};
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options = {
|
options = {
|
||||||
mySystem.de.kde = {
|
mySystem.de.kde = {
|
||||||
enable = lib.mkEnableOption "KDE" // {
|
enable =
|
||||||
|
lib.mkEnableOption "KDE"
|
||||||
|
// {
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
# /home/jahanson/projects/mochi/nixos/modules/nixos/editor/vim.nix
|
# /home/jahanson/projects/mochi/nixos/modules/nixos/editor/vim.nix
|
||||||
|
{
|
||||||
{ config, lib, ... }:
|
config,
|
||||||
with lib;
|
lib,
|
||||||
let
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
cfg = config.mySystem.editor.vim;
|
cfg = config.mySystem.editor.vim;
|
||||||
users = ["jahanson"];
|
users = ["jahanson"];
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.editor.vim.enable = mkEnableOption "vim";
|
options.mySystem.editor.vim.enable = mkEnableOption "vim";
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
# Enable vim and set as default editor
|
# Enable vim and set as default editor
|
||||||
|
@ -27,7 +28,8 @@ in
|
||||||
map (u: {
|
map (u: {
|
||||||
name = u;
|
name = u;
|
||||||
value = {};
|
value = {};
|
||||||
}) users
|
})
|
||||||
|
users
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,11 +3,9 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.games.steam;
|
cfg = config.mySystem.games.steam;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.games.steam = {
|
options.mySystem.games.steam = {
|
||||||
enable = lib.mkEnableOption "Steam";
|
enable = lib.mkEnableOption "Steam";
|
||||||
};
|
};
|
||||||
|
@ -24,6 +22,5 @@ in
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
protonup-qt
|
protonup-qt
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,15 +4,12 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.hardware.nvidia;
|
cfg = config.mySystem.hardware.nvidia;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.hardware.nvidia.enable = mkEnableOption "NVIDIA config";
|
options.mySystem.hardware.nvidia.enable = mkEnableOption "NVIDIA config";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
# ref: https://nixos.wiki/wiki/Nvidia
|
# ref: https://nixos.wiki/wiki/Nvidia
|
||||||
# Enable OpenGL
|
# Enable OpenGL
|
||||||
|
@ -30,7 +27,6 @@ in
|
||||||
# This is for the benefit of VSCODE running natively in wayland
|
# This is for the benefit of VSCODE running natively in wayland
|
||||||
|
|
||||||
nvidia = {
|
nvidia = {
|
||||||
|
|
||||||
# Modesetting is required.
|
# Modesetting is required.
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.shell.fish;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.shell.fish;
|
||||||
|
in {
|
||||||
options.mySystem.shell.fish = {
|
options.mySystem.shell.fish = {
|
||||||
enable = mkEnableOption "Fish";
|
enable = mkEnableOption "Fish";
|
||||||
enablePlugins = mkOption {
|
enablePlugins = mkOption {
|
||||||
|
@ -22,5 +24,4 @@ in
|
||||||
functions.enable = true;
|
functions.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
{ config, lib, ... }:
|
{
|
||||||
with lib;
|
config,
|
||||||
let
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
cfg = config.mySystem.security._1password;
|
cfg = config.mySystem.security._1password;
|
||||||
user = "jahanson";
|
user = "jahanson";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.security._1password = {
|
options.mySystem.security._1password = {
|
||||||
enable = mkEnableOption "_1password";
|
enable = mkEnableOption "_1password";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.security.acme;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.security.acme;
|
||||||
|
in {
|
||||||
options.mySystem.security.acme.enable = mkEnableOption "acme";
|
options.mySystem.security.acme.enable = mkEnableOption "acme";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./1password
|
./1password
|
||||||
./acme
|
./acme
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.bind;
|
cfg = config.mySystem.services.bind;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.bind = {
|
options.mySystem.services.bind = {
|
||||||
enable = mkEnableOption "bind";
|
enable = mkEnableOption "bind";
|
||||||
package = mkPackageOption pkgs "bind" {};
|
package = mkPackageOption pkgs "bind" {};
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.dnsmasq;
|
cfg = config.mySystem.services.dnsmasq;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.dnsmasq = {
|
options.mySystem.services.dnsmasq = {
|
||||||
enable = mkEnableOption "dnsmasq";
|
enable = mkEnableOption "dnsmasq";
|
||||||
package = mkPackageOption pkgs "dnsmasq" {};
|
package = mkPackageOption pkgs "dnsmasq" {};
|
||||||
|
|
|
@ -5,11 +5,9 @@
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.libvirt-qemu;
|
cfg = config.mySystem.services.libvirt-qemu;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
imports = [inputs.nixvirt-git.nixosModules.default];
|
imports = [inputs.nixvirt-git.nixosModules.default];
|
||||||
options.mySystem.services.libvirt-qemu = {
|
options.mySystem.services.libvirt-qemu = {
|
||||||
enable = mkEnableOption "libvirt-qemu";
|
enable = mkEnableOption "libvirt-qemu";
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.matchbox;
|
cfg = config.mySystem.services.matchbox;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.matchbox = {
|
options.mySystem.services.matchbox = {
|
||||||
enable = mkEnableOption "matchbox";
|
enable = mkEnableOption "matchbox";
|
||||||
package = mkPackageOption pkgs "matchbox-server" {};
|
package = mkPackageOption pkgs "matchbox-server" {};
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.nginx;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.services.nginx;
|
||||||
|
in {
|
||||||
options.mySystem.services.nginx.enable = mkEnableOption "nginx";
|
options.mySystem.services.nginx.enable = mkEnableOption "nginx";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,9 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.nix-index-daily;
|
cfg = config.mySystem.services.nix-index-daily;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.nix-index-daily = {
|
options.mySystem.services.nix-index-daily = {
|
||||||
enable = lib.mkEnableOption "Automatic daily nix-index database updates";
|
enable = lib.mkEnableOption "Automatic daily nix-index database updates";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.onepassword-connect;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.services.onepassword-connect;
|
||||||
|
in {
|
||||||
options.mySystem.services.onepassword-connect = {
|
options.mySystem.services.onepassword-connect = {
|
||||||
enable = mkEnableOption "onepassword-connect";
|
enable = mkEnableOption "onepassword-connect";
|
||||||
apiVersion = lib.mkOption {
|
apiVersion = lib.mkOption {
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.podman;
|
cfg = config.mySystem.services.podman;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.podman.enable = mkEnableOption "Podman";
|
options.mySystem.services.podman.enable = mkEnableOption "Podman";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.qbittorrent;
|
cfg = config.mySystem.services.qbittorrent;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.qbittorrent = {
|
options.mySystem.services.qbittorrent = {
|
||||||
enable = mkEnableOption "qBittorrent";
|
enable = mkEnableOption "qBittorrent";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.rebootRequiredCheck;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.services.rebootRequiredCheck;
|
||||||
|
in {
|
||||||
options.mySystem.services.rebootRequiredCheck.enable = mkEnableOption "Reboot required check";
|
options.mySystem.services.rebootRequiredCheck.enable = mkEnableOption "Reboot required check";
|
||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.sanoid;
|
cfg = config.mySystem.services.sanoid;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.sanoid = {
|
options.mySystem.services.sanoid = {
|
||||||
enable = mkEnableOption "sanoid";
|
enable = mkEnableOption "sanoid";
|
||||||
package = mkPackageOption pkgs "sanoid" {};
|
package = mkPackageOption pkgs "sanoid" {};
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ sops, ... }:
|
{sops, ...}: {
|
||||||
{
|
|
||||||
gui = {
|
gui = {
|
||||||
user = sops.secrets.username;
|
user = sops.secrets.username;
|
||||||
password = sops.secrets.password;
|
password = sops.secrets.password;
|
||||||
|
|
|
@ -2,11 +2,9 @@
|
||||||
config,
|
config,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.syncthing;
|
cfg = config.mySystem.services.syncthing;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.syncthing = {
|
options.mySystem.services.syncthing = {
|
||||||
enable = lib.mkEnableOption "Syncthing";
|
enable = lib.mkEnableOption "Syncthing";
|
||||||
publicCertPath = lib.mkOption {
|
publicCertPath = lib.mkOption {
|
||||||
|
|
|
@ -4,13 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
|
with lib; let
|
||||||
with lib;
|
|
||||||
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.unpackerr;
|
cfg = config.mySystem.services.unpackerr;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.services.unpackerr = {
|
options.mySystem.services.unpackerr = {
|
||||||
enable = mkEnableOption "Unpackerr";
|
enable = mkEnableOption "Unpackerr";
|
||||||
|
|
||||||
|
@ -66,9 +62,11 @@ in
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
EnvironmentFile = lib.optional (
|
EnvironmentFile =
|
||||||
|
lib.optional (
|
||||||
cfg.extraEnvVarsFile != null && cfg.extraEnvVarsFile != ""
|
cfg.extraEnvVarsFile != null && cfg.extraEnvVarsFile != ""
|
||||||
) cfg.extraEnvVarsFile;
|
)
|
||||||
|
cfg.extraEnvVarsFile;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.system.borgbackup;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.mySystem.system.borgbackup;
|
||||||
|
in {
|
||||||
options.mySystem.system.borgbackup = {
|
options.mySystem.system.borgbackup = {
|
||||||
enable = lib.mkEnableOption "borgbackup";
|
enable = lib.mkEnableOption "borgbackup";
|
||||||
paths = lib.mkOption {
|
paths = lib.mkOption {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
imports = [
|
imports = [
|
||||||
./borgbackup
|
./borgbackup
|
||||||
./pikabackup
|
./pikabackup
|
||||||
|
|
|
@ -3,12 +3,10 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.system.borg.pika-backup;
|
cfg = config.mySystem.system.borg.pika-backup;
|
||||||
user = "jahanson";
|
user = "jahanson";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.system.borg.pika-backup = {
|
options.mySystem.system.borg.pika-backup = {
|
||||||
enable = lib.mkEnableOption "pika-backup";
|
enable = lib.mkEnableOption "pika-backup";
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,12 +3,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.system.incus;
|
cfg = config.mySystem.system.incus;
|
||||||
user = "jahanson";
|
user = "jahanson";
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
# sops.secrets.secret-domain-0 = {
|
# sops.secrets.secret-domain-0 = {
|
||||||
# sopsFile = ./secret.sops.yaml;
|
# sopsFile = ./secret.sops.yaml;
|
||||||
# };
|
# };
|
||||||
|
@ -27,7 +25,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
|
|
||||||
virtualisation.incus = {
|
virtualisation.incus = {
|
||||||
inherit (cfg) preseed;
|
inherit (cfg) preseed;
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -3,8 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
motd = pkgs.writeShellScriptBin "motd" ''
|
motd = pkgs.writeShellScriptBin "motd" ''
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
source /etc/os-release
|
source /etc/os-release
|
||||||
|
@ -41,8 +40,7 @@ let
|
||||||
printf "\n"
|
printf "\n"
|
||||||
${lib.strings.concatStrings (
|
${lib.strings.concatStrings (
|
||||||
lib.lists.forEach cfg.networkInterfaces (
|
lib.lists.forEach cfg.networkInterfaces (
|
||||||
x:
|
x: "printf \"$BOLD * %-20s$ENDCOLOR %s\\n\" \"IPv4 ${x}\" \"$(ip -4 addr show ${x} | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}')\"\n"
|
||||||
"printf \"$BOLD * %-20s$ENDCOLOR %s\\n\" \"IPv4 ${x}\" \"$(ip -4 addr show ${x} | grep -oP '(?<=inet\\s)\\d+(\\.\\d+){3}')\"\n"
|
|
||||||
)
|
)
|
||||||
)}
|
)}
|
||||||
printf "$BOLD * %-20s$ENDCOLOR %s\n" "Release" "$PRETTY_NAME"
|
printf "$BOLD * %-20s$ENDCOLOR %s\n" "Release" "$PRETTY_NAME"
|
||||||
|
@ -82,8 +80,7 @@ let
|
||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
cfg = config.mySystem.system.motd;
|
cfg = config.mySystem.system.motd;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.system.motd = {
|
options.mySystem.system.motd = {
|
||||||
enable = lib.mkEnableOption "MOTD";
|
enable = lib.mkEnableOption "MOTD";
|
||||||
networkInterfaces = lib.mkOption {
|
networkInterfaces = lib.mkOption {
|
||||||
|
@ -92,7 +89,6 @@ in
|
||||||
# default = lib.mapAttrsToList (_: val: val.interface)
|
# default = lib.mapAttrsToList (_: val: val.interface)
|
||||||
default = [];
|
default = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.system.nfs;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.mySystem.system.nfs;
|
||||||
|
in {
|
||||||
options.mySystem.system.nfs = {
|
options.mySystem.system.nfs = {
|
||||||
enable = lib.mkEnableOption "nfs";
|
enable = lib.mkEnableOption "nfs";
|
||||||
exports = lib.mkOption {
|
exports = lib.mkOption {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.nix;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.nix;
|
||||||
|
in {
|
||||||
options.mySystem.nix = {
|
options.mySystem.nix = {
|
||||||
autoOptimiseStore = mkOption {
|
autoOptimiseStore = mkOption {
|
||||||
type = lib.types.bool;
|
type = lib.types.bool;
|
||||||
|
@ -11,7 +13,9 @@ in
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
gc = {
|
gc = {
|
||||||
enable = mkEnableOption "automatic garbage collection" // {
|
enable =
|
||||||
|
mkEnableOption "automatic garbage collection"
|
||||||
|
// {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
persistent = mkOption {
|
persistent = mkOption {
|
||||||
|
|
|
@ -1,11 +1,15 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.services.openssh;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.services.openssh;
|
||||||
|
in {
|
||||||
options.mySystem.services.openssh = {
|
options.mySystem.services.openssh = {
|
||||||
enable = mkEnableOption "openssh" // {
|
enable =
|
||||||
|
mkEnableOption "openssh"
|
||||||
|
// {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
passwordAuthentication = mkOption {
|
passwordAuthentication = mkOption {
|
||||||
|
|
|
@ -4,19 +4,16 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.system.systemd.pushover-alerts;
|
cfg = config.mySystem.system.systemd.pushover-alerts;
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.system.systemd.pushover-alerts.enable =
|
options.mySystem.system.systemd.pushover-alerts.enable =
|
||||||
mkEnableOption "Pushover alerts for systemd failures"
|
mkEnableOption "Pushover alerts for systemd failures"
|
||||||
// {
|
// {
|
||||||
default = true;
|
default = true;
|
||||||
};
|
};
|
||||||
options.systemd.services = mkOption {
|
options.systemd.services = mkOption {
|
||||||
type =
|
type = with types;
|
||||||
with types;
|
|
||||||
attrsOf (submodule {
|
attrsOf (submodule {
|
||||||
config.onFailure = ["notify-pushover@%n.service"];
|
config.onFailure = ["notify-pushover@%n.service"];
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.security;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.security;
|
||||||
|
in {
|
||||||
options.mySystem.security = {
|
options.mySystem.security = {
|
||||||
sshAgentAuth.enable = lib.mkEnableOption "openssh";
|
sshAgentAuth.enable = lib.mkEnableOption "openssh";
|
||||||
wheelNeedsSudoPassword = lib.mkOption {
|
wheelNeedsSudoPassword = lib.mkOption {
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
with lib;
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.system;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; let
|
||||||
|
cfg = config.mySystem.system;
|
||||||
|
in {
|
||||||
options.mySystem.system = {
|
options.mySystem.system = {
|
||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
type = with types; listOf package;
|
type = with types; listOf package;
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{ lib, config, ... }:
|
|
||||||
let
|
|
||||||
cfg = config.mySystem.time;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
cfg = config.mySystem.time;
|
||||||
|
in {
|
||||||
options.mySystem.time = {
|
options.mySystem.time = {
|
||||||
timeZone = lib.mkOption {
|
timeZone = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
|
@ -5,8 +5,7 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib; let
|
||||||
let
|
|
||||||
cfg = config.mySystem.framework_wifi_swap;
|
cfg = config.mySystem.framework_wifi_swap;
|
||||||
wifiSwap = pkgs.writeShellScriptBin "wifi_swap" ''
|
wifiSwap = pkgs.writeShellScriptBin "wifi_swap" ''
|
||||||
#! /usr/bin/env bash
|
#! /usr/bin/env bash
|
||||||
|
@ -34,10 +33,11 @@ let
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
'';
|
'';
|
||||||
in
|
in {
|
||||||
{
|
|
||||||
options.mySystem.framework_wifi_swap = {
|
options.mySystem.framework_wifi_swap = {
|
||||||
enable = mkEnableOption "framework_wifi_swap" // {
|
enable =
|
||||||
|
mkEnableOption "framework_wifi_swap"
|
||||||
|
// {
|
||||||
default = false;
|
default = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -3,12 +3,10 @@
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
let
|
|
||||||
cfg = config.mySystem.system.zfs;
|
cfg = config.mySystem.system.zfs;
|
||||||
in
|
in
|
||||||
with lib;
|
with lib; {
|
||||||
{
|
|
||||||
options.mySystem.system.zfs = {
|
options.mySystem.system.zfs = {
|
||||||
enable = lib.mkEnableOption "zfs";
|
enable = lib.mkEnableOption "zfs";
|
||||||
mountPoolsAtBoot = lib.mkOption {
|
mountPoolsAtBoot = lib.mkOption {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: let
|
||||||
let
|
|
||||||
finalVersion = "tauri-v2.0.4";
|
finalVersion = "tauri-v2.0.4";
|
||||||
in
|
in
|
||||||
final: prev: {
|
final: prev: {
|
||||||
|
|
|
@ -8,9 +8,7 @@
|
||||||
stdenvNoCC,
|
stdenvNoCC,
|
||||||
unzip,
|
unzip,
|
||||||
nixosTests,
|
nixosTests,
|
||||||
}:
|
}: let
|
||||||
|
|
||||||
let
|
|
||||||
inherit (stdenvNoCC.hostPlatform) system;
|
inherit (stdenvNoCC.hostPlatform) system;
|
||||||
|
|
||||||
channels = {
|
channels = {
|
||||||
|
@ -40,8 +38,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
hash = (channels.${channel}.hash).${system};
|
hash = (channels.${channel}.hash).${system};
|
||||||
|
|
||||||
url =
|
url = let
|
||||||
let
|
|
||||||
systemName =
|
systemName =
|
||||||
{
|
{
|
||||||
x86_64-linux = "linux_amd64";
|
x86_64-linux = "linux_amd64";
|
||||||
|
@ -59,8 +56,7 @@ stdenvNoCC.mkDerivation (finalAttrs: {
|
||||||
aarch64-darwin = "zip";
|
aarch64-darwin = "zip";
|
||||||
}
|
}
|
||||||
.${system};
|
.${system};
|
||||||
in
|
in "https://github.com/coder/coder/releases/download/v${finalAttrs.version}/coder_${finalAttrs.version}_${systemName}.${ext}";
|
||||||
"https://github.com/coder/coder/releases/download/v${finalAttrs.version}/coder_${finalAttrs.version}_${systemName}.${ext}";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: let
|
||||||
let
|
|
||||||
dbrev = "5613";
|
dbrev = "5613";
|
||||||
drivedbBranch = "RELEASE_7_4";
|
drivedbBranch = "RELEASE_7_4";
|
||||||
in
|
in
|
||||||
|
|
|
@ -5,7 +5,6 @@
|
||||||
installShellFiles,
|
installShellFiles,
|
||||||
git,
|
git,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "talosctl";
|
pname = "talosctl";
|
||||||
version = "1.9.0";
|
version = "1.9.0";
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
udev,
|
udev,
|
||||||
wrapGAppsHook3,
|
wrapGAppsHook3,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "termius";
|
pname = "termius";
|
||||||
version = "9.5.0";
|
version = "9.5.0";
|
||||||
|
|
|
@ -62,11 +62,15 @@
|
||||||
libpulseaudio,
|
libpulseaudio,
|
||||||
kerberosSupport ? true,
|
kerberosSupport ? true,
|
||||||
libkrb5,
|
libkrb5,
|
||||||
}:
|
}: let
|
||||||
|
branch =
|
||||||
let
|
if isSnapshot
|
||||||
branch = if isSnapshot then "snapshot" else "stable";
|
then "snapshot"
|
||||||
vivaldiName = if isSnapshot then "vivaldi-snapshot" else "vivaldi";
|
else "stable";
|
||||||
|
vivaldiName =
|
||||||
|
if isSnapshot
|
||||||
|
then "vivaldi-snapshot"
|
||||||
|
else "vivaldi";
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "vivaldi";
|
pname = "vivaldi";
|
||||||
|
@ -77,7 +81,8 @@ stdenv.mkDerivation rec {
|
||||||
aarch64-linux = "arm64";
|
aarch64-linux = "arm64";
|
||||||
x86_64-linux = "amd64";
|
x86_64-linux = "amd64";
|
||||||
}
|
}
|
||||||
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
.${stdenv.hostPlatform.system}
|
||||||
|
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}-1_${suffix}.deb";
|
url = "https://downloads.vivaldi.com/${branch}/vivaldi-${branch}_${version}-1_${suffix}.deb";
|
||||||
|
@ -86,7 +91,8 @@ stdenv.mkDerivation rec {
|
||||||
aarch64-linux = "sha256-kYTnWad/jrJt9z+AhjXzHYxVSIwIIO3RKD7szuPEg2s=";
|
aarch64-linux = "sha256-kYTnWad/jrJt9z+AhjXzHYxVSIwIIO3RKD7szuPEg2s=";
|
||||||
x86_64-linux = "sha256-+h7SHci8gZ+epKFHD0PiXyME2xT+loD2KXpJGFCfIFg=";
|
x86_64-linux = "sha256-+h7SHci8gZ+epKFHD0PiXyME2xT+loD2KXpJGFCfIFg=";
|
||||||
}
|
}
|
||||||
.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
.${stdenv.hostPlatform.system}
|
||||||
|
or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
};
|
};
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
|
|
|
@ -4,7 +4,6 @@
|
||||||
lib,
|
lib,
|
||||||
stdenv,
|
stdenv,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
# This derivation roughly follows the update-ffmpeg script that ships with the official Vivaldi
|
# This derivation roughly follows the update-ffmpeg script that ships with the official Vivaldi
|
||||||
# downloads at https://vivaldi.com/download/
|
# downloads at https://vivaldi.com/download/
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
|
@ -25,9 +25,7 @@
|
||||||
util-linux,
|
util-linux,
|
||||||
socat,
|
socat,
|
||||||
hicolor-icon-theme,
|
hicolor-icon-theme,
|
||||||
}:
|
}: let
|
||||||
|
|
||||||
let
|
|
||||||
inherit (stdenvNoCC.hostPlatform) system;
|
inherit (stdenvNoCC.hostPlatform) system;
|
||||||
throwSystem = throw "Unsupported system: ${system}";
|
throwSystem = throw "Unsupported system: ${system}";
|
||||||
|
|
||||||
|
@ -36,17 +34,18 @@ let
|
||||||
x86_64-linux = "x86_64";
|
x86_64-linux = "x86_64";
|
||||||
aarch64-linux = "arm64";
|
aarch64-linux = "arm64";
|
||||||
}
|
}
|
||||||
.${system} or throwSystem;
|
.${system}
|
||||||
|
or throwSystem;
|
||||||
|
|
||||||
hash =
|
hash =
|
||||||
{
|
{
|
||||||
x86_64-linux = "sha256-O4gl0WulhDyqL9lDwqR1oxNAzVjHn+3q0UB8KP0/sBk=";
|
x86_64-linux = "sha256-O4gl0WulhDyqL9lDwqR1oxNAzVjHn+3q0UB8KP0/sBk=";
|
||||||
aarch64-linux = "";
|
aarch64-linux = "";
|
||||||
}
|
}
|
||||||
.${system} or throwSystem;
|
.${system}
|
||||||
|
or throwSystem;
|
||||||
|
|
||||||
displayname = "XPipe PTB";
|
displayname = "XPipe PTB";
|
||||||
|
|
||||||
in
|
in
|
||||||
stdenvNoCC.mkDerivation rec {
|
stdenvNoCC.mkDerivation rec {
|
||||||
pname = "xpipe-ptb";
|
pname = "xpipe-ptb";
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: let
|
||||||
let
|
|
||||||
finalVersion = "0.149.3";
|
finalVersion = "0.149.3";
|
||||||
in
|
in
|
||||||
final: prev: {
|
final: prev: {
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{disks ? ["/dev/sda"], ...}: {
|
||||||
disks ? [ "/dev/sda" ],
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{ lib, nixpkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
nixpkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
## Below is to align shell/system to flake's nixpkgs
|
## Below is to align shell/system to flake's nixpkgs
|
||||||
## ref: https://nixos-and-flakes.thiscute.world/best-practices/nix-path-and-flake-registry
|
## ref: https://nixos-and-flakes.thiscute.world/best-practices/nix-path-and-flake-registry
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ ... }:
|
{...}: {
|
||||||
{
|
|
||||||
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
sops.age.sshKeyPaths = ["/etc/ssh/ssh_host_ed25519_key"];
|
||||||
# Secret for machine-specific pushover
|
# Secret for machine-specific pushover
|
||||||
sops.secrets = {
|
sops.secrets = {
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
system = {
|
system = {
|
||||||
# Enable printing changes on nix build etc with nvd
|
# Enable printing changes on nix build etc with nvd
|
||||||
activationScripts.report-changes = ''
|
activationScripts.report-changes = ''
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
with lib;
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
with lib; {
|
||||||
boot = {
|
boot = {
|
||||||
|
|
||||||
initrd.availableKernelModules = [
|
initrd.availableKernelModules = [
|
||||||
"nvme"
|
"nvme"
|
||||||
"xhci_pci"
|
"xhci_pci"
|
||||||
|
@ -21,10 +23,8 @@ with lib;
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
grub.memtest86.enable = true;
|
grub.memtest86.enable = true;
|
||||||
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
{
|
|
||||||
imports = [];
|
imports = [];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ lib, ... }:
|
{lib, ...}: {
|
||||||
{
|
|
||||||
mySystem = {
|
mySystem = {
|
||||||
security.wheelNeedsSudoPassword = false;
|
security.wheelNeedsSudoPassword = false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
boot = {
|
boot = {
|
||||||
# for managing/mounting nfs
|
# for managing/mounting nfs
|
||||||
supportedFilesystems = ["nfs"];
|
supportedFilesystems = ["nfs"];
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
{ lib, pkgs, ... }:
|
|
||||||
# Role for headless servers
|
|
||||||
with lib;
|
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
# Role for headless servers
|
||||||
|
with lib; {
|
||||||
config = {
|
config = {
|
||||||
mySystem = {
|
mySystem = {
|
||||||
services.rebootRequiredCheck.enable = true;
|
services.rebootRequiredCheck.enable = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue