+15
-12
capabilities/autoupdate.nix
+15
-12
capabilities/autoupdate.nix
···
1
{ config, lib, pkgs, ... }:
2
{
3
-
system.autoUpgrade = {
4
-
enable = true;
5
-
flake = "git+https://tangled.sh/@hotsocket.fyi/nix";
6
-
flags = [
7
-
"--update-input" "nixpkgs"
8
-
"--update-input" "nixpkgs-unstabe"
9
-
"--update-input" "home-manager"
10
-
"--no-write-lock-file"
11
-
"-L"
12
-
];
13
-
dates = "daily";
14
-
};
15
}
···
1
{ config, lib, pkgs, ... }:
2
{
3
+
system.autoUpgrade = {
4
+
enable = true;
5
+
flake = "git+https://tangled.sh/@hotsocket.fyi/nix";
6
+
flags = [
7
+
"--update-input" "nixpkgs"
8
+
"--update-input" "nixpkgs-unstabe"
9
+
"--update-input" "home-manager"
10
+
"--no-write-lock-file"
11
+
"-L"
12
+
];
13
+
dates = "daily";
14
+
# wait for internet
15
+
fixedRandomDelay = true;
16
+
randomizedDelaySec = "5min";
17
+
};
18
}
+7
common/config-darwin.nix
+7
common/config-darwin.nix
+30
common/config-linux.nix
+30
common/config-linux.nix
···
···
1
+
{ config, lib, pkgs, ... }:
2
+
{
3
+
imports = [ ./options.nix ];
4
+
# just a default. automatic-timezoned on workstations.
5
+
time.timeZone = lib.mkDefault "America/Chicago";
6
+
# It's ASCII, but better!
7
+
i18n.defaultLocale = "en_US.UTF-8";
8
+
# capital cities was on to something here
9
+
environment.memoryAllocator.provider = "graphene-hardened";
10
+
# dripped-out nano
11
+
programs = {
12
+
nano = {
13
+
enable = true;
14
+
nanorc = ''
15
+
set autoindent
16
+
set boldtext
17
+
set constantshow
18
+
set smarthome
19
+
set softwrap
20
+
set tabsize 2
21
+
set titlecolor blue
22
+
set statuscolor green
23
+
set keycolor red
24
+
set numbercolor blue
25
+
'';
26
+
};
27
+
};
28
+
29
+
system.stateVersion = "25.05";
30
+
}
+2
-32
common/config.nix
+2
-32
common/config.nix
···
1
{ config, lib, pkgs, ... }:
2
-
let
3
-
scriptsPkg = pkgs.callPackage ./scripts.nix {};
4
-
in {
5
-
imports = [ ./options.nix ];
6
-
environment.systemPackages = [scriptsPkg];
7
-
# just a default. automatic-timezoned on workstations.
8
-
time.timeZone = lib.mkDefault "America/Chicago";
9
-
# It's ASCII, but better!
10
-
i18n.defaultLocale = "en_US.UTF-8";
11
-
# capital cities was on to something here
12
-
environment.memoryAllocator.provider = "graphene-hardened";
13
-
# dripped-out nano
14
-
programs = {
15
-
nano = {
16
-
enable = true;
17
-
nanorc = ''
18
-
set autoindent
19
-
set boldtext
20
-
set constantshow
21
-
set smarthome
22
-
set softwrap
23
-
set tabsize 2
24
-
set titlecolor blue
25
-
set statuscolor green
26
-
set keycolor red
27
-
set numbercolor blue
28
-
'';
29
-
};
30
-
};
31
-
32
nix.settings.experimental-features = [ "nix-command" "flakes" ];
33
-
system.stateVersion = "25.05";
34
-
}
+5
-1
common/default.nix
+5
-1
common/default.nix
-8
common/scripts.nix
-8
common/scripts.nix
+26
-38
flake.lock
+26
-38
flake.lock
···
1
{
2
"nodes": {
3
-
"disko": {
4
-
"inputs": {
5
-
"nixpkgs": "nixpkgs"
6
-
},
7
-
"locked": {
8
-
"lastModified": 1755519972,
9
-
"narHash": "sha256-bU4nqi3IpsUZJeyS8Jk85ytlX61i4b0KCxXX9YcOgVc=",
10
-
"owner": "nix-community",
11
-
"repo": "disko",
12
-
"rev": "4073ff2f481f9ef3501678ff479ed81402caae6d",
13
-
"type": "github"
14
-
},
15
-
"original": {
16
-
"id": "disko",
17
-
"type": "indirect"
18
-
}
19
-
},
20
"home-manager": {
21
"inputs": {
22
"nixpkgs": [
···
38
"type": "github"
39
}
40
},
41
-
"nixpkgs": {
42
"locked": {
43
-
"lastModified": 1755736253,
44
-
"narHash": "sha256-jlIQRypNhB1PcB1BE+expE4xZeJxzoAGr1iUbHQta8s=",
45
-
"owner": "NixOS",
46
-
"repo": "nixpkgs",
47
-
"rev": "596312aae91421d6923f18cecce934a7d3bfd6b8",
48
"type": "github"
49
},
50
"original": {
51
-
"owner": "NixOS",
52
-
"ref": "nixpkgs-unstable",
53
-
"repo": "nixpkgs",
54
"type": "github"
55
}
56
},
57
-
"nixpkgs-unstable": {
58
"locked": {
59
-
"lastModified": 1755706679,
60
-
"narHash": "sha256-WJ6eaSiN6xtz3vyH2bTYLQ3+ct0W8ai/BkYaq1n1jP8=",
61
"owner": "NixOS",
62
"repo": "nixpkgs",
63
-
"rev": "c3fc1fe6d8765d99c8614c6f82d611dc56b9ae37",
64
"type": "github"
65
},
66
"original": {
67
"owner": "NixOS",
68
-
"ref": "nixpkgs-unstable",
69
"repo": "nixpkgs",
70
"type": "github"
71
}
72
},
73
-
"nixpkgs_2": {
74
"locked": {
75
-
"lastModified": 1755593991,
76
-
"narHash": "sha256-BA9MuPjBDx/WnpTJ0EGhStyfE7hug8g85Y3Ju9oTsM4=",
77
"owner": "NixOS",
78
"repo": "nixpkgs",
79
-
"rev": "a58390ab6f1aa810eb8e0f0fc74230e7cc06de03",
80
"type": "github"
81
},
82
"original": {
83
"owner": "NixOS",
84
-
"ref": "nixos-25.05",
85
"repo": "nixpkgs",
86
"type": "github"
87
}
88
},
89
"root": {
90
"inputs": {
91
-
"disko": "disko",
92
"home-manager": "home-manager",
93
-
"nixpkgs": "nixpkgs_2",
94
"nixpkgs-unstable": "nixpkgs-unstable"
95
}
96
}
···
1
{
2
"nodes": {
3
"home-manager": {
4
"inputs": {
5
"nixpkgs": [
···
21
"type": "github"
22
}
23
},
24
+
"nix-darwin": {
25
+
"inputs": {
26
+
"nixpkgs": [
27
+
"nixpkgs"
28
+
]
29
+
},
30
"locked": {
31
+
"lastModified": 1749744770,
32
+
"narHash": "sha256-MEM9XXHgBF/Cyv1RES1t6gqAX7/tvayBC1r/KPyK1ls=",
33
+
"owner": "nix-darwin",
34
+
"repo": "nix-darwin",
35
+
"rev": "536f951efb1ccda9b968e3c9dee39fbeb6d3fdeb",
36
"type": "github"
37
},
38
"original": {
39
+
"owner": "nix-darwin",
40
+
"ref": "nix-darwin-25.05",
41
+
"repo": "nix-darwin",
42
"type": "github"
43
}
44
},
45
+
"nixpkgs": {
46
"locked": {
47
+
"lastModified": 1755593991,
48
+
"narHash": "sha256-BA9MuPjBDx/WnpTJ0EGhStyfE7hug8g85Y3Ju9oTsM4=",
49
"owner": "NixOS",
50
"repo": "nixpkgs",
51
+
"rev": "a58390ab6f1aa810eb8e0f0fc74230e7cc06de03",
52
"type": "github"
53
},
54
"original": {
55
"owner": "NixOS",
56
+
"ref": "nixos-25.05",
57
"repo": "nixpkgs",
58
"type": "github"
59
}
60
},
61
+
"nixpkgs-unstable": {
62
"locked": {
63
+
"lastModified": 1755706679,
64
+
"narHash": "sha256-WJ6eaSiN6xtz3vyH2bTYLQ3+ct0W8ai/BkYaq1n1jP8=",
65
"owner": "NixOS",
66
"repo": "nixpkgs",
67
+
"rev": "c3fc1fe6d8765d99c8614c6f82d611dc56b9ae37",
68
"type": "github"
69
},
70
"original": {
71
"owner": "NixOS",
72
+
"ref": "nixpkgs-unstable",
73
"repo": "nixpkgs",
74
"type": "github"
75
}
76
},
77
"root": {
78
"inputs": {
79
"home-manager": "home-manager",
80
+
"nix-darwin": "nix-darwin",
81
+
"nixpkgs": "nixpkgs",
82
"nixpkgs-unstable": "nixpkgs-unstable"
83
}
84
}
+28
-12
flake.nix
+28
-12
flake.nix
···
6
url = "github:nix-community/home-manager/release-25.05";
7
inputs.nixpkgs.follows = "nixpkgs";
8
};
9
-
};
10
-
outputs = { nixpkgs, nixpkgs-unstable, home-manager, disko, ... }@inputs:
11
-
let
12
-
pkgs-unstable = import nixpkgs-unstable {
13
-
system = "x86_64-linux";
14
};
15
-
in {
16
# not-quite-fucked-up thinkpad
17
-
nixosConfigurations.yaoi = nixpkgs.lib.nixosSystem {
18
-
specialArgs = { inherit inputs pkgs-unstable; };
19
system = "x86_64-linux";
20
modules = [
21
home-manager.nixosModules.home-manager
22
./common
···
29
./nonfree/_allow.nix
30
./nonfree/steam.nix
31
];
32
-
};
33
# corebooted chromebook
34
-
nixosConfigurations.yuri = nixpkgs.lib.nixosSystem {
35
-
specialArgs = { inherit inputs pkgs-unstable; };
36
system = "x86_64-linux";
37
modules = [
38
home-manager.nixosModules.home-manager
39
./common
···
43
./hosts/yuri.nix
44
./users/hotsocket.nix
45
];
46
-
};
47
};
48
}
···
6
url = "github:nix-community/home-manager/release-25.05";
7
inputs.nixpkgs.follows = "nixpkgs";
8
};
9
+
nix-darwin = {
10
+
url = "github:nix-darwin/nix-darwin/nix-darwin-25.05";
11
+
inputs.nixpkgs.follows = "nixpkgs";
12
};
13
+
};
14
+
# The idea behind having a bunch of modules listed out like this is so I can layer different things
15
+
# on top of each other in a pretty way, as well as give an immediate idea of what a system will look
16
+
# like before even beginning to install it.
17
+
outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, nix-darwin, ... }@inputs: {
18
# not-quite-fucked-up thinkpad
19
+
nixosConfigurations."yaoi" = nixpkgs.lib.nixosSystem (rec {
20
system = "x86_64-linux";
21
+
specialArgs = { inherit inputs; pkgs-unstable = import nixpkgs-unstable { inherit system; }; };
22
modules = [
23
home-manager.nixosModules.home-manager
24
./common
···
31
./nonfree/_allow.nix
32
./nonfree/steam.nix
33
];
34
+
});
35
+
36
# corebooted chromebook
37
+
nixosConfigurations."yuri" = nixpkgs.lib.nixosSystem (rec {
38
system = "x86_64-linux";
39
+
specialArgs = { inherit inputs; pkgs-unstable = import nixpkgs-unstable { inherit system; }; };
40
modules = [
41
home-manager.nixosModules.home-manager
42
./common
···
46
./hosts/yuri.nix
47
./users/hotsocket.nix
48
];
49
+
});
50
+
51
+
# MacBook Pro
52
+
darwinConfigurations."bara" = nix-darwin.lib.darwinSystem (rec {
53
+
system = "aarch64-darwin";
54
+
specialArgs = { inherit inputs system; pkgs-unstable = import nixpkgs-unstable { inherit system; }; };
55
+
modules = [
56
+
home-manager.darwinModules.home-manager
57
+
./common
58
+
./workstation.nix
59
+
./hosts/bara.nix
60
+
./users/hotsocket.nix
61
+
];
62
+
});
63
};
64
}
+4
hosts/bara.nix
+4
hosts/bara.nix
+1
-1
hosts/yuri.nix
+1
-1
hosts/yuri.nix
-30
scripts/nix-tmpl.sh
-30
scripts/nix-tmpl.sh
···
1
-
#!/usr/bin/env sh
2
-
# handy script to grab templates for code projects
3
-
4
-
TEMPLATES_REPO="https://github.com/NixOS/templates"
5
-
CACHE_DIR="$HOME/.cache"
6
-
CLONE_DIR="$CACHE_DIR/nix-tmpl"
7
-
8
-
ARG_TEMPLATE_NAME="$1"
9
-
TEMPLATE_DIR="$CLONE_DIR/$ARG_TEMPLATE_NAME"
10
-
11
-
if [ -z "$ARG_TEMPLATE_NAME" ]; then
12
-
echo "$0: no template specified"
13
-
exit -1
14
-
fi
15
-
16
-
if [ ! -d "$CLONE_DIR" ]; then
17
-
mkdir -p "$CACHE_DIR"
18
-
git clone "$TEMPLATES_REPO" "$CLONE_DIR"
19
-
fi
20
-
21
-
pushd "$CLONE_DIR" > /dev/null
22
-
git pull
23
-
24
-
if [ ! -d "$TEMPLATE_DIR" ]; then
25
-
echo "$0: template not found"
26
-
exit -2
27
-
fi
28
-
popd > /dev/null
29
-
30
-
cp -R "$TEMPLATE_DIR/." .
···
+28
-14
users/hotsocket.nix
+28
-14
users/hotsocket.nix
···
1
-
{ config, lib, pkgs, pkgs-unstable, ... }:
2
{
3
-
users.users.hotsocket = {
4
-
description = "ur mom";
5
-
isNormalUser = true;
6
-
hashedPassword = "$y$j9T$zLozDIuafBb/SmDkuApXn/$fx4sfleiFwu5qK/yw3kD9EzmuCZWuv4lt3C9sf8oLH5";
7
-
extraGroups = [ "wheel" ];
8
-
};
9
# i love home-manager :)
10
home-manager.users.hotsocket = if config.isWorkstation then {
11
home = {
12
stateVersion = "25.05";
13
username = "hotsocket";
14
-
homeDirectory = "/home/hotsocket";
15
-
packages = ((with pkgs; [
16
jetbrains.idea-community-bin
17
brave
18
vscodium
19
-
git
20
playerctl
21
rescrobbled
22
p7zip
23
-
]) ++ (with pkgs-unstable; [
24
-
# in case of multiplayer. that's the reason for me having unstable.
25
-
luanti-client
26
]));
27
file = {
28
".config/VSCodium/product.json".text = builtins.readFile ../files/product.json;
···
47
};
48
};
49
};
50
};
51
services = {
52
-
kdeconnect.enable = true;
53
};
54
} else null;
55
}
···
1
+
{ config, lib, pkgs, pkgs-unstable, system, ... }:
2
{
3
+
programs.fish.enable = true;
4
+
users.users.hotsocket = lib.mkMerge [
5
+
{
6
+
shell = pkgs.fish;
7
+
}
8
+
(lib.mkIf (lib.hasInfix "linux" system) {
9
+
description = "ur mom";
10
+
isNormalUser = true;
11
+
hashedPassword = "$y$j9T$zLozDIuafBb/SmDkuApXn/$fx4sfleiFwu5qK/yw3kD9EzmuCZWuv4lt3C9sf8oLH5";
12
+
extraGroups = [ "wheel" ];
13
+
}
14
+
)];
15
# i love home-manager :)
16
home-manager.users.hotsocket = if config.isWorkstation then {
17
home = {
18
stateVersion = "25.05";
19
username = "hotsocket";
20
+
homeDirectory = lib.mkForce (if (lib.hasInfix "darwin" system) then "/Users/hotsocket" else "/home/hotsocket");
21
+
packages = (with pkgs; [ # Shared packages.
22
+
git
23
+
direnv
24
+
]) ++ (with pkgs-unstable; [ # Shared unstable packages.
25
+
# in case of multiplayer. that's the entire reason for me having unstable.
26
+
luanti-client
27
+
]) ++ (lib.optionals (lib.hasInfix "linux" system) (with pkgs; [ # Linux-specific packages.
28
jetbrains.idea-community-bin
29
brave
30
vscodium
31
playerctl
32
rescrobbled
33
p7zip
34
+
gimp3-with-plugins
35
+
])) ++ (lib.optionals (lib.hasInfix "darwin" system) (with pkgs; [ # Darwin-specific packages. At some point.
36
]));
37
file = {
38
".config/VSCodium/product.json".text = builtins.readFile ../files/product.json;
···
57
};
58
};
59
};
60
+
direnv = {
61
+
enable = true;
62
+
enableFishIntegration = true;
63
+
};
64
};
65
services = {
66
+
kdeconnect.enable = lib.mkIf (lib.hasInfix "linux" system) true;
67
};
68
} else null;
69
}
+49
workstation-linux.nix
+49
workstation-linux.nix
···
···
1
+
# linux-specific configuration for workstations.
2
+
{ config, lib, pkgs, pkgs-unstable, ... }:
3
+
{
4
+
imports = [ ./nonfree/_allow.nix ./nonfree/hplip.nix ]; # because i have hp bullshit
5
+
services = {
6
+
# workstations have a tendency to move one way or another
7
+
automatic-timezoned.enable = true;
8
+
9
+
# hardware support
10
+
udev.packages = [ pkgs.yubikey-personalization ];
11
+
fwupd.enable = true;
12
+
13
+
# software support
14
+
flatpak.enable = true;
15
+
16
+
# kde is comfy /shrug (praying tde shows up)
17
+
displayManager.sddm.enable = true;
18
+
desktopManager.plasma6.enable = true;
19
+
# in this house, we suck off red hat.
20
+
xserver.enable = false;
21
+
displayManager.sddm.wayland.enable = true;
22
+
23
+
# audio! yay! my tunes!
24
+
pipewire = {
25
+
enable = true;
26
+
pulse.enable = true; # enables pulseaudio emulation
27
+
};
28
+
29
+
# fucking hp oh my god
30
+
printing = {
31
+
enable = true;
32
+
};
33
+
avahi = {
34
+
enable = true;
35
+
nssmdns4 = true;
36
+
openFirewall = true;
37
+
};
38
+
};
39
+
boot.loader = {
40
+
grub.device = "nodev";
41
+
systemd-boot.enable = true;
42
+
efi.canTouchEfiVariables = true;
43
+
};
44
+
networking.networkmanager.enable = true;
45
+
swapDevices = [{
46
+
device = "/var/lib/swapfile";
47
+
size = 8*1024; # 8 GB
48
+
}];
49
+
}
+3
-53
workstation.nix
+3
-53
workstation.nix
···
1
# common configuration for workstation.nixes.
2
# (joke for 65-wide terminals ^)
3
-
{ config, lib, pkgs, pkgs-unstable, ... }:
4
{
5
isWorkstation = true;
6
-
imports = [ ./nonfree/_allow.nix ./nonfree/hplip.nix ]; # because i have hp bullshit
7
-
services = {
8
-
# workstations have a tendency to move one way or another
9
-
automatic-timezoned.enable = true;
10
-
11
-
12
-
13
-
# hardware support
14
-
udev.packages = [ pkgs.yubikey-personalization ];
15
-
fwupd.enable = true;
16
-
17
-
18
19
-
# software support
20
-
flatpak.enable = true;
21
-
22
-
# kde is comfy /shrug (praying tde shows up)
23
-
displayManager.sddm.enable = true;
24
-
desktopManager.plasma6.enable = true;
25
-
# in this house, we suck off red hat.
26
-
xserver.enable = false;
27
-
displayManager.sddm.wayland.enable = true;
28
-
29
-
# audio! yay! my tunes!
30
-
pipewire = {
31
-
enable = true;
32
-
pulse.enable = true; # enables pulseaudio emulation
33
-
};
34
-
35
-
# fucking hp oh my god
36
-
printing = {
37
-
enable = true;
38
-
};
39
-
avahi = {
40
-
enable = true;
41
-
nssmdns4 = true;
42
-
openFirewall = true;
43
-
};
44
-
};
45
-
46
-
# for better or worse, my workstations use efi.
47
-
boot.loader = {
48
-
grub.device = "nodev";
49
-
systemd-boot.enable = true;
50
-
efi.canTouchEfiVariables = true;
51
-
};
52
-
53
-
# i have a vague idea of something cool involving this
54
networking.domain = "workstations.hotsocket.fyi";
55
-
networking.networkmanager.enable = true;
56
57
home-manager = {
58
extraSpecialArgs = {
···
61
useGlobalPkgs = true;
62
useUserPackages = true;
63
};
64
-
swapDevices = [{
65
-
device = "/var/lib/swapfile";
66
-
size = 8*1024; # 8 GB
67
-
}];
68
}
···
1
# common configuration for workstation.nixes.
2
# (joke for 65-wide terminals ^)
3
+
{ config, lib, pkgs, pkgs-unstable, system, ... }:
4
{
5
isWorkstation = true;
6
7
networking.domain = "workstations.hotsocket.fyi";
8
9
home-manager = {
10
extraSpecialArgs = {
···
13
useGlobalPkgs = true;
14
useUserPackages = true;
15
};
16
+
17
+
imports = lib.optionals (lib.hasInfix "linux" system) [ ./workstation-linux.nix ];
18
}