mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-12-22 09:35:50 +01:00
biiiiig refactor (part 1)
This commit is contained in:
parent
9a7768ff5b
commit
7bacabf0d3
23 changed files with 96 additions and 81 deletions
|
@ -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 = {
|
||||
|
|
|
@ -2,8 +2,9 @@
|
|||
imports = [
|
||||
./shell
|
||||
./desktop
|
||||
./terminal.nix
|
||||
./flatpak.nix
|
||||
./hardware
|
||||
./firewall.nix
|
||||
./desktop-environment
|
||||
./input
|
||||
];
|
||||
}
|
||||
|
|
11
modules/desktop-environment/default.nix
Normal file
11
modules/desktop-environment/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./audio.nix
|
||||
./compositing.nix
|
||||
./dunst.nix
|
||||
./panels
|
||||
./xmonad
|
||||
./terminal.nix
|
||||
./flatpak.nix
|
||||
];
|
||||
}
|
16
modules/desktop-environment/flatpak.nix
Normal file
16
modules/desktop-environment/flatpak.nix
Normal 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
|
||||
];
|
||||
};
|
||||
}
|
6
modules/desktop-environment/panels/default.nix
Normal file
6
modules/desktop-environment/panels/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./xmobar
|
||||
./polybar.nix
|
||||
];
|
||||
}
|
33
modules/desktop-environment/panels/xmobar/default.nix
Normal file
33
modules/desktop-environment/panels/xmobar/default.nix
Normal 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;
|
||||
};
|
||||
};
|
||||
}
|
25
modules/desktop-environment/xmonad/default.nix
Normal file
25
modules/desktop-environment/xmonad/default.nix
Normal 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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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 = {
|
||||
|
|
|
@ -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;
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
|
@ -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];
|
Loading…
Reference in a new issue