+137
-7
flake.lock
+137
-7
flake.lock
···
1
1
{
2
2
"nodes": {
3
+
"flake-parts": {
4
+
"inputs": {
5
+
"nixpkgs-lib": [
6
+
"nixpak",
7
+
"nixpkgs"
8
+
]
9
+
},
10
+
"locked": {
11
+
"lastModified": 1762040540,
12
+
"narHash": "sha256-z5PlZ47j50VNF3R+IMS9LmzI5fYRGY/Z5O5tol1c9I4=",
13
+
"owner": "hercules-ci",
14
+
"repo": "flake-parts",
15
+
"rev": "0010412d62a25d959151790968765a70c436598b",
16
+
"type": "github"
17
+
},
18
+
"original": {
19
+
"owner": "hercules-ci",
20
+
"repo": "flake-parts",
21
+
"type": "github"
22
+
}
23
+
},
3
24
"hardware": {
4
25
"locked": {
5
-
"lastModified": 1757943327,
6
-
"narHash": "sha256-w6cDExPBqbq7fTLo4dZ1ozDGeq3yV6dSN4n/sAaS6OM=",
26
+
"lastModified": 1762463231,
27
+
"narHash": "sha256-hv1mG5j5PTbnWbtHHomzTus77pIxsc4x8VrMjc7+/YE=",
7
28
"owner": "nixos",
8
29
"repo": "nixos-hardware",
9
-
"rev": "67a709cfe5d0643dafd798b0b613ed579de8be05",
30
+
"rev": "52113c4f5cfd1e823001310e56d9c8d0699a6226",
10
31
"type": "github"
11
32
},
12
33
"original": {
···
16
37
"type": "github"
17
38
}
18
39
},
40
+
"hercules-ci-effects": {
41
+
"inputs": {
42
+
"flake-parts": [
43
+
"nixpak",
44
+
"flake-parts"
45
+
],
46
+
"nixpkgs": [
47
+
"nixpak",
48
+
"nixpkgs"
49
+
]
50
+
},
51
+
"locked": {
52
+
"lastModified": 1761230615,
53
+
"narHash": "sha256-pLE7U5gOtlA/2wbKCsVRYf5DqMQ5TWBCrCfZGytDDeo=",
54
+
"owner": "hercules-ci",
55
+
"repo": "hercules-ci-effects",
56
+
"rev": "7db2b867219a26781437d840ce457b75b7645154",
57
+
"type": "github"
58
+
},
59
+
"original": {
60
+
"owner": "hercules-ci",
61
+
"repo": "hercules-ci-effects",
62
+
"type": "github"
63
+
}
64
+
},
65
+
"nixpak": {
66
+
"inputs": {
67
+
"flake-parts": "flake-parts",
68
+
"hercules-ci-effects": "hercules-ci-effects",
69
+
"nixpkgs": [
70
+
"nixpkgs"
71
+
]
72
+
},
73
+
"locked": {
74
+
"lastModified": 1762396580,
75
+
"narHash": "sha256-riBOo30D8DhqQobcIYAC6sDl9PHBUq9ukjS4NjnjEM4=",
76
+
"owner": "nixpak",
77
+
"repo": "nixpak",
78
+
"rev": "e4bcce21a735a07c409b696b31c17f6640ca0aa2",
79
+
"type": "github"
80
+
},
81
+
"original": {
82
+
"owner": "nixpak",
83
+
"repo": "nixpak",
84
+
"type": "github"
85
+
}
86
+
},
19
87
"nixpkgs": {
20
88
"locked": {
21
-
"lastModified": 1758277210,
22
-
"narHash": "sha256-iCGWf/LTy+aY0zFu8q12lK8KuZp7yvdhStehhyX1v8w=",
89
+
"lastModified": 1762596750,
90
+
"narHash": "sha256-rXXuz51Bq7DHBlfIjN7jO8Bu3du5TV+3DSADBX7/9YQ=",
23
91
"owner": "nixos",
24
92
"repo": "nixpkgs",
25
-
"rev": "8eaee110344796db060382e15d3af0a9fc396e0e",
93
+
"rev": "b6a8526db03f735b89dd5ff348f53f752e7ddc8e",
26
94
"type": "github"
27
95
},
28
96
"original": {
···
32
100
"type": "github"
33
101
}
34
102
},
103
+
"noctalia": {
104
+
"inputs": {
105
+
"nixpkgs": [
106
+
"nixpkgs"
107
+
],
108
+
"quickshell": [
109
+
"quickshell"
110
+
],
111
+
"systems": "systems"
112
+
},
113
+
"locked": {
114
+
"lastModified": 1762734257,
115
+
"narHash": "sha256-UXyPiIHXmYPscf9p3nql2wTCEWfhk5dxrBD8VEBgDcs=",
116
+
"owner": "noctalia-dev",
117
+
"repo": "noctalia-shell",
118
+
"rev": "cd0556064bcdaa7a182c82332d2f0436b9ee338c",
119
+
"type": "github"
120
+
},
121
+
"original": {
122
+
"owner": "noctalia-dev",
123
+
"repo": "noctalia-shell",
124
+
"type": "github"
125
+
}
126
+
},
127
+
"quickshell": {
128
+
"inputs": {
129
+
"nixpkgs": [
130
+
"nixpkgs"
131
+
]
132
+
},
133
+
"locked": {
134
+
"lastModified": 1761897390,
135
+
"narHash": "sha256-er4gYrIoThYLjlsOMTysoRfn67d1Gci+ZpqDrtQxrA0=",
136
+
"owner": "outfoxxed",
137
+
"repo": "quickshell",
138
+
"rev": "fc704e6b5d445899a1565955268c91942a4f263f",
139
+
"type": "github"
140
+
},
141
+
"original": {
142
+
"owner": "outfoxxed",
143
+
"repo": "quickshell",
144
+
"type": "github"
145
+
}
146
+
},
35
147
"root": {
36
148
"inputs": {
37
149
"hardware": "hardware",
38
-
"nixpkgs": "nixpkgs"
150
+
"nixpak": "nixpak",
151
+
"nixpkgs": "nixpkgs",
152
+
"noctalia": "noctalia",
153
+
"quickshell": "quickshell"
154
+
}
155
+
},
156
+
"systems": {
157
+
"locked": {
158
+
"lastModified": 1681028828,
159
+
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
160
+
"owner": "nix-systems",
161
+
"repo": "default",
162
+
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
163
+
"type": "github"
164
+
},
165
+
"original": {
166
+
"owner": "nix-systems",
167
+
"repo": "default",
168
+
"type": "github"
39
169
}
40
170
}
41
171
},
+30
-7
flake.nix
+30
-7
flake.nix
···
3
3
4
4
inputs = {
5
5
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
6
-
7
6
hardware.url = "github:nixos/nixos-hardware/master";
7
+
quickshell = {
8
+
url = "github:outfoxxed/quickshell";
9
+
inputs.nixpkgs.follows = "nixpkgs";
10
+
};
11
+
noctalia = {
12
+
url = "github:noctalia-dev/noctalia-shell";
13
+
inputs.nixpkgs.follows = "nixpkgs";
14
+
inputs.quickshell.follows = "quickshell";
15
+
};
16
+
nixpak = {
17
+
url = "github:nixpak/nixpak";
18
+
inputs.nixpkgs.follows = "nixpkgs";
19
+
};
8
20
};
9
21
10
22
outputs =
11
23
{
12
24
nixpkgs,
13
25
hardware,
26
+
noctalia,
27
+
nixpak,
14
28
...
15
29
}@inputs:
16
30
let
31
+
noctalia-overlay = system: final: prev: { noctalia-shell = noctalia.packages.${system}.default; };
17
32
forAllSystems =
18
33
function:
19
34
nixpkgs.lib.genAttrs [
20
35
"x86_64-linux" # <- useful
21
36
"aarch64-linux" # <- aspirational
22
-
# "risc64-linux" # <- aspirational
23
37
"aarch64-darwin" # <- useless
24
-
] (system: function nixpkgs.legacyPackages.${system});
38
+
] (system: function (nixpkgs.legacyPackages.${system}.extend (noctalia-overlay system)));
25
39
in
26
-
rec {
40
+
{
27
41
nixosConfigurations.asa-fw = nixpkgs.lib.nixosSystem rec {
28
42
system = "x86_64-linux";
29
43
specialArgs = {
30
44
inherit inputs;
31
-
packages = packages."${system}";
32
45
};
33
46
modules = [
34
47
modules/system.nix
35
-
modules/niri.nix
48
+
modules/desktop.nix
36
49
modules/apps.nix
37
50
modules/fonts.nix
38
51
modules/networking.nix
···
40
53
modules/dev.nix
41
54
hardware/fw-13.nix
42
55
hardware.nixosModules.framework-13-7040-amd
56
+
{
57
+
nixpkgs.overlays = [
58
+
(noctalia-overlay system)
59
+
(final: prev: {
60
+
customPackages = import ./programs {
61
+
pkgs = prev;
62
+
};
63
+
})
64
+
];
65
+
}
43
66
];
44
67
};
45
68
46
69
packages = forAllSystems (pkgs: import ./programs { inherit pkgs; });
47
70
48
-
devShell = forAllSystems (pkgs: pkgs.nil);
71
+
devShell = forAllSystems (pkgs: pkgs.nixd);
49
72
50
73
formatter = forAllSystems (pkgs: pkgs.nixfmt-tree);
51
74
};
+206
-34
modules/apps.nix
+206
-34
modules/apps.nix
···
1
1
{
2
+
lib,
2
3
pkgs,
3
4
packages,
4
5
...
5
6
}:
7
+
# set up chromium web "apps"
8
+
let
9
+
webapps =
10
+
let
11
+
apps = {
12
+
discord = "https://discord.com/channels/@me";
13
+
slack = "https://app.slack.com/client/";
14
+
outlook = "https://outlook.office.com/mail/";
15
+
bluesky = "https://bsky.app/";
16
+
canvas = "https://canvas.mit.edu/";
17
+
gradescope = "https://www.gradescope.com/";
18
+
};
19
+
in
20
+
lib.mapAttrsToList (
21
+
name: url:
22
+
pkgs.makeDesktopItem {
23
+
inherit name;
24
+
desktopName = name;
25
+
exec = "${lib.getExe pkgs.customPackages.chromium-wrapped} --app=${url}";
26
+
terminal = false;
27
+
}
28
+
) apps;
29
+
in
6
30
{
7
31
services.flatpak.enable = true;
8
-
9
-
# set up chromium config for pwas
32
+
10
33
programs.chromium = {
11
34
enable = true;
12
-
extensions = [
13
-
# "ddkjiahejlhfcafbddmgiahcphecmpfh" # ublock origin lite
14
-
"https://clients2.google.com/service/update2/crx?response=redirect&acceptformat=crx2,crx3&prodversion=${pkgs.ungoogled-chromium.version}&x=id%3Dddkjiahejlhfcafbddmgiahcphecmpfh%26installsource%3Dondemand%26uc"
15
-
];
35
+
36
+
# extensions = [
37
+
# "ddkjiahejlhfcafbddmgiahcphecmpfh" # ublock origin lite
38
+
# "nngceckbapebfimnlniiiahkandclblb" # bitwarden
39
+
# ];
40
+
41
+
# https://github.com/RKNF404/chromium-hardening-guide/blob/main/configs/POLICIES.md
16
42
extraOpts = {
43
+
"AIModeSettings" = 1;
44
+
"AlternateErrorPagesEnabled" = false;
45
+
# "AudioSandboxEnabled" = true;
46
+
"AutofillAddressEnabled" = false;
47
+
"AutofillCreditCardEnabled" = false;
48
+
"AutofillPredictionSettings" = 2;
49
+
"AutomatedPasswordChangeSettings" = 2;
50
+
"BackgroundModeEnabled" = false;
51
+
"BlockExternalExtensions" = true;
52
+
"BlockThirdPartyCookies" = true;
53
+
"BrowserLabsEnabled" = false;
17
54
"BrowserSignin" = 0;
18
-
"SyncDisabled" = true;
55
+
"BuiltInAIAPIsEnabled" = false;
56
+
"ChromeVariations" = 2;
57
+
"ClearBrowsingDataOnExitList" = [
58
+
"download_history"
59
+
"cached_images_and_files"
60
+
"autofill"
61
+
"hosted_app_data"
62
+
];
63
+
"ClickToCallEnabled" = false;
64
+
"CloudPrintProxyEnabled" = false;
65
+
"CreateThemesSettings" = 2;
66
+
"DefaultBrowserSettingEnabled" = false;
67
+
# "DefaultJavaScriptJitSetting" = 2;
68
+
# "DefaultJavaScriptOptimizerSetting" = 1;
69
+
"DefaultSensorsSetting" = 2;
70
+
"DefaultWebUsbGuardSetting" = 2;
71
+
"DesktopSharingHubEnabled" = false;
72
+
"DevToolsGenAiSettings" = 2;
73
+
"Disable3DAPIs" = true;
74
+
"DnsOverHttpsMode" = "automatic";
75
+
# "DnsOverHttpsTemplates"
76
+
"EnableMediaRouter" = false;
77
+
"ExtensionAllowedTypes" = [
78
+
"extension"
79
+
"theme"
80
+
];
81
+
"ExtensionDeveloperModeSettings" = 1;
82
+
# "ExtensionInstallAllowlist" = []; # TODO
83
+
# "ExtensionInstallBlocklist" = [
84
+
# "ddkjiahejlhfcafbddmgiahcphecmpfh" # ublock origin lite
85
+
# "nngceckbapebfimnlniiiahkandclblb" # bitwarden
86
+
# ];
87
+
"ExtensionSettings" = {
88
+
"*" = {
89
+
"installation_mode" = "blocked";
90
+
};
91
+
"ddkjiahejlhfcafbddmgiahcphecmpfh" = {
92
+
"installation_mode" = "force_installed";
93
+
"update_url" = "https://clients2.google.com/service/update2/crx";
94
+
};
95
+
"nngceckbapebfimnlniiiahkandclblb" = {
96
+
"installation_mode" = "force_installed";
97
+
"update_url" = "https://clients2.google.com/service/update2/crx";
98
+
};
99
+
};
100
+
101
+
"GeminiSettings" = 1;
102
+
"GenAILocalFoundationalModelSettings" = 1;
103
+
"GoogleSearchSidePanelEnabled" = false;
104
+
"HardwareAccelerationModeEnabled" = true; # recommended to be false
105
+
"HelpMeWriteSettings" = 2;
106
+
"HistoryClustersVisible" = false;
107
+
"HistorySearchSettings" = 2;
108
+
"HttpsOnlyMode" = "force_enabled";
109
+
"LensOverlaySettings" = 1;
110
+
"LensRegionSearchEnabled" = false;
111
+
"LiveTranslateEnabled" = false;
112
+
"MediaRecommendationsEnabled" = false;
113
+
"MetricsReportingEnabled" = false;
114
+
"NativeMessagingBlocklist" = [ "*" ];
115
+
"NetworkPredictionOptions" = 2;
116
+
"NetworkServiceSandboxEnabled" = true;
117
+
"NTPCardsVisible" = false;
118
+
"PasswordLeakDetectionEnabled" = false;
19
119
"PasswordManagerEnabled" = false;
20
-
"SpellcheckEnabled" = true;
21
-
"SpellcheckLanguage" = [ "en-US" ];
120
+
"PaymentMethodQueryEnabled" = false;
121
+
"PrivacySandboxAdMeasurementEnabled" = false;
122
+
"PrivacySandboxAdTopicsEnabled" = false;
123
+
"PrivacySandboxPromptEnabled" = false;
124
+
"PrivacySandboxSiteEnabledAdsEnabled" = false;
125
+
"PromotionsEnabled" = false;
126
+
"PromptForDownloadLocation" = true; # TODO ??
127
+
# "ProtectedContentIdentifiersAllowed" = false;
128
+
"RelatedWebsiteSetsEnabled" = false;
129
+
"RemoteAccessHostAllowRemoteAccessConnections" = false;
130
+
"RemoteAccessHostAllowRemoteSupportConnections" = false;
131
+
"RemoteAccessHostFirewallTraversal" = false;
132
+
"RemoteDebuggingAllowed" = false;
133
+
"SafeBrowsingDeepScanningEnabled" = false;
134
+
"SafeBrowsingExtendedReportingEnabled" = false;
135
+
"SafeBrowsingProtectionLevel" = 1;
136
+
"SafeBrowsingSurveysEnabled" = false;
137
+
"SearchSuggestEnabled" = false;
138
+
"SharedClipboardEnabled" = false;
139
+
"ShoppingListEnabled" = false;
140
+
"ShowFullUrlsInAddressBar" = true;
141
+
"SitePerProcess" = true;
142
+
"SpellCheckServiceEnabled" = false;
143
+
"SyncDisabled" = true;
144
+
"TabCompareSettings" = 2;
145
+
"TLS13EarlyDataEnabled" = false;
146
+
"TranslateEnabled" = false;
147
+
"TranslatorAPIAllowed" = false;
148
+
# "UrlKeyedAnonymizedDataCollectionEnabled" = false;
149
+
"UrlKeyedMetricsAllowed" = false;
150
+
"UserAgentReduction" = 2;
151
+
"UserFeedbackAllowed" = false;
152
+
"WebRtcIPHandling" = "disable_non_proxied_udp";
153
+
"WebRtcTextLogCollectionAllowed" = false;
154
+
# "WebUsbAskForUrls" = [ ] # whitelist of sites allowed to ask for webusb
22
155
};
23
156
};
24
157
25
-
# Tell electron apps / chromium to use wayland
158
+
# needed for electron apps that won't run on wayland
26
159
environment.sessionVariables.NIXOS_OZONE_WL = "1";
27
160
28
-
users.users.asa.packages = with pkgs; [
29
-
packages.alacritty-wrapped
30
-
packages.helix-wrapped
161
+
# programs.firefox = {
162
+
# enable = true;
163
+
# languagePacks = [
164
+
# "en-US"
165
+
# ];
31
166
32
-
aerc
33
-
yazi
34
-
wget
35
-
ungoogled-chromium
167
+
# # ---- POLICIES ----
168
+
# # Check about:policies#documentation for options.
169
+
# policies = {
170
+
# DisableTelemetry = true;
171
+
# DisableFirefoxStudies = true;
172
+
# EnableTrackingProtection = {
173
+
# Value = true;
174
+
# Locked = true;
175
+
# Cryptomining = true;
176
+
# Fingerprinting = true;
177
+
# };
178
+
# DisablePocket = true;
179
+
# DisableFirefoxAccounts = true;
180
+
# DisableAccounts = true;
181
+
# DisableFirefoxScreenshots = true;
182
+
# OverrideFirstRunPage = "";
183
+
# OverridePostUpdatePage = "";
184
+
# DontCheckDefaultBrowser = true;
185
+
# DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
186
+
# DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on"
187
+
# SearchBar = "unified"; # alternative: "separate"
36
188
37
-
fzf
38
-
ripgrep
189
+
# OfferToSaveLogins = false;
190
+
# PasswordManagerEnabled = false;
39
191
40
-
# utilities
41
-
zip
42
-
unzip
43
-
zathura
44
-
btop
192
+
# # ---- EXTENSIONS ----
193
+
# # Check about:support for extension/add-on ID strings.
194
+
# # Valid strings for installation_mode are "allowed", "blocked",
195
+
# # "force_installed" and "normal_installed".
196
+
# ExtensionSettings = {
197
+
# "*".installation_mode = "blocked"; # blocks all addons except the ones specified below
198
+
# "uBlock0@raymondhill.net" = {
199
+
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
200
+
# installation_mode = "force_installed";
201
+
# };
202
+
# "{446900e4-71c2-419f-a6a7-df9c091e268b}" = {
203
+
# install_url = "https://addons.mozilla.org/firefox/downloads/latest/bitwarden-password-manager/latest.xpi";
204
+
# installation_mode = "force_installed";
205
+
# };
206
+
# };
207
+
# };
208
+
# };
45
209
46
-
# vpn stuff
47
-
# (globalprotect-openconnect.overrideAttrs rec {
48
-
# version = "2.4.5";
49
-
# src = fetchurl {
50
-
# url = "https://github.com/yuezk/GlobalProtect-openconnect/releases/download/v${version}/globalprotect-openconnect-${version}.tar.gz";
51
-
# hash = "sha256-ACeNZpHxSK+LkhxuSMOHjuLj5SK82WCOh53+Ai/NQFA=";
52
-
# };
53
-
# patchPhase = "";
210
+
users.users.asa.packages = [
211
+
pkgs.customPackages.alacritty-wrapped
212
+
pkgs.customPackages.helix-wrapped
213
+
pkgs.customPackages.chromium-wrapped
54
214
55
-
# })
56
-
];
215
+
# aerc
216
+
# yazi
217
+
# wget
218
+
219
+
# fzf
220
+
# ripgrep
221
+
222
+
# utilities
223
+
# zip
224
+
# unzip
225
+
# zathura
226
+
# btop
227
+
]
228
+
++ webapps;
57
229
58
230
}
+2
-3
modules/audio.nix
+2
-3
modules/audio.nix
+106
modules/desktop.nix
+106
modules/desktop.nix
···
1
+
{
2
+
inputs,
3
+
lib,
4
+
pkgs,
5
+
...
6
+
}:
7
+
{
8
+
imports = [
9
+
inputs.noctalia.nixosModules.default
10
+
];
11
+
12
+
services.noctalia-shell = {
13
+
# package = pkgs.noctalia-shell;
14
+
enable = true;
15
+
};
16
+
17
+
programs.niri = {
18
+
enable = true;
19
+
package = pkgs.customPackages.niri-wrapped;
20
+
};
21
+
22
+
services.greetd = {
23
+
enable = true;
24
+
settings = {
25
+
default_session = {
26
+
command = "${lib.getExe pkgs.tuigreet} --time --cmd 'bash -l -c ${lib.getExe' pkgs.customPackages.niri-wrapped "niri-session"}'";
27
+
user = "greeter";
28
+
};
29
+
};
30
+
};
31
+
32
+
systemd.user.services = {
33
+
swayidle = {
34
+
enable = true;
35
+
unitConfig = {
36
+
PartOf = "graphical-session.target";
37
+
After = "graphical-session.target";
38
+
Requisite = "graphical-session.target";
39
+
};
40
+
wantedBy = [ "graphical-session.target" ];
41
+
serviceConfig = {
42
+
ExecStart = "${lib.getExe pkgs.swayidle} -w timeout 300 '${lib.getExe pkgs.niri} msg action power-off-monitors' before-sleep '${lib.getExe pkgs.noctalia-shell} ipc call lockScreen lock'";
43
+
Restart = "on-failure";
44
+
};
45
+
};
46
+
};
47
+
48
+
# https://github.com/YaLTeR/niri/wiki/Important-Software
49
+
50
+
environment.systemPackages = with pkgs; [
51
+
noctalia-shell
52
+
adwaita-icon-theme
53
+
# gnome-themes-extra
54
+
nautilus
55
+
wl-clipboard
56
+
];
57
+
58
+
services.upower.enable = true;
59
+
60
+
# enable polkit auth agent
61
+
security.soteria.enable = true;
62
+
63
+
# some gnome settings (dark mode)
64
+
programs.dconf.profiles.user.databases = [
65
+
{
66
+
lockAll = true;
67
+
settings = {
68
+
"org/gnome/desktop/interface" = {
69
+
accent-color = "teal";
70
+
color-scheme = "prefer-dark";
71
+
};
72
+
};
73
+
}
74
+
];
75
+
76
+
# configure xdg portals and default apps
77
+
xdg.portal = {
78
+
enable = true;
79
+
xdgOpenUsePortal = true;
80
+
extraPortals = with pkgs; [
81
+
xdg-desktop-portal-gtk
82
+
xdg-desktop-portal-gnome
83
+
];
84
+
};
85
+
86
+
# default handlers
87
+
xdg.terminal-exec = {
88
+
enable = true;
89
+
settings = {
90
+
default = [ "Alacritty.desktop" ];
91
+
};
92
+
};
93
+
94
+
xdg.mime.defaultApplications = {
95
+
"x-scheme-handler/http" = "chromium-browser.desktop";
96
+
"x-scheme-handler/https" = "chromium-browser.desktop";
97
+
"x-scheme-handler/ftp" = "chromium-browser.desktop";
98
+
"x-scheme-handler/mailto" = "org.mozilla.thunderbird.desktop";
99
+
"text/plain" = "Helix.desktop";
100
+
"application/pdf" = "chromium-browser.desktop";
101
+
# "image/png" = [
102
+
# "sxiv.desktop"
103
+
# "gimp.desktop"
104
+
# ];
105
+
};
106
+
}
+20
-13
modules/dev.nix
+20
-13
modules/dev.nix
···
1
-
{ lib, pkgs, packages, ... }:
1
+
{
2
+
lib,
3
+
pkgs,
4
+
packages,
5
+
...
6
+
}:
2
7
# let container-env = pkgs.buildFHSEnv {
3
8
# name = "container-env";
4
9
# targetPkgs = pkgs: [
···
13
18
{
14
19
programs.git = {
15
20
enable = true;
21
+
lfs.enable = true;
16
22
config = {
17
23
init.defaultBranch = "main";
18
24
user.email = "asapaparo@gmail.com";
···
45
51
46
52
# Configure helix for editor and viewing functionality
47
53
environment.variables = {
48
-
EDITOR = "${lib.getExe packages.helix-wrapped}";
49
-
VISUAL = "${lib.getExe packages.helix-wrapped}";
54
+
EDITOR = "${lib.getExe pkgs.customPackages.helix-wrapped}";
55
+
VISUAL = "${lib.getExe pkgs.customPackages.helix-wrapped}";
50
56
};
51
57
52
58
# Set up local llms
53
-
services.ollama = {
54
-
enable = true;
55
-
# radeon 780M igpu = gfx1103
56
-
# gfx1100 is closest working target
57
-
rocmOverrideGfx = "11.0.0";
58
-
acceleration = "rocm";
59
-
# loadModels = [
60
-
# "gemma3n:latest"
61
-
# ];
62
-
};
59
+
# services.ollama = {
60
+
# enable = true;
61
+
# # radeon 780M igpu = gfx1103
62
+
# # gfx1100 is closest working target
63
+
# rocmOverrideGfx = "11.0.0";
64
+
# acceleration = "rocm";
65
+
# # loadModels = [
66
+
# # "gemma3n:latest"
67
+
# # ];
68
+
# };
69
+
63
70
}
+8
-5
modules/fonts.nix
+8
-5
modules/fonts.nix
···
16
16
17
17
fonts.fontconfig = {
18
18
enable = true;
19
-
hinting.enable = true;
19
+
# hinting.enable = false;
20
+
# antialias = false;
21
+
# subpixel.lcdfilter = "none";
22
+
20
23
defaultFonts = {
21
24
sansSerif = [
22
25
"Inter"
···
60
63
};
61
64
};
62
65
63
-
console = {
64
-
font = "Lat2-Terminus16";
65
-
useXkbConfig = true; # use xkb.options in tty.
66
-
};
66
+
# better font rendering by enabling stem darkening
67
+
# https://blog.aktsbot.in/no-more-blurry-fonts.html
68
+
# https://freetype.org/freetype2/docs/reference/ft2-properties.html#no-stem-darkening
69
+
environment.sessionVariables.FREETYPE_PROPERTIES = "cff:no-stem-darkening=0 autofitter:no-stem-darkening=0";
67
70
}
-125
modules/gnome.nix
-125
modules/gnome.nix
···
1
-
2
-
{
3
-
lib,
4
-
pkgs,
5
-
packages,
6
-
...
7
-
}:
8
-
{
9
-
services.displayManager.gdm.enable = true;
10
-
services.desktopManager.gnome.enable = true;
11
-
services.gnome.core-apps.enable = true;
12
-
services.gnome.core-os-services.enable = true;
13
-
14
-
# gnome settings
15
-
#
16
-
# WIP
17
-
programs.dconf.profiles.user.databases = [
18
-
{
19
-
lockAll = true;
20
-
settings = {
21
-
"org/gnome/desktop/interface" = {
22
-
accent-color = "blue";
23
-
color-scheme = "prefer-dark";
24
-
};
25
-
26
-
"org/gnome/mutter" = {
27
-
experimental-features = [
28
-
"scale-monitor-framebuffer"
29
-
"xwayland-native-scaling"
30
-
];
31
-
};
32
-
33
-
# "org/gnome/desktop/default-applications" = {
34
-
35
-
# };
36
-
37
-
# org.gnome.desktop.default-applications.office.calendar exec 'evolution -c calendar'
38
-
# org.gnome.desktop.default-applications.office.calendar needs-term false
39
-
# org.gnome.desktop.default-applications.office.tasks exec 'evolution -c tasks'
40
-
# org.gnome.desktop.default-applications.office.tasks needs-term false
41
-
# org.gnome.desktop.default-applications.terminal exec 'gnome-terminal'
42
-
# org.gnome.desktop.default-applications.terminal exec-arg '-x'
43
-
44
-
45
-
"org/gnome/desktop/input-sources" = {
46
-
xkb-options = [
47
-
"caps:escape"
48
-
];
49
-
};
50
-
51
-
"org/gnome/desktop/wm/keybindings" = with lib.gvariant; {
52
-
close = [ "<Super>Q" ];
53
-
54
-
cycle-windows = ["<Super>Tab"];
55
-
cycle-windows-backward = ["<Super><Shift>Tab"];
56
-
switch-applications = mkEmptyArray type.string;
57
-
switch-applications-backward = mkEmptyArray type.string;
58
-
toggle-overview = ["<Super>D"];
59
-
60
-
# move-to-monitor-down = ["<Super><Shift>Down"];
61
-
# move-to-monitor-left = ["<Super><Shift>Left"];
62
-
# move-to-monitor-right = ["<Super><Shift>Right"];
63
-
# move-to-monitor-up = ["<Super><Shift>Up"];
64
-
65
-
move-to-workspace-1 = ["<Super><Shift>1"];
66
-
move-to-workspace-2 = ["<Super><Shift>2"];
67
-
move-to-workspace-3 = ["<Super><Shift>3"];
68
-
move-to-workspace-4 = ["<Super><Shift>4"];
69
-
move-to-workspace-5 = ["<Super><Shift>5"];
70
-
move-to-workspace-6 = ["<Super><Shift>6"];
71
-
move-to-workspace-7 = ["<Super><Shift>7"];
72
-
move-to-workspace-8 = ["<Super><Shift>8"];
73
-
move-to-workspace-9 = ["<Super><Shift>9"];
74
-
move-to-workspace-10 = ["<Super><Shift>0"];
75
-
# move-to-workspace-11 = [];
76
-
# move-to-workspace-12 = [];
77
-
78
-
move-to-workspace-left = [ "<Super><Shift>U" "<Super><Shift>Page_Up" "<Super><Shift><Alt>Left" "<Control><Shift><Alt>Left"];
79
-
move-to-workspace-right = [ "Super><Shift>I" "<Super><Shift>Page_Down" "<Super><Shift><Alt>Right" "<Control><Shift><Alt>Right"];
80
-
81
-
82
-
switch-to-workspace-1 = ["<Super>1"];
83
-
switch-to-workspace-2 = ["<Super>2"];
84
-
switch-to-workspace-3 = ["<Super>3"];
85
-
switch-to-workspace-4 = ["<Super>4"];
86
-
switch-to-workspace-5 = ["<Super>5"];
87
-
switch-to-workspace-6 = ["<Super>6"];
88
-
switch-to-workspace-7 = ["<Super>7"];
89
-
switch-to-workspace-8 = ["<Super>8"];
90
-
switch-to-workspace-9 = ["<Super>9"];
91
-
switch-to-workspace-10 = ["<Super>0"];
92
-
# switch-to-workspace-11 = [];
93
-
# switch-to-workspace-12 = [];
94
-
95
-
switch-to-application-1 = mkEmptyArray type.string;
96
-
switch-to-application-2 = mkEmptyArray type.string;
97
-
switch-to-application-3 = mkEmptyArray type.string;
98
-
switch-to-application-4 = mkEmptyArray type.string;
99
-
switch-to-application-5 = mkEmptyArray type.string;
100
-
switch-to-application-6 = mkEmptyArray type.string;
101
-
switch-to-application-7 = mkEmptyArray type.string;
102
-
switch-to-application-8 = mkEmptyArray type.string;
103
-
switch-to-application-9 = mkEmptyArray type.string;
104
-
105
-
106
-
switch-to-workspace-left = ["<Super>U" "<Super>Page_Up" "<Super><Alt>Left" "<Control><Alt>Left"];
107
-
switch-to-workspace-right = ["<Super>I" "<Super>Page_Down" "<Super><Alt>Right" "<Control><Alt>Right"];
108
-
109
-
maximize = [ "<Super>K" ];
110
-
unmaximize = [ "<Super>J" ];
111
-
toggle-tiled-left = [ "<Super>H" ];
112
-
toggle-tiled-right = [ "<Super>L" ];
113
-
114
-
};
115
-
116
-
"org/gnome/settings-daemon/plugins/custom-keybindings/custom0" = {
117
-
binding = "<Super>Enter";
118
-
command = "${lib.getExe packages.ghostty-wrapped}";
119
-
name = "Terminal";
120
-
};
121
-
122
-
};
123
-
}
124
-
];
125
-
}
+6
-5
modules/networking.nix
+6
-5
modules/networking.nix
···
1
-
{
2
-
...
3
-
}:
4
1
{
5
2
networking.hostName = "asa-fw"; # Define your hostname.
6
3
# Pick only one of the below networking options.
7
4
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
5
+
# networking.wireless.iwd.enable = true;
6
+
7
+
# networking.useNetworkd = true;
8
+
9
+
# networking.useDHCP = false;
8
10
networking.networkmanager = {
9
11
enable = true;
10
-
wifi.backend = "wpa_supplicant";
12
+
# wifi.backend = "iwd";
11
13
};
12
-
programs.nm-applet.enable = true; # cursed wifi widget
13
14
14
15
# networking.firewall = {
15
16
# enable = true;
-115
modules/niri.nix
-115
modules/niri.nix
···
1
-
2
-
{
3
-
lib,
4
-
pkgs,
5
-
packages,
6
-
...
7
-
}:
8
-
{
9
-
systemd.user.services = {
10
-
swayidle = {
11
-
enable = true;
12
-
unitConfig = {
13
-
PartOf = "graphical-session.target";
14
-
After = "graphical-session.target";
15
-
Requisite = "graphical-session.target";
16
-
};
17
-
wantedBy = [ "graphical-session.target" ];
18
-
serviceConfig = {
19
-
ExecStart = "${lib.getExe pkgs.swayidle} -w timeout 300 '${lib.getExe pkgs.niri} msg action power-off-monitors' timeout 300 '${lib.getExe packages.swaylock-wrapped} -f' before-sleep '${lib.getExe packages.swaylock-wrapped} -f'";
20
-
Restart = "on-failure";
21
-
};
22
-
};
23
-
};
24
-
25
-
programs.niri = {
26
-
enable = true;
27
-
package = packages.niri-wrapped;
28
-
};
29
-
30
-
programs.waybar = {
31
-
enable = true;
32
-
package = packages.waybar-wrapped;
33
-
};
34
-
35
-
services.greetd = {
36
-
enable = true;
37
-
settings = {
38
-
default_session = {
39
-
command = "${lib.getExe pkgs.tuigreet} --time --cmd 'bash -l -c ${lib.getExe' packages.niri-wrapped "niri-session"}'";
40
-
user = "greeter";
41
-
};
42
-
};
43
-
};
44
-
45
-
# https://github.com/YaLTeR/niri/wiki/Important-Software
46
-
47
-
environment.systemPackages = with pkgs; [
48
-
adwaita-icon-theme
49
-
gnome-themes-extra
50
-
nautilus
51
-
packages.mako-wrapped
52
-
packages.fuzzel-wrapped
53
-
wl-clipboard
54
-
xwayland-satellite
55
-
networkmanagerapplet
56
-
];
57
-
58
-
systemd.user.services.polkit-gnome-authentication-agent-1 = {
59
-
description = "polkit-gnome-authentication-agent-1";
60
-
wantedBy = [ "graphical-session.target" ];
61
-
wants = [ "graphical-session.target" ];
62
-
after = [ "graphical-session.target" ];
63
-
serviceConfig = {
64
-
Type = "simple";
65
-
ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
66
-
Restart = "on-failure";
67
-
RestartSec = 1;
68
-
TimeoutStopSec = 10;
69
-
};
70
-
};
71
-
72
-
# some gnome settings (dark mode)
73
-
programs.dconf.profiles.user.databases = [
74
-
{
75
-
lockAll = true;
76
-
settings = {
77
-
"org/gnome/desktop/interface" = {
78
-
accent-color = "teal";
79
-
color-scheme = "prefer-dark";
80
-
};
81
-
};
82
-
}
83
-
];
84
-
85
-
# configure xdg portals and default apps
86
-
xdg.portal = {
87
-
enable = true;
88
-
xdgOpenUsePortal = true;
89
-
extraPortals = with pkgs; [
90
-
xdg-desktop-portal-gtk
91
-
xdg-desktop-portal-gnome
92
-
];
93
-
};
94
-
95
-
# default handlers
96
-
xdg.terminal-exec = {
97
-
enable = true;
98
-
settings = {
99
-
default = [ "Alacritty.desktop" ];
100
-
};
101
-
};
102
-
103
-
xdg.mime.defaultApplications = {
104
-
"x-scheme-handler/http" = "org.mozilla.firefox.desktop";
105
-
"x-scheme-handler/https" = "org.mozilla.firefox.desktop";
106
-
"x-scheme-handler/ftp" = "org.mozilla.firefox.desktop";
107
-
"x-scheme-handler/mailto" = "org.mozilla.thunderbird.desktop";
108
-
"text/plain" = "Helix.desktop";
109
-
"application/pdf" = "org.mozilla.firefox.desktop";
110
-
# "image/png" = [
111
-
# "sxiv.desktop"
112
-
# "gimp.desktop"
113
-
# ];
114
-
};
115
-
}
+97
-23
modules/system.nix
+97
-23
modules/system.nix
···
1
1
{
2
+
lib,
2
3
pkgs,
4
+
config,
5
+
modulesPath,
3
6
...
4
7
}:
5
-
6
8
{
7
-
nix.settings.trusted-users = [
8
-
"root"
9
-
"@wheel"
10
-
];
9
+
# imports = [ "${modulesPath}/profiles/perlless.nix" ];
10
+
# stuff to remove perl
11
+
# system.disableInstallerTools = true;
12
+
system.tools.nixos-generate-config.enable = lib.mkDefault false;
13
+
environment.defaultPackages = lib.mkDefault [ ];
14
+
# documentation.info.enable = lib.mkDefault false;
15
+
# documentation.nixos.enable = lib.mkDefault false;
16
+
17
+
18
+
nix.settings = {
19
+
experimental-features = [
20
+
"nix-command"
21
+
"flakes"
22
+
"ca-derivations"
23
+
];
24
+
trusted-users = [ "root" ];
25
+
allowed-users = [ "@wheel" ];
26
+
auto-optimise-store = true;
27
+
};
28
+
29
+
nix.gc = {
30
+
automatic = true;
31
+
dates = "daily";
32
+
};
33
+
34
+
# nix.optimise = {
35
+
# automatic = true;
36
+
# dates = "daily";
37
+
# };
38
+
39
+
# improve laptop responsiveness during rebuilds
40
+
# nix.daemonCPUSchedPolicy = "idle";
41
+
42
+
# nix.channel.enable = false;
43
+
# nix.nixPath = [ "nixpkgs=/etc/nixos/nixpkgs" ];
44
+
45
+
# environment.etc = {
46
+
# "nixos/nixpkgs".source = builtins.storePath pkgs.path;
47
+
# };
48
+
49
+
hardware.enableRedistributableFirmware = true;
50
+
51
+
documentation.man = {
52
+
enable = true;
53
+
man-db.enable = false;
54
+
mandoc.enable = true;
55
+
};
56
+
57
+
# nixpkgs.hostPlatform = {
58
+
# system = "x86_64-linux";
59
+
# gcc.arch = "znver4";
60
+
# gcc.tune = "znver4";
61
+
# };
62
+
63
+
security.sudo.enable = false;
11
64
12
65
# Use the systemd-boot EFI boot loader.
13
66
boot.loader.systemd-boot = {
14
67
enable = true;
15
-
configurationLimit = 10;
68
+
configurationLimit = 4;
16
69
};
17
70
boot.loader.efi.canTouchEfiVariables = true;
18
71
19
-
# Set your time zone.
20
-
time.timeZone = "America/New_York";
72
+
boot.initrd.systemd.enable = true;
21
73
22
-
# why is this needed again?
23
-
systemd.user.extraConfig = ''
24
-
DefaultEnvironment="PATH=/run/current-system/sw/bin"
25
-
'';
74
+
system.etc.overlay = {
75
+
enable = true;
76
+
mutable = true;
77
+
};
26
78
27
-
# latest (not lts) kernel?
28
-
boot.kernelPackages = pkgs.linuxPackages_latest;
79
+
boot.tmp.cleanOnBoot = true;
80
+
boot.tmp.useTmpfs = true;
81
+
systemd.services.nix-daemon = {
82
+
environment.TMPDIR = "/var/tmp";
83
+
};
84
+
85
+
security.lockKernelModules = true;
86
+
security.protectKernelImage = true;
87
+
88
+
# will break / experimental
89
+
systemd.enableStrictShellChecks = true;
90
+
91
+
# i wonder if this is a good idea
92
+
zramSwap = {
93
+
enable = true;
94
+
algorithm = "zstd";
95
+
};
96
+
97
+
services.dbus.implementation = "broker";
98
+
99
+
# prevent freezing on high loads
100
+
services.irqbalance.enable = true;
101
+
services.earlyoom.enable = true;
29
102
30
103
programs.nh = {
31
104
enable = true;
32
-
clean.enable = true;
33
-
clean.extraArgs = "--keep-since 4d --keep 3";
34
105
flake = "/home/asa/system";
35
106
};
36
107
108
+
# Set your time zone.
109
+
time.timeZone = "America/New_York";
110
+
111
+
# latest (lts) kernel?
112
+
boot.kernelPackages = pkgs.linuxPackages_latest;
113
+
# hardware.framework.enableKmod = false;
114
+
37
115
# Select internationalisation properties.
38
116
i18n.defaultLocale = "en_US.UTF-8";
39
117
40
-
nix.settings.experimental-features = [
41
-
"nix-command"
42
-
"flakes"
43
-
];
44
-
45
118
# For framework
46
119
services.fwupd.enable = true;
47
120
48
-
# Define a user account. Don't forget to set a password with ‘passwd’.
121
+
# User accounts
122
+
# users.mutableUsers = false;
123
+
services.userborn.enable = true;
49
124
users.users.asa = {
50
125
isNormalUser = true;
51
126
extraGroups = [
···
77
152
#
78
153
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
79
154
system.stateVersion = "24.11"; # Did you read the comment?
80
-
81
155
}
+4
-1
programs/alacritty-wrapped.nix
+4
-1
programs/alacritty-wrapped.nix
+72
programs/chromium-wrapped.nix
+72
programs/chromium-wrapped.nix
···
1
+
{
2
+
lib,
3
+
mkWrapper,
4
+
chromium,
5
+
}:
6
+
let
7
+
enable_features = [
8
+
"CapReferrerToOriginOnCrossOrigin"
9
+
"ContentSettingsPartitioning"
10
+
"HstsTopLevelNavigationsOnly"
11
+
"LocalNetworkAccessChecks:LocalNetworkAccessChecksWarn/false"
12
+
"LocalNetworkAccessChecksWebRTC"
13
+
"PartitionConnectionsByNetworkIsolationKey"
14
+
"ReduceAcceptLanguage"
15
+
"SplitCodeCacheByNetworkIsolationKey"
16
+
"SplitCacheByNetworkIsolationKey"
17
+
"SplitCacheByIncludeCredentials"
18
+
"SplitCacheByNavigationInitiator"
19
+
"StrictOriginIsolation"
20
+
21
+
# https://wiki.archlinux.org/title/Chromium
22
+
"TouchpadOverscrollHistoryNavigation"
23
+
"WaylandPerSurfaceScale"
24
+
"WaylandUiScale"
25
+
];
26
+
disable_features = [
27
+
"AllowSwiftShaderFallback"
28
+
"AllowSoftwareGLFallbackDueToCrash"
29
+
"AutofillServerCommunication"
30
+
"BrowsingTopics"
31
+
"BrowsingTopicsDocumentAPI"
32
+
"BrowsingTopicsParameters"
33
+
"InterestFeedV2"
34
+
"NTPPopularSitesBakedInContent"
35
+
"UsePopularSitesSuggestions"
36
+
"LensStandalone"
37
+
"MediaDrmPreprovisioning"
38
+
39
+
"OptimizationHints"
40
+
"OptimizationHintsFetching"
41
+
"OptimizationHintsFetching"
42
+
"AnonymousDataConsent"
43
+
"OptimizationPersonalizedHintsFetching"
44
+
"OptimizationGuideModelDownloading"
45
+
"TextSafetyClassifier"
46
+
47
+
"PrivacySandboxSettings4"
48
+
"Reporting"
49
+
"CrashReporting"
50
+
"DocumentReporting"
51
+
"TabHoverCardImages"
52
+
53
+
# "WebGPUBlobCache"
54
+
# "WebGPUService"
55
+
];
56
+
in
57
+
mkWrapper {
58
+
pkg = chromium;
59
+
chromium.prependFlags = [
60
+
"--component-updater=--disable-pings"
61
+
"--disable-breakpad --disable-crash-reporter"
62
+
"--extension-content-verification=enforce_strict --extensions-install-verification=enforce_strict"
63
+
# "--js-flags=--jitless"
64
+
"--no-pings"
65
+
"--ozone-platform=wayland"
66
+
"--enable-features=${lib.strings.concatStringsSep "," enable_features}"
67
+
"--disable-features=${lib.strings.concatStringsSep "," disable_features}"
68
+
69
+
# more arch wiki
70
+
"--gtk-version=4"
71
+
];
72
+
}
+17
-18
programs/default.nix
+17
-18
programs/default.nix
···
1
-
{ pkgs }:
2
-
pkgs.lib.fix (
1
+
{
2
+
sources ? import ../npins,
3
+
pkgs ? import sources.nixpkgs { },
4
+
}:
5
+
let
6
+
allFiles = builtins.attrNames (builtins.readDir ./.);
7
+
packageFiles = builtins.filter (
8
+
file: pkgs.lib.hasSuffix ".nix" file && file != "default.nix"
9
+
) allFiles;
10
+
in
11
+
pkgs.lib.makeScope pkgs.newScope (
3
12
self:
4
-
let
5
-
callPackage = pkgs.lib.callPackageWith (
6
-
pkgs
7
-
// self
8
-
// {
9
-
mkWrapper = import ../utils/wrap.nix pkgs;
10
-
theme = import ../config/theme.nix;
11
-
}
12
-
);
13
-
allFiles = builtins.attrNames (builtins.readDir ./.);
14
-
packageFiles = builtins.filter (
15
-
file: pkgs.lib.hasSuffix ".nix" file && file != "default.nix"
16
-
) allFiles;
17
-
in
18
-
builtins.listToAttrs (
13
+
{
14
+
mkWrapper = import ../utils/wrap.nix pkgs;
15
+
theme = import ../config/theme.nix;
16
+
}
17
+
// builtins.listToAttrs (
19
18
map (file: {
20
19
name = pkgs.lib.removeSuffix ".nix" file;
21
-
value = callPackage ./${file} { };
20
+
value = self.callPackage ./${file} { };
22
21
}) packageFiles
23
22
)
24
23
)
+21
-23
programs/helix-wrapped.nix
+21
-23
programs/helix-wrapped.nix
···
5
5
}:
6
6
let
7
7
cfg = writers.writeTOML "config.toml" {
8
-
theme = "zed_onedark";
8
+
theme = "zed_onedark";
9
9
10
-
keys.normal = {
11
-
tab = "goto_next_buffer";
12
-
S-tab = "goto_previous_buffer";
13
-
};
14
-
15
-
editor = {
16
-
bufferline = "multiple";
17
-
idle-timeout = 5;
18
-
completion-timeout = 5;
19
-
end-of-line-diagnostics = "hint";
20
-
inline-diagnostics.cursor-line = "error";
10
+
keys.normal = {
11
+
tab = "goto_next_buffer";
12
+
S-tab = "goto_previous_buffer";
13
+
};
21
14
22
-
lsp.display-inlay-hints = true;
15
+
editor = {
16
+
bufferline = "multiple";
17
+
idle-timeout = 5;
18
+
completion-timeout = 5;
19
+
end-of-line-diagnostics = "hint";
20
+
inline-diagnostics.cursor-line = "error";
23
21
24
-
cursor-shape = {
25
-
insert = "bar";
26
-
normal = "block";
27
-
select = "underline";
28
-
};
22
+
lsp.display-inlay-hints = true;
29
23
30
-
file-picker = {
31
-
hidden = true;
32
-
ignore = true;
33
-
};
24
+
cursor-shape = {
25
+
insert = "bar";
26
+
normal = "block";
27
+
select = "underline";
28
+
};
34
29
35
-
soft-wrap.enable = true;
30
+
file-picker = {
31
+
hidden = true;
32
+
ignore = true;
36
33
};
37
34
};
35
+
};
38
36
in
39
37
mkWrapper {
40
38
pkg = helix;
+51
-53
programs/niri-wrapped.nix
+51
-53
programs/niri-wrapped.nix
···
1
1
{
2
-
pkgs,
2
+
writeText,
3
3
lib,
4
4
mkWrapper,
5
5
theme,
6
6
niri,
7
-
swaylock-wrapped,
8
7
alacritty-wrapped,
9
-
fuzzel-wrapped,
10
-
wireplumber,
11
-
brightnessctl,
12
-
flatpak,
8
+
chromium-wrapped,
9
+
noctalia-shell,
13
10
}:
14
11
let
15
-
cfg = pkgs.writeText "config.kdl" ''
12
+
cfg = writeText "config.kdl" ''
16
13
// This config is in the KDL format: https://kdl.dev
17
14
// "/-" comments out the following node.
18
15
// Check the wiki for a full description of the configuration:
19
16
// https://github.com/YaLTeR/niri/wiki/Configuration:-Overview
20
17
21
-
spawn-at-startup "xwayland-satellite"
22
-
23
-
// Temporary for xwayland
24
-
environment {
25
-
DISPLAY ":0"
26
-
}
27
-
28
18
// Input device configuration.
29
19
// Find the full list of options on the wiki:
30
20
// https://github.com/YaLTeR/niri/wiki/Configuration:-Input
31
21
input {
22
+
// mod-key "Alt"
23
+
// mod-key-nested "Alt"
24
+
32
25
keyboard {
33
26
xkb {
34
27
// You can set rules, model, layout, variant and options.
···
224
217
inactive-color "#${theme.colors.gray}"
225
218
}
226
219
220
+
default-column-display "normal"
221
+
222
+
tab-indicator {
223
+
width 8
224
+
gap 4
225
+
length total-proportion=1.0
226
+
position "top"
227
+
place-within-column
228
+
}
229
+
227
230
// You can enable drop shadows for windows.
228
231
shadow {
229
232
// Uncomment the next line to enable shadows.
···
267
270
// Top and bottom struts will simply add outer gaps in addition to the area occupied by
268
271
// layer-shell panels and regular gaps.
269
272
struts {
270
-
// left 64
271
-
// right 64
272
-
// top 64
273
-
// bottom 64
273
+
// remove gaps from top bar
274
+
top -4
274
275
}
275
276
}
276
277
···
310
311
// Find more information on the wiki:
311
312
// https://github.com/YaLTeR/niri/wiki/Configuration:-Window-Rules
312
313
313
-
// Work around WezTerm's initial configure bug
314
-
// by setting an empty default-column-width.
315
-
window-rule {
316
-
// This regular expression is intentionally made as specific as possible,
317
-
// since this is the default config, and we want no false positives.
318
-
// You can get away with just app-id="wezterm" if you want.
319
-
match app-id=r#"^org\.wezfurlong\.wezterm$"#
320
-
default-column-width {}
321
-
}
322
-
323
-
// Open the Firefox picture-in-picture player as floating by default.
314
+
// Open the chromium-wrapped picture-in-picture player as floating by default.
324
315
window-rule {
325
316
// This app-id regular expression will work for both:
326
-
// - host Firefox (app-id is "firefox")
327
-
// - Flatpak Firefox (app-id is "org.mozilla.firefox")
328
-
match app-id=r#"firefox$"# title="^Picture-in-Picture$"
317
+
// - host chromium-wrapped (app-id is "chromium-wrapped")
318
+
// - Flatpak chromium-wrapped (app-id is "org.mozilla.chromium-wrapped")
319
+
match app-id=r#""# title="^Picture in picture$"
329
320
open-floating true
330
321
}
331
322
···
370
361
371
362
// Suggested binds for running programs: terminal, app launcher, screen locker.
372
363
Mod+Return { spawn "${lib.getExe alacritty-wrapped}"; }
373
-
Mod+D { spawn "${lib.getExe fuzzel-wrapped}"; }
374
-
Mod+Shift+Return { spawn "${lib.getExe flatpak}" "run" "org.mozilla.firefox"; }
375
-
Super+Alt+L { spawn "${lib.getExe swaylock-wrapped}"; }
364
+
Mod+Shift+Return { spawn "${lib.getExe chromium-wrapped}"; }
376
365
377
366
// You can also use a shell. Do this if you need pipes, multiple commands, etc.
378
367
// Note: the entire command goes as a single argument in the end.
379
368
// Mod+T { spawn "bash" "-c" "notify-send hello && exec alacritty"; }
380
369
381
-
// Example volume keys mappings for PipeWire & WirePlumber.
382
-
// The allow-when-locked=true property makes them work even when the session is locked.
383
-
XF86AudioRaiseVolume allow-when-locked=true { spawn "${lib.getExe' wireplumber "wpctl"}" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.08+"; }
384
-
XF86AudioLowerVolume allow-when-locked=true { spawn "${lib.getExe' wireplumber "wpctl"}" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.08-"; }
385
-
XF86AudioMute allow-when-locked=true { spawn "${lib.getExe' wireplumber "wpctl"}" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle"; }
386
-
XF86AudioMicMute allow-when-locked=true { spawn "${lib.getExe' wireplumber "wpctl"}" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle"; }
387
-
XF86MonBrightnessDown allow-when-locked=true {spawn "${lib.getExe' brightnessctl "brightnessctl"}" "-e" "set" "10%-"; }
388
-
XF86MonBrightnessUp allow-when-locked=true {spawn "${lib.getExe brightnessctl}" "-e" "set" "+10%"; }
370
+
// Core Noctalia binds
371
+
Mod+D { spawn "${lib.getExe noctalia-shell}" "ipc" "call" "launcher" "toggle"; }
372
+
Mod+Space { spawn "${lib.getExe noctalia-shell}" "ipc" "call" "launcher" "toggle"; }
389
373
390
-
Mod+Ctrl+Shift+Alt+L { spawn "${lib.getExe flatpak}" "run" "org.mozilla.firefox" "--new-window" "https://www.linkedin.com/"; }
374
+
// Audio controls
375
+
XF86AudioRaiseVolume { spawn "${lib.getExe noctalia-shell}" "ipc" "call" "volume" "increase"; }
376
+
XF86AudioLowerVolume { spawn "${lib.getExe noctalia-shell}" "ipc" "call" "volume" "decrease"; }
377
+
XF86AudioMute { spawn "${lib.getExe noctalia-shell}" "ipc" "call" "volume" "muteOutput"; }
378
+
379
+
// Brightness controls
380
+
XF86MonBrightnessUp { spawn "${lib.getExe noctalia-shell}" "ipc" "call" "brightness" "increase"; }
381
+
XF86MonBrightnessDown { spawn "${lib.getExe noctalia-shell}" "ipc" "call" "brightness" "decrease"; }
382
+
383
+
Mod+Ctrl+Shift+Alt+L { spawn "${lib.getExe chromium-wrapped}" "--new-window" "https://www.linkedin.com/"; }
391
384
392
385
Mod+Q { close-window; }
393
386
···
496
489
// These binds are also affected by touchpad's natural-scroll, so these
497
490
// example binds are "inverted", since we have natural-scroll enabled for
498
491
// touchpads by default.
499
-
// Mod+TouchpadScrollDown { spawn "${lib.getExe' wireplumber "wpctl"}" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+"; }
500
-
// Mod+TouchpadScrollUp { spawn "${lib.getExe' wireplumber "wpctl"}" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-"; }
501
492
502
493
// You can refer to workspaces by index. However, keep in mind that
503
494
// niri is a dynamic workspace system, so these commands are kind of
···
590
581
Print { screenshot; }
591
582
Ctrl+Print { screenshot-screen; }
592
583
Alt+Print { screenshot-window; }
593
-
Super+P { screenshot; }
594
-
Ctrl+Super+P { screenshot-screen; }
595
-
Alt+Super+P { screenshot-window; }
584
+
Mod+P { screenshot; }
585
+
Ctrl+Mod+P { screenshot-screen; }
586
+
Alt+Mod+P { screenshot-window; }
596
587
597
588
// Applications such as remote-desktop clients and software KVM switches may
598
589
// request that niri stops processing the keyboard shortcuts defined here
···
612
603
// moving the mouse or pressing any other key.
613
604
Mod+Shift+P { power-off-monitors; }
614
605
}
606
+
607
+
// noctalia settings
608
+
layer-rule {
609
+
match namespace="^quickshell-overview$"
610
+
place-within-backdrop true
611
+
}
612
+
613
+
debug {
614
+
honor-xdg-activation-with-invalid-serial
615
+
}
615
616
'';
616
617
in
617
618
mkWrapper {
618
619
pkg = niri;
619
-
niri.prependFlags = [
620
-
"--config"
621
-
"${cfg}"
622
-
];
620
+
niri.env.NIRI_CONFIG = "${cfg}";
623
621
}