tangled
alpha
login
or
join now
devins.page
/
flake
0
fork
atom
configurations for my servers and desktops
nix
nixos
flake
dots
dotfiles
0
fork
atom
overview
issues
pulls
pipelines
chore: cleanup
devins.page
2 months ago
329e5daf
4cd6aadb
+106
-147
16 changed files
expand all
collapse all
unified
split
flake.nix
hosts
bluepill
default.nix
hardware.nix
services
jellyfin.nix
ssh.nix
tank-wsl
default.nix
trinity
default.nix
hardware.nix
services
fwupd.nix
tailscale.nix
modules
darwin
default.nix
nixos
default.nix
services
fwupd.nix
ssh.nix
tailscale.nix
users
devin.nix
+76
-65
flake.nix
···
1
1
{
2
2
-
description = "Darwin and NixOS system configurations";
3
3
-
4
2
inputs = {
5
5
-
agenix.url = "github:ryantm/agenix";
6
6
-
home-manager.url = "github:nix-community/home-manager";
7
7
-
home-manager-stable.url = "github:nix-community/home-manager/release-25.11";
8
8
-
mac-app-util.url = "github:hraban/mac-app-util";
9
9
-
nix-darwin.url = "github:nix-darwin/nix-darwin/master";
10
10
-
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
11
3
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
12
4
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-25.11";
13
5
nixpkgs-tlp-pr.url = "github:NixOS/nixpkgs/pull/473626/head";
14
14
-
15
15
-
home-manager.inputs.nixpkgs.follows = "nixpkgs";
16
16
-
home-manager-stable.inputs.nixpkgs.follows = "nixpkgs-stable";
17
17
-
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
6
6
+
home-manager = {
7
7
+
url = "github:nix-community/home-manager";
8
8
+
inputs.nixpkgs.follows = "nixpkgs";
9
9
+
};
10
10
+
home-manager-stable = {
11
11
+
url = "github:nix-community/home-manager/release-25.11";
12
12
+
inputs.nixpkgs.follows = "nixpkgs-stable";
13
13
+
};
14
14
+
nix-darwin = {
15
15
+
url = "github:nix-darwin/nix-darwin";
16
16
+
inputs.nixpkgs.follows = "nixpkgs";
17
17
+
};
18
18
+
mac-app-util.url = "github:hraban/mac-app-util";
19
19
+
nixos-wsl.url = "github:nix-community/NixOS-WSL";
20
20
+
agenix.url = "github:ryantm/agenix";
18
21
};
19
22
20
20
-
outputs = inputs: {
21
21
-
darwinConfigurations.neo = inputs.nix-darwin.lib.darwinSystem {
22
22
-
specialArgs = inputs;
23
23
-
modules = [
24
24
-
./modules/common
25
25
-
./modules/darwin
26
26
-
./hosts/neo
27
27
-
inputs.home-manager.darwinModules.home-manager
28
28
-
inputs.mac-app-util.darwinModules.default
29
29
-
{
30
30
-
home-manager = {
31
31
-
sharedModules = [inputs.mac-app-util.homeManagerModules.default];
32
32
-
};
33
33
-
}
34
34
-
];
23
23
+
outputs = {
24
24
+
self,
25
25
+
nixpkgs,
26
26
+
nixpkgs-stable,
27
27
+
nixpkgs-tlp-pr,
28
28
+
nix-darwin,
29
29
+
home-manager,
30
30
+
home-manager-stable,
31
31
+
mac-app-util,
32
32
+
nixos-wsl,
33
33
+
agenix,
34
34
+
}: let
35
35
+
commonModules = [./modules/common];
36
36
+
in {
37
37
+
darwinConfigurations.neo = nix-darwin.lib.darwinSystem {
38
38
+
modules =
39
39
+
commonModules
40
40
+
++ [
41
41
+
./modules/darwin
42
42
+
./hosts/neo
43
43
+
home-manager.darwinModules.home-manager
44
44
+
mac-app-util.darwinModules.default
45
45
+
{home-manager.sharedModules = [mac-app-util.homeManagerModules.default];}
46
46
+
];
35
47
};
36
48
37
37
-
nixosConfigurations.trinity = inputs.nixpkgs-tlp-pr.lib.nixosSystem {
38
38
-
specialArgs = inputs;
39
39
-
modules = [
40
40
-
./modules/common
41
41
-
./modules/nixos
42
42
-
./hosts/trinity
43
43
-
inputs.home-manager.nixosModules.home-manager
44
44
-
];
45
45
-
};
49
49
+
nixosConfigurations = {
50
50
+
trinity = nixpkgs-tlp-pr.lib.nixosSystem {
51
51
+
modules =
52
52
+
commonModules
53
53
+
++ [
54
54
+
./modules/nixos
55
55
+
./hosts/trinity
56
56
+
home-manager.nixosModules.home-manager
57
57
+
];
58
58
+
};
46
59
47
47
-
nixosConfigurations.bluepill = inputs.nixpkgs-stable.lib.nixosSystem {
48
48
-
specialArgs = inputs;
49
49
-
modules = [
50
50
-
./modules/common
51
51
-
./modules/nixos
52
52
-
./hosts/bluepill
53
53
-
inputs.agenix.nixosModules.default
54
54
-
inputs.home-manager-stable.nixosModules.home-manager
55
55
-
{
56
56
-
nixpkgs.overlays = [
57
57
-
(final: prev: {
58
58
-
tailscale = inputs.nixpkgs.legacyPackages.${prev.stdenv.hostPlatform.system}.tailscale;
59
59
-
})
60
60
+
bluepill = nixpkgs-stable.lib.nixosSystem {
61
61
+
modules =
62
62
+
commonModules
63
63
+
++ [
64
64
+
./modules/nixos
65
65
+
./hosts/bluepill
66
66
+
agenix.nixosModules.default
67
67
+
home-manager-stable.nixosModules.home-manager
68
68
+
{
69
69
+
nixpkgs.overlays = [
70
70
+
(final: prev: {
71
71
+
tailscale = nixpkgs.legacyPackages.${prev.stdenv.hostPlatform.system}.tailscale;
72
72
+
})
73
73
+
];
74
74
+
}
60
75
];
61
61
-
}
62
62
-
];
63
63
-
};
76
76
+
};
64
77
65
65
-
nixosConfigurations.tank-wsl = inputs.nixpkgs.lib.nixosSystem {
66
66
-
specialArgs = inputs;
67
67
-
modules = [
68
68
-
./modules/common
69
69
-
./modules/nixos
70
70
-
./hosts/tank-wsl
71
71
-
inputs.home-manager.nixosModules.home-manager
72
72
-
inputs.nixos-wsl.nixosModules.default
73
73
-
];
78
78
+
tank-wsl = nixpkgs.lib.nixosSystem {
79
79
+
modules =
80
80
+
commonModules
81
81
+
++ [
82
82
+
./modules/nixos
83
83
+
./hosts/tank-wsl
84
84
+
home-manager.nixosModules.home-manager
85
85
+
nixos-wsl.nixosModules.default
86
86
+
];
87
87
+
};
74
88
};
75
89
76
76
-
formatter = {
77
77
-
aarch64-darwin = inputs.nixpkgs.legacyPackages.aarch64-darwin.alejandra;
78
78
-
x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.alejandra;
79
79
-
};
90
90
+
formatter = nixpkgs.lib.genAttrs ["aarch64-darwin" "x86_64-linux"] (system: nixpkgs.legacyPackages.${system}.alejandra);
80
91
};
81
92
}
-8
hosts/bluepill/default.nix
···
1
1
{pkgs, ...}: {
2
2
imports = [
3
3
./hardware.nix
4
4
-
./services/fwupd.nix
5
4
./services/homepage.nix
6
5
./services/jellyfin.nix
7
6
./services/mikusmp67.nix
···
10
9
./services/restic.nix
11
10
./services/samba.nix
12
11
./services/slskd.nix
13
13
-
./services/ssh.nix
14
14
-
./services/tailscale.nix
15
12
./services/transmission.nix
16
13
];
17
17
-
18
18
-
boot.loader = {
19
19
-
systemd-boot.enable = true;
20
20
-
efi.canTouchEfiVariables = true;
21
21
-
};
22
14
23
15
networking.hostName = "bluepill";
24
16
+1
-7
hosts/bluepill/hardware.nix
···
1
1
-
# Do not modify this file! It was generated by ‘nixos-generate-config’
2
2
-
# and may be overwritten by future invocations. Please make changes
3
3
-
# to /etc/nixos/configuration.nix instead.
4
1
{
5
2
config,
6
3
lib,
7
7
-
pkgs,
8
4
modulesPath,
9
5
...
10
6
}: {
11
11
-
imports = [
12
12
-
(modulesPath + "/installer/scan/not-detected.nix")
13
13
-
];
7
7
+
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
14
8
15
9
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "xhci_pci_renesas" "usbhid" "sd_mod"];
16
10
boot.initrd.kernelModules = [];
hosts/bluepill/services/fwupd.nix
modules/nixos/services/fwupd.nix
-1
hosts/bluepill/services/jellyfin.nix
···
8
8
openFirewall = true;
9
9
};
10
10
11
11
-
# enable nvidia shit
12
11
hardware.graphics.enable = true;
13
12
services.xserver.videoDrivers = ["nvidia"];
14
13
hardware.nvidia = {
-10
hosts/bluepill/services/ssh.nix
···
1
1
-
{...}: {
2
2
-
services = {
3
3
-
openssh = {
4
4
-
enable = true;
5
5
-
settings.PasswordAuthentication = false;
6
6
-
};
7
7
-
8
8
-
fail2ban.enable = true;
9
9
-
};
10
10
-
}
hosts/bluepill/services/tailscale.nix
modules/nixos/services/tailscale.nix
+1
-7
hosts/tank-wsl/default.nix
···
1
1
-
{
2
2
-
config,
3
3
-
lib,
4
4
-
pkgs,
5
5
-
...
6
6
-
}: {
1
1
+
{...}: {
7
2
wsl.enable = true;
8
3
wsl.defaultUser = "devin";
9
9
-
10
4
system.stateVersion = "25.05";
11
5
}
+1
-13
hosts/trinity/default.nix
···
1
1
-
{
2
2
-
config,
3
3
-
pkgs,
4
4
-
...
5
5
-
}: {
1
1
+
{pkgs, ...}: {
6
2
imports = [
7
3
./hardware.nix
8
8
-
./services/fwupd.nix
9
4
./services/power.nix
10
10
-
./services/ssh.nix
11
11
-
./services/tailscale.nix
12
5
];
13
13
-
14
14
-
boot.loader = {
15
15
-
systemd-boot.enable = true;
16
16
-
efi.canTouchEfiVariables = true;
17
17
-
};
18
6
19
7
networking.hostName = "trinity";
20
8
networking.networkmanager.enable = true;
+1
-7
hosts/trinity/hardware.nix
···
1
1
-
# Do not modify this file! It was generated by ‘nixos-generate-config’
2
2
-
# and may be overwritten by future invocations. Please make changes
3
3
-
# to /etc/nixos/configuration.nix instead.
4
1
{
5
2
config,
6
3
lib,
7
7
-
pkgs,
8
4
modulesPath,
9
5
...
10
6
}: {
11
11
-
imports = [
12
12
-
(modulesPath + "/installer/scan/not-detected.nix")
13
13
-
];
7
7
+
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
14
8
15
9
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "usbhid" "sd_mod" "rtsx_pci_sdmmc"];
16
10
boot.initrd.kernelModules = [];
-3
hosts/trinity/services/fwupd.nix
···
1
1
-
{...}: {
2
2
-
services.fwupd.enable = true;
3
3
-
}
-1
hosts/trinity/services/ssh.nix
modules/nixos/services/ssh.nix
···
4
4
enable = true;
5
5
settings.PasswordAuthentication = false;
6
6
};
7
7
-
8
7
fail2ban.enable = true;
9
8
};
10
9
}
-3
hosts/trinity/services/tailscale.nix
···
1
1
-
{...}: {
2
2
-
services.tailscale.enable = true;
3
3
-
}
+1
-6
modules/darwin/default.nix
···
1
1
{lib, ...}: {
2
2
-
system = {
3
3
-
stateVersion = 6;
4
4
-
configurationRevision = null;
5
5
-
primaryUser = "devin";
6
6
-
};
7
7
-
2
2
+
system.stateVersion = 6;
8
3
nixpkgs.hostPlatform = lib.mkDefault "aarch64-darwin";
9
4
10
5
homebrew = {
+11
modules/nixos/default.nix
···
1
1
{lib, ...}: {
2
2
+
imports = [
3
3
+
./services/fwupd.nix
4
4
+
./services/ssh.nix
5
5
+
./services/tailscale.nix
6
6
+
];
7
7
+
2
8
system.stateVersion = lib.mkDefault "24.11";
3
9
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
10
10
+
11
11
+
boot.loader = {
12
12
+
systemd-boot.enable = lib.mkDefault true;
13
13
+
efi.canTouchEfiVariables = lib.mkDefault true;
14
14
+
};
4
15
5
16
zramSwap.enable = true;
6
17
time.timeZone = lib.mkDefault "America/Nassau";
+14
-16
modules/users/devin.nix
···
1
1
-
{
2
2
-
lib,
3
3
-
pkgs,
4
4
-
...
5
5
-
}: let
1
1
+
{pkgs, ...}: let
2
2
+
isDarwin = pkgs.stdenv.isDarwin;
6
3
homeDir =
7
7
-
if pkgs.stdenv.isDarwin
4
4
+
if isDarwin
8
5
then "/Users/devin"
9
6
else "/home/devin";
10
7
in {
···
13
10
home = homeDir;
14
11
shell = pkgs.fish;
15
12
}
16
16
-
// lib.optionalAttrs (!pkgs.stdenv.isDarwin) {
17
17
-
isNormalUser = true;
18
18
-
extraGroups = ["networkmanager" "wheel"];
19
19
-
}
20
20
-
// lib.optionalAttrs pkgs.stdenv.isDarwin {
21
21
-
uid = 501;
22
22
-
};
13
13
+
// (
14
14
+
if isDarwin
15
15
+
then {uid = 501;}
16
16
+
else {
17
17
+
isNormalUser = true;
18
18
+
extraGroups = ["networkmanager" "wheel"];
19
19
+
}
20
20
+
);
23
21
24
22
home-manager.users.devin = {pkgs, ...}: {
25
23
home = {
···
57
55
58
56
git = {
59
57
enable = true;
60
60
-
settings = {
61
61
-
user.name = "intergrav";
62
62
-
user.email = "devin@devins.page";
58
58
+
userName = "intergrav";
59
59
+
userEmail = "devin@devins.page";
60
60
+
extraConfig = {
63
61
credential.helper = "!gh auth git-credential";
64
62
pull.rebase = true;
65
63
rebase.autoStash = true;