feat(home-manager): service defs and fmt
fmt: reformatted using nixpkgs-fmt prettifier mpd: created configuration hypr: add window rules commons: add usingMusicPlayerDaemon variable
This commit is contained in:
parent
2d4b39c72f
commit
7d88765f5d
67 changed files with 633 additions and 573 deletions
|
@ -1,30 +1,32 @@
|
||||||
{
|
{ config
|
||||||
config,
|
, pkgs
|
||||||
pkgs,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
monitorMaxBrightness = "255";
|
monitorMaxBrightness = "255";
|
||||||
monitorMinBrightness = "32";
|
monitorMinBrightness = "32";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# Type definitions for nix variables used in this configuration
|
# Type definitions for nix variables used in this configuration
|
||||||
options = with lib;
|
options = with lib;
|
||||||
with types; {
|
with types; {
|
||||||
|
usingMusicPlayerDaemon = mkOption { type = bool; };
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
fileManager = mkOption {type = str;};
|
fileManager = mkOption { type = str; };
|
||||||
appLauncher = mkOption {type = str;};
|
appLauncher = mkOption { type = str; };
|
||||||
terminal = mkOption {type = str;};
|
terminal = mkOption { type = str; };
|
||||||
};
|
};
|
||||||
myWallPaperPath = mkOption {type = path;};
|
myWallPaperPath = mkOption { type = path; };
|
||||||
myUserName = mkOption {type = str;};
|
myUserName = mkOption { type = str; };
|
||||||
myHostName = mkOption {type = str;};
|
myHostName = mkOption { type = str; };
|
||||||
myWallPaperPathString = mkOption {type = str;};
|
myWallPaperPathString = mkOption { type = str; };
|
||||||
myDisplayName = mkOption {type = str;};
|
myDisplayName = mkOption { type = str; };
|
||||||
myEmail = mkOption {type = str;};
|
myEmail = mkOption { type = str; };
|
||||||
displayScale = mkOption {type = int;};
|
displayScale = mkOption { type = int; };
|
||||||
myAutostartCommands = mkOption {type = listOf str;};
|
myAutostartCommands = mkOption { type = listOf str; };
|
||||||
myConfigLocation = mkOption {type = str;};
|
myConfigLocation = mkOption { type = str; };
|
||||||
desktopFontFullName = mkOption {type = str;};
|
desktopFontFullName = mkOption { type = str; };
|
||||||
};
|
};
|
||||||
|
|
||||||
# Default values for this configuration
|
# Default values for this configuration
|
||||||
|
@ -37,7 +39,7 @@ in {
|
||||||
myDisplayName = "Zhongheng Liu";
|
myDisplayName = "Zhongheng Liu";
|
||||||
myEmail = "z.liu@outlook.com.gr";
|
myEmail = "z.liu@outlook.com.gr";
|
||||||
specialisation."powersave".configuration = {
|
specialisation."powersave".configuration = {
|
||||||
myAutostartCommands = ["${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMinBrightness}"];
|
myAutostartCommands = [ "${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMinBrightness}" ];
|
||||||
};
|
};
|
||||||
myConfigLocation = "/home/${myUserName}/nix-conf";
|
myConfigLocation = "/home/${myUserName}/nix-conf";
|
||||||
desktopFontFullName = "IntoneMono NFM:style=Regular";
|
desktopFontFullName = "IntoneMono NFM:style=Regular";
|
||||||
|
@ -54,5 +56,6 @@ in {
|
||||||
fileManager = "${pkgs.nemo}/bin/nemo";
|
fileManager = "${pkgs.nemo}/bin/nemo";
|
||||||
appLauncher = "${pkgs.walker}/bin/walker";
|
appLauncher = "${pkgs.walker}/bin/walker";
|
||||||
};
|
};
|
||||||
|
usingMusicPlayerDaemon = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
16
devenv.nix
16
devenv.nix
|
@ -1,21 +1,15 @@
|
||||||
{
|
{ pkgs, lib, config, inputs, ... }: {
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
config,
|
|
||||||
inputs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
# https://devenv.sh/basics/
|
# https://devenv.sh/basics/
|
||||||
env.GREET = "devenv";
|
env.GREET = "devenv";
|
||||||
cachix.enable = false;
|
cachix.enable = false;
|
||||||
# https://devenv.sh/packages/
|
# https://devenv.sh/packages/
|
||||||
packages = [pkgs.git];
|
packages = [ pkgs.git ];
|
||||||
|
|
||||||
# https://devenv.sh/languages/
|
# https://devenv.sh/languages/
|
||||||
# languages.rust.enable = true;
|
# languages.rust.enable = true;
|
||||||
languages.nix.enable = true;
|
languages.nix.enable = true;
|
||||||
pre-commit.hooks = {
|
pre-commit.hooks = {
|
||||||
alejandra.enable = true;
|
nixpkgs-fmt.enable = true;
|
||||||
shellcheck.enable = true;
|
shellcheck.enable = true;
|
||||||
commitizen.enable = true;
|
commitizen.enable = true;
|
||||||
};
|
};
|
||||||
|
@ -38,9 +32,7 @@
|
||||||
|
|
||||||
# https://devenv.sh/tests/
|
# https://devenv.sh/tests/
|
||||||
enterTest =
|
enterTest =
|
||||||
/*
|
# shell
|
||||||
shell
|
|
||||||
*/
|
|
||||||
''
|
''
|
||||||
echo "Running tests"
|
echo "Running tests"
|
||||||
git --version | grep --color=auto "${pkgs.git.version}"
|
git --version | grep --color=auto "${pkgs.git.version}"
|
||||||
|
|
26
flake.nix
26
flake.nix
|
@ -22,7 +22,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
stylix = {url = "github:danth/stylix";};
|
stylix = { url = "github:danth/stylix"; };
|
||||||
spicetify-nix = {
|
spicetify-nix = {
|
||||||
url = "github:Gerg-L/spicetify-nix";
|
url = "github:Gerg-L/spicetify-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
@ -30,23 +30,25 @@
|
||||||
hyprland-qtutils.url = "github:hyprwm/hyprland-qtutils";
|
hyprland-qtutils.url = "github:hyprwm/hyprland-qtutils";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
self,
|
{ self
|
||||||
nixpkgs,
|
, nixpkgs
|
||||||
home-manager,
|
, home-manager
|
||||||
stylix,
|
, stylix
|
||||||
spicetify-nix,
|
, spicetify-nix
|
||||||
...
|
, ...
|
||||||
} @ inputs: let
|
} @ inputs:
|
||||||
|
let
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
myHostName = "nixos-msi";
|
myHostName = "nixos-msi";
|
||||||
stevenUserName = "stvnliu";
|
stevenUserName = "stvnliu";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# NixOS configuration entrypoint
|
# NixOS configuration entrypoint
|
||||||
# Available through 'nixos-rebuild --flake .#your-hostname'
|
# Available through 'nixos-rebuild --flake .#your-hostname'
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
"${myHostName}" = nixpkgs.lib.nixosSystem {
|
"${myHostName}" = nixpkgs.lib.nixosSystem {
|
||||||
specialArgs = {inherit inputs outputs;};
|
specialArgs = { inherit inputs outputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/configuration.nix
|
./nixos/configuration.nix
|
||||||
#lix-module.nixosModules.default
|
#lix-module.nixosModules.default
|
||||||
|
@ -60,7 +62,7 @@
|
||||||
"${stevenUserName}@${myHostName}" = home-manager.lib.homeManagerConfiguration {
|
"${stevenUserName}@${myHostName}" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs =
|
pkgs =
|
||||||
nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
extraSpecialArgs = { inherit inputs outputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./home-manager/${stevenUserName}/home.nix
|
./home-manager/${stevenUserName}/home.nix
|
||||||
stylix.homeManagerModules.stylix
|
stylix.homeManagerModules.stylix
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
const hyprland = await Service.import("hyprland")
|
const hyprland = await Service.import("hyprland")
|
||||||
|
|
||||||
const dispatch = ws => hyprland.messageAsync(`dispatch workspace ${ws}`);
|
const dispatch = ws => hyprland.messageAsync(`dispatch workspace ${ws}`);
|
||||||
const wsSymbols = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10"]
|
const wsSymbols = ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20"]
|
||||||
const Workspaces = () => Widget.EventBox({
|
const Workspaces = () => Widget.EventBox({
|
||||||
onScrollUp: () => dispatch('+1'),
|
onScrollUp: () => dispatch('+1'),
|
||||||
onScrollDown: () => dispatch('-1'),
|
onScrollDown: () => dispatch('-1'),
|
||||||
|
|
17
home-manager/stvnliu/ags/config/mpris.js
Normal file
17
home-manager/stvnliu/ags/config/mpris.js
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
const mpris = await Service.import('mpris')
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {import('types/service/mpris').MprisPlayer} player
|
||||||
|
* */
|
||||||
|
const Player = (player, count) => Widget.Button({
|
||||||
|
onClicked: () => player.playPause(),
|
||||||
|
child: Widget.Label().hook(player, label => {
|
||||||
|
const { track_artists, track_title } = player;
|
||||||
|
label.label = `${count} PLAYING`;
|
||||||
|
}),
|
||||||
|
})
|
||||||
|
|
||||||
|
export const players = Widget.Box({
|
||||||
|
children: mpris.bind('players').as(p => p.map(
|
||||||
|
(this_player, index, array) => { return Player(this_player, array.length) }))
|
||||||
|
})
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
config = {
|
config = {
|
||||||
home.file = {
|
home.file = {
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
}: { }
|
||||||
}: {
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
#./vscode.nix
|
#./vscode.nix
|
||||||
|
@ -10,9 +9,14 @@
|
||||||
];
|
];
|
||||||
programs.nixvim = import ./nixvim;
|
programs.nixvim = import ./nixvim;
|
||||||
# dependencies for nixvim configuration
|
# dependencies for nixvim configuration
|
||||||
home.packages = with pkgs; [ripgrep fd];
|
home.packages = with pkgs; [ ripgrep fd ];
|
||||||
|
programs.helix = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
/*
|
||||||
programs.vscode = {
|
programs.vscode = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.vscode.fhs;
|
package = pkgs.vscode.fhs;
|
||||||
};
|
};
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -13,6 +12,6 @@
|
||||||
qt = {
|
qt = {
|
||||||
enable = true;
|
enable = true;
|
||||||
platformTheme.name = "gtk";
|
platformTheme.name = "gtk";
|
||||||
style = {name = "Fusion";};
|
style = { name = "Fusion"; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
{
|
{ inputs
|
||||||
inputs,
|
, lib
|
||||||
lib,
|
, config
|
||||||
config,
|
, pkgs
|
||||||
pkgs,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./hypr
|
./hypr
|
||||||
|
@ -28,7 +27,7 @@
|
||||||
overlays = [
|
overlays = [
|
||||||
(final: prev: {
|
(final: prev: {
|
||||||
ags = prev.ags.overrideAttrs (old: {
|
ags = prev.ags.overrideAttrs (old: {
|
||||||
buildInputs = old.buildInputs ++ [pkgs.libdbusmenu-gtk3];
|
buildInputs = old.buildInputs ++ [ pkgs.libdbusmenu-gtk3 ];
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
|
@ -51,7 +50,7 @@
|
||||||
username = "${config.myUserName}";
|
username = "${config.myUserName}";
|
||||||
homeDirectory = "/home/${config.myUserName}";
|
homeDirectory = "/home/${config.myUserName}";
|
||||||
# copy wallpaper from assets
|
# copy wallpaper from assets
|
||||||
file = {"wallpaper.jpg".source = config.myWallPaperPath;};
|
file = { "wallpaper.jpg".source = config.myWallPaperPath; };
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
prismlauncher
|
prismlauncher
|
||||||
|
@ -69,6 +68,7 @@
|
||||||
teams-for-linux
|
teams-for-linux
|
||||||
sxiv
|
sxiv
|
||||||
heroic
|
heroic
|
||||||
|
vscodium-fhs
|
||||||
];
|
];
|
||||||
myAutostartCommands = [
|
myAutostartCommands = [
|
||||||
#"${pkgs.clash-verge-rev}/bin/clash-verge"
|
#"${pkgs.clash-verge-rev}/bin/clash-verge"
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
programs = {
|
programs = {
|
||||||
obs-studio = {
|
obs-studio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.obs-studio-plugins; [wlrobs input-overlay];
|
plugins = with pkgs.obs-studio-plugins; [ wlrobs input-overlay ];
|
||||||
};
|
};
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
firefox = {
|
firefox = {
|
||||||
|
@ -96,7 +96,7 @@
|
||||||
};
|
};
|
||||||
thunderbird = {
|
thunderbird = {
|
||||||
enable = true;
|
enable = true;
|
||||||
profiles.default = {isDefault = true;};
|
profiles.default = { isDefault = true; };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# Nicely reload system units when changing configs
|
# Nicely reload system units when changing configs
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./hyprland
|
./hyprland
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
{pkgs, ...}: let
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
timeoutSeconds = 600;
|
timeoutSeconds = 600;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services.hypridle = {
|
services.hypridle = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{ config
|
||||||
config,
|
, pkgs
|
||||||
pkgs,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
terminalCmd = config.defaultApplications.terminal;
|
terminalCmd = config.defaultApplications.terminal;
|
||||||
screenshotLocation = "/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png";
|
screenshotLocation = "/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png";
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
"$mod SHIFT, L, exec, ${pkgs.wlogout}/bin/wlogout"
|
"$mod SHIFT, L, exec, ${pkgs.wlogout}/bin/wlogout"
|
||||||
|
|
||||||
"$mod SHIFT, Print, exec, ${pkgs.grimblast}/bin/grimblast copysave output ${screenshotLocation}"
|
"$mod SHIFT, Print, exec, ${pkgs.grimblast}/bin/grimblast copysave output ${screenshotLocation}"
|
||||||
|
@ -34,27 +34,42 @@ in
|
||||||
TODO Fix floating window rule
|
TODO Fix floating window rule
|
||||||
*/
|
*/
|
||||||
# "$mod, N, exec, [float] ${terminalCmd} ${pkgs.networkmanager}/bin/nmtui"
|
# "$mod, N, exec, [float] ${terminalCmd} ${pkgs.networkmanager}/bin/nmtui"
|
||||||
"$mod, M, exec, [float] ${terminalCmd} ${pkgs.zenith}/bin/zenith"
|
#"$mod, M, exec, [float] ${terminalCmd} ${pkgs.zenith}/bin/zenith"
|
||||||
|
|
||||||
# vimkeys navigation
|
# vimkeys navigation
|
||||||
"$mod, H, movefocus, l"
|
"$mod, H, movefocus, l"
|
||||||
"$mod, J, movefocus, d"
|
"$mod, J, movefocus, d"
|
||||||
"$mod, K, movefocus, u"
|
"$mod, K, movefocus, u"
|
||||||
"$mod, L, movefocus, r"
|
"$mod, L, movefocus, r"
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
|
if config.services.mpd.enable then [ "$mod, M, exec, ${terminalCmd} --title=ncmpc ${pkgs.ncmpc}/bin/ncmpc -h 127.0.0.1" ] else [ ]
|
||||||
|
)
|
||||||
|
++ (
|
||||||
if config.services.swaync.enable
|
if config.services.swaync.enable
|
||||||
then ["$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"]
|
then [ "$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t" ]
|
||||||
else []
|
else [ ]
|
||||||
)
|
)
|
||||||
++ (
|
++ (
|
||||||
# workspaces
|
# workspaces
|
||||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||||
builtins.concatLists (builtins.genList (x: let
|
builtins.concatLists (builtins.genList
|
||||||
|
(x:
|
||||||
|
let
|
||||||
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
||||||
in [
|
in
|
||||||
|
[
|
||||||
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
"$mod, ${ws}, workspace, ${toString (x + 1)}"
|
||||||
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
"$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
||||||
])
|
]) 10)
|
||||||
10)
|
# workspaces
|
||||||
)
|
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||||
|
/*
|
||||||
|
builtins.concatLists (builtins.genList (x:
|
||||||
|
let ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
||||||
|
in [
|
||||||
|
"$mod M, ${ws}, workspace, ${toString (x + 10 + 1)}"
|
||||||
|
"$mod SHIFT M, ${ws}, movetoworkspace, ${toString (x + 10 + 1)}"
|
||||||
|
]) 10)
|
||||||
|
*/
|
||||||
|
)
|
||||||
|
|
|
@ -1,28 +1,21 @@
|
||||||
{
|
{ inputs, config, pkgs, lib, ... }: {
|
||||||
inputs,
|
home.packages =
|
||||||
config,
|
[ inputs.hyprland-qtutils.packages.x86_64-linux.default pkgs.foot ];
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
home.packages = [
|
|
||||||
inputs.hyprland-qtutils.packages.x86_64-linux.default
|
|
||||||
pkgs.foot
|
|
||||||
];
|
|
||||||
wayland.windowManager.hyprland = {
|
wayland.windowManager.hyprland = {
|
||||||
# Whether to enable Hyprland wayland compositor
|
# Whether to enable Hyprland wayland compositor
|
||||||
enable = true;
|
enable = true;
|
||||||
# The hyprland package to use
|
# The hyprland package to use
|
||||||
package = pkgs.hyprland;
|
package = pkgs.hyprland;
|
||||||
plugins = with pkgs.hyprlandPlugins; [
|
plugins = with pkgs.hyprlandPlugins;
|
||||||
|
[
|
||||||
# hyprfocus
|
# hyprfocus
|
||||||
# hycov
|
# hycov
|
||||||
];
|
];
|
||||||
# Whether to enable XWayland
|
# Whether to enable XWayland
|
||||||
xwayland.enable = true;
|
xwayland.enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
env = ["AQ_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0"];
|
env = [ "AQ_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0" ];
|
||||||
xwayland = {force_zero_scaling = true;};
|
xwayland = { force_zero_scaling = true; };
|
||||||
monitor = [
|
monitor = [
|
||||||
#"eDP-1, 1920x1080@165,0x0,1"
|
#"eDP-1, 1920x1080@165,0x0,1"
|
||||||
"desc:Xiaomi Corporation Mi 27 NFGL 3215000032603, 1920x1080@75, 2560x0, 1"
|
"desc:Xiaomi Corporation Mi 27 NFGL 3215000032603, 1920x1080@75, 2560x0, 1"
|
||||||
|
@ -37,8 +30,8 @@
|
||||||
gaps_out = 5;
|
gaps_out = 5;
|
||||||
allow_tearing = true;
|
allow_tearing = true;
|
||||||
};
|
};
|
||||||
windowrulev2 = ["immediate, class:^(cs2)$"];
|
windowrulev2 = import ./window_rules.nix;
|
||||||
decoration = {rounding = 5;};
|
decoration = { rounding = 5; };
|
||||||
input = {
|
input = {
|
||||||
# xset rate 250 50 replacement on wayland...
|
# xset rate 250 50 replacement on wayland...
|
||||||
# FAST MODE LET'S GOOO
|
# FAST MODE LET'S GOOO
|
||||||
|
@ -46,13 +39,10 @@
|
||||||
repeat_delay = 250;
|
repeat_delay = 250;
|
||||||
accel_profile = "flat";
|
accel_profile = "flat";
|
||||||
};
|
};
|
||||||
exec-once =
|
exec-once = config.myAutostartCommands ++ import ./hypr_autostart.nix {
|
||||||
config.myAutostartCommands
|
inherit pkgs;
|
||||||
++ [
|
inherit config;
|
||||||
# future hyprland-specific exec commands
|
};
|
||||||
#"${config.programs.firefox.package}/bin/firefox"
|
|
||||||
#"${pkgs.thunderbird}/bin/thunderbird"
|
|
||||||
];
|
|
||||||
misc = {
|
misc = {
|
||||||
disable_hyprland_logo = true;
|
disable_hyprland_logo = true;
|
||||||
disable_splash_rendering = true;
|
disable_splash_rendering = true;
|
||||||
|
@ -78,7 +68,7 @@
|
||||||
};
|
};
|
||||||
# Optional
|
# Optional
|
||||||
# Whether to enable hyprland-session.target on hyprland startup
|
# Whether to enable hyprland-session.target on hyprland startup
|
||||||
systemd = {enable = true;};
|
systemd = { enable = true; };
|
||||||
};
|
};
|
||||||
# ...
|
# ...
|
||||||
}
|
}
|
||||||
|
|
8
home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix
Normal file
8
home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, config }:
|
||||||
|
let
|
||||||
|
term = config.defaultApplications.terminal;
|
||||||
|
shell = config.myShells.defaultShell;
|
||||||
|
in
|
||||||
|
[
|
||||||
|
"${term} --title=autorun ${shell}"
|
||||||
|
]
|
7
home-manager/stvnliu/hypr/hyprland/window_rules.nix
Normal file
7
home-manager/stvnliu/hypr/hyprland/window_rules.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[
|
||||||
|
"workspace special silent, class:^(foot.*)$, title:autorun"
|
||||||
|
"float, tag:floats"
|
||||||
|
"float, title:ncmpc"
|
||||||
|
"size 50% 50%, title:ncmpc"
|
||||||
|
"immediate, class:^(cs2)$"
|
||||||
|
]
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
,
|
||||||
}: [
|
}: [
|
||||||
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
|
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
|
||||||
", XF86AudioStop, exec, ${pkgs.playerctl}/bin/playerctl stop"
|
", XF86AudioStop, exec, ${pkgs.playerctl}/bin/playerctl stop"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
programs.hyprlock = {
|
programs.hyprlock = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
services.hyprpaper = {
|
services.hyprpaper = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
ipc = "on";
|
ipc = "on";
|
||||||
splash = false;
|
splash = false;
|
||||||
preload = [config.myWallPaperPathString];
|
preload = [ config.myWallPaperPathString ];
|
||||||
wallpaper = [",${config.myWallPaperPathString}"];
|
wallpaper = [ ",${config.myWallPaperPathString}" ];
|
||||||
#preload = [/home/stvnliu/Downloads/mao-zedong.jpg];
|
#preload = [/home/stvnliu/Downloads/mao-zedong.jpg];
|
||||||
#wallpaper = [",/home/stvnliu/Downloads/mao-zedong.jpg"];
|
#wallpaper = [",/home/stvnliu/Downloads/mao-zedong.jpg"];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
defaultTimeoutMillis = 5 * 1000;
|
defaultTimeoutMillis = 5 * 1000;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services.mako = {
|
services.mako = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultTimeout = defaultTimeoutMillis;
|
defaultTimeout = defaultTimeoutMillis;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{plugins.nvim-autopairs = {enable = true;};}
|
{ plugins.nvim-autopairs = { enable = true; }; }
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{plugins.bufferline = {enable = true;};}
|
{ plugins.bufferline = { enable = true; }; }
|
||||||
|
|
|
@ -13,18 +13,18 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
autoEnableSources = true;
|
autoEnableSources = true;
|
||||||
experimental = {ghost_text = false;};
|
experimental = { ghost_text = false; };
|
||||||
performance = {
|
performance = {
|
||||||
debounce = 60;
|
debounce = 60;
|
||||||
fetchingTimeout = 200;
|
fetchingTimeout = 200;
|
||||||
maxViewEntries = 30;
|
maxViewEntries = 30;
|
||||||
};
|
};
|
||||||
snippet = {expand = "luasnip";};
|
snippet = { expand = "luasnip"; };
|
||||||
cmp-buffer = {enable = true;};
|
cmp-buffer = { enable = true; };
|
||||||
cmp-emoji = {enable = true;};
|
cmp-emoji = { enable = true; };
|
||||||
cmp-nvim-lsp = {enable = true;};
|
cmp-nvim-lsp = { enable = true; };
|
||||||
cmp-path = {enable = true;};
|
cmp-path = { enable = true; };
|
||||||
cmp_luasnip = {enable = true;};
|
cmp_luasnip = { enable = true; };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
snippet.expand = ''
|
snippet.expand = ''
|
||||||
|
@ -34,17 +34,17 @@
|
||||||
'';
|
'';
|
||||||
*/
|
*/
|
||||||
sources = [
|
sources = [
|
||||||
{name = "nvim_lsp";}
|
{ name = "nvim_lsp"; }
|
||||||
{name = "luasnip";}
|
{ name = "luasnip"; }
|
||||||
{
|
{
|
||||||
name = "buffer";
|
name = "buffer";
|
||||||
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
|
||||||
}
|
}
|
||||||
{name = "nvim_lua";}
|
{ name = "nvim_lua"; }
|
||||||
{name = "path";}
|
{ name = "path"; }
|
||||||
];
|
];
|
||||||
formatting = {
|
formatting = {
|
||||||
fields = ["abbr" "kind" "menu"];
|
fields = [ "abbr" "kind" "menu" ];
|
||||||
format =
|
format =
|
||||||
# lua
|
# lua
|
||||||
''
|
''
|
||||||
|
@ -104,11 +104,11 @@
|
||||||
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
|
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
|
||||||
scrollbar = false;
|
scrollbar = false;
|
||||||
sidePadding = 0;
|
sidePadding = 0;
|
||||||
border = ["╭" "─" "╮" "│" "╯" "─" "╰" "│"];
|
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
settings.documentation = {
|
settings.documentation = {
|
||||||
border = ["╭" "─" "╮" "│" "╯" "─" "╰" "│"];
|
border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
|
||||||
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
|
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{config, ...}: {
|
{ config, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./auto-pairs.nix
|
./auto-pairs.nix
|
||||||
./autosave.nix
|
./autosave.nix
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
enableMan = true;
|
enableMan = true;
|
||||||
defaultEditor = true;
|
defaultEditor = true;
|
||||||
globals.mapleader = " ";
|
globals.mapleader = " ";
|
||||||
colorschemes.gruvbox = {enable = true;};
|
colorschemes.gruvbox = { enable = true; };
|
||||||
keymaps =
|
keymaps =
|
||||||
[
|
[
|
||||||
# Global
|
# Global
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
Ionide-vim
|
Ionide-vim
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{...}: {
|
{ ... }: {
|
||||||
plugins = {
|
plugins = {
|
||||||
lsp-signature.enable = true;
|
lsp-signature.enable = true;
|
||||||
lsp-status.enable = true;
|
lsp-status.enable = true;
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
extensions.fzf-native = {enable = true;};
|
extensions.fzf-native = { enable = true; };
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{plugins.transparent.enable = true;}
|
{ plugins.transparent.enable = true; }
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
plugins = {
|
plugins = {
|
||||||
treesitter = {
|
treesitter = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
plugins.virt-column = {
|
plugins.virt-column = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.char = ["┃"];
|
settings.char = [ "┃" ];
|
||||||
settings.virtcolumn = "80";
|
settings.virtcolumn = "80";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{plugins.which-key = {enable = true;};}
|
{ plugins.which-key = { enable = true; }; }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
plugins.wilder = {
|
plugins.wilder = {
|
||||||
enable = true;
|
enable = true;
|
||||||
modes = [":" "/" "?"];
|
modes = [ ":" "/" "?" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./util-programs.nix
|
./util-programs.nix
|
||||||
|
@ -11,5 +10,6 @@
|
||||||
./wayland-utils.nix
|
./wayland-utils.nix
|
||||||
./pentesting.nix
|
./pentesting.nix
|
||||||
./dev.nix
|
./dev.nix
|
||||||
|
./gaming.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
|
|
|
@ -1,14 +1,13 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [vesktop];
|
home.packages = with pkgs; [ vesktop ];
|
||||||
xdg.desktopEntries.discord = {
|
xdg.desktopEntries.discord = {
|
||||||
exec = "${pkgs.vesktop}/bin/vesktop";
|
exec = "${pkgs.vesktop}/bin/vesktop";
|
||||||
terminal = false;
|
terminal = false;
|
||||||
mimeType = ["x-scheme-handler/discord"];
|
mimeType = [ "x-scheme-handler/discord" ];
|
||||||
name = "Discord - Vesktop";
|
name = "Discord - Vesktop";
|
||||||
genericName = "Discord but substituted with Vesktop";
|
genericName = "Discord but substituted with Vesktop";
|
||||||
type = "Application";
|
type = "Application";
|
||||||
|
|
4
home-manager/stvnliu/packages/gaming.nix
Normal file
4
home-manager/stvnliu/packages/gaming.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [ bottles ];
|
||||||
|
}
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
libreoffice
|
libreoffice
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
openvpn
|
openvpn
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
bottom
|
bottom
|
||||||
|
|
4
home-manager/stvnliu/packages/vscodium.nix
Normal file
4
home-manager/stvnliu/packages/vscodium.nix
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, config, ... }: {
|
||||||
|
home.packages = with pkgs; [ vscodium-fhs ];
|
||||||
|
xdg.desktopEntries.codium = { };
|
||||||
|
}
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
home.packages = with pkgs; [wl-clipboard];
|
home.packages = with pkgs; [ wl-clipboard ];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./git.nix
|
./git.nix
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
programs.foot = {
|
programs.foot = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -11,7 +10,7 @@
|
||||||
term = "xterm-256color";
|
term = "xterm-256color";
|
||||||
dpi-aware = lib.mkForce "yes";
|
dpi-aware = lib.mkForce "yes";
|
||||||
};
|
};
|
||||||
mouse = {hide-when-typing = "yes";};
|
mouse = { hide-when-typing = "yes"; };
|
||||||
};
|
};
|
||||||
server.enable = true;
|
server.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
programs.rofi = {
|
programs.rofi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
programs.tmux = {
|
programs.tmux = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
programs.walker = {
|
programs.walker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -10,7 +9,7 @@
|
||||||
# All options from the config.json can be used here.
|
# All options from the config.json can be used here.
|
||||||
config = {
|
config = {
|
||||||
search.placeholder = "Example";
|
search.placeholder = "Example";
|
||||||
list = {height = 200;};
|
list = { height = 200; };
|
||||||
websearch.prefix = "?";
|
websearch.prefix = "?";
|
||||||
switcher.prefix = "/";
|
switcher.prefix = "/";
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
{
|
{ config
|
||||||
config,
|
, pkgs
|
||||||
pkgs,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
home.packages = [
|
home.packages = [
|
||||||
(import ./heic-to-jpg.script.nix {inherit pkgs;})
|
(import ./heic-to-jpg.script.nix { inherit pkgs; })
|
||||||
(import ./tmux-default.script.nix {
|
(import ./tmux-default.script.nix {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
inherit config;
|
inherit config;
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
git = config.programs.git.package;
|
git = config.programs.git.package;
|
||||||
# checks for any Git repositories with uncommitted changes
|
# checks for any Git repositories with uncommitted changes
|
||||||
# used because I am too lazy
|
# used because I am too lazy
|
||||||
in
|
in
|
||||||
pkgs.writeShellScriptBin "git-check" ''
|
pkgs.writeShellScriptBin "git-check" ''
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
cd_err() {
|
cd_err() {
|
||||||
echo "change-directory occurred error. interrupting..."
|
echo "change-directory occurred error. interrupting..."
|
||||||
|
@ -51,4 +52,4 @@ in
|
||||||
for item in $(find $scan_path -maxdepth 1 -type d); do
|
for item in $(find $scan_path -maxdepth 1 -type d); do
|
||||||
git_check "$path" "$item"
|
git_check "$path" "$item"
|
||||||
done
|
done
|
||||||
''
|
''
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs}:
|
{ pkgs }:
|
||||||
pkgs.writeShellScriptBin "heic-to-jpg" ''
|
pkgs.writeShellScriptBin "heic-to-jpg" ''
|
||||||
mkdir -p ./heic-to-jpg-out
|
mkdir -p ./heic-to-jpg-out
|
||||||
${pkgs.findutils}/bin/find . -type f -print0 | ${pkgs.findutils}/bin/xargs -0 -I "{}" ${pkgs.imagemagick}/bin/magick "{}" -quality 100% ./jpg-out/"{}.conv.jpg"
|
${pkgs.findutils}/bin/find . -type f -print0 | ${pkgs.findutils}/bin/xargs -0 -I "{}" ${pkgs.imagemagick}/bin/magick "{}" -quality 100% ./jpg-out/"{}.conv.jpg"
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
tmux = config.programs.tmux.package;
|
tmux = config.programs.tmux.package;
|
||||||
windowName = "code-mode";
|
windowName = "code-mode";
|
||||||
in
|
in
|
||||||
pkgs.writeShellScriptBin "tmux-code" ''
|
pkgs.writeShellScriptBin "tmux-code" ''
|
||||||
#!${pkgs.bash}/bin/bash
|
#!${pkgs.bash}/bin/bash
|
||||||
${tmux}/bin/tmux has-session -t ${windowName} 2>/dev/null
|
${tmux}/bin/tmux has-session -t ${windowName} 2>/dev/null
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
|
@ -15,4 +16,4 @@ in
|
||||||
${tmux}/bin/tmux split-window -h
|
${tmux}/bin/tmux split-window -h
|
||||||
fi
|
fi
|
||||||
${tmux}/bin/tmux attach -t ${windowName}
|
${tmux}/bin/tmux attach -t ${windowName}
|
||||||
''
|
''
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./swaync.nix
|
./swaync.nix
|
||||||
|
./mpd.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
29
home-manager/stvnliu/services/mpd.nix
Normal file
29
home-manager/stvnliu/services/mpd.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, config, lib, ... }:
|
||||||
|
lib.mkIf config.usingMusicPlayerDaemon {
|
||||||
|
home.packages = [ pkgs.ncmpc ];
|
||||||
|
services.mpd = {
|
||||||
|
enable = true;
|
||||||
|
network.listenAddress = "any";
|
||||||
|
network.port = 6600;
|
||||||
|
extraConfig = ''
|
||||||
|
audio_output {
|
||||||
|
type "pipewire"
|
||||||
|
name "my pipewire output"
|
||||||
|
}
|
||||||
|
audio_output {
|
||||||
|
type "httpd"
|
||||||
|
name "My HTTP Stream"
|
||||||
|
encoder "vorbis" # optional, vorbis or lame
|
||||||
|
port "8000"
|
||||||
|
# bind_to_address "0.0.0.0" # optional, IPv4 or IPv6
|
||||||
|
quality "5.0" # do not define if bitrate is defined
|
||||||
|
# bitrate "128" # do not define if quality is defined
|
||||||
|
format "44100:16:1"
|
||||||
|
max_clients "5" # optional 0=no limit
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
services.mpd-mpris = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
services.swaync = {
|
services.swaync = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs}: {
|
{ pkgs }: {
|
||||||
gil = "${pkgs.lazygit}/bin/lazygit";
|
gil = "${pkgs.lazygit}/bin/lazygit";
|
||||||
cd = "z";
|
cd = "z";
|
||||||
cdi = "zi";
|
cdi = "zi";
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, lib
|
||||||
lib,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
cfg = config.myShells;
|
cfg = config.myShells;
|
||||||
in
|
in
|
||||||
with lib; {
|
with lib; {
|
||||||
imports = [
|
imports = [
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
./fish
|
./fish
|
||||||
|
@ -17,7 +17,7 @@ in
|
||||||
];
|
];
|
||||||
|
|
||||||
options.myShells = {
|
options.myShells = {
|
||||||
defaultShell = with types; mkOption {type = str;};
|
defaultShell = with types; mkOption { type = str; };
|
||||||
enable = mkEnableOption "Enables the shell customisation module.";
|
enable = mkEnableOption "Enables the shell customisation module.";
|
||||||
};
|
};
|
||||||
config = {
|
config = {
|
||||||
|
@ -29,4 +29,4 @@ in
|
||||||
prompts.starship.enable = true;
|
prompts.starship.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{config, ...}: {
|
{ config, ... }: {
|
||||||
programs = {
|
programs = {
|
||||||
direnv = {
|
direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
7
home-manager/stvnliu/shells/env/default.nix
vendored
7
home-manager/stvnliu/shells/env/default.nix
vendored
|
@ -1,7 +1,6 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
EDITOR = "nvim";
|
EDITOR = "nvim";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
cfg = config.myShells.fish;
|
cfg = config.myShells.fish;
|
||||||
in
|
in
|
||||||
with lib; {
|
with lib; {
|
||||||
options = {
|
options = {
|
||||||
myShells.fish = {enable = mkEnableOption "Enables fish and components.";};
|
myShells.fish = { enable = mkEnableOption "Enables fish and components."; };
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
|
@ -25,7 +25,7 @@ in
|
||||||
|
|
||||||
${pkgs.thefuck}/bin/thefuck --alias | source
|
${pkgs.thefuck}/bin/thefuck --alias | source
|
||||||
'';
|
'';
|
||||||
shellAliases = import ../aliases {inherit pkgs;};
|
shellAliases = import ../aliases { inherit pkgs; };
|
||||||
plugins = with pkgs.fishPlugins; [
|
plugins = with pkgs.fishPlugins; [
|
||||||
{
|
{
|
||||||
name = "z";
|
name = "z";
|
||||||
|
@ -62,4 +62,4 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,21 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
cfg = config.myShells.nushell;
|
cfg = config.myShells.nushell;
|
||||||
in
|
in
|
||||||
with lib; {
|
with lib; {
|
||||||
options = {
|
options = {
|
||||||
myShells.nushell = {enable = mkEnableOption "Enables nushell config";};
|
myShells.nushell = { enable = mkEnableOption "Enables nushell config"; };
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs = {
|
programs = {
|
||||||
nushell = {
|
nushell = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configFile.source = ./init/config.nu;
|
configFile.source = ./init/config.nu;
|
||||||
shellAliases = import ../aliases/default.nix {inherit pkgs;};
|
shellAliases = import ../aliases/default.nix { inherit pkgs; };
|
||||||
};
|
};
|
||||||
carapace = {
|
carapace = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -23,4 +23,4 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{ lib
|
||||||
lib,
|
, pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
cfg = config.myShells.prompts.starship;
|
cfg = config.myShells.prompts.starship;
|
||||||
in
|
in
|
||||||
with lib; {
|
with lib; {
|
||||||
options = {
|
options = {
|
||||||
myShells.prompts.starship.enable = mkEnableOption "Enables starship prompts.";
|
myShells.prompts.starship.enable = mkEnableOption "Enables starship prompts.";
|
||||||
myShells.prompts.starship.confPath = mkOption {
|
myShells.prompts.starship.confPath = mkOption {
|
||||||
|
@ -24,4 +24,4 @@ in
|
||||||
settings = builtins.fromTOML (builtins.readFile cfg.confPath);
|
settings = builtins.fromTOML (builtins.readFile cfg.confPath);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, lib
|
||||||
lib,
|
, ...
|
||||||
...
|
|
||||||
}: {
|
}: {
|
||||||
programs.zoxide = {
|
programs.zoxide = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, lib
|
||||||
lib,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
cfg = config.shell.zsh;
|
cfg = config.shell.zsh;
|
||||||
in
|
in
|
||||||
with lib; {
|
with lib; {
|
||||||
options.myShells.zsh = {
|
options.myShells.zsh = {
|
||||||
enable = mkEnableOption "Enables zsh and components.";
|
enable = mkEnableOption "Enables zsh and components.";
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,7 @@ in
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
syntaxHighlighting.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
shellAliases = import ./aliases {inherit pkgs;};
|
shellAliases = import ./aliases { inherit pkgs; };
|
||||||
dirHashes = {
|
dirHashes = {
|
||||||
docs = "$HOME/Documents";
|
docs = "$HOME/Documents";
|
||||||
dl = "$HOME/Downloads";
|
dl = "$HOME/Downloads";
|
||||||
|
@ -31,6 +31,6 @@ in
|
||||||
theme = "agnoster";
|
theme = "agnoster";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.packages = with pkgs; [zoxide];
|
home.packages = with pkgs; [ zoxide ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, lib
|
||||||
lib,
|
, inputs
|
||||||
inputs,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# allow spotify to be installed if you don't have unfree enabled already
|
# allow spotify to be installed if you don't have unfree enabled already
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||||
builtins.elem (lib.getName pkg) [
|
builtins.elem (lib.getName pkg) [
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{
|
{ pkgs
|
||||||
pkgs,
|
, config
|
||||||
config,
|
, ...
|
||||||
...
|
}:
|
||||||
}: let
|
let
|
||||||
globalOpacity = 0.75;
|
globalOpacity = 0.75;
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoEnable = true;
|
autoEnable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
"openssl-1.1.1w"
|
"openssl-1.1.1w"
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
{pkgs, ...}: {
|
{ pkgs, ... }: {
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
userDirs.enable = true;
|
||||||
mimeApps = {
|
mimeApps = {
|
||||||
enable = true;
|
enable = true;
|
||||||
defaultApplications = {
|
defaultApplications = {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue