Skip to content

Commit d3e0f2b

Browse files
committed
futher nixos config
1 parent 3c93cf5 commit d3e0f2b

7 files changed

Lines changed: 101 additions & 12 deletions

File tree

nix-darwin/home-modules/languages/jsts.nix

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,15 @@
3939
emacsPackages.import-js
4040
svelte-language-server # npm install -g svelte-language-server
4141
]
42-
++ (if config.jsts.vue.enable then [ vue-language-server ] else [ ])
42+
++ (
43+
if config.jsts.vue.enable then
44+
[
45+
vue-language-server
46+
vscode-extensions.vue.volar
47+
]
48+
else
49+
[ ]
50+
)
4351
++ (if config.jsts.svelte.enable then [ svelte-language-server ] else [ ]);
4452
};
4553
}

nix-darwin/home-modules/programs/kubernetes.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
tilt
3232
ctlptl
3333
argocd
34+
kubectx # easy contect changing
3435
];
3536
sessionVariables = config.kubernetes.kubeconfig;
3637
};

nix-darwin/home-modules/services/ssh.nix

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,49 @@
1919
description = "ssh key authorized to log with";
2020
default = null;
2121
};
22+
ssh.hosts = lib.mkOption {
23+
type = lib.types.attrsOf (
24+
lib.types.submodule {
25+
options = {
26+
hostname = lib.mkOption {
27+
type = lib.types.str;
28+
description = "The hostname or IP address of the server";
29+
};
30+
user = lib.mkOption {
31+
type = lib.types.str;
32+
description = "The username to use for the SSH connection";
33+
default = username; # Default to the current user
34+
};
35+
port = lib.mkOption {
36+
type = lib.types.nullOr lib.types.int;
37+
description = "The port to use for the SSH connection";
38+
default = null;
39+
};
40+
identityFile = lib.mkOption {
41+
type = lib.types.nullOr lib.types.path;
42+
description = "The path to the SSH private key file";
43+
default = null;
44+
};
45+
};
46+
}
47+
);
48+
description = "A set of SSH hosts to configure";
49+
default = { };
50+
};
2251
};
2352

2453
config = lib.mkIf config.ssh.enable {
2554
programs.ssh = {
2655
enable = true;
56+
matchBlocks = lib.mapAttrs (name: host: {
57+
inherit (host)
58+
hostname
59+
user
60+
port
61+
identityFile
62+
;
63+
}) config.ssh.hosts;
64+
2765
};
2866
home = {
2967
packages = with pkgs; [

nix-darwin/home-modules/window-managers/hyprland/default.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
inputs.rose-pine-hyprcursor.packages.${pkgs.system}.default
1919
wl-clipboard
2020
hyprcursor
21-
flameshot
21+
(pkgs.flameshot.overrideAttrs (oldAttrs: {
22+
cmakeFlags = (oldAttrs.cmakeFlags or [ ]) ++ [ "-DUSE_WAYLAND_GRIM=ON" ];
23+
}))
2224
wf-recorder # video recorder for wayland
2325
waypaper
2426
# screenshot since flameshot isn't working

nix-darwin/home-modules/window-managers/hyprland/hyprland.nix

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@
144144
# launch program menu
145145
"SHIFTSUPER, P, exec, $menu"
146146
"SHIFTSUPER, O, exec, grim -g '$(slurp)' ~/Pictures/screenshot-$(date +'%Y-%m-%d_%H-%M-%S').png"
147-
# "SHIFTSUPER, O, exec, flameshot gui --clipboard"
148-
"SHIFTSUPER, Q, exec, $emacs --eval '(vterm)'"
147+
"SHIFTSUPER, O, exec, flameshot gui --clipboard"
148+
# "SHIFTSUPER, Q, exec, $emacs --eval '(vterm)'"
149149

150150
# scripts
151151
# "$mainMod, f, exec, ${lib.getExe myScript}"
@@ -196,6 +196,7 @@
196196
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
197197
", XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
198198
];
199+
# hyprctl clients
199200
windowrule = [
200201
"workspace 1, Emacs"
201202
"workspace 2, firefox"
@@ -215,9 +216,9 @@
215216
windowrulev2 = [
216217
# Steam rules
217218
"stayfocused, title:^()$,class:^(steam)$" # otherwise it closes post launching a game
218-
# "float, class:^([Ss]team)$, title:^((?![Ss]team).*)$" # Float non-Steam windows (e.g., game launchers)
219-
# "workspace 4 silent, class:^([Ss]team)$, title:^([Ss]team)$" # Move Steam to workspace 4
220-
# "tile, class:^([Ss]team)$, title:^([Ss]team)$" # Tile the main Steam window
219+
"float, class:^([Ss]team)$, title:^((?![Ss]team).*)$" # Float non-Steam windows (e.g., game launchers)
220+
"workspace 4 silent, class:^([Ss]team)$, title:^([Ss]team)$" # Move Steam to workspace 4
221+
"tile, class:^([Ss]team)$, title:^([Ss]team)$" # Tile the main Steam window
221222
# "workspace 4 silent, class:^([Ss]team)$, title:^(notificationtoasts_.*)$" # Move Steam notifications to workspace 4
222223
"nofocus, class:^([Ss]team)$, title:^((?![Ss]team).*)$" # Prevent non-Steam windows from stealing focus
223224
"noblur, class:^([Ss]team)$" # Ensure Steam window remains visible
@@ -239,14 +240,15 @@
239240
exec-once = [
240241
"sleep 1 && waybar"
241242
"hyprpaper"
243+
"Emacs"
242244
"blueman-applet"
243-
"/etc/profiles/per-user/henri/bin/emacs --daemon &"
245+
# "/etc/profiles/per-user/henri/bin/emacs --daemon &"
244246
"swaync"
245247
"discord --enable-wayland-ime"
246248
"spotify"
247-
"Brave"
249+
"Brave --enable-wayland-ime"
248250
"kitty"
249-
"flameshot &"
251+
"flameshot"
250252
"fcitx5"
251253
# "emacs" # TODO: make it spawn out of a shell
252254
];

nix-darwin/users/henri/home.nix

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,30 @@
2626
dunst.enable = lib.mkForce false;
2727
fcitx.enable = true; # chinese fonts are super pixels
2828
gnome.enable = true;
29-
ssh.enable = true;
29+
ssh = {
30+
enable = true;
31+
hosts = {
32+
factorio = {
33+
# ssh factorio
34+
hostname = "192.168.4.250";
35+
user = "root";
36+
};
37+
knode1 = {
38+
# ssh knode1
39+
hostname = "192.168.2.10";
40+
user = "proxmox";
41+
};
42+
43+
knode2 = {
44+
hostname = "192.168.2.11";
45+
user = "proxmox";
46+
};
47+
knode3 = {
48+
hostname = "192.168.2.12";
49+
user = "proxmox";
50+
};
51+
};
52+
};
3053
# ssh.authorizedSshKeys = /home/henri/.ssh/endeavourGit; # TODO: move to nix-modules
3154
# languages
3255
go.lsp.enable = true;
@@ -40,7 +63,7 @@
4063
json.lsp.enable = true;
4164

4265
# programs
43-
flameshot.enable = true;
66+
flameshot.enable = false; # enabled by hyprland
4467
brave.enable = true;
4568
firefox.enable = true; # lib.mkForce false;
4669

nix-k8s-homelab/charts/servers/factorioVanilla/base/values.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ resources:
1111
# memory: 1024Mi
1212
# cpu: 1000m
1313

14+
#### Service Configuration ####
15+
## @section Service Parameters
16+
## @param service.type Factorio service type
17+
## @param service.port Factorio service port
18+
## @extra service.externalIPs [array] If you are able to map an external IP, set it here
19+
## @extra service.nodePort If you use "type: NodePort" set the port to a value you like in the range of 30000-32767. Leave it blank for a random port
20+
## @param service.annotations Additional custom annotations for Factorio service
21+
## The service is a kind tricky, so factorio uses UDP, but not every cloud provider is able to route UDP traffic.
22+
## I.e. your cloud provider has LoadBalancers without the ability for UDP protocol. Furthermore kubectl ist not able to route UDP Traffic
23+
## ref: https://github.com/kubernetes/kubernetes/issues/47862
24+
## You have to expose factorio on a NodePort and map a port between 30000 and 32767, but the native port is 34197. So you have always to specify the port in factorio.
25+
## The best way ist to define a ClusterIP service and define one or more externalIPs. Of course this IPs must be available on the node the factorio pod runs on!
26+
service:
27+
type: LoadBalancer
28+
1429
## @section Port-Fixer Parameters
1530
## @param port_fixer.enabled Enable the Factorio Port Fixer
1631
## @param image.repository Factorio port-fixer image repository

0 commit comments

Comments
 (0)