chore: Further modularize flake
This commit is contained in:
parent
c3706f3d36
commit
912751b0df
9 changed files with 124 additions and 112 deletions
100
nix/flake.nix
100
nix/flake.nix
|
|
@ -26,93 +26,51 @@
|
||||||
anyrun.inputs.nixpkgs.follows = "nixpkgs";
|
anyrun.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs @ { self, nixpkgs, home-manager, nix-flatpak, hyprland, anyrun, ironbar, ... }:
|
outputs = { ... }@inputs:
|
||||||
let
|
let
|
||||||
pkgs = import nixpkgs {
|
pkgs = import inputs.nixpkgs {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
base_imports = [
|
||||||
hypr_config = { monitor = [ "" ]; workspace = [ "" ]; };
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
./base/default.nix
|
||||||
|
];
|
||||||
in
|
in
|
||||||
|
#inputs.flake-parts.lib.mkFlake { inherit inputs; }
|
||||||
{
|
{
|
||||||
# TODO put actual configuration of profiles somewhere else
|
#imports = [
|
||||||
# TODO: deduplicate
|
#];
|
||||||
homeConfigurations."marmo" = home-manager.lib.homeManagerConfiguration {
|
#homeConfigurations."marmo" = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
# inherit pkgs;
|
||||||
modules = [ ./hardware/marmo/default.nix ];
|
# modules = [
|
||||||
};
|
# ./hardware/marmo/default.nix
|
||||||
nixosConfigurations."overheating" = nixpkgs.lib.nixosSystem {
|
# ./programs
|
||||||
inherit pkgs;
|
# ];
|
||||||
|
#};
|
||||||
|
nixosConfigurations."overheating" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs pkgs;
|
||||||
|
mod = ./hardware/overheating/base_config.nix;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hardware/overheating/default.nix
|
./hardware/overheating/default.nix
|
||||||
./base/default.nix
|
./programs
|
||||||
hyprland.nixosModules.default
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
xdg.portal.config.common.default = "*";
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
extraPortals = [
|
|
||||||
pkgs.xdg-desktop-portal-hyprland
|
|
||||||
pkgs.xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.users.dashie.imports = [
|
|
||||||
{
|
|
||||||
_module = { args = { inherit self inputs; }; };
|
|
||||||
}
|
|
||||||
./programs/default.nix
|
|
||||||
hyprland.homeManagerModules.default
|
|
||||||
anyrun.homeManagerModules.default
|
|
||||||
ironbar.homeManagerModules.default
|
|
||||||
./hardware/overheating/base_config.nix
|
|
||||||
./programs/hyprland/default.nix
|
|
||||||
nix-flatpak.homeManagerModules.nix-flatpak
|
|
||||||
./programs/flatpak.nix
|
|
||||||
];
|
|
||||||
home-manager.users.dashie.home.stateVersion = "24.05";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
nixosConfigurations."spaceship" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."spaceship" = inputs.nixpkgs.lib.nixosSystem {
|
||||||
inherit pkgs;
|
specialArgs = {
|
||||||
|
inherit inputs pkgs;
|
||||||
|
mod = ./hardware/spaceship/base_config.nix;
|
||||||
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hardware/spaceship/default.nix
|
./hardware/spaceship/default.nix
|
||||||
./hardware/streamdeck.nix
|
./hardware/streamdeck.nix
|
||||||
./programs/gaming/default.nix
|
./programs/gaming/default.nix
|
||||||
./base/default.nix
|
./programs
|
||||||
hyprland.nixosModules.default
|
] ++ base_imports;
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
{
|
|
||||||
xdg.portal.config.common.default = "*";
|
|
||||||
xdg.portal = {
|
|
||||||
enable = true;
|
|
||||||
extraPortals = [
|
|
||||||
pkgs.xdg-desktop-portal-hyprland
|
|
||||||
pkgs.xdg-desktop-portal-gtk
|
|
||||||
];
|
|
||||||
};
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.users.dashie.imports = [
|
|
||||||
{
|
|
||||||
_module = { args = { inherit self inputs; }; };
|
|
||||||
}
|
|
||||||
./programs/default.nix
|
|
||||||
hyprland.homeManagerModules.default
|
|
||||||
anyrun.homeManagerModules.default
|
|
||||||
ironbar.homeManagerModules.default
|
|
||||||
./hardware/spaceship/base_config.nix
|
|
||||||
./programs/hyprland/default.nix
|
|
||||||
nix-flatpak.homeManagerModules.nix-flatpak
|
|
||||||
./programs/flatpak.nix
|
|
||||||
];
|
|
||||||
home-manager.users.dashie.home.stateVersion = "24.05";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ lib, config, ... }: {
|
{ lib, config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/ironbar_config.nix
|
../../modules
|
||||||
];
|
];
|
||||||
wayland.windowManager.hyprland.settings.monitor = [
|
wayland.windowManager.hyprland.settings.monitor = [
|
||||||
# default
|
# default
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
{ config, ... }: {
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../../modules/ironbar_config.nix
|
../../modules
|
||||||
../../modules/hyprpaper_config.nix
|
|
||||||
];
|
];
|
||||||
wayland.windowManager.hyprland.settings.monitor = [
|
wayland.windowManager.hyprland.settings.monitor = [
|
||||||
# default
|
# default
|
||||||
|
|
|
||||||
6
nix/modules/default.nix
Normal file
6
nix/modules/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./ironbar_config.nix
|
||||||
|
./hyprpaper_config.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -38,8 +38,14 @@
|
||||||
nix-index
|
nix-index
|
||||||
libnotify
|
libnotify
|
||||||
zenith
|
zenith
|
||||||
|
nh
|
||||||
|
amberol
|
||||||
];
|
];
|
||||||
|
|
||||||
|
home.username = "dashie";
|
||||||
|
home.homeDirectory = "/home/dashie";
|
||||||
|
home.stateVersion = "24.05";
|
||||||
|
|
||||||
home.sessionPath = [
|
home.sessionPath = [
|
||||||
"$HOME/.cargo/bin"
|
"$HOME/.cargo/bin"
|
||||||
];
|
];
|
||||||
|
|
@ -68,4 +74,8 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
enableFishIntegration = true;
|
enableFishIntegration = true;
|
||||||
};
|
};
|
||||||
|
home.sessionVariables =
|
||||||
|
{
|
||||||
|
FLAKE = "home/dasshie/gits/dotFiles/nix";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,12 @@
|
||||||
{
|
{ inputs, pkgs, mod, ... }:
|
||||||
imports = [
|
let
|
||||||
|
base_imports = [
|
||||||
|
inputs.hyprland.homeManagerModules.default
|
||||||
|
inputs.anyrun.homeManagerModules.default
|
||||||
|
inputs.ironbar.homeManagerModules.default
|
||||||
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
|
./hyprland/default.nix
|
||||||
|
./flatpak.nix
|
||||||
./common.nix
|
./common.nix
|
||||||
./coding.nix
|
./coding.nix
|
||||||
./xdg.nix
|
./xdg.nix
|
||||||
|
|
@ -9,8 +16,21 @@
|
||||||
./themes/default.nix
|
./themes/default.nix
|
||||||
./individual_configs/default.nix
|
./individual_configs/default.nix
|
||||||
];
|
];
|
||||||
|
in
|
||||||
home.username = "dashie";
|
{
|
||||||
home.homeDirectory = "/home/dashie";
|
xdg.portal.config.common.default = "*";
|
||||||
home.stateVersion = "24.05";
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
extraPortals = [
|
||||||
|
pkgs.xdg-desktop-portal-hyprland
|
||||||
|
pkgs.xdg-desktop-portal-gtk
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.users.dashie.imports = [
|
||||||
|
{
|
||||||
|
_module = { args = { inherit inputs; }; };
|
||||||
|
}
|
||||||
|
mod
|
||||||
|
] ++ base_imports;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
}
|
|
||||||
|
|
@ -53,8 +53,8 @@
|
||||||
# @define-color secondary_sidebar_shade_color rgba(0, 0, 0, 0.36);
|
# @define-color secondary_sidebar_shade_color rgba(0, 0, 0, 0.36);
|
||||||
# @define-color thumbnail_bg_color #1a1b26;
|
# @define-color thumbnail_bg_color #1a1b26;
|
||||||
# @define-color thumbnail_fg_color #c0caf5;
|
# @define-color thumbnail_fg_color #c0caf5;
|
||||||
# @define-color sidebar_backdrop_color rgba(192, 202, 245, 0.12);
|
# @define-color sidebar_backdrop_color @sidebar_bg_color;
|
||||||
# @define-color secondary_sidebar_backdrop_color rgba(192, 202, 245, 0.12);
|
# @define-color secondary_sidebar_backdrop_color @sidebar_bg_color;
|
||||||
# @define-color blue_1 #99c1f1;
|
# @define-color blue_1 #99c1f1;
|
||||||
# @define-color blue_2 #62a0ea;
|
# @define-color blue_2 #62a0ea;
|
||||||
# @define-color blue_3 #3584e4;
|
# @define-color blue_3 #3584e4;
|
||||||
|
|
|
||||||
|
|
@ -1,33 +1,55 @@
|
||||||
{config, ...}:
|
# Copyright (c) 2020-2021 Mihai Fufezan
|
||||||
|
# credits to fufexan https://github.com/fufexan/dotfiles/blob/main/home/terminal/programs/xdg.nix
|
||||||
|
{ config
|
||||||
|
, pkgs
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
browser = [ "firefox.desktop" ];
|
browser = [ "firefox" ];
|
||||||
|
imageViewer = [ "imv" ];
|
||||||
|
videoPlayer = [ "mpv" ];
|
||||||
|
audioPlayer = [ "io.bassi.Amberol" ];
|
||||||
|
|
||||||
|
xdgAssociations = type: program: list:
|
||||||
|
builtins.listToAttrs (map
|
||||||
|
(e: {
|
||||||
|
name = "${type}/${e}";
|
||||||
|
value = program;
|
||||||
|
})
|
||||||
|
list);
|
||||||
|
|
||||||
|
image = xdgAssociations "image" imageViewer [ "png" "svg" "jpeg" "gif" ];
|
||||||
|
video = xdgAssociations "video" videoPlayer [ "mp4" "avi" "mkv" ];
|
||||||
|
audio = xdgAssociations "audio" audioPlayer [ "mp3" "flac" "wav" "aac" ];
|
||||||
|
browserTypes =
|
||||||
|
(xdgAssociations "application" browser [
|
||||||
|
"json"
|
||||||
|
"x-extension-htm"
|
||||||
|
"x-extension-html"
|
||||||
|
"x-extension-shtml"
|
||||||
|
"x-extension-xht"
|
||||||
|
"x-extension-xhtml"
|
||||||
|
])
|
||||||
|
// (xdgAssociations "x-scheme-handler" browser [
|
||||||
|
"about"
|
||||||
|
"ftp"
|
||||||
|
"http"
|
||||||
|
"https"
|
||||||
|
"unknown"
|
||||||
|
]);
|
||||||
|
|
||||||
# XDG MIME types
|
# XDG MIME types
|
||||||
# TODO: make this actually work
|
associations = builtins.mapAttrs (_: v: (map (e: "${e}.desktop") v)) ({
|
||||||
associations = {
|
"application/pdf" = [ "org.pwmt.zathura-pdf-mupdf" ];
|
||||||
"application/x-extension-htm" = browser;
|
|
||||||
"application/x-extension-html" = browser;
|
|
||||||
"application/x-extension-shtml" = browser;
|
|
||||||
"application/x-extension-xht" = browser;
|
|
||||||
"application/x-extension-xhtml" = browser;
|
|
||||||
"application/xhtml+xml" = browser;
|
|
||||||
"text/html" = browser;
|
"text/html" = browser;
|
||||||
"x-scheme-handler/about" = browser;
|
"text/plain" = [ "neovide" ];
|
||||||
"x-scheme-handler/chrome" = [ "brave.desktop" ];
|
"x-scheme-handler/chrome" = [ "com.brave.browser" ];
|
||||||
"x-scheme-handler/ftp" = browser;
|
"inode/directory" = [ "yazi" ];
|
||||||
"x-scheme-handler/http" = browser;
|
}
|
||||||
"x-scheme-handler/https" = browser;
|
// image
|
||||||
"x-scheme-handler/unknown" = browser;
|
// video
|
||||||
|
// audio
|
||||||
"audio/*" = [ "mpv.desktop" ];
|
// browserTypes);
|
||||||
"video/*" = [ "mpv.dekstop" ];
|
|
||||||
"image/*" = [ "imv.desktop" ];
|
|
||||||
"application/json" = browser;
|
|
||||||
"application/pdf" = [ "org.pwmt.zathura.desktop.desktop" ];
|
|
||||||
# "x-scheme-handler/discord" = [ "discordcanary.desktop" ];
|
|
||||||
# "x-scheme-handler/spotify" = [ "spotify.desktop" ];
|
|
||||||
};
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
xdg = {
|
xdg = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue