Skip to content

Commit c2a1c84

Browse files
committed
fixed medialab
1 parent dc4edb4 commit c2a1c84

File tree

7 files changed

+74
-49
lines changed

7 files changed

+74
-49
lines changed

nix-darwin/nix-modules/services/bluetooth.nix

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{
2-
pkgs,
32
lib,
43
config,
54
...
@@ -14,9 +13,16 @@
1413
};
1514

1615
config = lib.mkIf config.bluetooth.enable {
17-
# Enable Bluetooth
1816
hardware.bluetooth.enable = true;
1917
hardware.bluetooth.powerOnBoot = true;
18+
19+
boot.extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
2020
services.blueman.enable = true;
21+
22+
services.udev.extraRules = ''
23+
# Enable Xbox controller support via Bluetooth
24+
SUBSYSTEM=="input", GROUP="input", MODE="0660"
25+
KERNEL=="uinput", MODE="0660", GROUP="input", OPTIONS+="static_node=uinput"
26+
'';
2127
};
2228
}

nix-darwin/users/henri/configuration.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
isNormalUser = true;
6565
extraGroups = [
6666
"wheel"
67+
"input"
6768
];
6869
};
6970

nix-darwin/users/medialab/configuration.nix

Lines changed: 9 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
inputs,
3-
username,
43
meta,
54
config,
65
hosts,
@@ -19,34 +18,14 @@
1918
../../nix-modules/services/bluetooth.nix
2019
# local
2120
./sops.nix
21+
./nix.nix
2222
];
2323

2424
programs.fish.enable = true;
2525
# services
2626
bluetooth.enable = true;
2727
internationalisation.enable = true;
2828
system.stateVersion = "25.05";
29-
nix = {
30-
optimise.automatic = true;
31-
settings = {
32-
warn-dirty = false;
33-
experimental-features = "nix-command flakes";
34-
substituters = [ ];
35-
trusted-public-keys = [ ];
36-
};
37-
38-
gc = {
39-
automatic = true;
40-
options = "--delete-older-than 14d";
41-
};
42-
43-
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # for nix.nix
44-
};
45-
46-
nixpkgs = {
47-
hostPlatform = meta.system;
48-
config.allowUnfree = true;
49-
};
5029

5130
security.sudo.extraConfig = ''
5231
Defaults timestamp_timeout=3600
@@ -69,7 +48,14 @@
6948
};
7049
};
7150

72-
networking.wireless.enable = true;
51+
networking.wireless = {
52+
enable = true;
53+
networks = {
54+
"Linksys00356_24GHz" = {
55+
psk = config.sops.secrets."home-server/wifi/password".path;
56+
};
57+
};
58+
};
7359
users.users.${meta.username} = {
7460
home = "/home/${meta.username}";
7561
shell = pkgs.fish;

nix-darwin/users/medialab/home.nix

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,24 @@
1414
# services
1515
../../home-modules/services
1616
];
17-
brave.enable = true;
18-
fish.enable = true;
19-
20-
# TODO: medialab shouldn't have my github keyFile
21-
# find a way to have different keys
22-
git = {
23-
userEmail = "henri-vandersleyen@protonmail.com";
24-
userName = "vanderscycle";
25-
signingKey = "~/.ssh/endeavourGit.pub";
17+
program = {
18+
brave.enable = true;
19+
fish.enable = true;
20+
git = {
21+
userEmail = "henri-vandersleyen@protonmail.com";
22+
userName = "vanderscycle";
23+
signingKey = "~/.ssh/endeavourGit.pub";
24+
};
25+
keychain = {
26+
enable = true;
27+
keys = [
28+
"/home/${meta.username}/.ssh/endeavourGit"
29+
];
30+
};
31+
thunar.enable = true;
32+
nh.flakeLocation = "/home/${meta.username}/Documents/dotFiles/nix-darwin";
2633
};
27-
keychain.enable = true;
28-
keychain.keys = [
29-
"/home/${meta.username}/.ssh/endeavourGit"
30-
];
31-
thunar.enable = true;
32-
nh.flakeLocation = "/home/${meta.username}/Documents/dotFiles/nix-darwin";
34+
3335
home = {
3436
username = meta.username;
3537
homeDirectory = "/home/${meta.username}";

nix-darwin/users/medialab/nix.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{ meta, inputs, ... }:
2+
{
3+
nix = {
4+
optimise.automatic = true;
5+
settings = {
6+
warn-dirty = false;
7+
experimental-features = "nix-command flakes";
8+
substituters = [ ];
9+
trusted-public-keys = [ ];
10+
};
11+
12+
gc = {
13+
automatic = true;
14+
options = "--delete-older-than 14d";
15+
};
16+
17+
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # for nix.nix
18+
};
19+
20+
nixpkgs = {
21+
hostPlatform = meta.system;
22+
config.allowUnfree = true;
23+
};
24+
}
Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
home-server:
2+
wifi:
3+
password: ENC[AES256_GCM,data:qRFFBzqxi5cWDg==,iv:26fJjbBuE7cJ1Rvj8qAEia99zGVRGUTdkifzjw8MnmE=,tag:VaF9Sef2O/bSBqlYfwdfCQ==,type:str]
24
rice:
3-
user: ENC[AES256_GCM,data:LbLRmygR,iv:mpmTxfMNWUsg/zgd1CkQ+H77Y2ltQYrnRsxadkVkCy8=,tag:t2+s2hKApPuejIvnRFDNzQ==,type:str]
4-
password: ENC[AES256_GCM,data:LVq1aAFMyU/43g==,iv:ZwTv1IAHOlBmBDWyaW8pTfLkp8Ld1sc0E/D6X69yPFg=,tag:taHxfGML+/vgFA+EH5eZrA==,type:str]
5+
user: ENC[AES256_GCM,data:T3AZrkeI,iv:1pJgtJpn33Naqag+MbjtJggGuRqmcrEFu9YsHKfjWso=,tag:AS9B2mCegNHxb4nSL3sMUw==,type:str]
6+
password: ENC[AES256_GCM,data:Nfh29urWTNqhXA==,iv:tVlCy27D4gFM/V/vyfFGvCcFPMF8I+slxpf1kmPML2k=,tag:hem5vBOn5EzsdOVo/H0j0g==,type:str]
57
sops:
68
age:
79
- recipient: age1df2u7xvze6rq5utz74ckx059wr3z97j484wc04063437h6hn4v6s9auec3
810
enc: |
911
-----BEGIN AGE ENCRYPTED FILE-----
10-
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBkaktHUkJ1elkvM1hDQ3pQ
11-
SnppNU9Qd0RCaEcxTnNmOVRtQ280V2U5NHh3Cnlnc2lSemd6d1V3aUNWcndYOUxq
12-
RHlYYmdEdjQ5RkJQL25PR3BUeDlDOVUKLS0tIDB0MlBPa0k5V1Q5S1YzWHZCRDJp
13-
YUxuMUVQc1J4SWQwVjJ6QWZYVVR1V0UKypXSQPc+5a75k/de4e/YkWpqsRYfPWqP
14-
0O/4nVj2OKF6SRkDVH7P1iZgRWgiOIhY9TvVERWLB7JtsM339rpEBw==
12+
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBUMVJiNHVKK3hOWURTaHh5
13+
WFJMMWVoOVdPYTg1S0NkaWpLNHlVeHhJeGt3CkszVzJDWVZKZVNUY2hXcXhacm9z
14+
SU5WU0VRTHpCMGlJYWJmejN5MTR0Q2sKLS0tIGhBWWlRc0pXTW5sVUk3Rk5FMEpV
15+
UTg3RWxOS3dnSVVCcTdrbUlwOThneE0KgzD4U9rLhcby2LmZvSmqM8nMJoDB/5qp
16+
okvHIIGvSVKZbDApIyi4YzhUm686bNHmi37kIlP5xN7WPInxKis7eA==
1517
-----END AGE ENCRYPTED FILE-----
16-
lastmodified: "2025-07-17T20:04:56Z"
17-
mac: ENC[AES256_GCM,data:rwKhNVihm4O1kis6IbMm/wFglvGZM6h57sEqhQhyA0sdHZNpr4kZiwnlgpA5S6ogrzXcRyr6nuzsxIgB7bt43eJH3JUBniq0QVCPYFTRbHU+VFM3Kl6NqsKBoCuOLwL3sbb0abrj4kHNLpa6SO5M9ok0CGJMO+hE4rA8AOgmhtQ=,iv:j0yF+Wpcx2g2zGlaxA+ZwZ6aMJbmejT01AxDe9qB5B4=,tag:Dd99CDbvwHc4dV8lR6ft/Q==,type:str]
18+
lastmodified: "2025-07-20T17:44:43Z"
19+
mac: ENC[AES256_GCM,data:9DWX6gm68EsQ7Ik7Bxnk/omATfLYTmAYKgGdDvlHvq9slnyfD14WeuHAagpe627vTUwc/uIpx4hgDiWCGwblD+WqERjj7gmdRxGStRCKzVhtk2GpNGBWhzNRyd00haAvUsNL7yYFbcbuiDlb3SRJ0B2IKxWFQcpM3Z7lsKzn4wg=,iv:1zqMDV9kqgzBbXqyCxqo17EqyEKCgNCL8mXn1fHnoQs=,tag:RjvecoYVLSWBo6h4ECDyzQ==,type:str]
1820
unencrypted_suffix: _unencrypted
1921
version: 3.10.2

nix-darwin/users/medialab/sops.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ in
2424
secrets = {
2525
# Maggit Forge
2626
# TruNas SMB access
27+
"home-server/wifi/password" = {
28+
owner = "root";
29+
};
30+
2731
"home-server/rice/password" = {
2832
owner = "root";
2933
};

0 commit comments

Comments
 (0)