Compare commits

..

6 Commits

Author SHA1 Message Date
Alexander Heldt
896d0c7d43 test-vm: Add WHIB backend 2024-11-09 10:41:52 +01:00
Alexander Heldt
5697f190bc Update README with documentation about the test-vm 2024-11-09 10:41:52 +01:00
Alexander Heldt
2211713693 test-vm: Resize terminal to host terminal size 2024-11-09 10:41:52 +01:00
Alexander Heldt
246d0f4d59 test-vm: Add alias of shutting down the VM 2024-11-09 10:41:52 +01:00
Alexander Heldt
0a36765c29 test-vm: Auto login a user and assume its sudo 2024-11-09 10:41:52 +01:00
Alexander Heldt
88cb69c9dc test-vm: Increase disk size 2024-11-09 10:41:47 +01:00
10 changed files with 82 additions and 110 deletions

View File

@@ -33,7 +33,7 @@ let
update() { update() {
echo -e "\033[0;31mUPDATING FLAKE\033[0m" echo -e "\033[0;31mUPDATING FLAKE\033[0m"
nix flake update --flake ${flakePath} nix flake update ${flakePath}
} }
switch() { switch() {

80
flake.lock generated
View File

@@ -47,17 +47,18 @@
}, },
"emacs-overlay": { "emacs-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1732784553, "lastModified": 1730513067,
"narHash": "sha256-S3PiqgTS8ST07ihFDL2cPExoxHcd9I8ITecpgMz+s4M=", "narHash": "sha256-0MHc5yR4qmQK4O8MzraisT3gnv907fn813Qb2J134CU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "fb81e75180369a888db920df8f6097fbf2f603e9", "rev": "6afb2183cef03dcfce47c3bf22b2d44ded54ace0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -66,6 +67,24 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1726560853,
"narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": { "home-manager": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -94,11 +113,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1732793095, "lastModified": 1730490306,
"narHash": "sha256-6TrknJ8CpvSSF4gviQSeD+wyj3siRcMvdBKhOXkEMKU=", "narHash": "sha256-AvCVDswOUM9D368HxYD25RsSKp+5o0L0/JHADjLoD38=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2f7739d01080feb4549524e8f6927669b61c6ee3", "rev": "1743615b61c7285976f85b303a36cdf88a556503",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -114,11 +133,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1730743354, "lastModified": 1729224425,
"narHash": "sha256-gU4NySYyXeAzVaF5bI6BKmj2CdgiwGFnuPjXUId3Dx0=", "narHash": "sha256-w9dNUedNe2qnhHuhcRf7A1l29+/6DxdMfwN6g4U3c/w=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "contrib", "repo": "contrib",
"rev": "792f6b83dc719214e0e2a0b380c34f147b28ece2", "rev": "d72bc8b1cd30d448bd438e8328f8eeb4c0f2ddb6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -134,11 +153,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1732782112, "lastModified": 1728371783,
"narHash": "sha256-8rxzWGOVyijmE2ojWJxPEWqtUQ7i/lA5TvLoklwI4qw=", "narHash": "sha256-ufI7115ims2PPxggpWQhigAUrwlwu155wVgngZzzyZ0=",
"owner": "viperML", "owner": "viperML",
"repo": "nh", "repo": "nh",
"rev": "24293d624556d32bd502c440b352e4fef4eeab6d", "rev": "afdff9ab4fdb9c329b5d97c5b742242b97f8754d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -164,11 +183,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1732483221, "lastModified": 1730537918,
"narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=", "narHash": "sha256-GJB1/aaTnAtt9sso/EQ77TAGJ/rt6uvlP0RqZFnWue8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405", "rev": "f6e0cd5c47d150c4718199084e5764f968f1b560",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -180,11 +199,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1732521221, "lastModified": 1730200266,
"narHash": "sha256-2ThgXBUXAE1oFsVATK1ZX9IjPcS4nKFOAjhPNKuiMn0=", "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4633a7c72337ea8fd23a4f2ba3972865e3ec685d", "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -196,11 +215,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1732632634, "lastModified": 1730327045,
"narHash": "sha256-+G7n/ZD635aN0sEXQLynU7pWMd3PKDM7yBIXvYmjABQ=", "narHash": "sha256-xKel5kd1AbExymxoIfQ7pgcX6hjw9jCgbiBjiUfSVJ8=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6f6076c37180ea3a916f84928cf3a714c5207a30", "rev": "080166c15633801df010977d9d7474b4a6c549d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -260,6 +279,21 @@
"type": "github" "type": "github"
} }
}, },
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"whib-backend": { "whib-backend": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@@ -267,8 +301,8 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1733056232, "lastModified": 1731143140,
"narHash": "sha256-TlGxaIEzV+4dithjWT4xtl/yOgayHIqZqj7okKufF8E=", "narHash": "sha256-pLxBnIgcAJxvbMglXbeSI5/yxSR0RfFgNW7eQ7oNFR8=",
"path": "/home/alex/code/own/whib", "path": "/home/alex/code/own/whib",
"type": "path" "type": "path"
}, },

View File

@@ -604,8 +604,7 @@ Setup prefix for keybindings.
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq (setq
js-indent-level 2 js-indent-level 2
js2-basic-offset 2 js2-basic-offset 2)
indent-tabs-mode nil)
(add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode)) (add-to-list 'auto-mode-alist '("\\.ts\\'" . typescript-ts-mode))
#+END_SRC #+END_SRC

View File

@@ -42,13 +42,6 @@ in
workspace = 9, monitor:eDP-1 workspace = 9, monitor:eDP-1
workspace = 10, monitor:eDP-1 workspace = 10, monitor:eDP-1
workspace = w[tv1], gapsout:0, gapsin:0
workspace = f[1], gapsout:0, gapsin:0
windowrulev2 = bordersize 0, floating:0, onworkspace:w[tv1]
windowrulev2 = rounding 0, floating:0, onworkspace:w[tv1]
windowrulev2 = bordersize 0, floating:0, onworkspace:f[1]
windowrulev2 = rounding 0, floating:0, onworkspace:f[1]
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
''; '';
@@ -91,6 +84,7 @@ in
dwindle = { dwindle = {
force_split = 2; force_split = 2;
no_gaps_when_only = 1;
}; };
bind = bind =

View File

@@ -17,10 +17,7 @@ in
config = lib.mkIf enabled { config = lib.mkIf enabled {
virtualisation = { virtualisation = {
spiceUSBRedirection.enable = true; # Allow redirecting USB to the VM spiceUSBRedirection.enable = true; # Allow redirecting USB to the VM
libvirtd = { libvirtd.enable = true;
enable = true;
qemu.vhostUserPackages = [ pkgs.virtiofsd ];
};
}; };
users.users.alex = { users.users.alex = {

View File

@@ -16,26 +16,11 @@ in
GITHUB_TOKEN = "$(${pkgs.coreutils}/bin/cat ${config.age.secrets.work-github-token.path})"; GITHUB_TOKEN = "$(${pkgs.coreutils}/bin/cat ${config.age.secrets.work-github-token.path})";
}; };
home.packages = home.packages = [
let
intellij = (
pkgs.jetbrains.idea-ultimate.overrideAttrs (
final: prev: {
version = "2024.2.4";
src = pkgs.fetchurl {
url = "https://download.jetbrains.com/idea/ideaIU-${final.version}.tar.gz";
sha256 = "8411fda793a20356a4982e4f18f6691839d8a471e2081ab6d8cc78b3f8b02532";
};
}
)
);
in
[
# (pkgs.callPackage ./pants.nix { inherit (pkgs) system; }) # (pkgs.callPackage ./pants.nix { inherit (pkgs) system; })
# (pkgs.callPackage ./syb-cli.nix { }) (pkgs.callPackage ./syb-cli.nix { })
(pkgs.jetbrains.plugins.addPlugins intellij [ "ideavim" ])
(pkgs.jetbrains.plugins.addPlugins pkgs.jetbrains.idea-ultimate [ "ideavim" ])
(pkgs.google-cloud-sdk.withExtraComponents [ (pkgs.google-cloud-sdk.withExtraComponents [
pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin
]) ])

View File

@@ -36,8 +36,6 @@
# Resize terminal to host terminal size # Resize terminal to host terminal size
environment.loginShellInit = '' environment.loginShellInit = ''
${pkgs.xterm}/bin/resize ${pkgs.xterm}/bin/resize
echo alias 'sd' can be used to shutdown the VM
''; '';
environment.interactiveShellInit = '' environment.interactiveShellInit = ''

View File

@@ -1,5 +1,4 @@
{ {
pkgs,
lib, lib,
config, config,
... ...
@@ -15,8 +14,6 @@ in
}; };
config = lib.mkIf enabled { config = lib.mkIf enabled {
environment.systemPackages = [ pkgs.gnupg ];
services.whib-backend = { services.whib-backend = {
enable = true; enable = true;
domain = "whib-backend.local"; domain = "whib-backend.local";
@@ -27,18 +24,6 @@ in
postgres = { postgres = {
password = "postgrespassword"; password = "postgrespassword";
backup = {
gpgPassphraseFile = ./whib-gpgPassfile;
backblazeBucket = "whib-postgres-backups";
backblazeKeyID = "003867c33cd1a9b0000000003";
backblazeKey = "K003+GUNG0lwTOMS5EheKC9YzgxFzuU";
};
};
grafana = {
password = "granfanapassword";
}; };
}; };
@@ -53,35 +38,15 @@ in
forwardPorts = [ forwardPorts = [
{ {
# Service API
from = "host"; from = "host";
host.port = 8080; host.port = 8080;
guest.port = 8080; guest.port = 8080;
} }
{ {
# Service Metrics
from = "host";
host.port = 8181;
guest.port = 8181;
}
{
# Postgres
from = "host"; from = "host";
host.port = 5432; host.port = 5432;
guest.port = 5432; guest.port = 5432;
} }
{
# Grafana
from = "host";
host.port = 3000;
guest.port = 3000;
}
{
# Prometheus
from = "host";
host.port = 9090;
guest.port = 9090;
}
]; ];
}; };
}; };

View File

@@ -1 +0,0 @@
abc123

View File

@@ -1,7 +1,8 @@
age-encryption.org/v1 age-encryption.org/v1
-> ssh-ed25519 vxPbZg kPlQg/h4GOsYY4xhXBt7tf3FKpRLKcCWJ++qzFyEW0U -> ssh-ed25519 vxPbZg Bmvy3//fQLVj/L4NPxOJ97lZi3mnr4JRYd4LMsQhZFo
HPEO63dlU+IxFyRH11bBRDi0mCeW8CGgMChm6s62JHs AUKgDUPbXxY9hdvw/p227xJs1zy97bZdzSq+dU8SvjI
-> ssh-ed25519 +oNaHQ uVezQzhewJvvudpJHCqFDRikj/J4tJXN85ESjkXoJjU -> ssh-ed25519 +oNaHQ GLTMdsKIZZQBuTUQGfNvow1vawla7/MHIBHMzeIjp1w
cGUGizHtXZ/d+vO9jVoURNC19vHo77rXq5Cnd4cRwUU HcbCdXR0TkTe7MxctOubSCB00zc2LD8mmQsluhYxIMs
--- DtoPmQklXZeD4zDS/wJvQhx26S8kM2S64Rf9R+AlO2Y --- jg1CbPpvJyFLXfpizH6ibgJ8Fil8lsxjpysOk2QOJks
'<1B>r<EFBFBD>|j<><6A>.<2E>ɭ<EFBFBD><C9AD><EFBFBD>{<7B>A<><41>_4<5F><34>q<EFBFBD>M<EFBFBD>mE7<><37>پ<EFBFBD> <05><>W7L<>g)]<5D><><EFBFBD><EFBFBD><6;U<><1C>\<5C><> <20><><EFBFBD>E<EFBFBD>
r<EFBFBD><EFBFBD><01>A<EFBFBD><41><EFBFBD>'<06>8|<7C>xX<78><58><EFBFBD><6A>=#Tùήէ<>/