+46
-49
flake.nix
+46
-49
flake.nix
···
86
86
# catppuccin-discord.flake = false;
87
87
};
88
88
89
-
outputs = inputs: let
90
-
lib = inputs.nixpkgs.lib.extend (_: _: builtins);
91
-
tlib = (import ./lib lib).extend (_: prev: rec {
92
-
makePkgs = system:
93
-
import ./pkgs-set {
94
-
inherit system lib inputs;
95
-
tlib = prev;
96
-
};
97
-
genPkgs = f: prev.genSystems (system: f (makePkgs system));
98
-
});
89
+
outputs =
90
+
inputs:
91
+
let
92
+
lib = inputs.nixpkgs.lib.extend (_: _: builtins);
93
+
tlib = (import ./lib lib).extend (
94
+
_: prev: rec {
95
+
makePkgs =
96
+
system:
97
+
import ./pkgs-set {
98
+
inherit system lib inputs;
99
+
tlib = prev;
100
+
};
101
+
genPkgs = f: prev.genSystems (system: f (makePkgs system));
102
+
}
103
+
);
99
104
100
-
allPkgs = tlib.genPkgs (x: x);
105
+
allPkgs = tlib.genPkgs (x: x);
101
106
102
-
miscApps =
103
-
lib.mapAttrs
104
-
(
105
-
_: cmds:
106
-
lib.mapAttrs
107
-
(_: cmd: {
108
-
type = "app";
109
-
program = cmd;
110
-
})
111
-
cmds
112
-
)
113
-
(
107
+
miscApps =
114
108
lib.mapAttrs
115
-
(
116
-
_: pkgs: {
117
-
generate-firefox-addons =
118
-
toString
119
-
"${pkgs.generate-firefox-addons}/bin/generate-firefox-addons";
120
-
dns = toString "${pkgs.dnsmngmt}/bin/dns";
121
-
nh = toString "${inputs.nh.packages.${pkgs.system}.default}/bin/nh";
122
-
}
123
-
)
124
-
allPkgs
125
-
);
126
-
in {
127
-
lib = tlib;
128
-
nixosConfigurations = import ./hosts {inherit lib tlib inputs;};
109
+
(
110
+
_: cmds:
111
+
lib.mapAttrs (_: cmd: {
112
+
type = "app";
113
+
program = cmd;
114
+
}) cmds
115
+
)
116
+
(
117
+
lib.mapAttrs (_: pkgs: {
118
+
generate-firefox-addons = toString "${pkgs.generate-firefox-addons}/bin/generate-firefox-addons";
119
+
dns = toString "${pkgs.dnsmngmt}/bin/dns";
120
+
nh = toString "${inputs.nh.packages.${pkgs.system}.default}/bin/nh";
121
+
}) allPkgs
122
+
);
123
+
in
124
+
{
125
+
lib = tlib;
126
+
nixosConfigurations = import ./hosts { inherit lib tlib inputs; };
129
127
130
-
packages = lib.mapAttrs (_: pkgs: pkgs._exported) allPkgs;
131
-
legacyPackages = allPkgs;
132
-
apps = miscApps
133
-
// (inputs.nixinate.nixinate.x86_64-linux inputs.self);
128
+
packages = lib.mapAttrs (_: pkgs: pkgs._exported) allPkgs;
129
+
legacyPackages = allPkgs;
130
+
apps = miscApps // (inputs.nixinate.nixinate.x86_64-linux inputs.self);
134
131
135
-
# topology = lib.mapAttrs (_: pkgs:
136
-
# import inputs.nixtopo {
137
-
# inherit pkgs;
138
-
# modules = [{nixosConfigurations = {inherit (inputs.self.nixosConfigurations) wolumonde;};}];
139
-
# })
140
-
# allPkgs;
132
+
# topology = lib.mapAttrs (_: pkgs:
133
+
# import inputs.nixtopo {
134
+
# inherit pkgs;
135
+
# modules = [{nixosConfigurations = {inherit (inputs.self.nixosConfigurations) wolumonde;};}];
136
+
# })
137
+
# allPkgs;
141
138
142
-
devShells = import ./shells {inherit lib tlib inputs;};
143
-
};
139
+
devShells = import ./shells { inherit lib tlib inputs; };
140
+
};
144
141
}
+14
-13
hosts/default.nix
+14
-13
hosts/default.nix
···
3
3
lib,
4
4
tlib,
5
5
...
6
-
}: let
6
+
}:
7
+
let
7
8
baseModules = [
8
9
../modules
9
10
../locale
10
11
inputs.home.nixosModules.default
11
12
];
12
13
13
-
mkSystem = name: system: let
14
-
pkgs = tlib.makePkgs system;
15
-
in
14
+
mkSystem =
15
+
name: system:
16
+
let
17
+
pkgs = tlib.makePkgs system;
18
+
in
16
19
lib.nixosSystem {
17
20
inherit system;
18
-
modules =
19
-
baseModules
20
-
++ [
21
-
{networking.hostName = name;}
22
-
{nixpkgs.pkgs = pkgs;}
23
-
(import (./. + "/${name}/default.nix"))
24
-
];
25
-
specialArgs = {inherit inputs tlib;};
21
+
modules = baseModules ++ [
22
+
{ networking.hostName = name; }
23
+
{ nixpkgs.pkgs = pkgs; }
24
+
(import (./. + "/${name}/default.nix"))
25
+
];
26
+
specialArgs = { inherit inputs tlib; };
26
27
};
27
28
28
29
systems = {
···
32
33
wsl = "x86_64-linux";
33
34
};
34
35
in
35
-
lib.mapAttrs mkSystem systems
36
+
lib.mapAttrs mkSystem systems
+53
-33
hosts/lungmen/default.nix
+53
-33
hosts/lungmen/default.nix
···
4
4
pkgs,
5
5
inputs,
6
6
...
7
-
}: let
7
+
}:
8
+
let
8
9
btrfsPartPath = "/dev/disk/by-label/NIXOS";
9
-
btrfsOptions = ["compress-force=zstd" "noatime"];
10
-
in {
11
-
imports = with inputs;
12
-
with nixos-hardware.nixosModules; [
13
-
nixpkgs.nixosModules.notDetected
14
-
nixos-persistence.nixosModule
15
-
common-pc-ssd
16
-
common-pc
17
-
common-gpu-amd
18
-
common-cpu-amd
19
-
../../modules/persist
20
-
../../modules/network
21
-
#../../modules/develop/nixbuild
22
-
../../users/root
23
-
../../users/patriot
10
+
btrfsOptions = [
11
+
"compress-force=zstd"
12
+
"noatime"
24
13
];
14
+
in
15
+
{
16
+
imports =
17
+
with inputs;
18
+
with nixos-hardware.nixosModules;
19
+
[
20
+
nixpkgs.nixosModules.notDetected
21
+
nixos-persistence.nixosModule
22
+
common-pc-ssd
23
+
common-pc
24
+
common-gpu-amd
25
+
common-cpu-amd
26
+
../../modules/persist
27
+
../../modules/network
28
+
#../../modules/develop/nixbuild
29
+
../../users/root
30
+
../../users/patriot
31
+
];
25
32
26
33
system.persistDir = "/persist";
27
34
···
33
40
systemd-boot.configurationLimit = 10;
34
41
};
35
42
kernelPackages = pkgs.linuxPackages_latest;
36
-
supportedFilesystems = ["btrfs"];
43
+
supportedFilesystems = [ "btrfs" ];
37
44
initrd = {
38
-
availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"];
39
-
kernelModules = ["amdgpu"];
45
+
availableKernelModules = [
46
+
"xhci_pci"
47
+
"ahci"
48
+
"usb_storage"
49
+
"usbhid"
50
+
"sd_mod"
51
+
];
52
+
kernelModules = [ "amdgpu" ];
40
53
};
41
-
kernelModules = ["kvm-amd"];
42
-
extraModulePackages = [];
43
-
kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;};
54
+
kernelModules = [ "kvm-amd" ];
55
+
extraModulePackages = [ ];
56
+
kernel.sysctl = {
57
+
"fs.inotify.max_user_watches" = 524288;
58
+
};
44
59
};
45
60
46
61
fileSystems."/" = {
47
62
device = "none";
48
63
fsType = "tmpfs";
49
-
options = ["defaults" "size=2G" "mode=755"];
64
+
options = [
65
+
"defaults"
66
+
"size=2G"
67
+
"mode=755"
68
+
];
50
69
};
51
70
fileSystems."/nix" = {
52
71
device = btrfsPartPath;
53
72
fsType = "btrfs";
54
-
options = ["subvol=nix"] ++ btrfsOptions;
73
+
options = [ "subvol=nix" ] ++ btrfsOptions;
55
74
};
56
75
fileSystems."${config.system.persistDir}" = {
57
76
device = btrfsPartPath;
58
77
fsType = "btrfs";
59
-
options = ["subvol=persist"] ++ btrfsOptions;
78
+
options = [ "subvol=persist" ] ++ btrfsOptions;
60
79
neededForBoot = true;
61
80
};
62
81
fileSystems."/boot" = {
···
64
83
fsType = "vfat";
65
84
};
66
85
67
-
swapDevices = [];
86
+
swapDevices = [ ];
68
87
zramSwap = {
69
88
enable = true;
70
89
algorithm = "zstd";
···
113
132
vulkan-loader
114
133
amdvlk
115
134
];
116
-
extraPackages32 = with pkgs.pkgsi686Linux;
135
+
extraPackages32 =
136
+
with pkgs.pkgsi686Linux;
117
137
[
118
138
libvdpau-va-gl
119
139
vaapiVdpau
···
133
153
fonts = {
134
154
enableDefaultFonts = true;
135
155
fontconfig.enable = true;
136
-
fonts = [pkgs.dejavu_fonts];
156
+
fonts = [ pkgs.dejavu_fonts ];
137
157
};
138
158
139
159
environment = {
140
-
systemPackages = [pkgs.ntfs3g];
141
-
pathsToLink = ["/share/zsh"];
160
+
systemPackages = [ pkgs.ntfs3g ];
161
+
pathsToLink = [ "/share/zsh" ];
142
162
persistence."${config.system.persistDir}" = {
143
-
directories = ["/etc/nixos"];
144
-
files = ["/etc/machine-id"];
163
+
directories = [ "/etc/nixos" ];
164
+
files = [ "/etc/machine-id" ];
145
165
};
146
166
};
147
167
···
156
176
autoMount = true;
157
177
};
158
178
flatpak.enable = false;
159
-
xserver.videoDrivers = ["amdgpu"];
179
+
xserver.videoDrivers = [ "amdgpu" ];
160
180
};
161
181
162
182
system.stateVersion = "22.05";
+37
-14
hosts/tkaronto/default.nix
+37
-14
hosts/tkaronto/default.nix
···
5
5
pkgs,
6
6
inputs,
7
7
...
8
-
}: {
9
-
imports = with inputs;
10
-
with nixos-hardware.nixosModules;
8
+
}:
9
+
{
10
+
imports =
11
+
with inputs;
12
+
with nixos-hardware.nixosModules;
11
13
[
12
14
# vfio.nixosModules.kvmfr
13
15
# vfio.nixosModules.virtualisation
···
66
68
support32Bit = true;
67
69
};
68
70
69
-
services.xserver.videoDrivers = ["nvidia" "amdgpu"];
71
+
services.xserver.videoDrivers = [
72
+
"nvidia"
73
+
"amdgpu"
74
+
];
70
75
hardware = {
71
76
nvidia = {
72
77
package = config.boot.kernelPackages.nvidiaPackages.production;
···
112
117
fonts = {
113
118
enableDefaultPackages = true;
114
119
fontconfig.enable = true;
115
-
packages = [pkgs.dejavu_fonts];
120
+
packages = [ pkgs.dejavu_fonts ];
116
121
};
117
122
118
123
environment = {
119
124
sessionVariables.FLAKE = "/etc/nixos";
120
-
pathsToLink = ["/share/zsh"];
125
+
pathsToLink = [ "/share/zsh" ];
121
126
persistence."${config.system.persistDir}" = {
122
127
directories = lib.flatten [
123
128
"/etc/nixos"
124
-
(
125
-
lib.optional
126
-
config.virtualisation.docker.enable
127
-
["/var/lib/docker" "/var/lib/containers"]
128
-
)
129
+
(lib.optional config.virtualisation.docker.enable [
130
+
"/var/lib/docker"
131
+
"/var/lib/containers"
132
+
])
129
133
];
130
-
files = ["/etc/machine-id"];
134
+
files = [ "/etc/machine-id" ];
131
135
};
132
136
};
133
137
134
138
# warframe
135
-
networking.firewall.allowedUDPPorts = [4990 4991 4992 4993 4994 4995];
139
+
networking.firewall.allowedUDPPorts = [
140
+
4990
141
+
4991
142
+
4992
143
+
4993
144
+
4994
145
+
4995
146
+
];
136
147
# musikcube
137
-
networking.firewall.allowedTCPPorts = [7905 7906] ++ [6695 6696 6697 6698 6699] ++ [50300];
148
+
networking.firewall.allowedTCPPorts =
149
+
[
150
+
7905
151
+
7906
152
+
]
153
+
++ [
154
+
6695
155
+
6696
156
+
6697
157
+
6698
158
+
6699
159
+
]
160
+
++ [ 50300 ];
138
161
139
162
# for tailscale
140
163
networking.firewall.checkReversePath = "loose";
+9
-6
hosts/tkaronto/modules/boot.nix
+9
-6
hosts/tkaronto/modules/boot.nix
···
1
-
{pkgs, ...}: {
1
+
{ pkgs, ... }:
2
+
{
2
3
boot = {
3
4
tmp.useTmpfs = true;
4
5
loader = {
···
7
8
systemd-boot.configurationLimit = 10;
8
9
};
9
10
kernelPackages = pkgs.linuxPackages_zen;
10
-
supportedFilesystems = ["f2fs"];
11
+
supportedFilesystems = [ "f2fs" ];
11
12
initrd = {
12
13
availableKernelModules = [
13
14
"nvme"
···
17
18
"usbhid"
18
19
"sd_mod"
19
20
];
20
-
kernelModules = ["amdgpu"];
21
+
kernelModules = [ "amdgpu" ];
22
+
};
23
+
kernelModules = [ "kvm-amd" ];
24
+
extraModulePackages = [ ];
25
+
kernel.sysctl = {
26
+
"fs.inotify.max_user_watches" = 524288;
21
27
};
22
-
kernelModules = ["kvm-amd"];
23
-
extraModulePackages = [];
24
-
kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;};
25
28
};
26
29
}
+17
-5
hosts/tkaronto/modules/fs.nix
+17
-5
hosts/tkaronto/modules/fs.nix
···
1
-
{config, ...}: let
1
+
{ config, ... }:
2
+
let
2
3
byLabel = label: "/dev/disk/by-label/${label}";
3
-
f2fsOptions = ["compress_algorithm=zstd:6" "compress_chksum" "atgc" "gc_merge" "lazytime"];
4
-
in {
4
+
f2fsOptions = [
5
+
"compress_algorithm=zstd:6"
6
+
"compress_chksum"
7
+
"atgc"
8
+
"gc_merge"
9
+
"lazytime"
10
+
];
11
+
in
12
+
{
5
13
fileSystems."/" = {
6
14
device = "none";
7
15
fsType = "tmpfs";
8
-
options = ["defaults" "size=2G" "mode=755"];
16
+
options = [
17
+
"defaults"
18
+
"size=2G"
19
+
"mode=755"
20
+
];
9
21
};
10
22
fileSystems."/nix" = {
11
23
device = byLabel "NIX";
···
23
35
fsType = "vfat";
24
36
};
25
37
26
-
swapDevices = [];
38
+
swapDevices = [ ];
27
39
zramSwap = {
28
40
enable = true;
29
41
algorithm = "zstd";
+3
-2
hosts/tkaronto/modules/iphone.nix
+3
-2
hosts/tkaronto/modules/iphone.nix
+1
-1
hosts/tkaronto/modules/secrets.nix
+1
-1
hosts/tkaronto/modules/secrets.nix
+3
-2
hosts/tkaronto/modules/wireguard.nix
+3
-2
hosts/tkaronto/modules/wireguard.nix
···
1
-
{config, ...}: {
1
+
{ config, ... }:
2
+
{
2
3
systemd.network.enable = true;
3
4
systemd.network.netdevs."wg0" = {
4
5
enable = true;
···
13
14
{
14
15
wireguardPeerConfig = {
15
16
PublicKey = builtins.readFile ./wgWolumondeKey.pub;
16
-
AllowedIPs = ["10.99.0.1/32"];
17
+
AllowedIPs = [ "10.99.0.1/32" ];
17
18
Endpoint = "${builtins.readFile ./wgWolumondeIp}:51820";
18
19
PersistentKeepalive = 25;
19
20
};
+14
-10
hosts/wolumonde/default.nix
+14
-10
hosts/wolumonde/default.nix
···
3
3
tlib,
4
4
pkgs,
5
5
...
6
-
}: {
7
-
imports =
8
-
[
9
-
inputs.agenix.nixosModules.default
10
-
# inputs.nixtopo.nixosModules.default
11
-
]
12
-
++ (tlib.importFolder (toString ./modules));
6
+
}:
7
+
{
8
+
imports = [
9
+
inputs.agenix.nixosModules.default
10
+
# inputs.nixtopo.nixosModules.default
11
+
] ++ (tlib.importFolder (toString ./modules));
13
12
14
-
environment.systemPackages = [pkgs.magic-wormhole-rs];
13
+
environment.systemPackages = [ pkgs.magic-wormhole-rs ];
15
14
16
15
boot.tmp.cleanOnBoot = true;
17
16
zramSwap.enable = true;
···
19
18
# firewall stuffs
20
19
networking.firewall = {
21
20
enable = true;
22
-
allowedTCPPorts = [22 80 443 5005];
23
-
allowedUDPPortRanges = [];
21
+
allowedTCPPorts = [
22
+
22
23
+
80
24
+
443
25
+
5005
26
+
];
27
+
allowedUDPPortRanges = [ ];
24
28
};
25
29
26
30
virtualisation.docker.enable = true;
+2
-2
hosts/wolumonde/modules/arpa.nix
+2
-2
hosts/wolumonde/modules/arpa.nix
···
1
-
{pkgs, config, ...}:
1
+
{ pkgs, config, ... }:
2
2
let
3
3
index = pkgs.writeText "index.txt" ''
4
4
hi there~
···
13
13
14
14
/dig +short TXT 9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa/
15
15
'';
16
-
root = pkgs.runCommand "root" {} ''
16
+
root = pkgs.runCommand "root" { } ''
17
17
mkdir -p $out
18
18
ln -s ${index} $out/index.txt
19
19
'';
+35
-25
hosts/wolumonde/modules/atproto.nix
+35
-25
hosts/wolumonde/modules/atproto.nix
···
1
-
{pkgs, lib, ...}: let
1
+
{ pkgs, lib, ... }:
2
+
let
2
3
mkFileCopy = name: file: "cp ${file} $out/${name}";
3
-
mkWellKnownDir = files: pkgs.runCommand "well-known" {} ''
4
-
mkdir -p $out
5
-
${lib.concatStringsSep "\n" (lib.mapAttrsToList mkFileCopy files)}
6
-
'';
4
+
mkWellKnownDir =
5
+
files:
6
+
pkgs.runCommand "well-known" { } ''
7
+
mkdir -p $out
8
+
${lib.concatStringsSep "\n" (lib.mapAttrsToList mkFileCopy files)}
9
+
'';
7
10
mkWellKnownCfg = files: {
8
11
locations."/.well-known/".extraConfig = ''
9
12
add_header content-type text/plain;
···
12
15
'';
13
16
};
14
17
mkDidWebCfg = domain: {
15
-
"${domain}" = (mkWellKnownCfg {
16
-
"did.json" = ../../../secrets/${domain}.did;
17
-
"atproto-did" = pkgs.writeText "server" "did:web:${domain}";
18
-
}) // (lib.optionalAttrs (lib.hasSuffix "gaze.systems" domain) {
19
-
useACMEHost = "gaze.systems";
20
-
forceSSL = true;
21
-
});
18
+
"${domain}" =
19
+
(mkWellKnownCfg {
20
+
"did.json" = ../../../secrets/${domain}.did;
21
+
"atproto-did" = pkgs.writeText "server" "did:web:${domain}";
22
+
})
23
+
// (lib.optionalAttrs (lib.hasSuffix "gaze.systems" domain) {
24
+
useACMEHost = "gaze.systems";
25
+
forceSSL = true;
26
+
});
22
27
};
23
-
in {
24
-
services.nginx.virtualHosts = {
25
-
"gaze.systems" = (mkWellKnownCfg {
26
-
"atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae";
27
-
}) // {
28
-
useACMEHost = "gaze.systems";
29
-
forceSSL = true;
30
-
};
31
-
# "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa" = mkWellKnownCfg {
32
-
# "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae";
33
-
# };
34
-
} // (mkDidWebCfg "dawn.gaze.systems")
35
-
// (mkDidWebCfg "guestbook.gaze.systems");
28
+
in
29
+
{
30
+
services.nginx.virtualHosts =
31
+
{
32
+
"gaze.systems" =
33
+
(mkWellKnownCfg {
34
+
"atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae";
35
+
})
36
+
// {
37
+
useACMEHost = "gaze.systems";
38
+
forceSSL = true;
39
+
};
40
+
# "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa" = mkWellKnownCfg {
41
+
# "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae";
42
+
# };
43
+
}
44
+
// (mkDidWebCfg "dawn.gaze.systems")
45
+
// (mkDidWebCfg "guestbook.gaze.systems");
36
46
# // (mkDidWebCfg "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa");
37
47
}
+7
-5
hosts/wolumonde/modules/bernbot.nix
+7
-5
hosts/wolumonde/modules/bernbot.nix
···
4
4
pkgs,
5
5
lib,
6
6
...
7
-
}: let
7
+
}:
8
+
let
8
9
bernbotPkg = inputs.bernbot.packages.${pkgs.system}.bernbot-release;
9
-
in {
10
+
in
11
+
{
10
12
systemd.services.bernbot = {
11
13
description = "bernbot";
12
-
wantedBy = ["multi-user.target"];
13
-
after = ["network.target"];
14
+
wantedBy = [ "multi-user.target" ];
15
+
after = [ "network.target" ];
14
16
serviceConfig = lib.mkMerge [
15
17
{
16
18
User = "bernbot";
···
26
28
isSystemUser = true;
27
29
group = "bernbot";
28
30
};
29
-
users.groups.bernbot = {};
31
+
users.groups.bernbot = { };
30
32
}
+10
-5
hosts/wolumonde/modules/blog.nix
+10
-5
hosts/wolumonde/modules/blog.nix
···
3
3
pkgs,
4
4
inputs,
5
5
...
6
-
}: let
6
+
}:
7
+
let
7
8
PUBLIC_BASE_URL = "https://gaze.systems";
8
9
pkg = inputs.blog.packages.${pkgs.system}.default.overrideAttrs (old: {
9
10
inherit PUBLIC_BASE_URL;
10
11
});
11
12
port = 3003;
12
-
in {
13
+
in
14
+
{
13
15
users.users.website = {
14
16
isSystemUser = true;
15
17
group = "website";
16
18
};
17
-
users.groups.website = {};
19
+
users.groups.website = { };
18
20
19
21
systemd.services.website = {
20
22
description = "website";
21
-
wantedBy = ["multi-user.target"];
22
-
after = ["network.target" "guestbook.service"];
23
+
wantedBy = [ "multi-user.target" ];
24
+
after = [
25
+
"network.target"
26
+
"guestbook.service"
27
+
];
23
28
environment = {
24
29
HOME = "/var/lib/website";
25
30
ORIGIN = PUBLIC_BASE_URL;
+2
-1
hosts/wolumonde/modules/forgejo.nix
+2
-1
hosts/wolumonde/modules/forgejo.nix
+9
-4
hosts/wolumonde/modules/hardware-configuration.nix
+9
-4
hosts/wolumonde/modules/hardware-configuration.nix
···
1
-
{modulesPath, ...}: {
2
-
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
1
+
{ modulesPath, ... }:
2
+
{
3
+
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
3
4
boot.loader.grub.device = "/dev/sda";
4
-
boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"];
5
-
boot.initrd.kernelModules = ["nvme"];
5
+
boot.initrd.availableKernelModules = [
6
+
"ata_piix"
7
+
"uhci_hcd"
8
+
"xen_blkfront"
9
+
];
10
+
boot.initrd.kernelModules = [ "nvme" ];
6
11
fileSystems."/" = {
7
12
device = "/dev/sda1";
8
13
fsType = "ext4";
+4
-2
hosts/wolumonde/modules/hedgedoc.nix
+4
-2
hosts/wolumonde/modules/hedgedoc.nix
···
1
-
{config, ...}: {
1
+
{ config, ... }:
2
+
{
2
3
services.hedgedoc = {
3
4
enable = true;
4
5
settings = {
···
18
19
forceSSL = true;
19
20
quic = true;
20
21
kTLS = true;
21
-
locations."/".proxyPass = "http://${config.services.hedgedoc.settings.host}:${toString config.services.hedgedoc.settings.port}";
22
+
locations."/".proxyPass =
23
+
"http://${config.services.hedgedoc.settings.host}:${toString config.services.hedgedoc.settings.port}";
22
24
};
23
25
}
+7
-5
hosts/wolumonde/modules/limbusart.nix
+7
-5
hosts/wolumonde/modules/limbusart.nix
···
3
3
pkgs,
4
4
lib,
5
5
...
6
-
}: let
6
+
}:
7
+
let
7
8
pkg = inputs.limbusart.packages.${pkgs.system}.default;
8
-
in {
9
+
in
10
+
{
9
11
systemd.services.limbusart = {
10
12
description = "limbusart";
11
-
wantedBy = ["multi-user.target"];
12
-
after = ["network.target"];
13
+
wantedBy = [ "multi-user.target" ];
14
+
after = [ "network.target" ];
13
15
serviceConfig = lib.mkMerge [
14
16
{
15
17
User = "limbusart";
···
31
33
isSystemUser = true;
32
34
group = "limbusart";
33
35
};
34
-
users.groups.limbusart = {};
36
+
users.groups.limbusart = { };
35
37
36
38
services.nginx.virtualHosts."pmart.gaze.systems" = {
37
39
useACMEHost = "gaze.systems";
+3
-2
hosts/wolumonde/modules/nginx.nix
+3
-2
hosts/wolumonde/modules/nginx.nix
···
1
-
{inputs, pkgs, ...}: {
1
+
{ inputs, pkgs, ... }:
2
+
{
2
3
services.nginx = {
3
4
enable = true;
4
5
package = pkgs.nginxQuic;
···
8
9
recommendedProxySettings = true;
9
10
};
10
11
11
-
users.users.nginx.extraGroups = ["acme"];
12
+
users.users.nginx.extraGroups = [ "acme" ];
12
13
13
14
security.acme = {
14
15
acceptTerms = true;
+2
-1
hosts/wolumonde/modules/nixinate.nix
+2
-1
hosts/wolumonde/modules/nixinate.nix
+10
-9
hosts/wolumonde/modules/pds.nix
+10
-9
hosts/wolumonde/modules/pds.nix
···
1
-
{ config, ... }: {
1
+
{ config, ... }:
2
+
{
2
3
services.nginx.virtualHosts.${config.services.pds.settings.PDS_HOSTNAME} = {
3
4
useACMEHost = "gaze.systems";
4
5
forceSSL = true;
···
28
29
PDS_RATE_LIMITS_ENABLED = "true";
29
30
PDS_INVITE_REQUIRED = "true";
30
31
31
-
PDS_DID_PLC_URL="https://plc.directory";
32
-
PDS_BSKY_APP_VIEW_URL="https://api.bsky.app";
33
-
PDS_BSKY_APP_VIEW_DID="did:web:api.bsky.app";
34
-
PDS_REPORT_SERVICE_URL="https://mod.bsky.app";
35
-
PDS_REPORT_SERVICE_DID="did:plc:ar7c4by46qjdydhdevvrndac";
36
-
PDS_CRAWLERS="https://bsky.network";
32
+
PDS_DID_PLC_URL = "https://plc.directory";
33
+
PDS_BSKY_APP_VIEW_URL = "https://api.bsky.app";
34
+
PDS_BSKY_APP_VIEW_DID = "did:web:api.bsky.app";
35
+
PDS_REPORT_SERVICE_URL = "https://mod.bsky.app";
36
+
PDS_REPORT_SERVICE_DID = "did:plc:ar7c4by46qjdydhdevvrndac";
37
+
PDS_CRAWLERS = "https://bsky.network";
37
38
};
38
-
environmentFiles = [config.age.secrets.pdsConfig.path];
39
+
environmentFiles = [ config.age.secrets.pdsConfig.path ];
39
40
};
40
41
41
42
# virtualisation = {
···
50
51
# autoStart = true;
51
52
# environmentFiles = [ ./pds.env config.age.secrets.pdsConfig.path ];
52
53
# ports = [ "1334:1334" ];
53
-
# volumes = [
54
+
# volumes = [
54
55
# "/var/lib/pds:/pds"
55
56
# ];
56
57
# extraOptions = [
+2
-1
hosts/wolumonde/modules/secrets.nix
+2
-1
hosts/wolumonde/modules/secrets.nix
+2
-1
hosts/wolumonde/modules/ssh.nix
+2
-1
hosts/wolumonde/modules/ssh.nix
+1
-1
hosts/wolumonde/modules/tailscale.nix
+1
-1
hosts/wolumonde/modules/tailscale.nix
+2
-1
hosts/wolumonde/modules/webhook.nix
+2
-1
hosts/wolumonde/modules/webhook.nix
+7
-3
hosts/wolumonde/modules/webhooks/deploy-wolumonde.nix
+7
-3
hosts/wolumonde/modules/webhooks/deploy-wolumonde.nix
···
1
-
{pkgs, ...}: {
1
+
{ pkgs, ... }:
2
+
{
2
3
services.webhook.hooks."deploy-wolumonde" = {
3
4
execute-command = "${pkgs.curl}/bin/curl";
4
-
pass-arguments-to-command = builtins.map (n: {source = "string"; name = n;}) ["http://higashi:9000/hooks/deploy-wolumonde"];
5
+
pass-arguments-to-command = builtins.map (n: {
6
+
source = "string";
7
+
name = n;
8
+
}) [ "http://higashi:9000/hooks/deploy-wolumonde" ];
5
9
};
6
-
}
10
+
}
+9
-10
hosts/wsl/default.nix
+9
-10
hosts/wsl/default.nix
···
5
5
pkgs,
6
6
inputs,
7
7
...
8
-
}: {
9
-
imports =
10
-
[
11
-
../../users/root
12
-
../../users/firewatch
13
-
inputs.nixos-wsl.nixosModules.wsl
14
-
inputs.agenix.nixosModules.default
15
-
]
16
-
++ (tlib.importFolder (toString ./modules));
8
+
}:
9
+
{
10
+
imports = [
11
+
../../users/root
12
+
../../users/firewatch
13
+
inputs.nixos-wsl.nixosModules.wsl
14
+
inputs.agenix.nixosModules.default
15
+
] ++ (tlib.importFolder (toString ./modules));
17
16
18
17
wsl.enable = true;
19
18
wsl.defaultUser = "firewatch";
···
22
21
23
22
networking.hostName = "wsl";
24
23
25
-
environment.systemPackages = [pkgs.wget];
24
+
environment.systemPackages = [ pkgs.wget ];
26
25
environment.sessionVariables = {
27
26
FLAKE = "/home/firewatch/ark";
28
27
};
+1
-1
hosts/wsl/modules/secrets.nix
+1
-1
hosts/wsl/modules/secrets.nix
+17
-15
lib/default.nix
+17
-15
lib/default.nix
···
3
3
defaultSystems = import ./systems.nix;
4
4
genSystems = lib.genAttrs self.defaultSystems;
5
5
6
-
pkgBin = pkg:
7
-
if (pkg.meta or {}) ? mainProgram
8
-
then "${pkg}/bin/${pkg.meta.mainProgram}"
9
-
else "${pkg}/bin/${pkg.pname}";
6
+
pkgBin =
7
+
pkg:
8
+
if (pkg.meta or { }) ? mainProgram then
9
+
"${pkg}/bin/${pkg.meta.mainProgram}"
10
+
else
11
+
"${pkg}/bin/${pkg.pname}";
10
12
11
-
prefixStrings = prefix: strings:
12
-
lib.forEach strings (string: "${prefix}${string}");
13
+
prefixStrings = prefix: strings: lib.forEach strings (string: "${prefix}${string}");
13
14
14
-
importFolder = modules: let
15
-
b = builtins;
16
-
files = b.readDir modules;
17
-
fileNames = b.attrNames files;
18
-
filesToImport =
19
-
b.map
20
-
(name: "${modules}/${name}")
21
-
(b.filter (name: b.match ".*\.nix" name != null) fileNames);
22
-
in
15
+
importFolder =
16
+
modules:
17
+
let
18
+
b = builtins;
19
+
files = b.readDir modules;
20
+
fileNames = b.attrNames files;
21
+
filesToImport = b.map (name: "${modules}/${name}") (
22
+
b.filter (name: b.match ".*\.nix" name != null) fileNames
23
+
);
24
+
in
23
25
filesToImport;
24
26
})
+6
-2
locale/default.nix
+6
-2
locale/default.nix
···
1
-
{...}: {
1
+
{ ... }:
2
+
{
2
3
i18n = {
3
4
defaultLocale = "en_US.UTF-8";
4
-
supportedLocales = ["en_US.UTF-8/UTF-8" "tr_TR.UTF-8/UTF-8"];
5
+
supportedLocales = [
6
+
"en_US.UTF-8/UTF-8"
7
+
"tr_TR.UTF-8/UTF-8"
8
+
];
5
9
};
6
10
time.timeZone = "Turkey";
7
11
services.xserver.xkb.layout = "us";
+4
-2
modules/ananicy/default.nix
+4
-2
modules/ananicy/default.nix
+56
-43
modules/base/default.nix
+56
-43
modules/base/default.nix
···
5
5
lib,
6
6
tlib,
7
7
...
8
-
}: let
8
+
}:
9
+
let
9
10
inherit (lib) fileContents mkIf;
10
11
11
12
coreBin = v: "${pkgs.coreutils}/bin/${v}";
12
13
nixBin = "${config.nix.package}/bin/nix";
13
14
pkgBin = tlib.pkgBin;
14
-
in {
15
+
in
16
+
{
15
17
imports = [
16
18
./nix.nix
17
19
./hm-system-defaults.nix
···
55
57
git
56
58
git-crypt
57
59
];
58
-
shellAliases = let
59
-
ifSudo = string: mkIf config.security.sudo.enable string;
60
-
inherit (pkgs) git bat eza du-dust;
61
-
in {
62
-
g = pkgBin git;
63
-
git-optimize = "${pkgBin git} gc --aggressive --prune=now";
64
-
cat = "${pkgBin bat} -pp --theme=base16";
65
-
c = "cat";
66
-
du = "${pkgBin du-dust}";
67
-
df = "${coreBin "df"} -h";
68
-
free = "${pkgs.procps}/bin/free -h";
69
-
ls = pkgBin eza;
70
-
l = "${pkgBin eza} -lhg";
71
-
la = "${pkgBin eza} -lhg -a";
72
-
t = "${pkgBin eza} -lhg -T";
73
-
ta = "${pkgBin eza} -lhg -a -T";
74
-
n = nixBin;
75
-
nb = "${nixBin} build";
76
-
nf = "${nixBin} flake";
77
-
nfu = "${nixBin} flake update";
78
-
nfui = "${nixBin} flake update";
79
-
nfs = "${nixBin} flake show";
80
-
nsh = "${nixBin} shell";
81
-
nix-store-refs = "nix-store -qR";
82
-
nosrs = ifSudo "sudo nixos-rebuild --fast switch";
83
-
nosrb = ifSudo "sudo nixos-rebuild --fast boot";
84
-
nosrt = ifSudo "sudo nixos-rebuild --fast test";
85
-
ngc = ifSudo "sudo nix-collect-garbage";
86
-
ngcdo = ifSudo "sudo nix-collect-garbage --delete-old";
87
-
top = "${pkgs.bottom}/bin/btm";
88
-
myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1";
89
-
mn = let
90
-
manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain";
91
-
in ''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix'';
92
-
# systemd
93
-
ctl = "systemctl";
94
-
stl = ifSudo "s systemctl";
95
-
utl = "systemctl --user";
96
-
jtl = "journalctl";
97
-
};
60
+
shellAliases =
61
+
let
62
+
ifSudo = string: mkIf config.security.sudo.enable string;
63
+
inherit (pkgs)
64
+
git
65
+
bat
66
+
eza
67
+
du-dust
68
+
;
69
+
in
70
+
{
71
+
g = pkgBin git;
72
+
git-optimize = "${pkgBin git} gc --aggressive --prune=now";
73
+
cat = "${pkgBin bat} -pp --theme=base16";
74
+
c = "cat";
75
+
du = "${pkgBin du-dust}";
76
+
df = "${coreBin "df"} -h";
77
+
free = "${pkgs.procps}/bin/free -h";
78
+
ls = pkgBin eza;
79
+
l = "${pkgBin eza} -lhg";
80
+
la = "${pkgBin eza} -lhg -a";
81
+
t = "${pkgBin eza} -lhg -T";
82
+
ta = "${pkgBin eza} -lhg -a -T";
83
+
n = nixBin;
84
+
nb = "${nixBin} build";
85
+
nf = "${nixBin} flake";
86
+
nfu = "${nixBin} flake update";
87
+
nfui = "${nixBin} flake update";
88
+
nfs = "${nixBin} flake show";
89
+
nsh = "${nixBin} shell";
90
+
nix-store-refs = "nix-store -qR";
91
+
nosrs = ifSudo "sudo nixos-rebuild --fast switch";
92
+
nosrb = ifSudo "sudo nixos-rebuild --fast boot";
93
+
nosrt = ifSudo "sudo nixos-rebuild --fast test";
94
+
ngc = ifSudo "sudo nix-collect-garbage";
95
+
ngcdo = ifSudo "sudo nix-collect-garbage --delete-old";
96
+
top = "${pkgs.bottom}/bin/btm";
97
+
myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1";
98
+
mn =
99
+
let
100
+
manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain";
101
+
in
102
+
''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix'';
103
+
# systemd
104
+
ctl = "systemctl";
105
+
stl = ifSudo "s systemctl";
106
+
utl = "systemctl --user";
107
+
jtl = "journalctl";
108
+
};
98
109
};
99
110
system.activationScripts.diff = ''
100
111
if [ -z "$systemConfig" ]; then
···
108
119
command-not-found.enable = true;
109
120
git = {
110
121
enable = true;
111
-
config = {safe.directory = ["/etc/nixos"];};
122
+
config = {
123
+
safe.directory = [ "/etc/nixos" ];
124
+
};
112
125
};
113
126
};
114
127
}
+21
-18
modules/base/hm-system-defaults.nix
+21
-18
modules/base/hm-system-defaults.nix
···
3
3
inputs,
4
4
tlib,
5
5
...
6
-
}: {
6
+
}:
7
+
{
7
8
home-manager.useGlobalPkgs = true;
8
9
home-manager.useUserPackages = true;
9
10
home-manager.sharedModules = [
···
17
18
xdg.configFile."nix/nix.conf".source = config.environment.etc."nix/nix.conf".source;
18
19
# xdg.configFile."nix/netrc".source = config.environment.etc."nix/netrc".source;
19
20
}
20
-
({
21
-
config,
22
-
pkgs,
23
-
lib,
24
-
...
25
-
}: {
26
-
home.packages = [
27
-
(
28
-
pkgs.writeShellScriptBin "apply-hm-env" ''
29
-
${lib.optionalString (config.home.sessionPath != []) ''
21
+
(
22
+
{
23
+
config,
24
+
pkgs,
25
+
lib,
26
+
...
27
+
}:
28
+
{
29
+
home.packages = [
30
+
(pkgs.writeShellScriptBin "apply-hm-env" ''
31
+
${lib.optionalString (config.home.sessionPath != [ ]) ''
30
32
export PATH=${builtins.concatStringsSep ":" config.home.sessionPath}:$PATH
31
33
''}
32
-
${builtins.concatStringsSep "\n" (lib.mapAttrsToList (k: v: ''
34
+
${builtins.concatStringsSep "\n" (
35
+
lib.mapAttrsToList (k: v: ''
33
36
export ${k}="${builtins.toString v}"
34
-
'')
35
-
config.home.sessionVariables)}
37
+
'') config.home.sessionVariables
38
+
)}
36
39
${config.home.sessionVariablesExtra}
37
40
exec "$@"
38
-
''
39
-
)
40
-
];
41
-
})
41
+
'')
42
+
];
43
+
}
44
+
)
42
45
];
43
46
home-manager.extraSpecialArgs = {
44
47
inherit inputs tlib;
+12
-8
modules/base/nix.nix
+12
-8
modules/base/nix.nix
···
3
3
lib,
4
4
inputs,
5
5
...
6
-
}: {
6
+
}:
7
+
{
7
8
nix = {
8
-
registry =
9
-
builtins.mapAttrs
10
-
(_: v: {flake = v;})
11
-
(lib.filterAttrs (_: v: v ? outputs) inputs);
9
+
registry = builtins.mapAttrs (_: v: { flake = v; }) (lib.filterAttrs (_: v: v ? outputs) inputs);
12
10
package = pkgs.lixPackageSets.latest.lix;
13
11
gc.automatic = false;
14
12
optimise.automatic = true;
···
20
18
extra-experimental-features = nix-command flakes
21
19
builders-use-substitutes = true
22
20
'';
23
-
nixPath = ["nixpkgs=${inputs.nixpkgs}" "home-manager=${inputs.home}"];
21
+
nixPath = [
22
+
"nixpkgs=${inputs.nixpkgs}"
23
+
"home-manager=${inputs.home}"
24
+
];
24
25
};
25
26
nix.settings = {
26
27
sandbox = true;
27
-
allowed-users = ["@wheel"];
28
-
trusted-users = ["root" "@wheel"];
28
+
allowed-users = [ "@wheel" ];
29
+
trusted-users = [
30
+
"root"
31
+
"@wheel"
32
+
];
29
33
auto-optimise-store = true;
30
34
};
31
35
}
+5
-3
modules/cachix/default.nix
+5
-3
modules/cachix/default.nix
···
2
2
pkgs,
3
3
lib,
4
4
...
5
-
}: let
5
+
}:
6
+
let
6
7
folder = ./.;
7
8
toImport = name: value: folder + ("/" + name);
8
9
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix";
9
10
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
10
-
in {
11
+
in
12
+
{
11
13
inherit imports;
12
-
nix.settings.substituters = ["https://cache.nixos.org/"];
14
+
nix.settings.substituters = [ "https://cache.nixos.org/" ];
13
15
}
+2
-2
modules/cachix/helix.nix
+2
-2
modules/cachix/helix.nix
···
1
1
{
2
2
nix.settings = {
3
-
substituters = ["https://helix.cachix.org"];
4
-
trusted-public-keys = ["helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="];
3
+
substituters = [ "https://helix.cachix.org" ];
4
+
trusted-public-keys = [ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ];
5
5
};
6
6
}
+2
-2
modules/cachix/nix-community.nix
+2
-2
modules/cachix/nix-community.nix
···
1
1
{
2
2
nix.settings = {
3
-
substituters = ["https://nix-community.cachix.org"];
4
-
trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
3
+
substituters = [ "https://nix-community.cachix.org" ];
4
+
trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ];
5
5
};
6
6
}
+2
-1
modules/de/budgie/default.nix
+2
-1
modules/de/budgie/default.nix
+2
-1
modules/de/gnome/default.nix
+2
-1
modules/de/gnome/default.nix
+2
-1
modules/de/greetd/default.nix
+2
-1
modules/de/greetd/default.nix
+7
-3
modules/develop/default.nix
+7
-3
modules/develop/default.nix
+8
-3
modules/develop/editor/default.nix
+8
-3
modules/develop/editor/default.nix
+8
-4
modules/develop/editor/helix.nix
+8
-4
modules/develop/editor/helix.nix
···
1
-
{pkgs, ...}: let
1
+
{ pkgs, ... }:
2
+
let
2
3
pkg = pkgs.helix;
3
4
bin = "${pkg}/bin/hx";
4
-
in {
5
-
environment.systemPackages = [pkg];
5
+
in
6
+
{
7
+
environment.systemPackages = [ pkg ];
6
8
environment.sessionVariables = {
7
9
EDITOR = bin;
8
10
VISUAL = bin;
9
11
};
10
-
environment.shellAliases = {e = bin;};
12
+
environment.shellAliases = {
13
+
e = bin;
14
+
};
11
15
}
+8
-4
modules/develop/editor/kakoune.nix
+8
-4
modules/develop/editor/kakoune.nix
···
1
-
{pkgs, ...}: let
1
+
{ pkgs, ... }:
2
+
let
2
3
pkg = pkgs.kakoune-unwrapped;
3
-
in {
4
-
environment.systemPackages = [pkg];
4
+
in
5
+
{
6
+
environment.systemPackages = [ pkg ];
5
7
environment.sessionVariables = {
6
8
EDITOR = "${pkg}/bin/kak";
7
9
VISUAL = "${pkg}/bin/kak";
8
10
};
9
-
environment.shellAliases = {k = "${pkg}/bin/kak";};
11
+
environment.shellAliases = {
12
+
k = "${pkg}/bin/kak";
13
+
};
10
14
}
+7
-3
modules/develop/nixbuild/default.nix
+7
-3
modules/develop/nixbuild/default.nix
···
1
-
{config, ...}: {
1
+
{ config, ... }:
2
+
{
2
3
programs.ssh.extraConfig = ''
3
4
Host eu.nixbuild.net
4
5
PubkeyAcceptedKeyTypes ssh-ed25519
···
7
8
8
9
programs.ssh.knownHosts = {
9
10
nixbuild = {
10
-
hostNames = ["eu.nixbuild.net"];
11
+
hostNames = [ "eu.nixbuild.net" ];
11
12
publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM";
12
13
};
13
14
};
···
19
20
hostName = "eu.nixbuild.net";
20
21
system = "x86_64-linux";
21
22
maxJobs = 100;
22
-
supportedFeatures = ["benchmark" "big-parallel"];
23
+
supportedFeatures = [
24
+
"benchmark"
25
+
"big-parallel"
26
+
];
23
27
}
24
28
];
25
29
};
+2
-1
modules/flatpak/default.nix
+2
-1
modules/flatpak/default.nix
+4
-2
modules/gamemode/default.nix
+4
-2
modules/gamemode/default.nix
···
3
3
inputs,
4
4
lib,
5
5
...
6
-
}: let
6
+
}:
7
+
let
7
8
programs = inputs.hyprland.packages.${pkgs.system}.default;
8
9
9
10
startscript = pkgs.writeShellScript "gamemode-start" ''
···
17
18
export HYPRLAND_INSTANCE_SIGNATURE=$(ls -w1 /tmp/hypr | tail -1)
18
19
hyprctl --batch 'keyword decoration:blur 1 ; keyword animations:enabled 1 ; keyword misc:no_vfr 0'
19
20
'';
20
-
in {
21
+
in
22
+
{
21
23
programs.gamemode = {
22
24
enable = true;
23
25
enableRenice = true;
+2
-1
modules/github.nix
+2
-1
modules/github.nix
+4
-3
modules/gnome-boxes/default.nix
+4
-3
modules/gnome-boxes/default.nix
+2
-1
modules/libvirtd/default.nix
+2
-1
modules/libvirtd/default.nix
+1
-1
modules/network/default.nix
+1
-1
modules/network/default.nix
+6
-2
modules/network/dns/cloudflare.nix
+6
-2
modules/network/dns/cloudflare.nix
···
1
-
{lib, ...}: {
1
+
{ lib, ... }:
2
+
{
2
3
networking.resolvconf.useLocalResolver = true;
3
4
networking.networkmanager.dns = lib.mkForce "none";
4
5
services.dnscrypt-proxy2 = {
5
6
enable = true;
6
7
settings = {
7
-
server_names = ["cloudflare" "cloudflare-ipv6"];
8
+
server_names = [
9
+
"cloudflare"
10
+
"cloudflare-ipv6"
11
+
];
8
12
};
9
13
};
10
14
}
+1
-1
modules/network/dns/default.nix
+1
-1
modules/network/dns/default.nix
+4
-1
modules/network/dns/nextdns.nix
+4
-1
modules/network/dns/nextdns.nix
+1
-1
modules/network/dns/stubby/default.nix
+1
-1
modules/network/dns/stubby/default.nix
+14
-12
modules/network/dns/stubby/nextdns.nix
+14
-12
modules/network/dns/stubby/nextdns.nix
···
1
1
{
2
2
services.stubby = {
3
3
roundRobinUpstreams = false;
4
-
upstreamServers = let
5
-
nextDnsId = "75e43d";
6
-
in ''
7
-
- address_data: 45.90.28.0
8
-
tls_auth_name: "${nextDnsId}.dns1.nextdns.io"
9
-
- address_data: 2a07:a8c0::0
10
-
tls_auth_name: "${nextDnsId}.dns1.nextdns.io"
11
-
- address_data: 45.90.30.0
12
-
tls_auth_name: "${nextDnsId}.dns2.nextdns.io"
13
-
- address_data: 2a07:a8c1::0
14
-
tls_auth_name: "${nextDnsId}.dns2.nextdns.io"
15
-
'';
4
+
upstreamServers =
5
+
let
6
+
nextDnsId = "75e43d";
7
+
in
8
+
''
9
+
- address_data: 45.90.28.0
10
+
tls_auth_name: "${nextDnsId}.dns1.nextdns.io"
11
+
- address_data: 2a07:a8c0::0
12
+
tls_auth_name: "${nextDnsId}.dns1.nextdns.io"
13
+
- address_data: 45.90.30.0
14
+
tls_auth_name: "${nextDnsId}.dns2.nextdns.io"
15
+
- address_data: 2a07:a8c1::0
16
+
tls_auth_name: "${nextDnsId}.dns2.nextdns.io"
17
+
'';
16
18
};
17
19
}
+6
-2
modules/network/iwd/default.nix
+6
-2
modules/network/iwd/default.nix
···
2
2
networking.wireless.iwd = {
3
3
enable = true;
4
4
settings = {
5
-
Network = {EnableIPv6 = true;};
6
-
Settings = {AutoConnect = true;};
5
+
Network = {
6
+
EnableIPv6 = true;
7
+
};
8
+
Settings = {
9
+
AutoConnect = true;
10
+
};
7
11
};
8
12
};
9
13
networking.networkmanager.wifi.backend = "iwd";
+7
-3
modules/network/networkmanager/default.nix
+7
-3
modules/network/networkmanager/default.nix
···
1
-
{config, ...}: {
2
-
imports = [../dns ../iwd];
1
+
{ config, ... }:
2
+
{
3
+
imports = [
4
+
../dns
5
+
../iwd
6
+
];
3
7
networking.networkmanager = {
4
8
enable = true;
5
9
wifi.powersave = true;
6
10
};
7
11
environment.persistence."${config.system.persistDir}" = {
8
-
directories = ["/etc/NetworkManager/system-connections"];
12
+
directories = [ "/etc/NetworkManager/system-connections" ];
9
13
};
10
14
}
+1
-1
modules/network/wpa_supplicant.nix
+1
-1
modules/network/wpa_supplicant.nix
+2
-1
modules/persist/default.nix
+2
-1
modules/persist/default.nix
+3
-2
modules/persist/null.nix
+3
-2
modules/persist/null.nix
+3
-2
modules/syncthing/default.nix
+3
-2
modules/syncthing/default.nix
+16
-27
pkgs-set/default.nix
+16
-27
pkgs-set/default.nix
···
4
4
lib,
5
5
tlib,
6
6
...
7
-
}: let
7
+
}:
8
+
let
8
9
l = lib;
9
-
overlays =
10
-
l.mapAttrsToList
11
-
(
12
-
name: _: let
13
-
o = import "${./.}/overlays/${name}";
14
-
in
15
-
if (l.functionArgs o) ? inputs
16
-
then o {inherit inputs;}
17
-
else o
18
-
)
19
-
(l.readDir ./overlays);
20
-
newPkgs =
21
-
l.mapAttrsToList
22
-
(
23
-
name: _: final: prev: {
24
-
${l.removeSuffix ".nix" name} =
25
-
final.callPackage
26
-
"${./pkgs}/${name}"
27
-
{inherit inputs tlib;};
28
-
}
29
-
)
30
-
(l.readDir ./pkgs);
10
+
overlays = l.mapAttrsToList (
11
+
name: _:
12
+
let
13
+
o = import "${./.}/overlays/${name}";
14
+
in
15
+
if (l.functionArgs o) ? inputs then o { inherit inputs; } else o
16
+
) (l.readDir ./overlays);
17
+
newPkgs = l.mapAttrsToList (name: _: final: prev: {
18
+
${l.removeSuffix ".nix" name} = final.callPackage "${./pkgs}/${name}" { inherit inputs tlib; };
19
+
}) (l.readDir ./pkgs);
31
20
pkgs = import inputs.nixpkgs {
32
21
inherit system;
33
22
config.allowUnfree = true;
···
37
26
};
38
27
pkgsToExport = import ./pkgs-to-export.nix pkgs;
39
28
in
40
-
pkgs
41
-
// {
42
-
_exported = pkgsToExport;
43
-
}
29
+
pkgs
30
+
// {
31
+
_exported = pkgsToExport;
32
+
}
+2
-1
pkgs-set/overlays/agenix.nix
+2
-1
pkgs-set/overlays/agenix.nix
+8
-1
pkgs-set/overlays/calf.nix
+8
-1
pkgs-set/overlays/calf.nix
···
6
6
rev = "024e9deab2d32b26e90b556d36d9c74f6b0aeb17";
7
7
sha256 = "sha256-av6quHkesND9M8vlkOQKLXK4prf+oQxOLANuNsWL+eg=";
8
8
};
9
-
nativeBuildInputs = old.nativeBuildInputs ++ (with final; [automake autoconf pkg-config libtool]);
9
+
nativeBuildInputs =
10
+
old.nativeBuildInputs
11
+
++ (with final; [
12
+
automake
13
+
autoconf
14
+
pkg-config
15
+
libtool
16
+
]);
10
17
configurePhase = ''
11
18
$SHELL autogen.sh
12
19
'';
+2
-1
pkgs-set/overlays/musikcube.nix
+2
-1
pkgs-set/overlays/musikcube.nix
+1
-1
pkgs-set/overlays/nur.nix
+1
-1
pkgs-set/overlays/nur.nix
+3
-2
pkgs-set/overlays/prismlauncher.nix
+3
-2
pkgs-set/overlays/prismlauncher.nix
···
1
-
{inputs}: final: prev: {
1
+
{ inputs }:
2
+
final: prev: {
2
3
prismlauncher = prev.prismlauncher.overrideAttrs (old: {
3
-
patches = [((toString inputs.self) + "/pkgs-set/patches/prismlauncher-offline.patch")];
4
+
patches = [ ((toString inputs.self) + "/pkgs-set/patches/prismlauncher-offline.patch") ];
4
5
});
5
6
}
+9
-9
pkgs-set/overlays/rofi-bluetooth.nix
+9
-9
pkgs-set/overlays/rofi-bluetooth.nix
···
1
1
final: prev: {
2
2
rofi-bluetooth-wayland =
3
-
(prev.rofi-bluetooth.override {rofi-unwrapped = final.rofi-wayland-unwrapped;})
4
-
.overrideAttrs (old: {
5
-
src = final.fetchFromGitHub {
6
-
owner = "nickclyde";
7
-
repo = "rofi-bluetooth";
8
-
rev = "0c07719c428984893c46f6cfe0a56660e03ccf50";
9
-
sha256 = "sha256-Er59/fMhcA7xCXn3abMeBlrYfDYsOBApeykR1r8XbNU=";
10
-
};
11
-
});
3
+
(prev.rofi-bluetooth.override { rofi-unwrapped = final.rofi-wayland-unwrapped; }).overrideAttrs
4
+
(old: {
5
+
src = final.fetchFromGitHub {
6
+
owner = "nickclyde";
7
+
repo = "rofi-bluetooth";
8
+
rev = "0c07719c428984893c46f6cfe0a56660e03ccf50";
9
+
sha256 = "sha256-Er59/fMhcA7xCXn3abMeBlrYfDYsOBApeykR1r8XbNU=";
10
+
};
11
+
});
12
12
}
+10
-2
pkgs-set/overlays/steam.nix
+10
-2
pkgs-set/overlays/steam.nix
···
1
-
{inputs}: final: prev: {
1
+
{ inputs }:
2
+
final: prev: {
2
3
steam = prev.steam.override {
3
-
extraLibraries = pkgs: with pkgs; [mimalloc pipewire vulkan-loader wayland wayland-protocols];
4
+
extraLibraries =
5
+
pkgs: with pkgs; [
6
+
mimalloc
7
+
pipewire
8
+
vulkan-loader
9
+
wayland
10
+
wayland-protocols
11
+
];
4
12
};
5
13
}
+6
-9
pkgs-set/pkgs-to-export.nix
+6
-9
pkgs-set/pkgs-to-export.nix
+6
-5
pkgs-set/pkgs/comic-mono.nix
+6
-5
pkgs-set/pkgs/comic-mono.nix
···
2
2
fetchurl,
3
3
runCommand,
4
4
...
5
-
}: let
5
+
}:
6
+
let
6
7
ttf = fetchurl {
7
8
url = "https://dtinth.github.io/comic-mono-font/ComicMono.ttf";
8
9
sha256 = "sha256-O8FCXpIqFqvw7HZ+/+TQJoQ5tMDc6YQy4H0V9drVcZY=";
9
10
};
10
11
in
11
-
runCommand "comic-mono" {} ''
12
-
mkdir -p $out/share/fonts/truetype
13
-
ln -s ${ttf} $out/share/fonts/truetype
14
-
''
12
+
runCommand "comic-mono" { } ''
13
+
mkdir -p $out/share/fonts/truetype
14
+
ln -s ${ttf} $out/share/fonts/truetype
15
+
''
+13
-12
pkgs-set/pkgs/discordo.nix
+13
-12
pkgs-set/pkgs/discordo.nix
···
2
2
buildGoModule,
3
3
fetchFromGitHub,
4
4
...
5
-
}: let
5
+
}:
6
+
let
6
7
rev = "40e2e7e6a5533c1e0bd682cb7ccadf3e5bc5eae8";
7
8
shortRev = builtins.substring 0 8 rev;
8
9
in
9
-
buildGoModule {
10
-
pname = "discordo";
11
-
version = shortRev;
10
+
buildGoModule {
11
+
pname = "discordo";
12
+
version = shortRev;
12
13
13
-
src = fetchFromGitHub {
14
-
owner = "ayntgl";
15
-
repo = "discordo";
16
-
inherit rev;
17
-
sha256 = "sha256-620PwT6RVrc3orD6Ny51kyMMdcQU5bZ1gSMJDJA7H2g=";
18
-
};
14
+
src = fetchFromGitHub {
15
+
owner = "ayntgl";
16
+
repo = "discordo";
17
+
inherit rev;
18
+
sha256 = "sha256-620PwT6RVrc3orD6Ny51kyMMdcQU5bZ1gSMJDJA7H2g=";
19
+
};
19
20
20
-
vendorSha256 = "sha256-XUoKEnLy88BAeUMZ19YS/vF1TksYroayQiyds5aQ3hI=";
21
-
}
21
+
vendorSha256 = "sha256-XUoKEnLy88BAeUMZ19YS/vF1TksYroayQiyds5aQ3hI=";
22
+
}
+17
-2
pkgs-set/pkgs/fluidsynth-dssi.nix
+17
-2
pkgs-set/pkgs/fluidsynth-dssi.nix
···
26
26
sha256 = "sha256-DJSrdxQpjvQTzio6e3p/iSYJWu+AbydyKkeKsRQA6qc=";
27
27
};
28
28
29
-
nativeBuildInputs = [autoconf automake pkg-config rpm2targz libtool];
30
-
buildInputs = [alsa-lib dssi gtk2 libjack2 ladspaH ladspaPlugins liblo fluidsynth.dev];
29
+
nativeBuildInputs = [
30
+
autoconf
31
+
automake
32
+
pkg-config
33
+
rpm2targz
34
+
libtool
35
+
];
36
+
buildInputs = [
37
+
alsa-lib
38
+
dssi
39
+
gtk2
40
+
libjack2
41
+
ladspaH
42
+
ladspaPlugins
43
+
liblo
44
+
fluidsynth.dev
45
+
];
31
46
32
47
unpackPhase = ''
33
48
rpm2targz $src
+6
-1
pkgs-set/pkgs/fractal-next.nix
+6
-1
pkgs-set/pkgs/fractal-next.nix
···
113
113
description = "Matrix group messaging app";
114
114
homepage = "https://gitlab.gnome.org/GNOME/fractal";
115
115
license = licenses.gpl3;
116
-
maintainers = teams.gnome.members ++ (with maintainers; [dtzWill genofire]);
116
+
maintainers =
117
+
teams.gnome.members
118
+
++ (with maintainers; [
119
+
dtzWill
120
+
genofire
121
+
]);
117
122
};
118
123
}
+1
-1
pkgs-set/pkgs/phantom.nix
+1
-1
pkgs-set/pkgs/phantom.nix
+31
-9
secrets/secrets.nix
+31
-9
secrets/secrets.nix
···
1
1
let
2
2
yusdacra = builtins.readFile ./yusdacra.key.pub;
3
3
wolumonde = builtins.readFile ./wolumonde.key.pub;
4
-
in {
5
-
"bernbotToken.age".publicKeys = [yusdacra wolumonde];
6
-
"musikquadConfig.age".publicKeys = [yusdacra wolumonde];
7
-
"nixGithubAccessToken.age".publicKeys = [yusdacra];
8
-
"websiteConfig.age".publicKeys = [yusdacra wolumonde];
9
-
"forgejoActRunnerToken.age".publicKeys = [yusdacra wolumonde];
10
-
"xrayConfig.age".publicKeys = [yusdacra wolumonde];
11
-
"pdsConfig.age".publicKeys = [yusdacra wolumonde];
12
-
"webhookAuth.age".publicKeys = [yusdacra wolumonde];
4
+
in
5
+
{
6
+
"bernbotToken.age".publicKeys = [
7
+
yusdacra
8
+
wolumonde
9
+
];
10
+
"musikquadConfig.age".publicKeys = [
11
+
yusdacra
12
+
wolumonde
13
+
];
14
+
"nixGithubAccessToken.age".publicKeys = [ yusdacra ];
15
+
"websiteConfig.age".publicKeys = [
16
+
yusdacra
17
+
wolumonde
18
+
];
19
+
"forgejoActRunnerToken.age".publicKeys = [
20
+
yusdacra
21
+
wolumonde
22
+
];
23
+
"xrayConfig.age".publicKeys = [
24
+
yusdacra
25
+
wolumonde
26
+
];
27
+
"pdsConfig.age".publicKeys = [
28
+
yusdacra
29
+
wolumonde
30
+
];
31
+
"webhookAuth.age".publicKeys = [
32
+
yusdacra
33
+
wolumonde
34
+
];
13
35
}
+33
-22
shells/default.nix
+33
-22
shells/default.nix
···
3
3
inputs,
4
4
...
5
5
}:
6
-
tlib.genPkgs (pkgs: let
7
-
mkNakedShell = pkgs.callPackage inputs.naked-shell {};
8
-
agenix-wrapped = pkgs.writeShellApplication {
9
-
name = "agenix";
10
-
runtimeInputs = [pkgs.agenix];
11
-
text = ''
12
-
if [ -z "''${1-}" ]; then
13
-
agenix
14
-
else
15
-
RULES="$FLAKE/secrets/secrets.nix" agenix -i "$FLAKE/ssh_key" "$@"
16
-
fi
17
-
'';
18
-
};
19
-
in {
20
-
default = mkNakedShell {
21
-
name = "prts";
22
-
packages = (with pkgs; [git nixfmt-rfc-style treefmt rage]) ++ [agenix-wrapped];
23
-
shellHook = ''
24
-
echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\"
25
-
'';
26
-
};
27
-
})
6
+
tlib.genPkgs (
7
+
pkgs:
8
+
let
9
+
mkNakedShell = pkgs.callPackage inputs.naked-shell { };
10
+
agenix-wrapped = pkgs.writeShellApplication {
11
+
name = "agenix";
12
+
runtimeInputs = [ pkgs.agenix ];
13
+
text = ''
14
+
if [ -z "''${1-}" ]; then
15
+
agenix
16
+
else
17
+
RULES="$FLAKE/secrets/secrets.nix" agenix -i "$FLAKE/ssh_key" "$@"
18
+
fi
19
+
'';
20
+
};
21
+
in
22
+
{
23
+
default = mkNakedShell {
24
+
name = "prts";
25
+
packages =
26
+
(with pkgs; [
27
+
git
28
+
nixfmt-rfc-style
29
+
treefmt
30
+
rage
31
+
])
32
+
++ [ agenix-wrapped ];
33
+
shellHook = ''
34
+
echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\"
35
+
'';
36
+
};
37
+
}
38
+
)
+1
-1
treefmt.toml
+1
-1
treefmt.toml
+65
-47
users/firewatch/default.nix
+65
-47
users/firewatch/default.nix
···
4
4
tlib,
5
5
config,
6
6
...
7
-
} @ globalAttrs: let
7
+
}@globalAttrs:
8
+
let
8
9
l = lib // builtins;
9
10
10
11
nixosConfig = globalAttrs.config;
11
12
12
13
signKeyText = builtins.readFile ../../secrets/yusdacra.key.pub;
13
-
in {
14
+
in
15
+
{
14
16
users.users.firewatch = {
15
17
isNormalUser = true;
16
18
createHome = true;
···
24
26
shell = pkgs.zsh;
25
27
hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
26
28
};
27
-
environment.shells = with pkgs; [bashInteractive zsh];
29
+
environment.shells = with pkgs; [
30
+
bashInteractive
31
+
zsh
32
+
];
28
33
programs = {
29
34
# cuz nixos complains
30
35
zsh.enable = true;
31
36
};
32
-
home-manager.users.firewatch = {
33
-
config,
34
-
pkgs,
35
-
inputs,
36
-
secrets,
37
-
...
38
-
}: let
39
-
personal = import ../../personal.nix;
40
-
name = personal.name;
41
-
email = personal.emails.primary;
42
-
in {
43
-
imports = let
44
-
modulesToEnable = l.flatten [
45
-
["zoxide" "zsh" "fzf" "starship" "direnv"]
46
-
# dev stuff
47
-
["helix" "git" "ssh"]
48
-
];
37
+
home-manager.users.firewatch =
38
+
{
39
+
config,
40
+
pkgs,
41
+
inputs,
42
+
secrets,
43
+
...
44
+
}:
45
+
let
46
+
personal = import ../../personal.nix;
47
+
name = personal.name;
48
+
email = personal.emails.primary;
49
49
in
50
-
l.flatten [
51
-
../../modules/persist/null.nix
52
-
(tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable)
53
-
];
50
+
{
51
+
imports =
52
+
let
53
+
modulesToEnable = l.flatten [
54
+
[
55
+
"zoxide"
56
+
"zsh"
57
+
"fzf"
58
+
"starship"
59
+
"direnv"
60
+
]
61
+
# dev stuff
62
+
[
63
+
"helix"
64
+
"git"
65
+
"ssh"
66
+
]
67
+
];
68
+
in
69
+
l.flatten [
70
+
../../modules/persist/null.nix
71
+
(tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable)
72
+
];
54
73
55
-
settings.enable = false;
74
+
settings.enable = false;
56
75
57
-
home = {
58
-
homeDirectory = nixosConfig.users.users.firewatch.home;
59
-
packages = with pkgs; [
60
-
# Programs
61
-
nix-output-monitor
62
-
inputs.nh.packages.${pkgs.system}.default
63
-
];
64
-
file.".ssh/authorized_keys".text = ''
65
-
${signKeyText}
66
-
'';
67
-
};
76
+
home = {
77
+
homeDirectory = nixosConfig.users.users.firewatch.home;
78
+
packages = with pkgs; [
79
+
# Programs
80
+
nix-output-monitor
81
+
inputs.nh.packages.${pkgs.system}.default
82
+
];
83
+
file.".ssh/authorized_keys".text = ''
84
+
${signKeyText}
85
+
'';
86
+
};
68
87
69
-
programs = {
70
-
command-not-found.enable =
71
-
nixosConfig.programs.command-not-found.enable;
72
-
git = {
73
-
userName = name;
74
-
userEmail = email;
75
-
extraConfig = {
76
-
gpg.format = "ssh";
77
-
commit.gpgsign = true;
78
-
user.signingkey = signKeyText;
88
+
programs = {
89
+
command-not-found.enable = nixosConfig.programs.command-not-found.enable;
90
+
git = {
91
+
userName = name;
92
+
userEmail = email;
93
+
extraConfig = {
94
+
gpg.format = "ssh";
95
+
commit.gpgsign = true;
96
+
user.signingkey = signKeyText;
97
+
};
79
98
};
80
99
};
81
100
};
82
-
};
83
101
}
+3
-2
users/modules/arrpc/default.nix
+3
-2
users/modules/arrpc/default.nix
+2
-1
users/modules/chromium/default.nix
+2
-1
users/modules/chromium/default.nix
+2
-1
users/modules/code/default.nix
+2
-1
users/modules/code/default.nix
+29
-26
users/modules/discord/default.nix
+29
-26
users/modules/discord/default.nix
···
4
4
pkgs,
5
5
lib,
6
6
...
7
-
}: {
7
+
}:
8
+
{
8
9
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
9
10
".config/ArmCord"
10
11
];
11
-
home.packages = let
12
-
flags = [
13
-
# "--flag-switches-begin"
14
-
# "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
15
-
# "--flag-switches-end"
16
-
# "--ozone-platform=wayland"
17
-
# "--enable-webrtc-pipewire-capturer"
18
-
# "--disable-gpu-memory-buffer-video-frames"
19
-
# "--enable-accelerated-mjpeg-decode"
20
-
# "--enable-accelerated-video"
21
-
# "--enable-gpu-rasterization"
22
-
# "--enable-native-gpu-memory-buffers"
23
-
# "--enable-zero-copy"
24
-
# "--ignore-gpu-blocklist"
25
-
];
26
-
pkg =
27
-
(pkgs.armcord.override {
28
-
nss = pkgs.nss_latest;
29
-
})
30
-
.overrideAttrs (old: {
31
-
# preInstall = ''
32
-
# gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}")
33
-
# '';
34
-
});
35
-
in [pkg];
12
+
home.packages =
13
+
let
14
+
flags = [
15
+
# "--flag-switches-begin"
16
+
# "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer"
17
+
# "--flag-switches-end"
18
+
# "--ozone-platform=wayland"
19
+
# "--enable-webrtc-pipewire-capturer"
20
+
# "--disable-gpu-memory-buffer-video-frames"
21
+
# "--enable-accelerated-mjpeg-decode"
22
+
# "--enable-accelerated-video"
23
+
# "--enable-gpu-rasterization"
24
+
# "--enable-native-gpu-memory-buffers"
25
+
# "--enable-zero-copy"
26
+
# "--ignore-gpu-blocklist"
27
+
];
28
+
pkg =
29
+
(pkgs.armcord.override {
30
+
nss = pkgs.nss_latest;
31
+
}).overrideAttrs
32
+
(old: {
33
+
# preInstall = ''
34
+
# gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}")
35
+
# '';
36
+
});
37
+
in
38
+
[ pkg ];
36
39
}
+3
-2
users/modules/discordrp-mpris/default.nix
+3
-2
users/modules/discordrp-mpris/default.nix
+5
-2
users/modules/dunst/default.nix
+5
-2
users/modules/dunst/default.nix
···
1
-
{config, ...}: {
1
+
{ config, ... }:
2
+
{
2
3
# notification daemon
3
4
services.dunst = {
4
5
enable = true;
···
27
28
word_wrap = "yes";
28
29
};
29
30
30
-
fullscreen_delay_everything = {fullscreen = "delay";};
31
+
fullscreen_delay_everything = {
32
+
fullscreen = "delay";
33
+
};
31
34
};
32
35
};
33
36
}
+8
-6
users/modules/firefox/default.nix
+8
-6
users/modules/firefox/default.nix
···
2
2
pkgs,
3
3
config,
4
4
...
5
-
}: {
5
+
}:
6
+
{
6
7
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
7
8
".mozilla"
8
9
".floorp"
9
10
];
10
-
home.packages = [(pkgs.lib.hiPrio pkgs.floorp)];
11
+
home.packages = [ (pkgs.lib.hiPrio pkgs.floorp) ];
11
12
programs.firefox = {
12
13
enable = true;
13
14
package = pkgs.firefox.override {
···
54
55
id = 1;
55
56
isDefault = true;
56
57
name = "personal";
57
-
extensions = with pkgs.nur.repos.rycee.firefox-addons; let
58
-
myExtensions =
59
-
pkgs.callPackage ./extensions.nix {inherit buildFirefoxXpiAddon;};
60
-
in
58
+
extensions =
59
+
with pkgs.nur.repos.rycee.firefox-addons;
60
+
let
61
+
myExtensions = pkgs.callPackage ./extensions.nix { inherit buildFirefoxXpiAddon; };
62
+
in
61
63
[
62
64
ublock-origin
63
65
darkreader
+3
-2
users/modules/firefox/extensions.nix
+3
-2
users/modules/firefox/extensions.nix
···
3
3
fetchurl,
4
4
lib,
5
5
stdenv,
6
-
}: {
6
+
}:
7
+
{
7
8
"better-clean-twitter" = buildFirefoxXpiAddon {
8
9
pname = "better-clean-twitter";
9
10
version = "1.3.2";
···
53
54
meta = with lib; {
54
55
description = "Firefox theme based on <a href=\"https://prod.outgoing.prod.webservices.mozgcp.net/v1/110954a3f2718cf03892676379416caed51099b639f643aaf12989b7e698f073/https%3A//github.com/catppuccin/catppuccin\" rel=\"nofollow\">https://github.com/catppuccin/catppuccin</a>";
55
56
license = licenses.cc-by-30;
56
-
mozPermissions = [];
57
+
mozPermissions = [ ];
57
58
platforms = platforms.all;
58
59
};
59
60
};
+2
-1
users/modules/fluxbox/default.nix
+2
-1
users/modules/fluxbox/default.nix
+2
-1
users/modules/foot/default.nix
+2
-1
users/modules/foot/default.nix
+2
-1
users/modules/fzf/default.nix
+2
-1
users/modules/fzf/default.nix
···
1
-
{config, ...}: {
1
+
{ config, ... }:
2
+
{
2
3
programs.fzf.enable = true;
3
4
# home.sessionVariables = {
4
5
# FZF_DEFAULT_OPTS = "--color=spinner:#F8BD96,hl:#F28FAD --color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96 --color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD";
+2
-1
users/modules/git/default.nix
+2
-1
users/modules/git/default.nix
+3
-2
users/modules/godot/default.nix
+3
-2
users/modules/godot/default.nix
+25
-6
users/modules/helix/default.nix
+25
-6
users/modules/helix/default.nix
···
2
2
inputs,
3
3
pkgs,
4
4
...
5
-
}: {
5
+
}:
6
+
{
6
7
stylix.targets.helix.enable = false;
7
8
programs.helix = {
8
9
enable = true;
9
10
languages.language = [
10
11
{
11
12
name = "dockerfile";
12
-
roots = ["Dockerfile" "Containerfile"];
13
-
file-types = ["Dockerfile" "Containerfile" "dockerfile" "containerfile"];
13
+
roots = [
14
+
"Dockerfile"
15
+
"Containerfile"
16
+
];
17
+
file-types = [
18
+
"Dockerfile"
19
+
"Containerfile"
20
+
"dockerfile"
21
+
"containerfile"
22
+
];
14
23
}
15
24
];
16
25
settings = {
···
38
47
"<" = ">";
39
48
};
40
49
statusline = {
41
-
left = ["mode" "spinner"];
42
-
center = ["file-name" "file-encoding" "version-control"];
43
-
right = ["diagnostics" "selections"];
50
+
left = [
51
+
"mode"
52
+
"spinner"
53
+
];
54
+
center = [
55
+
"file-name"
56
+
"file-encoding"
57
+
"version-control"
58
+
];
59
+
right = [
60
+
"diagnostics"
61
+
"selections"
62
+
];
44
63
};
45
64
};
46
65
};
+18
-11
users/modules/hyprland/config.nix
+18
-11
users/modules/hyprland/config.nix
···
2
2
config,
3
3
pkgs,
4
4
...
5
-
}: let
6
-
run-as-service = slice:
5
+
}:
6
+
let
7
+
run-as-service =
8
+
slice:
7
9
pkgs.writeShellScript "as-systemd-transient" ''
8
10
exec ${pkgs.systemd}/bin/systemd-run \
9
11
--slice=app-${slice}.slice \
···
15
17
launcher = "rofi";
16
18
launcherCmd = "${launcher} -show drun";
17
19
term = config.settings.terminal.name;
18
-
in {
20
+
in
21
+
{
19
22
wayland.windowManager.hyprland.extraConfig = ''
20
23
# should be configured per-profile
21
24
monitor=eDP-1,preferred,0x0,1.6
···
130
133
bind=SUPERSHIFT,braceright,focusmonitor,r
131
134
132
135
# workspaces
133
-
${builtins.concatStringsSep "\n" (builtins.genList (
134
-
x: let
135
-
ws = let
136
-
c = (x + 1) / 10;
137
-
in
136
+
${builtins.concatStringsSep "\n" (
137
+
builtins.genList (
138
+
x:
139
+
let
140
+
ws =
141
+
let
142
+
c = (x + 1) / 10;
143
+
in
138
144
builtins.toString (x + 1 - (c * 10));
139
-
in ''
145
+
in
146
+
''
140
147
bind=SUPER,${ws},workspace,${toString (x + 1)}
141
148
bind=SHIFTSUPER,${ws},movetoworkspacesilent,${toString (x + 1)}
142
149
''
143
-
)
144
-
10)}
150
+
) 10
151
+
)}
145
152
146
153
# screenshot
147
154
bind=,Print,exec,grimblast --notify copysave area
+2
-1
users/modules/hyprland/default.nix
+2
-1
users/modules/hyprland/default.nix
+7
-3
users/modules/hyprland/swayidle.nix
+7
-3
users/modules/hyprland/swayidle.nix
···
2
2
pkgs,
3
3
lib,
4
4
...
5
-
}: {
6
-
home.packages = with pkgs; [wlopm swayidle];
5
+
}:
6
+
{
7
+
home.packages = with pkgs; [
8
+
wlopm
9
+
swayidle
10
+
];
7
11
services.swayidle = {
8
12
enable = true;
9
13
events = [
···
28
32
}
29
33
];
30
34
};
31
-
systemd.user.services.swayidle.Install.WantedBy = lib.mkForce ["hyprland-session.target"];
35
+
systemd.user.services.swayidle.Install.WantedBy = lib.mkForce [ "hyprland-session.target" ];
32
36
}
+6
-3
users/modules/lollypop/default.nix
+6
-3
users/modules/lollypop/default.nix
···
2
2
config,
3
3
pkgs,
4
4
...
5
-
}: {
6
-
home.packages = [pkgs.lollypop];
7
-
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [".local/share/lollypop"];
5
+
}:
6
+
{
7
+
home.packages = [ pkgs.lollypop ];
8
+
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
9
+
".local/share/lollypop"
10
+
];
8
11
}
+2
-1
users/modules/mako/default.nix
+2
-1
users/modules/mako/default.nix
+9
-5
users/modules/musikcube/default.nix
+9
-5
users/modules/musikcube/default.nix
···
3
3
pkgs,
4
4
lib,
5
5
...
6
-
}: let
6
+
}:
7
+
let
7
8
cfg = config.programs.musikcube;
8
-
in {
9
+
in
10
+
{
9
11
options = {
10
12
programs.musikcube = {
11
13
enable = lib.mkEnableOption "whether to enable musikcube";
···
14
16
default = pkgs.musikcube;
15
17
};
16
18
settings = lib.mkOption {
17
-
type = (pkgs.formats.json {}).type;
19
+
type = (pkgs.formats.json { }).type;
18
20
default = builtins.fromJSON (builtins.readFile ./default-config.json);
19
21
};
20
22
};
21
23
};
22
24
23
25
config = lib.mkIf cfg.enable {
24
-
home.packages = [cfg.package];
25
-
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [".config/musikcube"];
26
+
home.packages = [ cfg.package ];
27
+
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
28
+
".config/musikcube"
29
+
];
26
30
xdg.configFile."musikcube/settings.json".text = builtins.toJSON cfg.settings;
27
31
};
28
32
}
+8
-5
users/modules/musikcubed/default.nix
+8
-5
users/modules/musikcubed/default.nix
···
3
3
lib,
4
4
pkgs,
5
5
...
6
-
}: let
6
+
}:
7
+
let
7
8
cfg = config.services.musikcubed;
8
-
in {
9
+
in
10
+
{
9
11
options = {
10
12
services.musikcubed = {
11
13
enable = lib.mkEnableOption "whether to enable musikcubed";
···
14
16
default = pkgs.musikcube;
15
17
};
16
18
settings = lib.mkOption {
17
-
type = (pkgs.formats.json {}).type;
19
+
type = (pkgs.formats.json { }).type;
18
20
default = builtins.fromJSON (builtins.readFile ./default-config.json);
19
21
};
20
22
};
···
22
24
config = lib.mkIf cfg.enable {
23
25
systemd.user.services.musikcubed = {
24
26
Install = {
25
-
WantedBy = ["default.target"];
27
+
WantedBy = [ "default.target" ];
26
28
};
27
29
Unit = {
28
30
Description = "musikcubed";
···
34
36
RestartSec = 5;
35
37
};
36
38
};
37
-
xdg.configFile."musikcube/plugin_musikcubeserver(wss,http).json".text = builtins.toJSON cfg.settings;
39
+
xdg.configFile."musikcube/plugin_musikcubeserver(wss,http).json".text =
40
+
builtins.toJSON cfg.settings;
38
41
};
39
42
}
+3
-2
users/modules/newsflash/default.nix
+3
-2
users/modules/newsflash/default.nix
+6
-3
users/modules/obsidian/default.nix
+6
-3
users/modules/obsidian/default.nix
···
3
3
config,
4
4
lib,
5
5
...
6
-
}: {
7
-
home.packages = [pkgs.obsidian];
8
-
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [".config/obsidian"];
6
+
}:
7
+
{
8
+
home.packages = [ pkgs.obsidian ];
9
+
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
10
+
".config/obsidian"
11
+
];
9
12
}
+3
-2
users/modules/premid/default.nix
+3
-2
users/modules/premid/default.nix
+8
-3
users/modules/psd/default.nix
+8
-3
users/modules/psd/default.nix
···
1
-
username: {pkgs, ...}: {
1
+
username:
2
+
{ pkgs, ... }:
3
+
{
2
4
services.psd.enable = true;
3
5
4
6
security.sudo.extraRules = [
5
7
{
6
-
users = [username];
8
+
users = [ username ];
7
9
commands = [
8
10
{
9
11
command = "${pkgs.profile-sync-daemon}/bin/psd-overlay-helper";
10
-
options = ["SETENV" "NOPASSWD"];
12
+
options = [
13
+
"SETENV"
14
+
"NOPASSWD"
15
+
];
11
16
}
12
17
];
13
18
}
+3
-2
users/modules/ripcord/default.nix
+3
-2
users/modules/ripcord/default.nix
+6
-4
users/modules/rofi-nm/default.nix
+6
-4
users/modules/rofi-nm/default.nix
···
3
3
pkgs,
4
4
lib,
5
5
...
6
-
}: let
6
+
}:
7
+
let
7
8
rofi-nm = pkgs.fetchurl {
8
9
url = "https://raw.githubusercontent.com/P3rf/rofi-network-manager/1daa69406c9b6539a4744eafb0d5bb8afdc80e9b/rofi-network-manager.sh";
9
10
hash = "sha256:1nlnjmk5b743j5826z2nzfvjwk0fmbf7gk38darby93kdr3nv5zx";
···
11
12
package = pkgs.writeShellScriptBin "rofi-nm" ''
12
13
${config.home.homeDirectory}/.config/rofi-nm/rofi-nm.sh
13
14
'';
14
-
in {
15
+
in
16
+
{
15
17
options = {
16
18
programs.rofi-nm.package = lib.mkOption {
17
19
type = lib.types.package;
···
20
22
config = {
21
23
programs.rofi-nm.package = package;
22
24
23
-
home.packages = [package];
25
+
home.packages = [ package ];
24
26
25
27
xdg.configFile = {
26
28
"rofi-nm/rofi-nm.sh" = {
27
-
source = pkgs.runCommandLocal "rofi-nm" {} ''
29
+
source = pkgs.runCommandLocal "rofi-nm" { } ''
28
30
cp --no-preserve=mode,ownership ${rofi-nm} rofi-nm.sh
29
31
substituteInPlace rofi-nm.sh \
30
32
--replace "#!/bin/bash" "#!${pkgs.stdenv.shell}" \
+2
-1
users/modules/rofi/default.nix
+2
-1
users/modules/rofi/default.nix
+3
-2
users/modules/s3s/default.nix
+3
-2
users/modules/s3s/default.nix
+4
-2
users/modules/settings/default.nix
+4
-2
users/modules/settings/default.nix
+5
-3
users/modules/smos/default.nix
+5
-3
users/modules/smos/default.nix
···
3
3
inputs,
4
4
secrets,
5
5
...
6
-
}: let
6
+
}:
7
+
let
7
8
smosDir = "${config.home.homeDirectory}/smos";
8
-
in {
9
-
imports = ["${inputs.smos}/nix/home-manager-module.nix"];
9
+
in
10
+
{
11
+
imports = [ "${inputs.smos}/nix/home-manager-module.nix" ];
10
12
programs.smos = {
11
13
enable = true;
12
14
notify.enable = true;
+3
-2
users/modules/spotify/default.nix
+3
-2
users/modules/spotify/default.nix
···
2
2
config,
3
3
pkgs,
4
4
...
5
-
}: {
5
+
}:
6
+
{
6
7
services.spotifyd = {
7
8
enable = true;
8
9
settings = {
9
10
device_name = "nix";
10
11
};
11
12
};
12
-
home.packages = [pkgs.spotify-tui];
13
+
home.packages = [ pkgs.spotify-tui ];
13
14
home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [
14
15
".config/spotify-tui"
15
16
];
+2
-1
users/modules/ssh/default.nix
+2
-1
users/modules/ssh/default.nix
+2
-1
users/modules/starship/default.nix
+2
-1
users/modules/starship/default.nix
+101
-95
users/modules/sway/default.nix
+101
-95
users/modules/sway/default.nix
···
5
5
lib,
6
6
tlib,
7
7
...
8
-
}: {
8
+
}:
9
+
{
9
10
imports = [
10
11
../wayland
11
12
../swaylock
···
15
16
# ./swayidle.nix
16
17
];
17
18
wayland.windowManager = {
18
-
sway = let
19
-
mkRofiCmd = args: "${config.programs.rofi.package}/bin/rofi ${lib.concatStringsSep " " args} | ${pkgs.sway}/bin/swaymsg --";
20
-
inherit (tlib) pkgBin;
21
-
in {
22
-
enable = true;
23
-
extraSessionCommands = ''
24
-
export QT_QPA_PLATFORM=wayland
25
-
'';
26
-
wrapperFeatures.gtk = true;
27
-
extraConfig = ''
28
-
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
29
-
exec xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
30
-
'';
31
-
config = {
32
-
bars = [];
33
-
gaps.smartBorders = "on";
34
-
menu = mkRofiCmd [
35
-
"-show"
36
-
"drun"
37
-
];
38
-
modifier = "Mod4";
39
-
terminal = config.settings.terminal.binary;
40
-
keybindings = let
41
-
mod = config.wayland.windowManager.sway.config.modifier;
19
+
sway =
20
+
let
21
+
mkRofiCmd =
22
+
args:
23
+
"${config.programs.rofi.package}/bin/rofi ${lib.concatStringsSep " " args} | ${pkgs.sway}/bin/swaymsg --";
24
+
inherit (tlib) pkgBin;
25
+
in
26
+
{
27
+
enable = true;
28
+
extraSessionCommands = ''
29
+
export QT_QPA_PLATFORM=wayland
30
+
'';
31
+
wrapperFeatures.gtk = true;
32
+
extraConfig = ''
33
+
exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
34
+
exec xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2
35
+
'';
36
+
config = {
37
+
bars = [ ];
38
+
gaps.smartBorders = "on";
39
+
menu = mkRofiCmd [
40
+
"-show"
41
+
"drun"
42
+
];
43
+
modifier = "Mod4";
44
+
terminal = config.settings.terminal.binary;
45
+
keybindings =
46
+
let
47
+
mod = config.wayland.windowManager.sway.config.modifier;
42
48
43
-
cat = pkgs.coreutils + "/bin/cat";
44
-
grim = pkgBin pkgs.grim;
45
-
slurp = pkgBin pkgs.slurp;
46
-
pactl = pkgs.pulseaudio + "/bin/pactl";
47
-
playerctl = pkgBin pkgs.playerctl;
48
-
wf-recorder = pkgBin pkgs.wf-recorder;
49
-
wl-copy = pkgs.wl-clipboard + "/bin/wl-copy";
50
-
wlogout = pkgBin pkgs.wlogout;
51
-
light = pkgBin pkgs.light;
49
+
cat = pkgs.coreutils + "/bin/cat";
50
+
grim = pkgBin pkgs.grim;
51
+
slurp = pkgBin pkgs.slurp;
52
+
pactl = pkgs.pulseaudio + "/bin/pactl";
53
+
playerctl = pkgBin pkgs.playerctl;
54
+
wf-recorder = pkgBin pkgs.wf-recorder;
55
+
wl-copy = pkgs.wl-clipboard + "/bin/wl-copy";
56
+
wlogout = pkgBin pkgs.wlogout;
57
+
light = pkgBin pkgs.light;
52
58
53
-
shotFile = config.home.homeDirectory + "/shots/shot_$(date '+%Y_%m_%d_%H_%M')";
54
-
shotDir = config.home.homeDirectory + "/shots";
55
-
in
56
-
lib.mkOptionDefault
57
-
{
58
-
"${mod}+Escape" = "exec ${wlogout} -p layer-shell";
59
-
"${mod}+q" = "kill";
60
-
"${mod}+Shift+e" = "exit";
61
-
"${mod}+Shift+r" = "reload";
62
-
# Screenshot and copy it to clipboard
63
-
"Mod1+s" = ''
64
-
exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
65
-
'';
66
-
# Save selected area as a picture and copy it to clipboard
67
-
"Mod1+Shift+s" = ''
68
-
exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} -g "$(${slurp})" "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
69
-
'';
70
-
# Record screen
71
-
"Mod1+r" = ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -f "${shotFile}.mp4"'';
72
-
# Record an area
73
-
"Mod1+Shift+r" = ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -g "$(${slurp})" -f "${shotFile}.mp4"'';
74
-
# Stop recording
75
-
"Mod1+c" = "exec pkill -INT wf-recorder";
76
-
"XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume 0 +5%";
77
-
"XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume 0 -5%";
78
-
"XF86AudioMute" = "exec ${pactl} set-sink-mute 0 toggle";
79
-
"XF86AudioPlay" = "exec ${playerctl} play-pause";
80
-
"XF86AudioPrev" = "exec ${playerctl} previous";
81
-
"XF86AudioNext" = "exec ${playerctl} next";
82
-
"XF86AudioStop" = "exec ${playerctl} stop";
83
-
"XF86MonBrightnessUp" = "exec ${light} -T 1.4";
84
-
"XF86MonBrightnessDown" = "exec ${light} -T 0.72";
85
-
};
86
-
input = {
87
-
"13364:832:Keychron_Keychron_V4_Keyboard" = {
88
-
xkb_layout = nixosConfig.services.xserver.layout;
89
-
};
90
-
"1:1:AT_Translated_Set_2_keyboard" = {
91
-
xkb_layout = "tr";
92
-
};
93
-
"type:pointer" = {
94
-
accel_profile = "flat";
95
-
};
96
-
"type:touchpad" = {
97
-
accel_profile = "adaptive";
98
-
tap = "enabled";
99
-
scroll_method = "two_finger";
100
-
dwt = "enabled";
101
-
events = "disabled_on_external_mouse";
102
-
};
103
-
};
104
-
output = {
105
-
"*" = {
106
-
bg = "${config.stylix.image} fill";
107
-
};
108
-
"eDP-1" = {
109
-
scale = "2";
110
-
adaptive_sync = "on";
59
+
shotFile = config.home.homeDirectory + "/shots/shot_$(date '+%Y_%m_%d_%H_%M')";
60
+
shotDir = config.home.homeDirectory + "/shots";
61
+
in
62
+
lib.mkOptionDefault {
63
+
"${mod}+Escape" = "exec ${wlogout} -p layer-shell";
64
+
"${mod}+q" = "kill";
65
+
"${mod}+Shift+e" = "exit";
66
+
"${mod}+Shift+r" = "reload";
67
+
# Screenshot and copy it to clipboard
68
+
"Mod1+s" = ''
69
+
exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
70
+
'';
71
+
# Save selected area as a picture and copy it to clipboard
72
+
"Mod1+Shift+s" = ''
73
+
exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} -g "$(${slurp})" "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png
74
+
'';
75
+
# Record screen
76
+
"Mod1+r" = ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -f "${shotFile}.mp4"'';
77
+
# Record an area
78
+
"Mod1+Shift+r" =
79
+
''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -g "$(${slurp})" -f "${shotFile}.mp4"'';
80
+
# Stop recording
81
+
"Mod1+c" = "exec pkill -INT wf-recorder";
82
+
"XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume 0 +5%";
83
+
"XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume 0 -5%";
84
+
"XF86AudioMute" = "exec ${pactl} set-sink-mute 0 toggle";
85
+
"XF86AudioPlay" = "exec ${playerctl} play-pause";
86
+
"XF86AudioPrev" = "exec ${playerctl} previous";
87
+
"XF86AudioNext" = "exec ${playerctl} next";
88
+
"XF86AudioStop" = "exec ${playerctl} stop";
89
+
"XF86MonBrightnessUp" = "exec ${light} -T 1.4";
90
+
"XF86MonBrightnessDown" = "exec ${light} -T 0.72";
91
+
};
92
+
input = {
93
+
"13364:832:Keychron_Keychron_V4_Keyboard" = {
94
+
xkb_layout = nixosConfig.services.xserver.layout;
95
+
};
96
+
"1:1:AT_Translated_Set_2_keyboard" = {
97
+
xkb_layout = "tr";
98
+
};
99
+
"type:pointer" = {
100
+
accel_profile = "flat";
101
+
};
102
+
"type:touchpad" = {
103
+
accel_profile = "adaptive";
104
+
tap = "enabled";
105
+
scroll_method = "two_finger";
106
+
dwt = "enabled";
107
+
events = "disabled_on_external_mouse";
108
+
};
111
109
};
112
-
"HDMI-A-1" = {
113
-
mode = "1920x1080@74.973Hz";
110
+
output = {
111
+
"*" = {
112
+
bg = "${config.stylix.image} fill";
113
+
};
114
+
"eDP-1" = {
115
+
scale = "2";
116
+
adaptive_sync = "on";
117
+
};
118
+
"HDMI-A-1" = {
119
+
mode = "1920x1080@74.973Hz";
120
+
};
114
121
};
115
122
};
116
123
};
117
-
};
118
124
};
119
125
}
+2
-1
users/modules/swaylock/default.nix
+2
-1
users/modules/swaylock/default.nix
+2
-1
users/modules/urxvt/default.nix
+2
-1
users/modules/urxvt/default.nix
+3
-2
users/modules/vesktop/default.nix
+3
-2
users/modules/vesktop/default.nix
+2
-1
users/modules/wayland/default.nix
+2
-1
users/modules/wayland/default.nix
+3
-2
users/modules/wezterm/default.nix
+3
-2
users/modules/wezterm/default.nix
+4
-2
users/modules/wlsunset/default.nix
+4
-2
users/modules/wlsunset/default.nix
+4
-1
users/modules/wtf/default.nix
+4
-1
users/modules/wtf/default.nix
+3
-2
users/modules/zoxide/default.nix
+3
-2
users/modules/zoxide/default.nix
+16
-8
users/modules/zsh/default.nix
+16
-8
users/modules/zsh/default.nix
···
4
4
lib,
5
5
pkgs,
6
6
...
7
-
}: let
7
+
}:
8
+
let
8
9
pkgBin = tlib.pkgBin;
9
-
in {
10
+
in
11
+
{
10
12
programs.zsh = {
11
13
enable = true;
12
14
autocd = true;
···
27
29
# configure history
28
30
history = {
29
31
extended = true;
30
-
ignorePatterns = ["rm *" "mv *" "l" "ls" "ll" "g s" "git status"];
32
+
ignorePatterns = [
33
+
"rm *"
34
+
"mv *"
35
+
"l"
36
+
"ls"
37
+
"ll"
38
+
"g s"
39
+
"git status"
40
+
];
31
41
save = 1000000;
32
42
size = 1000000;
33
43
};
···
36
46
history.path = "${config.home.homeDirectory}/.local/share/zsh/history";
37
47
# extra stuff for fixing gpg-agent ssh and some random commands
38
48
initExtra = ''
39
-
${
40
-
lib.optionalString
41
-
(config.programs.ssh.enable && config.services.gpg-agent.enable)
42
-
"export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)"
43
-
}
49
+
${lib.optionalString (
50
+
config.programs.ssh.enable && config.services.gpg-agent.enable
51
+
) "export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)"}
44
52
45
53
function tomp4 () {
46
54
${pkgBin pkgs.ffmpeg} -i $1 -c:v libx264 -preset slow -crf 30 -c:a aac -b:a 128k "$1.mp4"
+222
-186
users/patriot/default.nix
+222
-186
users/patriot/default.nix
···
4
4
tlib,
5
5
config,
6
6
...
7
-
} @ globalAttrs: let
7
+
}@globalAttrs:
8
+
let
8
9
l = lib // builtins;
9
10
10
11
nixosConfig = globalAttrs.config;
11
-
in {
12
-
imports = [./stylix.nix];
12
+
in
13
+
{
14
+
imports = [ ./stylix.nix ];
13
15
14
16
users.users.patriot = {
15
17
isNormalUser = true;
···
23
25
"nix-build-key-access"
24
26
(l.optional nixosConfig.networking.networkmanager.enable "networkmanager")
25
27
(l.optional nixosConfig.virtualisation.docker.enable "docker")
26
-
(l.optionals nixosConfig.virtualisation.libvirtd.enable ["libvirtd" "kvm"])
28
+
(l.optionals nixosConfig.virtualisation.libvirtd.enable [
29
+
"libvirtd"
30
+
"kvm"
31
+
])
27
32
];
28
33
shell = pkgs.zsh;
29
34
hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/";
···
45
50
"/home/patriot/.config/unity3d"
46
51
"/home/patriot/.config/HKModInstaller"
47
52
];
48
-
systemPackages = with pkgs; [qt5.qtwayland];
49
-
shells = with pkgs; [bashInteractive zsh];
53
+
systemPackages = with pkgs; [ qt5.qtwayland ];
54
+
shells = with pkgs; [
55
+
bashInteractive
56
+
zsh
57
+
];
50
58
};
51
59
xdg.portal = {
52
60
enable = true;
···
68
76
# gnome stuffs
69
77
seahorse.enable = true;
70
78
dconf.enable = true;
71
-
weylus.users = ["patriot"];
79
+
weylus.users = [ "patriot" ];
72
80
java = {
73
81
enable = false;
74
82
package = pkgs.jre8;
···
94
102
NetworkManager-wait-online.enable = false;
95
103
};
96
104
};
97
-
home-manager.users.patriot = {
98
-
config,
99
-
pkgs,
100
-
inputs,
101
-
secrets,
102
-
...
103
-
}: let
104
-
personal = import ../../personal.nix;
105
-
name = personal.name;
106
-
email = personal.emails.primary;
107
-
in {
108
-
imports = let
109
-
modulesToEnable = l.flatten [
110
-
# wm
111
-
# ["hyprland" "foot"]
112
-
["sway" "wayland" "foot"]
113
-
# ["fluxbox" "urxvt"]
114
-
# desktop stuff
115
-
# ["wayland" "foot"]
116
-
["obsidian" "firefox" "vesktop"]
117
-
# cli stuff
118
-
["zoxide" "zsh" "fzf" "starship" "direnv"]
119
-
# dev stuff
120
-
["helix" "git" "ssh"]
121
-
# ["godot"]
122
-
["musikcube" "musikcubed"]
123
-
["arrpc"]
124
-
["s3s"]
125
-
];
105
+
home-manager.users.patriot =
106
+
{
107
+
config,
108
+
pkgs,
109
+
inputs,
110
+
secrets,
111
+
...
112
+
}:
113
+
let
114
+
personal = import ../../personal.nix;
115
+
name = personal.name;
116
+
email = personal.emails.primary;
126
117
in
127
-
l.flatten [
128
-
../../modules/persist
129
-
inputs.nixos-persistence.nixosModules.home-manager.impermanence
130
-
(tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable)
131
-
];
132
-
133
-
system.persistDir = nixosConfig.system.persistDir;
134
-
135
-
home.persistence."${config.system.persistDir}${config.home.homeDirectory}" = let
136
-
mkPaths = pfx: paths: tlib.prefixStrings "${pfx}/" (l.flatten paths);
137
-
in {
138
-
directories =
118
+
{
119
+
imports =
120
+
let
121
+
modulesToEnable = l.flatten [
122
+
# wm
123
+
# ["hyprland" "foot"]
124
+
[
125
+
"sway"
126
+
"wayland"
127
+
"foot"
128
+
]
129
+
# ["fluxbox" "urxvt"]
130
+
# desktop stuff
131
+
# ["wayland" "foot"]
132
+
[
133
+
"obsidian"
134
+
"firefox"
135
+
"vesktop"
136
+
]
137
+
# cli stuff
138
+
[
139
+
"zoxide"
140
+
"zsh"
141
+
"fzf"
142
+
"starship"
143
+
"direnv"
144
+
]
145
+
# dev stuff
146
+
[
147
+
"helix"
148
+
"git"
149
+
"ssh"
150
+
]
151
+
# ["godot"]
152
+
[
153
+
"musikcube"
154
+
"musikcubed"
155
+
]
156
+
[ "arrpc" ]
157
+
[ "s3s" ]
158
+
];
159
+
in
139
160
l.flatten [
140
-
"Downloads"
141
-
".wine"
142
-
# ssh / gpg / keys
143
-
".ssh"
144
-
".gnupg"
145
-
"keys"
146
-
# caches / history stuff
147
-
".directory_history"
148
-
".cache"
149
-
"Bitwig Studio"
150
-
".BitwigStudio"
151
-
".vst"
152
-
]
153
-
++ mkPaths ".local/share" [
154
-
"bottles"
155
-
"direnv"
156
-
"zsh"
157
-
"keyrings"
158
-
"yuzu"
159
-
# "lutris"
160
-
# "Terraria"
161
-
"PrismLauncher"
162
-
]
163
-
++ mkPaths ".config" [
164
-
# "lutris"
165
-
"dconf"
166
-
"retroarch"
167
-
"yuzu"
168
-
"blender"
161
+
../../modules/persist
162
+
inputs.nixos-persistence.nixosModules.home-manager.impermanence
163
+
(tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable)
169
164
];
170
-
files = l.flatten [
171
-
".config/gnome-initial-setup-done"
172
-
(lib.removePrefix "~/" config.programs.ssh.userKnownHostsFile)
173
-
];
174
-
allowOther = true;
175
-
};
176
165
177
-
fonts.fontconfig.enable = l.mkForce true;
166
+
system.persistDir = nixosConfig.system.persistDir;
178
167
179
-
settings.iconTheme = {
180
-
name = "Yaru-dark";
181
-
package = pkgs.yaru-theme;
182
-
};
168
+
home.persistence."${config.system.persistDir}${config.home.homeDirectory}" =
169
+
let
170
+
mkPaths = pfx: paths: tlib.prefixStrings "${pfx}/" (l.flatten paths);
171
+
in
172
+
{
173
+
directories =
174
+
l.flatten [
175
+
"Downloads"
176
+
".wine"
177
+
# ssh / gpg / keys
178
+
".ssh"
179
+
".gnupg"
180
+
"keys"
181
+
# caches / history stuff
182
+
".directory_history"
183
+
".cache"
184
+
"Bitwig Studio"
185
+
".BitwigStudio"
186
+
".vst"
187
+
]
188
+
++ mkPaths ".local/share" [
189
+
"bottles"
190
+
"direnv"
191
+
"zsh"
192
+
"keyrings"
193
+
"yuzu"
194
+
# "lutris"
195
+
# "Terraria"
196
+
"PrismLauncher"
197
+
]
198
+
++ mkPaths ".config" [
199
+
# "lutris"
200
+
"dconf"
201
+
"retroarch"
202
+
"yuzu"
203
+
"blender"
204
+
];
205
+
files = l.flatten [
206
+
".config/gnome-initial-setup-done"
207
+
(lib.removePrefix "~/" config.programs.ssh.userKnownHostsFile)
208
+
];
209
+
allowOther = true;
210
+
};
183
211
184
-
home.pointerCursor = {
185
-
package = pkgs.bibata-cursors;
186
-
name = "Bibata-Modern-Classic";
187
-
size = 24;
212
+
fonts.fontconfig.enable = l.mkForce true;
213
+
214
+
settings.iconTheme = {
215
+
name = "Yaru-dark";
216
+
package = pkgs.yaru-theme;
217
+
};
218
+
219
+
home.pointerCursor = {
220
+
package = pkgs.bibata-cursors;
221
+
name = "Bibata-Modern-Classic";
222
+
size = 24;
223
+
gtk.enable = true;
224
+
x11.enable = true;
225
+
};
188
226
gtk.enable = true;
189
-
x11.enable = true;
190
-
};
191
-
gtk.enable = true;
192
-
gtk.theme.package = pkgs.yaru-theme;
193
-
gtk.theme.name = "Yaru-dark";
227
+
gtk.theme.package = pkgs.yaru-theme;
228
+
gtk.theme.name = "Yaru-dark";
194
229
195
-
# home.sessionVariables.QT_QPA_PLATFORMTHEME = "qt5ct";
196
-
# xdg.configFile = {
197
-
# "environment.d/20-apply-qtct.conf".text = ''
198
-
# QT_QPA_PLATFORMTHEME=qt5ct
199
-
# '';
200
-
# };
201
-
# qt.enable = true;
202
-
# qt.platformTheme = "qtct";
203
-
# qt.style.name = "phantom";
204
-
# qt.style.package = pkgs.phantom;
230
+
# home.sessionVariables.QT_QPA_PLATFORMTHEME = "qt5ct";
231
+
# xdg.configFile = {
232
+
# "environment.d/20-apply-qtct.conf".text = ''
233
+
# QT_QPA_PLATFORMTHEME=qt5ct
234
+
# '';
235
+
# };
236
+
# qt.enable = true;
237
+
# qt.platformTheme = "qtct";
238
+
# qt.style.name = "phantom";
239
+
# qt.style.package = pkgs.phantom;
205
240
206
-
stylix.targets.gnome.enable = lib.mkForce false;
207
-
stylix.targets.gtk.enable = lib.mkForce false;
241
+
stylix.targets.gnome.enable = lib.mkForce false;
242
+
stylix.targets.gtk.enable = lib.mkForce false;
208
243
209
-
home = {
210
-
homeDirectory = nixosConfig.users.users.patriot.home;
211
-
packages = with pkgs; [
212
-
# Font stuff
213
-
noto-fonts-cjk
214
-
font-awesome
215
-
dejavu_fonts
216
-
# Programs
217
-
pixelorama
218
-
krita
219
-
gnupg
220
-
imv
221
-
mpv
222
-
ffmpeg
223
-
mupdf
224
-
xdg-utils
225
-
protontricks
226
-
libreoffice-fresh
227
-
helvum
228
-
nix-output-monitor
229
-
inputs.nh.packages.${pkgs.system}.default
230
-
# steamPackages.steamcmd
231
-
# steam-tui
232
-
# fractal-next
233
-
# gtkcord4
234
-
# gh
235
-
transmission_4-gtk
236
-
kdenlive
237
-
### music prod
238
-
yabridge
239
-
yabridgectl
240
-
bitwig-studio
241
-
### stream / record
242
-
obs-studio
243
-
### gayming
244
-
# prismlauncher
245
-
# (retroarch.override {
246
-
# cores = with libretro; [desmume citra];
247
-
# })
248
-
# yuzu
249
-
# wineWowPackages.stagingFull
250
-
# lutris
251
-
# distrobox
252
-
bottles
253
-
blender
254
-
];
255
-
};
256
-
programs = {
257
-
musikcube.enable = true;
258
-
command-not-found.enable =
259
-
nixosConfig.programs.command-not-found.enable;
260
-
git = {
261
-
userName = name;
262
-
userEmail = email;
263
-
extraConfig = {
264
-
gpg.format = "ssh";
265
-
commit.gpgsign = true;
266
-
user.signingkey = builtins.readFile ../../secrets/yusdacra.key.pub;
267
-
};
244
+
home = {
245
+
homeDirectory = nixosConfig.users.users.patriot.home;
246
+
packages = with pkgs; [
247
+
# Font stuff
248
+
noto-fonts-cjk
249
+
font-awesome
250
+
dejavu_fonts
251
+
# Programs
252
+
pixelorama
253
+
krita
254
+
gnupg
255
+
imv
256
+
mpv
257
+
ffmpeg
258
+
mupdf
259
+
xdg-utils
260
+
protontricks
261
+
libreoffice-fresh
262
+
helvum
263
+
nix-output-monitor
264
+
inputs.nh.packages.${pkgs.system}.default
265
+
# steamPackages.steamcmd
266
+
# steam-tui
267
+
# fractal-next
268
+
# gtkcord4
269
+
# gh
270
+
transmission_4-gtk
271
+
kdenlive
272
+
### music prod
273
+
yabridge
274
+
yabridgectl
275
+
bitwig-studio
276
+
### stream / record
277
+
obs-studio
278
+
### gayming
279
+
# prismlauncher
280
+
# (retroarch.override {
281
+
# cores = with libretro; [desmume citra];
282
+
# })
283
+
# yuzu
284
+
# wineWowPackages.stagingFull
285
+
# lutris
286
+
# distrobox
287
+
bottles
288
+
blender
289
+
];
268
290
};
269
-
};
270
-
services = {
271
-
musikcubed = {
272
-
enable = true;
273
-
settings.password = "somethingidk";
291
+
programs = {
292
+
musikcube.enable = true;
293
+
command-not-found.enable = nixosConfig.programs.command-not-found.enable;
294
+
git = {
295
+
userName = name;
296
+
userEmail = email;
297
+
extraConfig = {
298
+
gpg.format = "ssh";
299
+
commit.gpgsign = true;
300
+
user.signingkey = builtins.readFile ../../secrets/yusdacra.key.pub;
301
+
};
302
+
};
274
303
};
275
-
gpg-agent = let
276
-
defaultCacheTtl = 3600 * 6;
277
-
maxCacheTtl = 3600 * 24;
278
-
in {
279
-
inherit defaultCacheTtl maxCacheTtl;
280
-
enable = true;
281
-
enableSshSupport = true;
282
-
sshKeys = ["8369D9CA26C3EAAAB8302A88CEE6FD14B58AA965"];
283
-
defaultCacheTtlSsh = defaultCacheTtl;
284
-
maxCacheTtlSsh = maxCacheTtl;
285
-
grabKeyboardAndMouse = false;
286
-
pinentryFlavor = "gnome3";
304
+
services = {
305
+
musikcubed = {
306
+
enable = true;
307
+
settings.password = "somethingidk";
308
+
};
309
+
gpg-agent =
310
+
let
311
+
defaultCacheTtl = 3600 * 6;
312
+
maxCacheTtl = 3600 * 24;
313
+
in
314
+
{
315
+
inherit defaultCacheTtl maxCacheTtl;
316
+
enable = true;
317
+
enableSshSupport = true;
318
+
sshKeys = [ "8369D9CA26C3EAAAB8302A88CEE6FD14B58AA965" ];
319
+
defaultCacheTtlSsh = defaultCacheTtl;
320
+
maxCacheTtlSsh = maxCacheTtl;
321
+
grabKeyboardAndMouse = false;
322
+
pinentryFlavor = "gnome3";
323
+
};
287
324
};
288
325
};
289
-
};
290
326
}
+34
-31
users/patriot/stylix.nix
+34
-31
users/patriot/stylix.nix
···
4
4
pkgs,
5
5
lib,
6
6
...
7
-
}: {
7
+
}:
8
+
{
8
9
imports = [
9
10
inputs.stylix.nixosModules.stylix
10
11
];
···
29
30
# "base0E" = "fffe27"; # splatoon 3 yellow
30
31
# "base0F" = "bdbebc";
31
32
# };
32
-
stylix.base16Scheme = let
33
-
night = "#2b292d";
34
-
ash = "#383539";
35
-
umber = "#4d424b";
36
-
bark = "#6F5D63";
37
-
mist = "#D1D1E0";
38
-
sage = "#B1B695";
39
-
blush = "#fecdb2";
40
-
coral = "#ffa07a";
41
-
rose = "#F6B6C9";
42
-
ember = "#e06b75";
43
-
honey = "#F5D76E";
44
-
in {
45
-
base00 = night;
46
-
base01 = ash;
47
-
base02 = umber;
48
-
base03 = bark;
49
-
base04 = blush;
50
-
base05 = mist;
51
-
base06 = mist;
52
-
base07 = bark;
53
-
base08 = ember;
54
-
base09 = honey;
55
-
base0A = rose;
56
-
base0B = sage;
57
-
base0C = bark;
58
-
base0D = coral;
59
-
base0E = blush;
60
-
base0F = umber;
61
-
};
33
+
stylix.base16Scheme =
34
+
let
35
+
night = "#2b292d";
36
+
ash = "#383539";
37
+
umber = "#4d424b";
38
+
bark = "#6F5D63";
39
+
mist = "#D1D1E0";
40
+
sage = "#B1B695";
41
+
blush = "#fecdb2";
42
+
coral = "#ffa07a";
43
+
rose = "#F6B6C9";
44
+
ember = "#e06b75";
45
+
honey = "#F5D76E";
46
+
in
47
+
{
48
+
base00 = night;
49
+
base01 = ash;
50
+
base02 = umber;
51
+
base03 = bark;
52
+
base04 = blush;
53
+
base05 = mist;
54
+
base06 = mist;
55
+
base07 = bark;
56
+
base08 = ember;
57
+
base09 = honey;
58
+
base0A = rose;
59
+
base0B = sage;
60
+
base0C = bark;
61
+
base0D = coral;
62
+
base0E = blush;
63
+
base0F = umber;
64
+
};
62
65
63
66
stylix.fonts = {
64
67
serif = {