dot-nixos/configuration.nix
Tim Peters d249a9dbb6 Gen 1
2024-03-05 22:05:40 +01:00

56 lines
1.5 KiB
Nix
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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)
];
}