mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-09 16:33:57 -05:00
local.packages convenience option
This commit is contained in:
parent
4ecebe8210
commit
99f42f5841
5 changed files with 109 additions and 106 deletions
|
|
@ -25,6 +25,37 @@
|
|||
"steam-unwrapped"
|
||||
"steam-run"
|
||||
];
|
||||
packages = {
|
||||
inherit (pkgs)
|
||||
bitwarden-desktop # store stuff
|
||||
qbittorrent # steal stuff
|
||||
pavucontrol # gui volume control
|
||||
pcmanfm # file manager
|
||||
vlc # play stuff
|
||||
ripgrep
|
||||
fd
|
||||
jq
|
||||
wget
|
||||
xautoclick
|
||||
prismlauncher
|
||||
deadnix
|
||||
statix
|
||||
#element-desktop
|
||||
vesktop
|
||||
gh
|
||||
nixfmt-rfc-style
|
||||
prusa-slicer # 3D printer slicer
|
||||
# QMK configuration
|
||||
#via
|
||||
#qmk
|
||||
|
||||
;
|
||||
inherit (nvim-flake.packages) neovim;
|
||||
inherit (self'.packages) lint;
|
||||
|
||||
librewolf = pkgs.librewolf.override { cfg.speechSynthesisSupport = false; };
|
||||
nixpkgs-review = pkgs.nixpkgs-review.override { nix = config.nix.package; };
|
||||
};
|
||||
};
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
|
||||
|
|
@ -88,42 +119,9 @@
|
|||
};
|
||||
sops.secrets.github_token = { };
|
||||
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
bitwarden-desktop # store stuff
|
||||
qbittorrent # steal stuff
|
||||
pavucontrol # gui volume control
|
||||
pcmanfm # file manager
|
||||
vlc # play stuff
|
||||
ripgrep
|
||||
fd
|
||||
jq
|
||||
wget
|
||||
xautoclick
|
||||
prismlauncher
|
||||
deadnix
|
||||
statix
|
||||
#element-desktop
|
||||
vesktop
|
||||
gh
|
||||
nixfmt-rfc-style
|
||||
prusa-slicer # 3D printer slicer
|
||||
# QMK configuration
|
||||
#via
|
||||
#qmk
|
||||
|
||||
;
|
||||
inherit (nvim-flake.packages) neovim;
|
||||
inherit (self'.packages) lint;
|
||||
|
||||
librewolf = pkgs.librewolf.override { cfg.speechSynthesisSupport = false; };
|
||||
nixpkgs-review = pkgs.nixpkgs-review.override { nix = config.nix.package; };
|
||||
};
|
||||
etc = {
|
||||
"jdks/17".source = "${pkgs.openjdk17}/bin";
|
||||
"jdks/8".source = "${pkgs.openjdk8}/bin";
|
||||
};
|
||||
environment.etc = {
|
||||
"jdks/17".source = "${pkgs.openjdk17}/bin";
|
||||
"jdks/8".source = "${pkgs.openjdk8}/bin";
|
||||
};
|
||||
|
||||
services.udev.packages = [
|
||||
|
|
|
|||
|
|
@ -17,16 +17,16 @@
|
|||
enable = true;
|
||||
kmscon.enable = true;
|
||||
};
|
||||
packages = {
|
||||
inherit (pkgs)
|
||||
vlc
|
||||
pavucontrol # gui volume control
|
||||
chromium
|
||||
;
|
||||
inherit (nvim-flake.packages) neovim;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = builtins.attrValues {
|
||||
inherit (pkgs)
|
||||
vlc
|
||||
pavucontrol # gui volume control
|
||||
chromium
|
||||
;
|
||||
inherit (nvim-flake.packages) neovim;
|
||||
};
|
||||
services.xserver.videoDrivers = [ "modesetting" ];
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,31 @@
|
|||
options.local.DE.dwm.enable = lib.mkEnableOption "";
|
||||
|
||||
config = lib.mkIf config.local.DE.dwm.enable {
|
||||
local.packages = {
|
||||
inherit (suckless.packages) dmenu dwm st;
|
||||
inherit (pkgs)
|
||||
maim
|
||||
playerctl
|
||||
xclip
|
||||
feh
|
||||
numlockx
|
||||
picom
|
||||
sxhkd
|
||||
xscreensaver
|
||||
;
|
||||
|
||||
xsecurelock = pkgs.writeShellScriptBin "xsecurelock" ''
|
||||
export XSECURELOCK_BLANK_TIMEOUT="30"
|
||||
export XSECURELOCK_AUTH_TIMEOUT="30"
|
||||
export XSECURELOCK_BLANK_DPMS_STATE="off"
|
||||
export XSECURELOCK_BACKGROUND_COLOR="#000000"
|
||||
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#080808"
|
||||
export XSECURELOCK_AUTH_FOREGROUND_COLOR="#bdbdbd"
|
||||
export XSECURELOCK_FONT="Overpass"
|
||||
export XSECURELOCK_SHOW_DATETIME="1"
|
||||
${lib.getExe pkgs.xsecurelock}
|
||||
'';
|
||||
};
|
||||
systemd.user.services = {
|
||||
sxhkd = {
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
|
|
@ -67,64 +92,36 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit (suckless.packages) dmenu dwm st;
|
||||
inherit (pkgs)
|
||||
maim
|
||||
playerctl
|
||||
xclip
|
||||
feh
|
||||
numlockx
|
||||
picom
|
||||
sxhkd
|
||||
xscreensaver
|
||||
;
|
||||
|
||||
xsecurelock = pkgs.writeShellScriptBin "xsecurelock" ''
|
||||
export XSECURELOCK_BLANK_TIMEOUT="30"
|
||||
export XSECURELOCK_AUTH_TIMEOUT="30"
|
||||
export XSECURELOCK_BLANK_DPMS_STATE="off"
|
||||
export XSECURELOCK_BACKGROUND_COLOR="#000000"
|
||||
export XSECURELOCK_AUTH_BACKGROUND_COLOR="#080808"
|
||||
export XSECURELOCK_AUTH_FOREGROUND_COLOR="#bdbdbd"
|
||||
export XSECURELOCK_FONT="Overpass"
|
||||
export XSECURELOCK_SHOW_DATETIME="1"
|
||||
${lib.getExe pkgs.xsecurelock}
|
||||
'';
|
||||
};
|
||||
etc = {
|
||||
"sxhkd/sxhkdrc".text = ''
|
||||
XF86AudioPlay
|
||||
playerctl play-pause
|
||||
XF86AudioPause
|
||||
playerctl play-pause
|
||||
XF86AudioStop
|
||||
playerctl stop
|
||||
XF86AudioNext
|
||||
playerctl next
|
||||
XF86AudioPrev
|
||||
playerctl previous
|
||||
XF86AudioRaiseVolume
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+
|
||||
XF86AudioLowerVolume
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-
|
||||
XF86AudioMute
|
||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
Print
|
||||
maim $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
||||
Print + shift
|
||||
maim | xclip -selection clipboard -t image/png
|
||||
super + Print
|
||||
maim -s $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
||||
super + Print + shift
|
||||
maim -s | xclip -selection clipboard -t image/png
|
||||
super + ctrl + r
|
||||
pkill -usr1 -x sxhkd
|
||||
super + ctrl + l
|
||||
xsecurelock
|
||||
'';
|
||||
};
|
||||
};
|
||||
environment.etc."sxhkd/sxhkdrc".text = ''
|
||||
XF86AudioPlay
|
||||
playerctl play-pause
|
||||
XF86AudioPause
|
||||
playerctl play-pause
|
||||
XF86AudioStop
|
||||
playerctl stop
|
||||
XF86AudioNext
|
||||
playerctl next
|
||||
XF86AudioPrev
|
||||
playerctl previous
|
||||
XF86AudioRaiseVolume
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%+
|
||||
XF86AudioLowerVolume
|
||||
wpctl set-volume @DEFAULT_AUDIO_SINK@ 1%-
|
||||
XF86AudioMute
|
||||
wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
||||
Print
|
||||
maim $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
||||
Print + shift
|
||||
maim | xclip -selection clipboard -t image/png
|
||||
super + Print
|
||||
maim -s $HOME/Screenshots/$(date +%Y-%m-%d_%H-%m-%s).jpg
|
||||
super + Print + shift
|
||||
maim -s | xclip -selection clipboard -t image/png
|
||||
super + ctrl + r
|
||||
pkill -usr1 -x sxhkd
|
||||
super + ctrl + l
|
||||
xsecurelock
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
8
modules/packages.nix
Normal file
8
modules/packages.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ lib, config }:
|
||||
{
|
||||
options.local.packages = lib.mkOption {
|
||||
type = lib.types.attrsOf lib.types.package;
|
||||
default = { };
|
||||
};
|
||||
config.environment.systemPackages = builtins.attrValues config.local.packages;
|
||||
}
|
||||
|
|
@ -3,11 +3,11 @@
|
|||
pkgs,
|
||||
}:
|
||||
{
|
||||
local.packages = {
|
||||
inherit (pkgs) eza fzf;
|
||||
inherit (fetch-rs.packages) fetch-rs;
|
||||
};
|
||||
environment = {
|
||||
systemPackages = builtins.attrValues {
|
||||
inherit (pkgs) eza fzf;
|
||||
inherit (fetch-rs.packages) fetch-rs;
|
||||
};
|
||||
variables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue