2024-12-22 06:43:30 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
username,
|
|
|
|
...
|
|
|
|
}:
|
2024-07-30 15:06:34 +01:00
|
|
|
{
|
2024-09-28 07:15:38 +01:00
|
|
|
nixpkgs.config.chromium.commandLineArgs = "--password-store='gnome-libsecret' --enable-features=UseOzonePlatform --ozone-platform=wayland";
|
2024-07-10 08:27:17 +01:00
|
|
|
hardware.bluetooth.enable = true;
|
2024-12-05 14:20:06 +00:00
|
|
|
networking.networkmanager.enable = true;
|
2024-07-10 08:27:17 +01:00
|
|
|
environment = {
|
2024-08-30 12:57:02 +01:00
|
|
|
sessionVariables = {
|
|
|
|
NIXOS_OZONE_WL = "1";
|
2024-10-25 11:25:34 +01:00
|
|
|
MOZ_ENABLE_WAYLAND = "1";
|
2024-11-06 07:27:52 +00:00
|
|
|
WEBKIT_DISABLE_COMPOSITING_MODE = "1";
|
2024-12-04 16:58:47 +00:00
|
|
|
MPLBACKEND = "TkAgg";
|
|
|
|
GDK_BACKEND = "wayland,x11";
|
2024-10-25 11:25:34 +01:00
|
|
|
XDG_SESSION_TYPE = "wayland";
|
2024-08-30 12:57:02 +01:00
|
|
|
QT_QPA_PLATFORM = "wayland";
|
2024-12-04 16:58:47 +00:00
|
|
|
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
|
|
|
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
2024-08-30 12:57:02 +01:00
|
|
|
};
|
2024-07-10 08:27:17 +01:00
|
|
|
systemPackages = with pkgs; [
|
2024-07-10 08:36:28 +01:00
|
|
|
libsecret
|
2024-07-19 08:52:17 +01:00
|
|
|
libnotify
|
2024-07-10 08:27:17 +01:00
|
|
|
xdg-utils
|
|
|
|
hunspell
|
|
|
|
hunspellDicts.en_GB-large
|
2024-12-05 13:51:47 +00:00
|
|
|
wl-clipboard
|
2024-12-21 06:14:49 +00:00
|
|
|
speedtest
|
2024-12-05 13:51:47 +00:00
|
|
|
overskride
|
2024-12-20 11:37:04 +00:00
|
|
|
hyprpicker
|
2024-11-18 14:02:16 +00:00
|
|
|
grim
|
|
|
|
slurp
|
|
|
|
swappy
|
2024-12-07 07:17:46 +00:00
|
|
|
nautilus
|
2024-12-05 11:52:37 +00:00
|
|
|
libreoffice
|
2024-11-14 08:43:27 +00:00
|
|
|
evince
|
|
|
|
image-roll
|
2024-12-05 13:51:47 +00:00
|
|
|
imagemagick
|
2024-11-14 08:43:27 +00:00
|
|
|
clapper
|
|
|
|
g4music
|
|
|
|
ffmpeg
|
2024-12-07 07:02:46 +00:00
|
|
|
picard
|
|
|
|
whipper
|
2024-11-14 08:43:27 +00:00
|
|
|
remmina
|
|
|
|
fractal
|
|
|
|
webcord
|
|
|
|
signal-desktop
|
2024-12-03 15:49:18 +00:00
|
|
|
whatsapp-for-linux
|
2024-11-14 08:43:27 +00:00
|
|
|
teams-for-linux
|
|
|
|
twinkle
|
|
|
|
nomachine-client
|
2024-07-10 08:27:17 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
security = {
|
|
|
|
polkit.enable = true;
|
|
|
|
pam.loginLimits = [
|
|
|
|
{
|
|
|
|
domain = "@users";
|
|
|
|
item = "rtprio";
|
|
|
|
type = "-";
|
|
|
|
value = 1;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
programs = {
|
|
|
|
dconf.enable = true;
|
|
|
|
noisetorch.enable = true;
|
2024-10-25 11:25:34 +01:00
|
|
|
seahorse.enable = true;
|
2024-10-25 12:19:00 +01:00
|
|
|
file-roller.enable = true;
|
2024-10-25 11:25:34 +01:00
|
|
|
hyprland.enable = true;
|
2024-07-10 08:27:17 +01:00
|
|
|
xwayland.enable = true;
|
|
|
|
};
|
|
|
|
gtk.iconCache.enable = true;
|
2024-10-25 11:25:34 +01:00
|
|
|
qt = {
|
|
|
|
enable = true;
|
2024-12-22 06:43:30 +00:00
|
|
|
style = if config.lib.stylix.scheme.variant == "light" then "adwaita" else "adwaita-dark";
|
2024-10-25 11:25:34 +01:00
|
|
|
};
|
2024-07-10 08:27:17 +01:00
|
|
|
services = {
|
2024-10-25 11:25:34 +01:00
|
|
|
gnome.gnome-keyring.enable = true;
|
2024-07-10 08:27:17 +01:00
|
|
|
flatpak.enable = true;
|
|
|
|
printing.enable = true;
|
2024-10-25 11:25:34 +01:00
|
|
|
tumbler.enable = true;
|
|
|
|
udisks2.enable = true;
|
2024-10-25 12:19:00 +01:00
|
|
|
gnome.sushi.enable = true;
|
2024-10-25 11:25:34 +01:00
|
|
|
gvfs = {
|
|
|
|
enable = true;
|
2024-12-07 07:17:46 +00:00
|
|
|
package = pkgs.gnome.gvfs;
|
2024-10-25 11:25:34 +01:00
|
|
|
};
|
2024-11-04 06:32:54 +00:00
|
|
|
kanata = {
|
2024-11-04 11:00:11 +00:00
|
|
|
enable = true;
|
2024-11-04 06:32:54 +00:00
|
|
|
keyboards.main = {
|
|
|
|
config = builtins.readFile ./kanata.kbd;
|
|
|
|
extraDefCfg = "process-unmapped-keys yes";
|
|
|
|
};
|
|
|
|
};
|
2024-07-10 08:27:17 +01:00
|
|
|
pipewire = {
|
|
|
|
enable = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
alsa = {
|
|
|
|
enable = true;
|
|
|
|
support32Bit = true;
|
|
|
|
};
|
|
|
|
};
|
2024-10-25 11:25:34 +01:00
|
|
|
greetd = {
|
|
|
|
enable = true;
|
|
|
|
settings =
|
|
|
|
let
|
|
|
|
default_session.command = "Hyprland";
|
|
|
|
in
|
|
|
|
{
|
|
|
|
inherit default_session;
|
|
|
|
initial_session = {
|
|
|
|
inherit (default_session) command;
|
|
|
|
user = username;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-07-10 08:27:17 +01:00
|
|
|
xserver = {
|
2024-08-05 14:49:37 +01:00
|
|
|
enable = true;
|
2024-11-05 10:34:24 +00:00
|
|
|
xkb.layout = "gb";
|
2024-07-10 08:27:17 +01:00
|
|
|
};
|
|
|
|
};
|
2024-10-25 11:25:34 +01:00
|
|
|
xdg.portal = {
|
|
|
|
enable = true;
|
|
|
|
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
|
2024-10-27 06:57:11 +00:00
|
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
2024-10-25 11:25:34 +01:00
|
|
|
};
|
2024-11-14 08:43:27 +00:00
|
|
|
home-manager.users.${username} =
|
|
|
|
{
|
|
|
|
config,
|
|
|
|
pkgs,
|
|
|
|
osConfig,
|
|
|
|
...
|
|
|
|
}:
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./home/hyprland.nix
|
|
|
|
./home/terminal/default.nix
|
2024-11-18 14:12:52 +00:00
|
|
|
./home/browser/firefox.nix
|
2024-11-26 06:27:57 +00:00
|
|
|
./home/emacs/default.nix
|
2024-11-14 13:50:55 +00:00
|
|
|
./home/email/default.nix
|
|
|
|
./home/calendar/default.nix
|
2024-11-26 06:27:57 +00:00
|
|
|
./home/password-store/default.nix
|
2024-11-14 08:43:27 +00:00
|
|
|
];
|
|
|
|
home.file.${config.gtk.gtk2.configLocation}.force = true;
|
|
|
|
services = {
|
|
|
|
syncthing.enable = true;
|
|
|
|
gammastep = {
|
|
|
|
inherit (osConfig.location) latitude longitude provider;
|
|
|
|
enable = true;
|
|
|
|
tray = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
gtk = {
|
|
|
|
enable = true;
|
|
|
|
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
|
|
|
iconTheme = {
|
2024-12-11 12:56:09 +00:00
|
|
|
package = (pkgs.papirus-icon-theme.override { color = "indigo"; });
|
2024-12-04 06:45:47 +00:00
|
|
|
name = if config.lib.stylix.scheme.variant == "light" then "Papirus-Light" else "Papirus-Dark";
|
2024-11-14 08:43:27 +00:00
|
|
|
};
|
|
|
|
};
|
2024-12-12 05:35:10 +00:00
|
|
|
stylix.targets.gtk.extraCss = with config.lib.stylix.scheme.withHashtag; ''
|
|
|
|
@define-color accent_color ${base0E-hex};
|
|
|
|
@define-color accent_bg_color ${base0E-hex};
|
|
|
|
'';
|
2024-11-14 08:43:27 +00:00
|
|
|
xdg = {
|
|
|
|
mime.enable = true;
|
|
|
|
mimeApps =
|
|
|
|
let
|
|
|
|
defaultApplications = import ./mimeapps.nix;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
enable = true;
|
|
|
|
inherit defaultApplications;
|
|
|
|
associations.added = defaultApplications;
|
|
|
|
};
|
|
|
|
userDirs = {
|
|
|
|
enable = true;
|
|
|
|
createDirectories = true;
|
|
|
|
extraConfig = {
|
|
|
|
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
configFile = {
|
|
|
|
# Stop programs from overriding mimeapps
|
|
|
|
"mimeapps.list".force = true;
|
|
|
|
# Ensure GTK config is set
|
|
|
|
"gtk-3.0/gtk.css".force = true;
|
|
|
|
"gtk-3.0/settings.ini".force = true;
|
|
|
|
"gtk-4.0/gtk.css".force = true;
|
|
|
|
"gtk-4.0/settings.ini".force = true;
|
2024-11-18 14:02:16 +00:00
|
|
|
# Set Swappy config so that it saves to Screenshots directory
|
|
|
|
"swappy/config".text = ''
|
|
|
|
[Default]
|
|
|
|
save_dir=${config.xdg.userDirs.pictures}/Screenshots/
|
|
|
|
save_filename_format=swappy-%Y%m%d-%H%M%S.png
|
|
|
|
show_panel=false
|
|
|
|
line_size=5
|
2024-11-18 14:11:30 +00:00
|
|
|
text_size=${toString config.stylix.fonts.sizes.desktop}
|
2024-11-18 14:02:16 +00:00
|
|
|
text_font=${config.stylix.fonts.sansSerif.name}
|
|
|
|
paint_mode=brush
|
|
|
|
early_exit=false
|
|
|
|
fill_shape=false
|
|
|
|
'';
|
2024-12-03 15:49:18 +00:00
|
|
|
# WhatsApp config
|
|
|
|
"whatsapp-for-linux/settings.conf" = {
|
|
|
|
force = true;
|
|
|
|
text = ''
|
|
|
|
[web]
|
|
|
|
allow-permissions=true
|
|
|
|
hw-accel=2
|
|
|
|
|
|
|
|
[general]
|
|
|
|
notification-sounds=true
|
|
|
|
close-to-tray=true
|
|
|
|
start-in-tray=true
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
# Teams config
|
|
|
|
"teams-for-linux/config.json" = {
|
|
|
|
force = true;
|
|
|
|
text = builtins.toJSON {
|
|
|
|
awayOnSystemIdle = true;
|
|
|
|
closeAppOnCross = false;
|
|
|
|
followSystemTheme = true;
|
|
|
|
notificationMethod = "electron";
|
|
|
|
optInTeamsV2 = true;
|
|
|
|
spellCheckerLanguages = [ "en_GB" ];
|
|
|
|
};
|
|
|
|
};
|
2024-11-14 08:43:27 +00:00
|
|
|
# Autostart some programs
|
2024-12-11 12:56:09 +00:00
|
|
|
"autostart/signal-desktop.desktop".source =
|
|
|
|
"${pkgs.signal-desktop}/share/applications/signal-desktop.desktop";
|
|
|
|
"autostart/com.github.eneshecan.WhatsAppForLinux.desktop".source =
|
|
|
|
"${pkgs.whatsapp-for-linux}/share/applications/com.github.eneshecan.WhatsAppForLinux.desktop";
|
2024-11-14 08:43:27 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2024-07-10 08:27:17 +01:00
|
|
|
}
|