Compare commits

...

11 Commits

13 changed files with 132 additions and 68 deletions

View File

@@ -6,17 +6,18 @@
let let
inherit (inputs.nixpkgs) lib; inherit (inputs.nixpkgs) lib;
utils = import ../utils { inherit lib; }; utils = import ../utils { inherit lib; };
hostDirNames = utils.dirNames ../hosts; hostnames = utils.dirNames ../hosts;
mkNode = hostname: meta: { mkNode = hostname: meta: {
imports = [ ../hosts/${hostname} ]; imports = [ ../hosts/${hostname} ];
host.name = hostname;
deployment = { deployment = {
inherit (meta.deployment) targetHost targetUser tags; inherit (meta.deployment) targetHost targetUser tags;
buildOnTarget = builtins.any (t: t != "local" && t != "arm") meta.deployment.tags; buildOnTarget = builtins.any (t: t != "local" && t != "arm") meta.deployment.tags;
}; };
}; };
nodes = lib.genAttrs hostDirNames (hostname: mkNode hostname (utils.hostMeta ../hosts/${hostname})); nodes = lib.genAttrs hostnames (hostname: mkNode hostname (utils.hostMeta ../hosts/${hostname}));
in in
inputs.colmena.lib.makeHive ( inputs.colmena.lib.makeHive (
{ {

View File

@@ -1,4 +1,4 @@
#!/usr/bin/python #!/usr/bin/env python3
import argparse import argparse
import json import json

View File

@@ -1,3 +1,5 @@
if not vim.env.KITTY_WINDOW_ID then return end
require("image").setup({ require("image").setup({
backend = "kitty", backend = "kitty",
kitty_method = "normal", kitty_method = "normal",

View File

@@ -1,11 +1,11 @@
{ {
"config": { "config": {
"options": {},
"preferences": { "preferences": {
"ascii": "", "ascii": "",
"asciiBibLaTeX": false, "asciiBibLaTeX": false,
"asciiBibTeX": true, "asciiBibTeX": true,
"autoAbbrev": false, "autoAbbrev": false,
"autoAbbrevStyle": "",
"autoExport": "immediate", "autoExport": "immediate",
"autoExportDelay": 5, "autoExportDelay": 5,
"autoExportIdleWait": 10, "autoExportIdleWait": 10,
@@ -13,18 +13,22 @@
"autoExportPathReplaceDirSep": "-", "autoExportPathReplaceDirSep": "-",
"autoExportPathReplaceSpace": " ", "autoExportPathReplaceSpace": " ",
"automaticTags": true, "automaticTags": true,
"autoPinDelay": 0,
"auxImport": false, "auxImport": false,
"baseAttachmentPath": "/home/h/doc/books", "baseAttachmentPath": "/home/h/doc/books",
"biblatexExtendedDateFormat": true, "biblatexExtendedDateFormat": true,
"biblatexExtendedNameFormat": true, "biblatexExtendedNameFormat": true,
"biblatexExtractEprint": true, "biblatexExtractEprint": true,
"biblatexUsePrefix": true,
"bibtexEditionOrdinal": false,
"bibtexParticleNoOp": false, "bibtexParticleNoOp": false,
"bibtexURL": "off", "bibtexURL": "off",
"cache": true, "cache": true,
"cacheFlushInterval": 5, "cacheDelete": false,
"charmap": "", "charmap": "",
"chinese": false,
"chineseSplitName": true,
"citeCommand": "cite", "citeCommand": "cite",
"citekeyCaseInsensitive": true,
"citekeyFold": true, "citekeyFold": true,
"citekeyFormat": "zotero.clean", "citekeyFormat": "zotero.clean",
"citekeyFormatEditing": "zotero.clean", "citekeyFormatEditing": "zotero.clean",
@@ -34,32 +38,35 @@
"DOIandURL": "both", "DOIandURL": "both",
"exportBibTeXStrings": "off", "exportBibTeXStrings": "off",
"exportBraceProtection": true, "exportBraceProtection": true,
"exportSort": "citekey",
"exportTitleCase": true, "exportTitleCase": true,
"extraMergeCitekeys": false, "extraMergeCitekeys": false,
"extraMergeCSL": false, "extraMergeCSL": false,
"extraMergeTeX": false, "extraMergeTeX": false,
"fillKeyAfter": 1,
"git": "config", "git": "config",
"import": true, "import": true,
"importBibTeXStrings": true, "importBibTeXStrings": true,
"importCaseProtection": "as-needed", "importCaseProtection": "as-needed",
"importCitationKey": true, "importCitationKey": true,
"importDetectURLs": true,
"importExtra": true, "importExtra": true,
"importJabRefAbbreviations": true, "importJabRefAbbreviations": true,
"importJabRefStrings": true, "importJabRefStrings": true,
"importNoteToExtra": "", "importNoteToExtra": "",
"importPlaceEvent": "inproceedings,conference,presentation,talk",
"importSentenceCase": "on+guess", "importSentenceCase": "on+guess",
"importSentenceCaseQuoted": true,
"importUnknownTexCommand": "ignore", "importUnknownTexCommand": "ignore",
"itemObserverDelay": 5, "itemObserverDelay": 5,
"jabrefFormat": 0, "jabrefFormat": 0,
"jieba": false, "japanese": false,
"keyConflictPolicy": "keep",
"keyScope": "global", "keyScope": "global",
"kuroshiro": false,
"language": "langid", "language": "langid",
"logEvents": false, "logEvents": false,
"mapMath": "", "mapMath": "",
"mapText": "", "mapText": "",
"mapUnicode": "conservative", "packages": "",
"parseParticles": true, "parseParticles": true,
"patchDates": "dateadded=dateAdded, date-added=dateAdded, datemodified=dateModified, date-modified=dateModified", "patchDates": "dateadded=dateAdded, date-added=dateAdded, datemodified=dateModified, date-modified=dateModified",
"platform": "lin", "platform": "lin",
@@ -75,7 +82,8 @@
"rawImports": false, "rawImports": false,
"rawLaTag": "#LaTeX", "rawLaTag": "#LaTeX",
"relativeFilePaths": false, "relativeFilePaths": false,
"retainCache": false, "remigrate": false,
"resetKeyOnChange": false,
"scrubDatabase": false, "scrubDatabase": false,
"separatorList": "and", "separatorList": "and",
"separatorNames": "and", "separatorNames": "and",
@@ -90,5 +98,4 @@
"warnTitleCased": false "warnTitleCased": false
} }
} }
} }

View File

@@ -52,6 +52,7 @@
ssh.enable = true; ssh.enable = true;
taskwarrior.enable = true; taskwarrior.enable = true;
terminal.enable = true; terminal.enable = true;
reference-manager.enable = true;
programs = { programs = {
home-manager.enable = true; home-manager.enable = true;

View File

@@ -27,7 +27,7 @@
file.".config/niri/config.kdl".source = ./config.kdl; file.".config/niri/config.kdl".source = ./config.kdl;
packages = with pkgs; [ packages = with pkgs; [
brightnessctl brightnessctl
xwayland-satellite wlsunset
]; ];
}; };

View File

@@ -0,0 +1,37 @@
{
config,
inputs,
lib,
pkgs,
...
}:
let
cfg = config.reference-manager;
hasBrowser =
name:
lib.elem name [
config.browser.primary
config.browser.secondary
];
zoteroConnector =
inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}.zotero-connector;
zoteroAddonId = "zotero@chnm.gmu.edu";
connectorExtension = {
profiles.default.extensions.packages = [ zoteroConnector ];
policies.ExtensionSettings.${zoteroAddonId}.default_area = "navbar";
};
in
{
options.reference-manager.enable = lib.mkEnableOption "reference manager (Zotero)";
config = lib.mkIf cfg.enable {
home.packages = [ pkgs.zotero ];
programs.firefox = lib.mkIf (hasBrowser "firefox") connectorExtension;
programs.librewolf = lib.mkIf (hasBrowser "librewolf") connectorExtension;
};
}

View File

@@ -6,6 +6,13 @@
{ {
config = lib.mkIf config.shell.enable { config = lib.mkIf config.shell.enable {
programs.starship.enable = true; programs.starship = {
enable = true;
settings = {
git_status = {
ahead = "$\{count\}";
};
};
};
}; };
} }

View File

@@ -11,57 +11,60 @@
config = lib.mkIf config.shikane.enable { config = lib.mkIf config.shikane.enable {
home.packages = with pkgs; [ (config.nixgl.wrap wdisplays) ]; home.packages = with pkgs; [ (config.nixgl.wrap wdisplays) ];
services.shikane.enable = true; services.shikane.enable = true;
home.file.".config/shikane/config.toml".text = '' home.file.".config/shikane/config.toml" = {
[[profile]] force = true;
name = "work" text = ''
[[profile]]
name = "work"
[[profile.output]] [[profile.output]]
enable = true enable = true
search = ["m=Unknown", "s=", "v=Unknown"] search = ["m=Unknown", "s=", "v=Unknown"]
mode = "2880x1800@120Hz" mode = "2880x1800@120Hz"
position = "288,3240" position = "288,3240"
scale = 1.5 scale = 1.5
transform = "normal" transform = "normal"
adaptive_sync = false adaptive_sync = false
[[profile.output]] [[profile.output]]
enable = true enable = true
search = ["m=Q27P1B", "s=GNXM2HA196769", "v=PNP(AOC)"] search = ["m=Q27P1B", "s=GNXM2HA196769", "v=PNP(AOC)"]
mode = "2560x1440@59.951Hz" mode = "2560x1440@59.951Hz"
position = "116,1800" position = "116,1800"
scale = 1.0 scale = 1.0
transform = "normal" transform = "normal"
adaptive_sync = false adaptive_sync = false
[[profile.output]] [[profile.output]]
enable = true enable = true
search = ["m=PHL 243S7", "s=UHB1923012753", "v=Philips Consumer Electronics Company"] search = ["m=PHL 243S7", "s=UHB1923012753", "v=Philips Consumer Electronics Company"]
mode = "1920x1080@60Hz" mode = "1920x1080@60Hz"
position = "2676,1800" position = "2676,1800"
scale = 1.0 scale = 1.0
transform = "270" transform = "270"
adaptive_sync = false adaptive_sync = false
[[profile]] [[profile]]
name = "home" name = "home"
[[profile.output]] [[profile.output]]
enable = true enable = true
search = ["m=Unknown", "s=Unknown", "v=Unknown"] search = ["m=Unknown", "s=Unknown", "v=Unknown"]
mode = "2880x1800@60.001Hz" mode = "2880x1800@60.001Hz"
position = "185,1440" position = "185,1440"
scale = 1.75 scale = 1.75
transform = "normal" transform = "normal"
adaptive_sync = false adaptive_sync = false
[[profile.output]] [[profile.output]]
enable = true enable = true
search = ["m=PHL 276E8V", "s=0x0000046D", "v=Philips Consumer Electronics Company"] search = ["m=PHL 276E8V", "s=0x0000046D", "v=Philips Consumer Electronics Company"]
mode = "3840x2160@59.996Hz" mode = "3840x2160@59.996Hz"
position = "1500,0" position = "1500,0"
scale = 1.5 scale = 1.5
transform = "normal" transform = "normal"
adaptive_sync = false adaptive_sync = false
''; '';
};
}; };
} }

View File

@@ -90,11 +90,19 @@
networking = { networking = {
hostId = "80eef97e"; hostId = "80eef97e";
useDHCP = false;
useNetworkd = true;
};
systemd.network.networks."40-wlan0" = {
matchConfig.Name = "wlan0";
networkConfig.DHCP = "yes";
}; };
boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
services = { services = {
resolved.enable = true;
fwupd.enable = true; fwupd.enable = true;
locate = { locate = {
enable = true; enable = true;

View File

@@ -15,8 +15,9 @@
../../modules ../../modules
]; ];
ssh.enable = true;
docker.enable = true; docker.enable = true;
ssh.enable = true;
tailscale.enable = true;
networking.hostName = config.host.name; networking.hostName = config.host.name;

View File

@@ -2,7 +2,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
deployment = { deployment = {
tags = [ "cloud" ]; tags = [ "cloud" ];
targetHost = "server.hektormisplon.xyz"; targetHost = "hecuba";
targetUser = "username"; targetUser = "username";
}; };
role = "server"; role = "server";

View File

@@ -1,8 +1,5 @@
{ { lib, config, ... }:
lib,
config,
...
}:
{ {
options.tailscale = { options.tailscale = {
enable = lib.mkEnableOption "tailscale"; enable = lib.mkEnableOption "tailscale";