Compare commits
6 Commits
wip
...
displaylin
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a5e17590a7
|
||
|
|
ffbd3847e7
|
||
|
|
4a6cbfad67
|
||
|
|
450478cff4 | ||
|
|
82d460e08e | ||
|
|
24853ba6a2
|
@@ -28,6 +28,7 @@ in
|
||||
./roles/d2
|
||||
./roles/direnv
|
||||
./roles/disko
|
||||
./roles/displaylink
|
||||
./roles/distributed_build
|
||||
./roles/doas
|
||||
./roles/docker
|
||||
@@ -273,6 +274,7 @@ in
|
||||
}
|
||||
);
|
||||
})
|
||||
(disableTests "ada") # test failing with http url is not idempotent.
|
||||
];
|
||||
|
||||
# This option defines the first version of NixOS you have installed on this particular machine,
|
||||
|
||||
6
nix/configuration/flake.lock
generated
6
nix/configuration/flake.lock
generated
@@ -185,11 +185,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1788531059,
|
||||
"narHash": "sha256-hLD4l3QOGBQhkVp3mQ2lJ/YbEi99qUgKapb40KovZ88=",
|
||||
"lastModified": 1788752844,
|
||||
"narHash": "sha256-VaWGJ6+cIYN2erfSecbRV+4ljI185Ty2wUrXyvQbgOw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "801bef6abd86b91e51083066b83fb354a11fc640",
|
||||
"rev": "dc5d91f840324650bac8c379428c7037a416959a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
config = {
|
||||
networking =
|
||||
let
|
||||
interface = "enp0s2";
|
||||
interface = "enp0s10";
|
||||
in
|
||||
{
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
||||
@@ -92,6 +92,7 @@
|
||||
me.chromium.enable = true;
|
||||
me.d2.enable = true;
|
||||
me.direnv.enable = true;
|
||||
me.displaylink.enable = true;
|
||||
me.doas.enable = true;
|
||||
me.docker.enable = false;
|
||||
me.dont_use_substituters.enable = true;
|
||||
|
||||
40
nix/configuration/roles/displaylink/default.nix
Normal file
40
nix/configuration/roles/displaylink/default.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
options.me = {
|
||||
displaylink.enable = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
example = true;
|
||||
description = "Whether we want to install displaylink.";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.me.displaylink.enable (
|
||||
lib.mkMerge [
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
displaylink
|
||||
];
|
||||
|
||||
allowedUnfree = [ "displaylink" ];
|
||||
|
||||
boot = {
|
||||
extraModulePackages = [ config.boot.kernelPackages.evdi ];
|
||||
initrd.kernelModules = [
|
||||
"evdi"
|
||||
];
|
||||
};
|
||||
}
|
||||
(lib.mkIf config.me.graphical {
|
||||
})
|
||||
]
|
||||
);
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(setq gc-cons-threshold (* 128 1024 1024)) ;; 128MiB Increase garbage collection threshold for performance (default 800000)
|
||||
;; Increase amount of data read from processes, default 4k
|
||||
(when (version<= "27.0" emacs-version)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(use-package diminish)
|
||||
|
||||
;; Eglot recommends pulling the latest of the standard libraries it
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
;; ========== Function to reload current file =================
|
||||
|
||||
(defun reload-file ()
|
||||
@@ -11,10 +12,9 @@
|
||||
"Run a command using the current buffer as stdin and replacing its contents if the command succeeds with the stdout from the command. This is useful for code formatters."
|
||||
(let (
|
||||
(stdout-buffer (generate-new-buffer "tmp-stdout" t))
|
||||
(full-cmd (append '(call-process-region nil nil cmd nil stdout-buffer nil) args))
|
||||
)
|
||||
(unwind-protect
|
||||
(let ((exit-status (eval full-cmd)))
|
||||
(let ((exit-status (apply #'call-process-region nil nil cmd nil (list stdout-buffer nil) nil args)))
|
||||
(if (eq exit-status 0)
|
||||
(save-excursion
|
||||
(replace-buffer-contents stdout-buffer)
|
||||
@@ -31,10 +31,9 @@
|
||||
"Run a command using the current buffer as stdin and replacing its contents if the command succeeds with the stdout from the command. This is useful for code formatters. This version only replaces the buffer contents if the command output some text."
|
||||
(let (
|
||||
(stdout-buffer (generate-new-buffer "tmp-stdout" t))
|
||||
(full-cmd (append '(call-process-region nil nil cmd nil stdout-buffer nil) args))
|
||||
)
|
||||
(unwind-protect
|
||||
(let ((exit-status (eval full-cmd)))
|
||||
(let ((exit-status (apply #'call-process-region nil nil cmd nil (list stdout-buffer nil) nil args)))
|
||||
(if (eq exit-status 0)
|
||||
(if (> (buffer-size stdout-buffer) 0)
|
||||
(save-excursion
|
||||
@@ -55,10 +54,9 @@
|
||||
(let (
|
||||
(default-directory (or dir default-directory))
|
||||
(stdout-buffer (generate-new-buffer "tmp-stdout" t))
|
||||
(full-cmd (append '(call-process cmd nil (list stdout-buffer nil) nil) args))
|
||||
)
|
||||
(unwind-protect
|
||||
(let ((exit-status (condition-case nil (eval full-cmd) (file-missing nil))))
|
||||
(let ((exit-status (condition-case nil (apply #'call-process cmd nil (list stdout-buffer nil) nil args) (file-missing nil))))
|
||||
(if (eq exit-status 0)
|
||||
(progn
|
||||
(with-current-buffer stdout-buffer
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
;; Add your keys here, as such
|
||||
|
||||
;; Disable the suspend frame hotkeys
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
;; Set theme
|
||||
(load-theme 'tango-dark t)
|
||||
(set-face-attribute 'default nil :background "black")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(package-initialize)
|
||||
(use-package use-package
|
||||
:custom
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(use-package eglot
|
||||
;; This is an emacs built-in but we're pulling the latest version
|
||||
:pin gnu
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
(use-package bash-ts-mode
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'common-lsp)
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'common-lsp)
|
||||
|
||||
(use-package cmake-mode
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(defun d2-format-buffer ()
|
||||
"Run prettier."
|
||||
(interactive)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(use-package dockerfile-ts-mode
|
||||
:pin manual
|
||||
:mode (
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'common-lsp)
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'common-lsp)
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(defun lua-format-buffer ()
|
||||
"Run stylua."
|
||||
(interactive)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(use-package markdown-mode
|
||||
:ensure t
|
||||
:commands (markdown-mode gfm-mode)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(use-package nftables-mode
|
||||
:commands nftables-mode
|
||||
)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'common-lsp)
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'color)
|
||||
(let ((bg (face-attribute 'default :background)))
|
||||
(use-package org
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'common-lsp)
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'common-lsp)
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(require 'common-lsp)
|
||||
(require 'util-tree-sitter)
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(defun xml-fmt ()
|
||||
"Run xmllint --format."
|
||||
(run-command-on-buffer "xmllint" "--format" "-")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(defun yaml-format-buffer ()
|
||||
"Run prettier."
|
||||
(interactive)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(use-package flymake
|
||||
:pin manual
|
||||
:ensure nil
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
|
||||
;; (add-to-list 'major-mode-remap-alist '(c-mode . c-ts-mode))
|
||||
|
||||
(use-package treesit
|
||||
@@ -13,6 +15,8 @@
|
||||
;; :custom
|
||||
;; (treesit-font-lock-level 3)
|
||||
(setq treesit-font-lock-level 4)
|
||||
;; (setq treesit-auto-install-grammar t)
|
||||
;; (setq treesit-enabled-modes t)
|
||||
)
|
||||
|
||||
(provide 'util-tree-sitter)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(defun my/minibuffer-delete (arg)
|
||||
"When looking for files, go up an entire directory with the backspace button if theres no text after the directory."
|
||||
(interactive "p")
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
;; -*- lexical-binding: t; -*-
|
||||
(add-to-list 'load-path (concat user-emacs-directory "elisp"))
|
||||
|
||||
(require 'base)
|
||||
|
||||
6
nix/kubernetes/flake.lock
generated
6
nix/kubernetes/flake.lock
generated
@@ -164,11 +164,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1784120854,
|
||||
"narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=",
|
||||
"lastModified": 1788752844,
|
||||
"narHash": "sha256-VaWGJ6+cIYN2erfSecbRV+4ljI185Ty2wUrXyvQbgOw=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46",
|
||||
"rev": "dc5d91f840324650bac8c379428c7037a416959a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
config = {
|
||||
networking =
|
||||
let
|
||||
interface = "enp0s2";
|
||||
interface = "enp0s10";
|
||||
in
|
||||
{
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
config = {
|
||||
networking =
|
||||
let
|
||||
interface = "enp0s2";
|
||||
interface = "enp0s10";
|
||||
in
|
||||
{
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
config = {
|
||||
networking =
|
||||
let
|
||||
interface = "enp0s2";
|
||||
interface = "enp0s10";
|
||||
in
|
||||
{
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
config = {
|
||||
networking =
|
||||
let
|
||||
interface = "enp0s2";
|
||||
interface = "enp0s10";
|
||||
in
|
||||
{
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
config = {
|
||||
networking =
|
||||
let
|
||||
interface = "enp0s2";
|
||||
interface = "enp0s10";
|
||||
in
|
||||
{
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
config = {
|
||||
networking =
|
||||
let
|
||||
interface = "enp0s2";
|
||||
interface = "enp0s10";
|
||||
in
|
||||
{
|
||||
# Generate with `head -c4 /dev/urandom | od -A none -t x4`
|
||||
|
||||
@@ -134,6 +134,18 @@ let
|
||||
"nix-pull-through-cache" = {
|
||||
"CACHE_GET_TOKEN" = (builtins.readFile "${./secrets/nix-pull-through-cache/auth/CACHE_GET_TOKEN}");
|
||||
};
|
||||
"registry-credentials" =
|
||||
(generate_docker_secret {
|
||||
username = builtins.readFile "${./secrets/flux-system/registry-credentials/username}";
|
||||
password = builtins.readFile "${./secrets/flux-system/registry-credentials/password}";
|
||||
email = builtins.readFile "${./secrets/flux-system/registry-credentials/email}";
|
||||
address = builtins.readFile "${./secrets/flux-system/registry-credentials/address}";
|
||||
})
|
||||
// {
|
||||
# "__annotations" = {
|
||||
# "tekton.dev/docker-0" = "https://harbor.fizz.buzz";
|
||||
# };
|
||||
};
|
||||
};
|
||||
};
|
||||
encrypted_secrets = (
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
assertions = [
|
||||
{
|
||||
# Kubernetes should only upgrade 1 minor version at a time, so this assert is here to prevent unwittingly jumping versions.
|
||||
assertion = lib.hasPrefix "1.36." pkgs.kubernetes.version;
|
||||
assertion = lib.hasPrefix "1.37." pkgs.kubernetes.version;
|
||||
message = "Unexpected Kubernetes package version: ${pkgs.kubernetes.version}";
|
||||
}
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user