56 lines
1.5 KiB
Nix
56 lines
1.5 KiB
Nix
# Edit this configuration file to define what should be installed on
|
||
# your system. Help is available in the configuration.nix(5) man page
|
||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||
|
||
{ config, pkgs, ... }:
|
||
|
||
let
|
||
dbus-sway-environment = pkgs.writeTextFile {
|
||
name = "dbus-sway-environment";
|
||
destination = "/bin/dbus-sway-environment";
|
||
executable = true;
|
||
|
||
text = ''
|
||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP DISPLAY SWAYSOCK
|
||
systemctl --user stop graphical-session.target
|
||
systemctl --user start sway-session.target
|
||
'';
|
||
};
|
||
|
||
configure-gtk = pkgs.writeTextFile {
|
||
name = "configure-gtk";
|
||
destination = "/bin/configure-gtk";
|
||
executable = true;
|
||
|
||
text = let
|
||
schema = pkgs.gsettings-desktop-schemas;
|
||
datadir = "${schema}/share/gsettings-schemas/${schema.name}";
|
||
in ''
|
||
export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS
|
||
gnome_schema=org.gnome.desktop.interface
|
||
${pkgs.glib}/bin/gsettings set $gnome_schema gtk-theme 'adw-gtk3-dark'
|
||
${pkgs.glib}/bin/gsettings set $gnome_schema color-scheme 'prefer-dark'
|
||
${pkgs.glib}/bin/gsettings set $gnome_schema icon-theme 'Adwaita'
|
||
'';
|
||
};
|
||
|
||
in
|
||
{
|
||
imports =
|
||
[
|
||
<home-manager/nixos>
|
||
./hardware-configuration.nix
|
||
./system
|
||
];
|
||
|
||
home-manager = {
|
||
useUserPackages = true;
|
||
useGlobalPkgs = true;
|
||
users.proto = import ./home;
|
||
};
|
||
|
||
nixpkgs.overlays =
|
||
[
|
||
(import ./overlays/pkgs.nix)
|
||
];
|
||
}
|