organization

This commit is contained in:
caandt 2024-10-18 14:11:33 -05:00
parent 1fb9627aa7
commit dfa1b0a43d
7 changed files with 62 additions and 9 deletions

View file

@ -30,7 +30,7 @@
username = "ahnwuoa"; username = "ahnwuoa";
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
}; };
modules = [ user/home.nix ]; modules = [ ./user ];
}; };
}; };
} }

View file

@ -13,7 +13,10 @@ in {
name = ".local/bin/${x}"; name = ".local/bin/${x}";
value = { source = mkln x; }; value = { source = mkln x; };
}) })
(builtins.attrNames (builtins.readDir ./bin)) (builtins.filter
(x: x != "default.nix")
(builtins.attrNames (builtins.readDir ./.))
)
); );
home.packages = pkgs.lib.lists.flatten (builtins.attrValues deps); home.packages = pkgs.lib.lists.flatten (builtins.attrValues deps);
} }

11
user/default.nix Normal file
View file

@ -0,0 +1,11 @@
{ ... }:
{
imports = [
./bin
./home.nix
./share
./theme.nix
./xdg.nix
];
}

View file

@ -4,7 +4,7 @@
imports = [ imports = [
./xdg.nix ./xdg.nix
./theme.nix ./theme.nix
./bin.nix ./bin
]; ];
home.username = username; home.username = username;

12
user/share/default.nix Normal file
View file

@ -0,0 +1,12 @@
{ ... }:
{
imports = [
./nsxiv-rifle.nix
];
xdg.dataFile."bell.wav".source = ./bell.wav;
xdg.dataFile."wallpaper.png".source = ./wallpaper.png;
xdg.dataFile."recently-used.xbel".text = "";
xdg.dataFile."RecentDocuments".text = "";
}

View file

@ -0,0 +1,31 @@
{ ... }:
{
xdg.desktopEntries."nsxiv-rifle" = {
exec = "nsxiv-rifle %F";
icon = "nsxiv";
name = "nsxiv-rifle";
mimeType = [
"image/bmp"
"image/gif"
"image/jpeg"
"image/jpg"
"image/png"
"image/tiff"
"image/x-bmp"
"image/x-portable-anymap"
"image/x-portable-bitmap"
"image/x-portable-graymap"
"image/x-tga"
"image/x-xpixmap"
"image/webp"
"image/heic"
"image/svg+xml"
"application/postscript"
"image/jp2"
"image/jxl"
"image/avif"
"image/heif"
];
};
}

View file

@ -27,20 +27,16 @@ in {
''; '';
fonts.fontconfig.enable = false; fonts.fontconfig.enable = false;
gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc"; gtk.gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
xdg.dataFile."bell.wav".source = share/bell.wav;
xdg.dataFile."wallpaper.png".source = share/wallpaper.png;
xdg.dataFile."recently-used.xbel".text = "";
xdg.dataFile."RecentDocuments".text = "";
xdg.mimeApps.enable = true; xdg.mimeApps.enable = true;
xdg.mimeApps.defaultApplications = let xdg.mimeApps.defaultApplications = let
image = "nsxiv.desktop"; image = "nsxiv-rifle.desktop";
browser = "firefox.desktop"; browser = "firefox.desktop";
text = "nvim.desktop"; text = "nvim.desktop";
media = "mpv.desktop"; media = "mpv.desktop";
in { in {
"image/jpeg" = image; "image/jpeg" = image;
"image/png" = image; "image/png" = image;
"image/gif" = media; "image/gif" = image;
"audio/mpeg" = media; "audio/mpeg" = media;
"audio/ogg" = media; "audio/ogg" = media;