feat(nix): add vars.nix to source global vars in nix config and refactor
This commit is contained in:
parent
5db6b40d2e
commit
085088a302
7 changed files with 35 additions and 34 deletions
|
@ -1,9 +1,6 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }: let
|
||||||
|
configDir = (import ../vars.nix).configDir;
|
||||||
let
|
|
||||||
configDir = "/home/matt/.nix/config";
|
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"swayosd/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swayosd/style.css";
|
"swayosd/style.css".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/swayosd/style.css";
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{ pkgs, config, hyprland, hyprgrass, ags, ... }: let
|
{ pkgs, config, hyprland, hyprgrass, ags, ... }: let
|
||||||
configDir = "/home/matt/.nix/config";
|
configDir = (import ../vars.nix).configDir;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
@ -39,15 +39,7 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# https://www.reddit.com/r/NixOS/comments/vc3srj/comment/iccqxw1/?utm_source=share&utm_medium=web2x&context=3
|
|
||||||
xdg.configFile = {
|
xdg.configFile = {
|
||||||
"../.themes/Dracula".source = "${pkgs.dracula-theme}/share/themes/Dracula";
|
|
||||||
|
|
||||||
"Kvantum/Dracula".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula";
|
|
||||||
"Kvantum/Dracula-Solid".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-Solid";
|
|
||||||
"Kvantum/Dracula-purple".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple";
|
|
||||||
"Kvantum/Dracula-purple-solid".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple-solid";
|
|
||||||
|
|
||||||
"hypr/main.conf".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/hypr/main.conf";
|
"hypr/main.conf".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/hypr/main.conf";
|
||||||
"hypr/hyprpaper.conf".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/hypr/hyprpaper.conf";
|
"hypr/hyprpaper.conf".source = config.lib.file.mkOutOfStoreSymlink "${configDir}/hypr/hyprpaper.conf";
|
||||||
};
|
};
|
||||||
|
|
|
@ -20,11 +20,11 @@
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./dconf.nix
|
./dconf.nix
|
||||||
|
./theme.nix
|
||||||
./hyprland.nix
|
./hyprland.nix
|
||||||
./bashdots.nix
|
./bashdots.nix
|
||||||
./dotfiles.nix
|
./dotfiles.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
./misc.nix
|
|
||||||
./nvim.nix
|
./nvim.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
xdg.desktopEntries.gparted = {
|
|
||||||
name = "GParted";
|
|
||||||
genericName = "Partition Editor";
|
|
||||||
comment = "Create, reorganize, and delete partitions";
|
|
||||||
exec = "Gparted";
|
|
||||||
icon = "gparted";
|
|
||||||
terminal = false;
|
|
||||||
type = "Application";
|
|
||||||
categories = [ "GNOME" "System" "Filesystem" ];
|
|
||||||
startupNotify = true;
|
|
||||||
settings = {
|
|
||||||
Keywords = "Partition";
|
|
||||||
X-GNOME-FullName = "GParted Partition Editor";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -19,6 +19,22 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
xdg.desktopEntries.gparted = {
|
||||||
|
name = "GParted";
|
||||||
|
genericName = "Partition Editor";
|
||||||
|
comment = "Create, reorganize, and delete partitions";
|
||||||
|
exec = "Gparted";
|
||||||
|
icon = "gparted";
|
||||||
|
terminal = false;
|
||||||
|
type = "Application";
|
||||||
|
categories = [ "GNOME" "System" "Filesystem" ];
|
||||||
|
startupNotify = true;
|
||||||
|
settings = {
|
||||||
|
Keywords = "Partition";
|
||||||
|
X-GNOME-FullName = "GParted Partition Editor";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
home.packages = with pkgs;
|
home.packages = with pkgs;
|
||||||
(with python311Packages; [
|
(with python311Packages; [
|
||||||
python
|
python
|
||||||
|
|
12
nixos/home/theme.nix
Normal file
12
nixos/home/theme.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
xdg.configFile = {
|
||||||
|
"../.themes/Dracula".source = "${pkgs.dracula-theme}/share/themes/Dracula";
|
||||||
|
|
||||||
|
"Kvantum/Dracula".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula";
|
||||||
|
"Kvantum/Dracula-Solid".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-Solid";
|
||||||
|
"Kvantum/Dracula-purple".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple";
|
||||||
|
"Kvantum/Dracula-purple-solid".source = "${pkgs.dracula-theme}/share/Kvantum/Dracula-purple-solid";
|
||||||
|
};
|
||||||
|
}
|
3
nixos/vars.nix
Normal file
3
nixos/vars.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
configDir = "/home/matt/.nix/config";
|
||||||
|
}
|
Loading…
Reference in a new issue