biiiiig refactor (part 1)

This commit is contained in:
Schrottkatze 2024-03-05 17:10:35 +01:00
parent 9a7768ff5b
commit 7bacabf0d3
Signed by: schrottkatze
SSH key fingerprint: SHA256:hXb3t1vINBFCiDCmhRABHX5ocdbLiKyCdKI4HK2Rbbc
23 changed files with 96 additions and 81 deletions

View file

@ -17,9 +17,7 @@
../../modules
];
jade = {
flatpak.enable = true;
desktop = {
compositing.enable = true;
syncthing.enable = true;
kdeconnect.enable = true;
cloud.enable = true;
@ -43,7 +41,6 @@
];
};
};
terminal.enable = true;
};
hardware.trackpoint = {

View file

@ -2,8 +2,9 @@
imports = [
./shell
./desktop
./terminal.nix
./flatpak.nix
./hardware
./firewall.nix
./desktop-environment
./input
];
}

View file

@ -0,0 +1,11 @@
{...}: {
imports = [
./audio.nix
./compositing.nix
./dunst.nix
./panels
./xmonad
./terminal.nix
./flatpak.nix
];
}

View file

@ -0,0 +1,16 @@
{
config,
lib,
pkgs,
...
}: {
services.flatpak.enable = true;
xdg.portal = {
enable = true;
# TODO
config.common.default = "*";
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
}

View file

@ -0,0 +1,6 @@
{...}: {
imports = [
./xmobar
./polybar.nix
];
}

View file

@ -0,0 +1,33 @@
{
lib,
pkgs,
...
}: {
home-manager.users.jade = {
config,
pkgs,
...
}: let
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs:
with pkgs; [
xmobar
statgrab
]);
in {
home = {
packages = [xmobarGhc];
file."xmobar.hs" = rec {
source = ./xmobar.hs;
target = ".config/xmobar/xmobar.hs";
onChange = ''
${xmobarGhc}/bin/ghc -threaded ${target}
${pkgs.busybox}/bin/pkill xmobar
${pkgs.haskellPackages.xmonad}/bin/xmonad --restart
'';
};
};
programs.xmobar = {
enable = true;
};
};
}

View file

@ -0,0 +1,25 @@
{
lib,
pkgs,
...
}: {
home-manager.users.jade = {
config,
pkgs,
...
}: {
home.packages = [pkgs.xmonadctl];
xsession.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
config = ./xmonad.hs;
};
home.file.wallpaper = {
target = "Pictures/wallpaper.jpg";
source = ../../../other/wallpaper.jpg;
onChange = ''
feh --bg-fill ~/Pictures/wallpaper.jpg;
'';
};
};
}

View file

@ -15,26 +15,19 @@
in
with lib; {
imports = [
./audio.nix
./gaming.nix
./creative.nix # TODO: more fine grained choices, not every setup needs fspy or rawtherapee
./dunst.nix
./compositing.nix
./ios-compat.nix
./syncthing.nix
./kdeconnect.nix
./themeing.nix
./cloud.nix
./networking.nix
./polybar.nix
./social.nix
./mail.nix
./specific-hardware
./xmonad.nix
./fonts.nix
./firefox.nix
./x.nix
./input
];
i18n.inputMethod = {

View file

@ -1,43 +0,0 @@
{
lib,
pkgs,
...
}: {
home-manager.users.jade = {
config,
pkgs,
...
}: let
xmobarGhc = pkgs.haskellPackages.ghcWithPackages (pkgs:
with pkgs; [
xmobar
statgrab
]);
in {
home.packages = [xmobarGhc pkgs.xmonadctl];
programs.xmobar = {
enable = true;
};
home.file."xmobar.hs" = rec {
source = ../../haskell/xmobar/xmobar.hs;
target = ".config/xmobar/xmobar.hs";
onChange = ''
${xmobarGhc}/bin/ghc -threaded ${target}
${pkgs.busybox}/bin/pkill xmobar
${pkgs.haskellPackages.xmonad}/bin/xmonad --restart
'';
};
xsession.windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
config = ../../haskell/xmonad/xmonad.hs;
};
home.file.wallpaper = {
target = "Pictures/wallpaper.jpg";
source = ../../other/wallpaper.jpg;
onChange = ''
feh --bg-fill ~/Pictures/wallpaper.jpg;
'';
};
};
}

View file

@ -1,24 +0,0 @@
{
config,
lib,
pkgs,
...
}: let
cfg = config.jade.flatpak;
in
with lib; {
options.jade.flatpak = {
enable = mkEnableOption "Enable flatpak";
};
config = mkIf cfg.enable {
services.flatpak.enable = true;
xdg.portal = {
enable = true;
# TODO
config.common.default = "*";
extraPortals = [
pkgs.xdg-desktop-portal-gtk
];
};
};
}

View file

@ -16,9 +16,9 @@
sha256 = "sha256-BxSrphgW1n465FX6bKVkq6O0XE2JqanfSYlsGwWUWkQ=";
};
cargoHash = "";
cargoLock.lockFile = ../../../other/evremap.Cargo.lock;
cargoLock.lockFile = ../../other/evremap.Cargo.lock;
postPatch = ''
cp ${../../../other/evremap.Cargo.lock} Cargo.lock
cp ${../../other/evremap.Cargo.lock} Cargo.lock
'';
nativeBuildInputs = [pkgs.pkg-config];
buildInputs = [pkgs.libevdev];