aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--common/variables.nix51
-rw-r--r--devenv.nix16
-rw-r--r--flake.nix80
-rw-r--r--home-manager/stvnliu/ags/config/hyprworkspaces.js2
-rw-r--r--home-manager/stvnliu/ags/config/mpris.js17
-rw-r--r--home-manager/stvnliu/ags/default.nix7
-rw-r--r--home-manager/stvnliu/devenv.nix12
-rw-r--r--home-manager/stvnliu/editors.nix20
-rw-r--r--home-manager/stvnliu/gtk.nix9
-rw-r--r--home-manager/stvnliu/home.nix20
-rw-r--r--home-manager/stvnliu/hypr/default.nix9
-rw-r--r--home-manager/stvnliu/hypr/hypridle.nix6
-rw-r--r--home-manager/stvnliu/hypr/hyprland/binds.nix105
-rw-r--r--home-manager/stvnliu/hypr/hyprland/default.nix44
-rw-r--r--home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix8
-rw-r--r--home-manager/stvnliu/hypr/hyprland/window_rules.nix7
-rw-r--r--home-manager/stvnliu/hypr/hyprland/xf86_binds.nix6
-rw-r--r--home-manager/stvnliu/hypr/hyprlock.nix9
-rw-r--r--home-manager/stvnliu/hypr/hyprpaper.nix11
-rw-r--r--home-manager/stvnliu/mako.nix13
-rw-r--r--home-manager/stvnliu/nixvim/auto-pairs.nix2
-rw-r--r--home-manager/stvnliu/nixvim/bufferline.nix2
-rw-r--r--home-manager/stvnliu/nixvim/cmp.nix32
-rw-r--r--home-manager/stvnliu/nixvim/default.nix4
-rw-r--r--home-manager/stvnliu/nixvim/ionide.nix2
-rw-r--r--home-manager/stvnliu/nixvim/lsp.nix2
-rw-r--r--home-manager/stvnliu/nixvim/telescope.nix2
-rw-r--r--home-manager/stvnliu/nixvim/transparent.nix2
-rw-r--r--home-manager/stvnliu/nixvim/treesitter.nix2
-rw-r--r--home-manager/stvnliu/nixvim/virt-column.nix2
-rw-r--r--home-manager/stvnliu/nixvim/which_key.nix2
-rw-r--r--home-manager/stvnliu/nixvim/wilder.nix2
-rw-r--r--home-manager/stvnliu/packages/default.nix10
-rw-r--r--home-manager/stvnliu/packages/dev.nix7
-rw-r--r--home-manager/stvnliu/packages/discord.nix13
-rw-r--r--home-manager/stvnliu/packages/gaming.nix4
-rw-r--r--home-manager/stvnliu/packages/office-programs.nix9
-rw-r--r--home-manager/stvnliu/packages/pentesting.nix7
-rw-r--r--home-manager/stvnliu/packages/util-programs.nix9
-rw-r--r--home-manager/stvnliu/packages/vscodium.nix4
-rw-r--r--home-manager/stvnliu/packages/wayland-utils.nix11
-rw-r--r--home-manager/stvnliu/programs/default.nix9
-rw-r--r--home-manager/stvnliu/programs/foot.nix11
-rw-r--r--home-manager/stvnliu/programs/git.nix9
-rw-r--r--home-manager/stvnliu/programs/rofi.nix9
-rw-r--r--home-manager/stvnliu/programs/tmux.nix9
-rw-r--r--home-manager/stvnliu/programs/walker.nix9
-rw-r--r--home-manager/stvnliu/scripts/default.nix9
-rw-r--r--home-manager/stvnliu/scripts/git-check.script.nix95
-rw-r--r--home-manager/stvnliu/scripts/heic-to-jpg.script.nix2
-rw-r--r--home-manager/stvnliu/scripts/tmux-default.script.nix31
-rw-r--r--home-manager/stvnliu/services/default.nix8
-rw-r--r--home-manager/stvnliu/services/mpd.nix29
-rw-r--r--home-manager/stvnliu/services/swaync.nix7
-rw-r--r--home-manager/stvnliu/shells/aliases/default.nix2
-rw-r--r--home-manager/stvnliu/shells/default.nix56
-rw-r--r--home-manager/stvnliu/shells/direnv.nix2
-rw-r--r--home-manager/stvnliu/shells/env/default.nix7
-rw-r--r--home-manager/stvnliu/shells/fish/default.nix122
-rw-r--r--home-manager/stvnliu/shells/nushell/default.nix44
-rw-r--r--home-manager/stvnliu/shells/starship/default.nix46
-rw-r--r--home-manager/stvnliu/shells/zoxide.nix9
-rw-r--r--home-manager/stvnliu/shells/zsh.nix62
-rw-r--r--home-manager/stvnliu/spicetify.nix15
-rw-r--r--home-manager/stvnliu/stylix.nix13
-rw-r--r--home-manager/stvnliu/wechat/default.nix2
-rw-r--r--home-manager/stvnliu/xdg.nix3
67 files changed, 631 insertions, 571 deletions
diff --git a/common/variables.nix b/common/variables.nix
index ddada2f..3e76916 100644
--- a/common/variables.nix
+++ b/common/variables.nix
@@ -1,31 +1,33 @@
-{
- config,
- pkgs,
- lib,
- ...
-}: let
+{ config
+, pkgs
+, lib
+, ...
+}:
+let
monitorMaxBrightness = "255";
monitorMinBrightness = "32";
-in {
+in
+{
# Type definitions for nix variables used in this configuration
options = with lib;
- with types; {
- defaultApplications = {
- fileManager = mkOption {type = str;};
- appLauncher = mkOption {type = str;};
- terminal = mkOption {type = str;};
+ with types; {
+ usingMusicPlayerDaemon = mkOption { type = bool; };
+ defaultApplications = {
+ fileManager = mkOption { type = str; };
+ appLauncher = mkOption { type = str; };
+ terminal = mkOption { type = str; };
+ };
+ myWallPaperPath = mkOption { type = path; };
+ myUserName = mkOption { type = str; };
+ myHostName = mkOption { type = str; };
+ myWallPaperPathString = mkOption { type = str; };
+ myDisplayName = mkOption { type = str; };
+ myEmail = mkOption { type = str; };
+ displayScale = mkOption { type = int; };
+ myAutostartCommands = mkOption { type = listOf str; };
+ myConfigLocation = mkOption { type = str; };
+ desktopFontFullName = mkOption { type = str; };
};
- myWallPaperPath = mkOption {type = path;};
- myUserName = mkOption {type = str;};
- myHostName = mkOption {type = str;};
- myWallPaperPathString = mkOption {type = str;};
- myDisplayName = mkOption {type = str;};
- myEmail = mkOption {type = str;};
- displayScale = mkOption {type = int;};
- myAutostartCommands = mkOption {type = listOf str;};
- myConfigLocation = mkOption {type = str;};
- desktopFontFullName = mkOption {type = str;};
- };
# Default values for this configuration
config = rec {
@@ -37,7 +39,7 @@ in {
myDisplayName = "Zhongheng Liu";
myEmail = "z.liu@outlook.com.gr";
specialisation."powersave".configuration = {
- myAutostartCommands = ["${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMinBrightness}"];
+ myAutostartCommands = [ "${pkgs.brightnessctl}/bin/brightnessctl s ${monitorMinBrightness}" ];
};
myConfigLocation = "/home/${myUserName}/nix-conf";
desktopFontFullName = "IntoneMono NFM:style=Regular";
@@ -54,5 +56,6 @@ in {
fileManager = "${pkgs.nemo}/bin/nemo";
appLauncher = "${pkgs.walker}/bin/walker";
};
+ usingMusicPlayerDaemon = true;
};
}
diff --git a/devenv.nix b/devenv.nix
index 475b359..1ba8269 100644
--- a/devenv.nix
+++ b/devenv.nix
@@ -1,21 +1,15 @@
-{
- pkgs,
- lib,
- config,
- inputs,
- ...
-}: {
+{ pkgs, lib, config, inputs, ... }: {
# https://devenv.sh/basics/
env.GREET = "devenv";
cachix.enable = false;
# https://devenv.sh/packages/
- packages = [pkgs.git];
+ packages = [ pkgs.git ];
# https://devenv.sh/languages/
# languages.rust.enable = true;
languages.nix.enable = true;
pre-commit.hooks = {
- alejandra.enable = true;
+ nixpkgs-fmt.enable = true;
shellcheck.enable = true;
commitizen.enable = true;
};
@@ -38,9 +32,7 @@
# https://devenv.sh/tests/
enterTest =
- /*
- shell
- */
+ # shell
''
echo "Running tests"
git --version | grep --color=auto "${pkgs.git.version}"
diff --git a/flake.nix b/flake.nix
index 86e98a6..43c2c20 100644
--- a/flake.nix
+++ b/flake.nix
@@ -16,13 +16,13 @@
inputs.nixpkgs.follows = "nixpkgs";
};
/*
- lix-module = {
+ lix-module = {
url =
"https://git.lix.systems/lix-project/nixos-module/archive/2.91.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
- };
+ };
*/
- stylix = {url = "github:danth/stylix";};
+ stylix = { url = "github:danth/stylix"; };
spicetify-nix = {
url = "github:Gerg-L/spicetify-nix";
inputs.nixpkgs.follows = "nixpkgs";
@@ -30,44 +30,46 @@
hyprland-qtutils.url = "github:hyprwm/hyprland-qtutils";
};
- outputs = {
- self,
- nixpkgs,
- home-manager,
- stylix,
- spicetify-nix,
- ...
- } @ inputs: let
- inherit (self) outputs;
- myHostName = "nixos-msi";
- stevenUserName = "stvnliu";
- in {
- # NixOS configuration entrypoint
- # Available through 'nixos-rebuild --flake .#your-hostname'
- nixosConfigurations = {
- "${myHostName}" = nixpkgs.lib.nixosSystem {
- specialArgs = {inherit inputs outputs;};
- modules = [
- ./nixos/configuration.nix
- #lix-module.nixosModules.default
- ];
+ outputs =
+ { self
+ , nixpkgs
+ , home-manager
+ , stylix
+ , spicetify-nix
+ , ...
+ } @ inputs:
+ let
+ inherit (self) outputs;
+ myHostName = "nixos-msi";
+ stevenUserName = "stvnliu";
+ in
+ {
+ # NixOS configuration entrypoint
+ # Available through 'nixos-rebuild --flake .#your-hostname'
+ nixosConfigurations = {
+ "${myHostName}" = nixpkgs.lib.nixosSystem {
+ specialArgs = { inherit inputs outputs; };
+ modules = [
+ ./nixos/configuration.nix
+ #lix-module.nixosModules.default
+ ];
+ };
};
- };
- # Standalone home-manager configuration entrypoint
- # Available through 'home-manager --flake .#your-username@your-hostname'
- homeConfigurations = {
- "${stevenUserName}@${myHostName}" = home-manager.lib.homeManagerConfiguration {
- pkgs =
- nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
- extraSpecialArgs = {inherit inputs outputs;};
- modules = [
- ./home-manager/${stevenUserName}/home.nix
- stylix.homeManagerModules.stylix
- inputs.nixvim.homeManagerModules.nixvim
- spicetify-nix.homeManagerModules.default
- ];
+ # Standalone home-manager configuration entrypoint
+ # Available through 'home-manager --flake .#your-username@your-hostname'
+ homeConfigurations = {
+ "${stevenUserName}@${myHostName}" = home-manager.lib.homeManagerConfiguration {
+ pkgs =
+ nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
+ extraSpecialArgs = { inherit inputs outputs; };
+ modules = [
+ ./home-manager/${stevenUserName}/home.nix
+ stylix.homeManagerModules.stylix
+ inputs.nixvim.homeManagerModules.nixvim
+ spicetify-nix.homeManagerModules.default
+ ];
+ };
};
};
- };
}
diff --git a/home-manager/stvnliu/ags/config/hyprworkspaces.js b/home-manager/stvnliu/ags/config/hyprworkspaces.js
index a1c4af8..270a410 100644
--- a/home-manager/stvnliu/ags/config/hyprworkspaces.js
+++ b/home-manager/stvnliu/ags/config/hyprworkspaces.js
@@ -1,7 +1,7 @@
const hyprland = await Service.import("hyprland")
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({
onScrollUp: () => dispatch('+1'),
onScrollDown: () => dispatch('-1'),
diff --git a/home-manager/stvnliu/ags/config/mpris.js b/home-manager/stvnliu/ags/config/mpris.js
new file mode 100644
index 0000000..b096a84
--- /dev/null
+++ b/home-manager/stvnliu/ags/config/mpris.js
@@ -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) }))
+})
diff --git a/home-manager/stvnliu/ags/default.nix b/home-manager/stvnliu/ags/default.nix
index 96833fb..6518235 100644
--- a/home-manager/stvnliu/ags/default.nix
+++ b/home-manager/stvnliu/ags/default.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
config = {
home.file = {
diff --git a/home-manager/stvnliu/devenv.nix b/home-manager/stvnliu/devenv.nix
index 74d0241..928a18b 100644
--- a/home-manager/stvnliu/devenv.nix
+++ b/home-manager/stvnliu/devenv.nix
@@ -1,7 +1,5 @@
-{
- pkgs,
- config,
- lib,
- ...
-}: {
-}
+{ pkgs
+, config
+, lib
+, ...
+}: { }
diff --git a/home-manager/stvnliu/editors.nix b/home-manager/stvnliu/editors.nix
index f548076..ce5aca7 100644
--- a/home-manager/stvnliu/editors.nix
+++ b/home-manager/stvnliu/editors.nix
@@ -1,8 +1,7 @@
-{
- lib,
- pkgs,
- config,
- ...
+{ lib
+, pkgs
+, config
+, ...
}: {
imports = [
#./vscode.nix
@@ -10,9 +9,14 @@
];
programs.nixvim = import ./nixvim;
# dependencies for nixvim configuration
- home.packages = with pkgs; [ripgrep fd];
- programs.vscode = {
+ home.packages = with pkgs; [ ripgrep fd ];
+ programs.helix = {
enable = true;
- package = pkgs.vscode.fhs;
};
+ /*
+ programs.vscode = {
+ enable = true;
+ package = pkgs.vscode.fhs;
+ };
+ */
}
diff --git a/home-manager/stvnliu/gtk.nix b/home-manager/stvnliu/gtk.nix
index 9e38baa..31f3f5b 100644
--- a/home-manager/stvnliu/gtk.nix
+++ b/home-manager/stvnliu/gtk.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
gtk = {
enable = true;
@@ -13,6 +12,6 @@
qt = {
enable = true;
platformTheme.name = "gtk";
- style = {name = "Fusion";};
+ style = { name = "Fusion"; };
};
}
diff --git a/home-manager/stvnliu/home.nix b/home-manager/stvnliu/home.nix
index aef2927..99529da 100644
--- a/home-manager/stvnliu/home.nix
+++ b/home-manager/stvnliu/home.nix
@@ -1,9 +1,8 @@
-{
- inputs,
- lib,
- config,
- pkgs,
- ...
+{ inputs
+, lib
+, config
+, pkgs
+, ...
}: {
imports = [
./hypr
@@ -28,7 +27,7 @@
overlays = [
(final: prev: {
ags = prev.ags.overrideAttrs (old: {
- buildInputs = old.buildInputs ++ [pkgs.libdbusmenu-gtk3];
+ buildInputs = old.buildInputs ++ [ pkgs.libdbusmenu-gtk3 ];
});
})
];
@@ -51,7 +50,7 @@
username = "${config.myUserName}";
homeDirectory = "/home/${config.myUserName}";
# copy wallpaper from assets
- file = {"wallpaper.jpg".source = config.myWallPaperPath;};
+ file = { "wallpaper.jpg".source = config.myWallPaperPath; };
};
home.packages = with pkgs; [
prismlauncher
@@ -69,6 +68,7 @@
teams-for-linux
sxiv
heroic
+ vscodium-fhs
];
myAutostartCommands = [
#"${pkgs.clash-verge-rev}/bin/clash-verge"
@@ -77,7 +77,7 @@
programs = {
obs-studio = {
enable = true;
- plugins = with pkgs.obs-studio-plugins; [wlrobs input-overlay];
+ plugins = with pkgs.obs-studio-plugins; [ wlrobs input-overlay ];
};
home-manager.enable = true;
firefox = {
@@ -96,7 +96,7 @@
};
thunderbird = {
enable = true;
- profiles.default = {isDefault = true;};
+ profiles.default = { isDefault = true; };
};
};
# Nicely reload system units when changing configs
diff --git a/home-manager/stvnliu/hypr/default.nix b/home-manager/stvnliu/hypr/default.nix
index bb8c931..e2ebf96 100644
--- a/home-manager/stvnliu/hypr/default.nix
+++ b/home-manager/stvnliu/hypr/default.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
imports = [
./hyprland
diff --git a/home-manager/stvnliu/hypr/hypridle.nix b/home-manager/stvnliu/hypr/hypridle.nix
index 5439a41..acbcde9 100644
--- a/home-manager/stvnliu/hypr/hypridle.nix
+++ b/home-manager/stvnliu/hypr/hypridle.nix
@@ -1,6 +1,8 @@
-{pkgs, ...}: let
+{ pkgs, ... }:
+let
timeoutSeconds = 600;
-in {
+in
+{
services.hypridle = {
enable = true;
settings = {
diff --git a/home-manager/stvnliu/hypr/hyprland/binds.nix b/home-manager/stvnliu/hypr/hyprland/binds.nix
index e02c08b..0325faa 100644
--- a/home-manager/stvnliu/hypr/hyprland/binds.nix
+++ b/home-manager/stvnliu/hypr/hyprland/binds.nix
@@ -1,60 +1,75 @@
-{
- config,
- pkgs,
- ...
-}: let
+{ config
+, pkgs
+, ...
+}:
+let
terminalCmd = config.defaultApplications.terminal;
screenshotLocation = "/home/${config.myUserName}/Screenshots/$(date '+%Y-%m-%d-%H-%M-%S').png";
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}"
- ", Print, exec, ${pkgs.grimblast}/bin/grimblast copysave area ${screenshotLocation}"
- "$mod, Print, exec, ${pkgs.grimblast}/bin/grimblast copy area"
+ "$mod SHIFT, Print, exec, ${pkgs.grimblast}/bin/grimblast copysave output ${screenshotLocation}"
+ ", Print, exec, ${pkgs.grimblast}/bin/grimblast copysave area ${screenshotLocation}"
+ "$mod, Print, exec, ${pkgs.grimblast}/bin/grimblast copy area"
- # special workspace keybinds
- "$mod, S, togglespecialworkspace"
- "$mod SHIFT, S, movetoworkspace, special"
+ # special workspace keybinds
+ "$mod, S, togglespecialworkspace"
+ "$mod SHIFT, S, movetoworkspace, special"
- # keysyms for util functions
- # Example volume button that allows press and hold, volume limited to 150%
- "$mod, Q, killactive"
- "$mod, D, exec, ${config.defaultApplications.appLauncher}"
- "$mod, F, fullscreen"
- "$mod, E, exec, ${config.defaultApplications.fileManager}"
- # foot terminal
- "$mod, Return, exec, ${terminalCmd} ${config.myShells.defaultShell}"
- "$mod SHIFT, Return, exec, [float] ${terminalCmd} ${config.myShells.defaultShell}"
+ # keysyms for util functions
+ # Example volume button that allows press and hold, volume limited to 150%
+ "$mod, Q, killactive"
+ "$mod, D, exec, ${config.defaultApplications.appLauncher}"
+ "$mod, F, fullscreen"
+ "$mod, E, exec, ${config.defaultApplications.fileManager}"
+ # foot terminal
+ "$mod, Return, exec, ${terminalCmd} ${config.myShells.defaultShell}"
+ "$mod SHIFT, Return, exec, [float] ${terminalCmd} ${config.myShells.defaultShell}"
- # cmdline utilities
- /*
+ # cmdline utilities
+ /*
NOTE Replaced by network manager applet
nmtui interface is no longer needed
TODO Fix floating window rule
*/
- # "$mod, N, exec, [float] ${terminalCmd} ${pkgs.networkmanager}/bin/nmtui"
- "$mod, M, exec, [float] ${terminalCmd} ${pkgs.zenith}/bin/zenith"
+ # "$mod, N, exec, [float] ${terminalCmd} ${pkgs.networkmanager}/bin/nmtui"
+ #"$mod, M, exec, [float] ${terminalCmd} ${pkgs.zenith}/bin/zenith"
- # vimkeys navigation
- "$mod, H, movefocus, l"
- "$mod, J, movefocus, d"
- "$mod, K, movefocus, u"
- "$mod, L, movefocus, r"
- ]
- ++ (
- if config.services.swaync.enable
- then ["$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t"]
- else []
- )
- ++ (
- # workspaces
- # binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
- builtins.concatLists (builtins.genList (x: let
+ # vimkeys navigation
+ "$mod, H, movefocus, l"
+ "$mod, J, movefocus, d"
+ "$mod, K, movefocus, u"
+ "$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
+ then [ "$mod, N, exec, ${pkgs.swaynotificationcenter}/bin/swaync-client -t" ]
+ else [ ]
+)
+++ (
+ # 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 [
+ in
+ [
"$mod, ${ws}, workspace, ${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)
+ */
+)
diff --git a/home-manager/stvnliu/hypr/hyprland/default.nix b/home-manager/stvnliu/hypr/hyprland/default.nix
index c582a13..bb3c3e6 100644
--- a/home-manager/stvnliu/hypr/hyprland/default.nix
+++ b/home-manager/stvnliu/hypr/hyprland/default.nix
@@ -1,28 +1,21 @@
-{
- inputs,
- config,
- pkgs,
- lib,
- ...
-}: {
- home.packages = [
- inputs.hyprland-qtutils.packages.x86_64-linux.default
- pkgs.foot
- ];
+{ inputs, config, pkgs, lib, ... }: {
+ home.packages =
+ [ inputs.hyprland-qtutils.packages.x86_64-linux.default pkgs.foot ];
wayland.windowManager.hyprland = {
# Whether to enable Hyprland wayland compositor
enable = true;
# The hyprland package to use
package = pkgs.hyprland;
- plugins = with pkgs.hyprlandPlugins; [
- # hyprfocus
- # hycov
- ];
+ plugins = with pkgs.hyprlandPlugins;
+ [
+ # hyprfocus
+ # hycov
+ ];
# Whether to enable XWayland
xwayland.enable = true;
settings = {
- env = ["AQ_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0"];
- xwayland = {force_zero_scaling = true;};
+ env = [ "AQ_DRM_DEVICES, /dev/dri/card1:/dev/dri/card0" ];
+ xwayland = { force_zero_scaling = true; };
monitor = [
#"eDP-1, 1920x1080@165,0x0,1"
"desc:Xiaomi Corporation Mi 27 NFGL 3215000032603, 1920x1080@75, 2560x0, 1"
@@ -37,8 +30,8 @@
gaps_out = 5;
allow_tearing = true;
};
- windowrulev2 = ["immediate, class:^(cs2)$"];
- decoration = {rounding = 5;};
+ windowrulev2 = import ./window_rules.nix;
+ decoration = { rounding = 5; };
input = {
# xset rate 250 50 replacement on wayland...
# FAST MODE LET'S GOOO
@@ -46,13 +39,10 @@
repeat_delay = 250;
accel_profile = "flat";
};
- exec-once =
- config.myAutostartCommands
- ++ [
- # future hyprland-specific exec commands
- #"${config.programs.firefox.package}/bin/firefox"
- #"${pkgs.thunderbird}/bin/thunderbird"
- ];
+ exec-once = config.myAutostartCommands ++ import ./hypr_autostart.nix {
+ inherit pkgs;
+ inherit config;
+ };
misc = {
disable_hyprland_logo = true;
disable_splash_rendering = true;
@@ -78,7 +68,7 @@
};
# Optional
# Whether to enable hyprland-session.target on hyprland startup
- systemd = {enable = true;};
+ systemd = { enable = true; };
};
# ...
}
diff --git a/home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix b/home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix
new file mode 100644
index 0000000..f245efa
--- /dev/null
+++ b/home-manager/stvnliu/hypr/hyprland/hypr_autostart.nix
@@ -0,0 +1,8 @@
+{ pkgs, config }:
+let
+ term = config.defaultApplications.terminal;
+ shell = config.myShells.defaultShell;
+in
+[
+ "${term} --title=autorun ${shell}"
+]
diff --git a/home-manager/stvnliu/hypr/hyprland/window_rules.nix b/home-manager/stvnliu/hypr/hyprland/window_rules.nix
new file mode 100644
index 0000000..b09a597
--- /dev/null
+++ b/home-manager/stvnliu/hypr/hyprland/window_rules.nix
@@ -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)$"
+]
diff --git a/home-manager/stvnliu/hypr/hyprland/xf86_binds.nix b/home-manager/stvnliu/hypr/hyprland/xf86_binds.nix
index 215a4a8..eed6ff6 100644
--- a/home-manager/stvnliu/hypr/hyprland/xf86_binds.nix
+++ b/home-manager/stvnliu/hypr/hyprland/xf86_binds.nix
@@ -1,6 +1,6 @@
-{
- pkgs,
- config,
+{ pkgs
+, config
+,
}: [
", XF86AudioPlay, exec, ${pkgs.playerctl}/bin/playerctl play-pause"
", XF86AudioStop, exec, ${pkgs.playerctl}/bin/playerctl stop"
diff --git a/home-manager/stvnliu/hypr/hyprlock.nix b/home-manager/stvnliu/hypr/hyprlock.nix
index 99529f3..9901cba 100644
--- a/home-manager/stvnliu/hypr/hyprlock.nix
+++ b/home-manager/stvnliu/hypr/hyprlock.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
programs.hyprlock = {
enable = true;
diff --git a/home-manager/stvnliu/hypr/hyprpaper.nix b/home-manager/stvnliu/hypr/hyprpaper.nix
index 8266871..81140a1 100644
--- a/home-manager/stvnliu/hypr/hyprpaper.nix
+++ b/home-manager/stvnliu/hypr/hyprpaper.nix
@@ -1,15 +1,14 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
- preload = [config.myWallPaperPathString];
- wallpaper = [",${config.myWallPaperPathString}"];
+ preload = [ config.myWallPaperPathString ];
+ wallpaper = [ ",${config.myWallPaperPathString}" ];
#preload = [/home/stvnliu/Downloads/mao-zedong.jpg];
#wallpaper = [",/home/stvnliu/Downloads/mao-zedong.jpg"];
};
diff --git a/home-manager/stvnliu/mako.nix b/home-manager/stvnliu/mako.nix
index 5b22460..69bbe5c 100644
--- a/home-manager/stvnliu/mako.nix
+++ b/home-manager/stvnliu/mako.nix
@@ -1,10 +1,11 @@
-{
- pkgs,
- lib,
- ...
-}: let
+{ pkgs
+, lib
+, ...
+}:
+let
defaultTimeoutMillis = 5 * 1000;
-in {
+in
+{
services.mako = {
enable = true;
defaultTimeout = defaultTimeoutMillis;
diff --git a/home-manager/stvnliu/nixvim/auto-pairs.nix b/home-manager/stvnliu/nixvim/auto-pairs.nix
index c57a48b..f8a479c 100644
--- a/home-manager/stvnliu/nixvim/auto-pairs.nix
+++ b/home-manager/stvnliu/nixvim/auto-pairs.nix
@@ -1 +1 @@
-{plugins.nvim-autopairs = {enable = true;};}
+{ plugins.nvim-autopairs = { enable = true; }; }
diff --git a/home-manager/stvnliu/nixvim/bufferline.nix b/home-manager/stvnliu/nixvim/bufferline.nix
index 628aaa6..9039f66 100644
--- a/home-manager/stvnliu/nixvim/bufferline.nix
+++ b/home-manager/stvnliu/nixvim/bufferline.nix
@@ -1 +1 @@
-{plugins.bufferline = {enable = true;};}
+{ plugins.bufferline = { enable = true; }; }
diff --git a/home-manager/stvnliu/nixvim/cmp.nix b/home-manager/stvnliu/nixvim/cmp.nix
index 5c91e90..260de1f 100644
--- a/home-manager/stvnliu/nixvim/cmp.nix
+++ b/home-manager/stvnliu/nixvim/cmp.nix
@@ -3,28 +3,28 @@
plugins = {
luasnip.enable = true;
/*
- copilot-lua = {
+ copilot-lua = {
enable = true;
suggestion.enabled = false;
panel.enabled = false;
- };
+ };
*/
cmp = {
enable = true;
settings = {
autoEnableSources = true;
- experimental = {ghost_text = false;};
+ experimental = { ghost_text = false; };
performance = {
debounce = 60;
fetchingTimeout = 200;
maxViewEntries = 30;
};
- snippet = {expand = "luasnip";};
- cmp-buffer = {enable = true;};
- cmp-emoji = {enable = true;};
- cmp-nvim-lsp = {enable = true;};
- cmp-path = {enable = true;};
- cmp_luasnip = {enable = true;};
+ snippet = { expand = "luasnip"; };
+ cmp-buffer = { enable = true; };
+ cmp-emoji = { enable = true; };
+ cmp-nvim-lsp = { enable = true; };
+ cmp-path = { enable = true; };
+ cmp_luasnip = { enable = true; };
/*
snippet.expand = ''
@@ -34,17 +34,17 @@
'';
*/
sources = [
- {name = "nvim_lsp";}
- {name = "luasnip";}
+ { name = "nvim_lsp"; }
+ { name = "luasnip"; }
{
name = "buffer";
option.get_bufnrs.__raw = "vim.api.nvim_list_bufs";
}
- {name = "nvim_lua";}
- {name = "path";}
+ { name = "nvim_lua"; }
+ { name = "path"; }
];
formatting = {
- fields = ["abbr" "kind" "menu"];
+ fields = [ "abbr" "kind" "menu" ];
format =
# lua
''
@@ -104,11 +104,11 @@
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
scrollbar = false;
sidePadding = 0;
- border = ["╭" "─" "╮" "│" "╯" "─" "╰" "│"];
+ border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
};
settings.documentation = {
- border = ["╭" "─" "╮" "│" "╯" "─" "╰" "│"];
+ border = [ "╭" "─" "╮" "│" "╯" "─" "╰" "│" ];
winhighlight = "FloatBorder:CmpBorder,Normal:CmpPmenu,CursorLine:CmpSel,Search:PmenuSel";
};
};
diff --git a/home-manager/stvnliu/nixvim/default.nix b/home-manager/stvnliu/nixvim/default.nix
index f865f09..33cf395 100644
--- a/home-manager/stvnliu/nixvim/default.nix
+++ b/home-manager/stvnliu/nixvim/default.nix
@@ -1,4 +1,4 @@
-{config, ...}: {
+{ config, ... }: {
imports = [
./auto-pairs.nix
./autosave.nix
@@ -26,7 +26,7 @@
enableMan = true;
defaultEditor = true;
globals.mapleader = " ";
- colorschemes.gruvbox = {enable = true;};
+ colorschemes.gruvbox = { enable = true; };
keymaps =
[
# Global
diff --git a/home-manager/stvnliu/nixvim/ionide.nix b/home-manager/stvnliu/nixvim/ionide.nix
index db3d3fc..3de2422 100644
--- a/home-manager/stvnliu/nixvim/ionide.nix
+++ b/home-manager/stvnliu/nixvim/ionide.nix
@@ -1,4 +1,4 @@
-{pkgs, ...}: {
+{ pkgs, ... }: {
extraPlugins = with pkgs.vimPlugins; [
Ionide-vim
];
diff --git a/home-manager/stvnliu/nixvim/lsp.nix b/home-manager/stvnliu/nixvim/lsp.nix
index 675dbf9..201aab1 100644
--- a/home-manager/stvnliu/nixvim/lsp.nix
+++ b/home-manager/stvnliu/nixvim/lsp.nix
@@ -1,4 +1,4 @@
-{...}: {
+{ ... }: {
plugins = {
lsp-signature.enable = true;
lsp-status.enable = true;
diff --git a/home-manager/stvnliu/nixvim/telescope.nix b/home-manager/stvnliu/nixvim/telescope.nix
index 989ff58..95e672f 100644
--- a/home-manager/stvnliu/nixvim/telescope.nix
+++ b/home-manager/stvnliu/nixvim/telescope.nix
@@ -10,6 +10,6 @@
};
};
};
- extensions.fzf-native = {enable = true;};
+ extensions.fzf-native = { enable = true; };
};
}
diff --git a/home-manager/stvnliu/nixvim/transparent.nix b/home-manager/stvnliu/nixvim/transparent.nix
index f81c39b..b392fb8 100644
--- a/home-manager/stvnliu/nixvim/transparent.nix
+++ b/home-manager/stvnliu/nixvim/transparent.nix
@@ -1 +1 @@
-{plugins.transparent.enable = true;}
+{ plugins.transparent.enable = true; }
diff --git a/home-manager/stvnliu/nixvim/treesitter.nix b/home-manager/stvnliu/nixvim/treesitter.nix
index 7a360c6..9105918 100644
--- a/home-manager/stvnliu/nixvim/treesitter.nix
+++ b/home-manager/stvnliu/nixvim/treesitter.nix
@@ -1,4 +1,4 @@
-{pkgs, ...}: {
+{ pkgs, ... }: {
plugins = {
treesitter = {
enable = true;
diff --git a/home-manager/stvnliu/nixvim/virt-column.nix b/home-manager/stvnliu/nixvim/virt-column.nix
index 0daf880..ef15de2 100644
--- a/home-manager/stvnliu/nixvim/virt-column.nix
+++ b/home-manager/stvnliu/nixvim/virt-column.nix
@@ -1,7 +1,7 @@
{
plugins.virt-column = {
enable = true;
- settings.char = ["┃"];
+ settings.char = [ "┃" ];
settings.virtcolumn = "80";
};
}
diff --git a/home-manager/stvnliu/nixvim/which_key.nix b/home-manager/stvnliu/nixvim/which_key.nix
index 1b73707..bf4f909 100644
--- a/home-manager/stvnliu/nixvim/which_key.nix
+++ b/home-manager/stvnliu/nixvim/which_key.nix
@@ -1 +1 @@
-{plugins.which-key = {enable = true;};}
+{ plugins.which-key = { enable = true; }; }
diff --git a/home-manager/stvnliu/nixvim/wilder.nix b/home-manager/stvnliu/nixvim/wilder.nix
index 84d2a31..1cca351 100644
--- a/home-manager/stvnliu/nixvim/wilder.nix
+++ b/home-manager/stvnliu/nixvim/wilder.nix
@@ -1,6 +1,6 @@
{
plugins.wilder = {
enable = true;
- modes = [":" "/" "?"];
+ modes = [ ":" "/" "?" ];
};
}
diff --git a/home-manager/stvnliu/packages/default.nix b/home-manager/stvnliu/packages/default.nix
index 9063c20..71fb0d8 100644
--- a/home-manager/stvnliu/packages/default.nix
+++ b/home-manager/stvnliu/packages/default.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
imports = [
./util-programs.nix
@@ -11,5 +10,6 @@
./wayland-utils.nix
./pentesting.nix
./dev.nix
+ ./gaming.nix
];
}
diff --git a/home-manager/stvnliu/packages/dev.nix b/home-manager/stvnliu/packages/dev.nix
index e1e91ff..cbf8d4d 100644
--- a/home-manager/stvnliu/packages/dev.nix
+++ b/home-manager/stvnliu/packages/dev.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
home.packages = with pkgs; [
wget
diff --git a/home-manager/stvnliu/packages/discord.nix b/home-manager/stvnliu/packages/discord.nix
index 90fff5a..cd89efb 100644
--- a/home-manager/stvnliu/packages/discord.nix
+++ b/home-manager/stvnliu/packages/discord.nix
@@ -1,14 +1,13 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
- home.packages = with pkgs; [vesktop];
+ home.packages = with pkgs; [ vesktop ];
xdg.desktopEntries.discord = {
exec = "${pkgs.vesktop}/bin/vesktop";
terminal = false;
- mimeType = ["x-scheme-handler/discord"];
+ mimeType = [ "x-scheme-handler/discord" ];
name = "Discord - Vesktop";
genericName = "Discord but substituted with Vesktop";
type = "Application";
diff --git a/home-manager/stvnliu/packages/gaming.nix b/home-manager/stvnliu/packages/gaming.nix
new file mode 100644
index 0000000..9d95d6f
--- /dev/null
+++ b/home-manager/stvnliu/packages/gaming.nix
@@ -0,0 +1,4 @@
+{ pkgs, config, ... }:
+{
+ home.packages = with pkgs; [ bottles ];
+}
diff --git a/home-manager/stvnliu/packages/office-programs.nix b/home-manager/stvnliu/packages/office-programs.nix
index c34d033..4b52405 100644
--- a/home-manager/stvnliu/packages/office-programs.nix
+++ b/home-manager/stvnliu/packages/office-programs.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
home.packages = with pkgs; [
libreoffice
diff --git a/home-manager/stvnliu/packages/pentesting.nix b/home-manager/stvnliu/packages/pentesting.nix
index 81bfd41..0a3ba0b 100644
--- a/home-manager/stvnliu/packages/pentesting.nix
+++ b/home-manager/stvnliu/packages/pentesting.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
home.packages = with pkgs; [
openvpn
diff --git a/home-manager/stvnliu/packages/util-programs.nix b/home-manager/stvnliu/packages/util-programs.nix
index caf3138..bd8c9ac 100644
--- a/home-manager/stvnliu/packages/util-programs.nix
+++ b/home-manager/stvnliu/packages/util-programs.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
home.packages = with pkgs; [
bottom
diff --git a/home-manager/stvnliu/packages/vscodium.nix b/home-manager/stvnliu/packages/vscodium.nix
new file mode 100644
index 0000000..3ea5951
--- /dev/null
+++ b/home-manager/stvnliu/packages/vscodium.nix
@@ -0,0 +1,4 @@
+{ pkgs, config, ... }: {
+ home.packages = with pkgs; [ vscodium-fhs ];
+ xdg.desktopEntries.codium = { };
+}
diff --git a/home-manager/stvnliu/packages/wayland-utils.nix b/home-manager/stvnliu/packages/wayland-utils.nix
index 6d47482..dfc526d 100644
--- a/home-manager/stvnliu/packages/wayland-utils.nix
+++ b/home-manager/stvnliu/packages/wayland-utils.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
- home.packages = with pkgs; [wl-clipboard];
+ home.packages = with pkgs; [ wl-clipboard ];
}
diff --git a/home-manager/stvnliu/programs/default.nix b/home-manager/stvnliu/programs/default.nix
index 5e4ee2e..1e62067 100644
--- a/home-manager/stvnliu/programs/default.nix
+++ b/home-manager/stvnliu/programs/default.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
imports = [
./git.nix
diff --git a/home-manager/stvnliu/programs/foot.nix b/home-manager/stvnliu/programs/foot.nix
index ae5188e..136d53b 100644
--- a/home-manager/stvnliu/programs/foot.nix
+++ b/home-manager/stvnliu/programs/foot.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
programs.foot = {
enable = true;
@@ -11,7 +10,7 @@
term = "xterm-256color";
dpi-aware = lib.mkForce "yes";
};
- mouse = {hide-when-typing = "yes";};
+ mouse = { hide-when-typing = "yes"; };
};
server.enable = true;
};
diff --git a/home-manager/stvnliu/programs/git.nix b/home-manager/stvnliu/programs/git.nix
index 6690fb1..e7bd955 100644
--- a/home-manager/stvnliu/programs/git.nix
+++ b/home-manager/stvnliu/programs/git.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
programs.git = {
enable = true;
diff --git a/home-manager/stvnliu/programs/rofi.nix b/home-manager/stvnliu/programs/rofi.nix
index b0731a3..6d73636 100644
--- a/home-manager/stvnliu/programs/rofi.nix
+++ b/home-manager/stvnliu/programs/rofi.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
programs.rofi = {
enable = true;
diff --git a/home-manager/stvnliu/programs/tmux.nix b/home-manager/stvnliu/programs/tmux.nix
index 8522af8..5e407d0 100644
--- a/home-manager/stvnliu/programs/tmux.nix
+++ b/home-manager/stvnliu/programs/tmux.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
programs.tmux = {
enable = true;
diff --git a/home-manager/stvnliu/programs/walker.nix b/home-manager/stvnliu/programs/walker.nix
index 2815a1e..e6dc416 100644
--- a/home-manager/stvnliu/programs/walker.nix
+++ b/home-manager/stvnliu/programs/walker.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
programs.walker = {
enable = true;
@@ -10,7 +9,7 @@
# All options from the config.json can be used here.
config = {
search.placeholder = "Example";
- list = {height = 200;};
+ list = { height = 200; };
websearch.prefix = "?";
switcher.prefix = "/";
};
diff --git a/home-manager/stvnliu/scripts/default.nix b/home-manager/stvnliu/scripts/default.nix
index ff6f091..4096c43 100644
--- a/home-manager/stvnliu/scripts/default.nix
+++ b/home-manager/stvnliu/scripts/default.nix
@@ -1,10 +1,9 @@
-{
- config,
- pkgs,
- ...
+{ config
+, pkgs
+, ...
}: {
home.packages = [
- (import ./heic-to-jpg.script.nix {inherit pkgs;})
+ (import ./heic-to-jpg.script.nix { inherit pkgs; })
(import ./tmux-default.script.nix {
inherit pkgs;
inherit config;
diff --git a/home-manager/stvnliu/scripts/git-check.script.nix b/home-manager/stvnliu/scripts/git-check.script.nix
index 209fa7b..82120bc 100644
--- a/home-manager/stvnliu/scripts/git-check.script.nix
+++ b/home-manager/stvnliu/scripts/git-check.script.nix
@@ -1,54 +1,55 @@
-{
- pkgs,
- config,
-}: let
+{ pkgs
+, config
+,
+}:
+let
git = config.programs.git.package;
# checks for any Git repositories with uncommitted changes
# used because I am too lazy
in
- pkgs.writeShellScriptBin "git-check" ''
- #!${pkgs.bash}/bin/bash
- cd_err() {
- echo "change-directory occurred error. interrupting..."
- }
- git_check() {
- prev=$1
- repo_dir=$2
- #echo "Checking git-cleanliness at $repo_dir, working in $PWD"
- cd "$repo_dir" || return
- inside_git_repo="$(${git}/bin/git rev-parse --is-inside-work-tree 2>/dev/null)"
- result=256
- default_skip=false
- if [ "$inside_git_repo" ]; then
- if [ "$(${git}/bin/git status --porcelain)" ]; then
- result=0
- else
- result=1
- fi
- #echo "not a git repository"
+pkgs.writeShellScriptBin "git-check" ''
+ #!${pkgs.bash}/bin/bash
+ cd_err() {
+ echo "change-directory occurred error. interrupting..."
+ }
+ git_check() {
+ prev=$1
+ repo_dir=$2
+ #echo "Checking git-cleanliness at $repo_dir, working in $PWD"
+ cd "$repo_dir" || return
+ inside_git_repo="$(${git}/bin/git rev-parse --is-inside-work-tree 2>/dev/null)"
+ result=256
+ default_skip=false
+ if [ "$inside_git_repo" ]; then
+ if [ "$(${git}/bin/git status --porcelain)" ]; then
+ result=0
+ else
+ result=1
+ fi
+ #echo "not a git repository"
+ fi
+ if [[ $result -eq 0 ]]; then
+ echo "DIRTY $PWD"
+ if $default_skip; then return; fi
+ read -rp "Enter dirty directory? [y/n/N(skip others)] " userinput
+ if [[ "$userinput" = "y" ]]; then
+ $SHELL
fi
- if [[ $result -eq 0 ]]; then
- echo "DIRTY $PWD"
- if $default_skip; then return; fi
- read -rp "Enter dirty directory? [y/n/N(skip others)] " userinput
- if [[ "$userinput" = "y" ]]; then
- $SHELL
- fi
- if [[ "$userinput" = "N" ]]; then
- default_skip=true
- fi
+ if [[ "$userinput" = "N" ]]; then
+ default_skip=true
fi
- #echo "going back to $prev"
- cd "$prev" || return
- }
- path=$PWD
- scan_path=$PWD
- if [ -z "$1" ]; then
- scan_path=$PWD
- else
- scan_path=$1
fi
- for item in $(find $scan_path -maxdepth 1 -type d); do
- git_check "$path" "$item"
- done
- ''
+ #echo "going back to $prev"
+ cd "$prev" || return
+ }
+ path=$PWD
+ scan_path=$PWD
+ if [ -z "$1" ]; then
+ scan_path=$PWD
+ else
+ scan_path=$1
+ fi
+ for item in $(find $scan_path -maxdepth 1 -type d); do
+ git_check "$path" "$item"
+ done
+''
diff --git a/home-manager/stvnliu/scripts/heic-to-jpg.script.nix b/home-manager/stvnliu/scripts/heic-to-jpg.script.nix
index c247474..a4a4ab8 100644
--- a/home-manager/stvnliu/scripts/heic-to-jpg.script.nix
+++ b/home-manager/stvnliu/scripts/heic-to-jpg.script.nix
@@ -1,4 +1,4 @@
-{pkgs}:
+{ pkgs }:
pkgs.writeShellScriptBin "heic-to-jpg" ''
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"
diff --git a/home-manager/stvnliu/scripts/tmux-default.script.nix b/home-manager/stvnliu/scripts/tmux-default.script.nix
index 8641d90..7f28493 100644
--- a/home-manager/stvnliu/scripts/tmux-default.script.nix
+++ b/home-manager/stvnliu/scripts/tmux-default.script.nix
@@ -1,18 +1,19 @@
-{
- pkgs,
- config,
-}: let
+{ pkgs
+, config
+,
+}:
+let
tmux = config.programs.tmux.package;
windowName = "code-mode";
in
- pkgs.writeShellScriptBin "tmux-code" ''
- #!${pkgs.bash}/bin/bash
- ${tmux}/bin/tmux has-session -t ${windowName} 2>/dev/null
- if [ $? != 0 ]; then
- # setting up session
- ${tmux}/bin/tmux new -s ${windowName} -d
- ${tmux}/bin/tmux send-keys -t ${windowName} 'nvim' Enter
- ${tmux}/bin/tmux split-window -h
- fi
- ${tmux}/bin/tmux attach -t ${windowName}
- ''
+pkgs.writeShellScriptBin "tmux-code" ''
+ #!${pkgs.bash}/bin/bash
+ ${tmux}/bin/tmux has-session -t ${windowName} 2>/dev/null
+ if [ $? != 0 ]; then
+ # setting up session
+ ${tmux}/bin/tmux new -s ${windowName} -d
+ ${tmux}/bin/tmux send-keys -t ${windowName} 'nvim' Enter
+ ${tmux}/bin/tmux split-window -h
+ fi
+ ${tmux}/bin/tmux attach -t ${windowName}
+''
diff --git a/home-manager/stvnliu/services/default.nix b/home-manager/stvnliu/services/default.nix
index c7801d9..32ae334 100644
--- a/home-manager/stvnliu/services/default.nix
+++ b/home-manager/stvnliu/services/default.nix
@@ -1,9 +1,9 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
imports = [
./swaync.nix
+ ./mpd.nix
];
}
diff --git a/home-manager/stvnliu/services/mpd.nix b/home-manager/stvnliu/services/mpd.nix
new file mode 100644
index 0000000..23e38e0
--- /dev/null
+++ b/home-manager/stvnliu/services/mpd.nix
@@ -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;
+ };
+}
diff --git a/home-manager/stvnliu/services/swaync.nix b/home-manager/stvnliu/services/swaync.nix
index 2a5d5bc..3feef00 100644
--- a/home-manager/stvnliu/services/swaync.nix
+++ b/home-manager/stvnliu/services/swaync.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
services.swaync = {
enable = true;
diff --git a/home-manager/stvnliu/shells/aliases/default.nix b/home-manager/stvnliu/shells/aliases/default.nix
index dde4dff..1159a90 100644
--- a/home-manager/stvnliu/shells/aliases/default.nix
+++ b/home-manager/stvnliu/shells/aliases/default.nix
@@ -1,4 +1,4 @@
-{pkgs}: {
+{ pkgs }: {
gil = "${pkgs.lazygit}/bin/lazygit";
cd = "z";
cdi = "zi";
diff --git a/home-manager/stvnliu/shells/default.nix b/home-manager/stvnliu/shells/default.nix
index d28a526..304ee9b 100644
--- a/home-manager/stvnliu/shells/default.nix
+++ b/home-manager/stvnliu/shells/default.nix
@@ -1,32 +1,32 @@
-{
- pkgs,
- lib,
- config,
- ...
-}: let
+{ pkgs
+, lib
+, config
+, ...
+}:
+let
cfg = config.myShells;
in
- with lib; {
- imports = [
- ./zsh.nix
- ./fish
- ./nushell
- ./zoxide.nix
- ./direnv.nix
- ./starship
- ];
+with lib; {
+ imports = [
+ ./zsh.nix
+ ./fish
+ ./nushell
+ ./zoxide.nix
+ ./direnv.nix
+ ./starship
+ ];
- options.myShells = {
- defaultShell = with types; mkOption {type = str;};
- enable = mkEnableOption "Enables the shell customisation module.";
+ options.myShells = {
+ defaultShell = with types; mkOption { type = str; };
+ enable = mkEnableOption "Enables the shell customisation module.";
+ };
+ config = {
+ myShells = {
+ zsh.enable = false;
+ fish.enable = true;
+ #nushell.enable = true;
+ defaultShell = "${config.programs.fish.package}/bin/fish";
+ prompts.starship.enable = true;
};
- config = {
- myShells = {
- zsh.enable = false;
- fish.enable = true;
- #nushell.enable = true;
- defaultShell = "${config.programs.fish.package}/bin/fish";
- prompts.starship.enable = true;
- };
- };
- }
+ };
+}
diff --git a/home-manager/stvnliu/shells/direnv.nix b/home-manager/stvnliu/shells/direnv.nix
index 6124695..e0fdc47 100644
--- a/home-manager/stvnliu/shells/direnv.nix
+++ b/home-manager/stvnliu/shells/direnv.nix
@@ -1,4 +1,4 @@
-{config, ...}: {
+{ config, ... }: {
programs = {
direnv = {
enable = true;
diff --git a/home-manager/stvnliu/shells/env/default.nix b/home-manager/stvnliu/shells/env/default.nix
index 9f2ab73..7900d1c 100644
--- a/home-manager/stvnliu/shells/env/default.nix
+++ b/home-manager/stvnliu/shells/env/default.nix
@@ -1,7 +1,6 @@
-{
- pkgs,
- config,
- ...
+{ pkgs
+, config
+, ...
}: {
EDITOR = "nvim";
}
diff --git a/home-manager/stvnliu/shells/fish/default.nix b/home-manager/stvnliu/shells/fish/default.nix
index e06fe00..4ea1d96 100644
--- a/home-manager/stvnliu/shells/fish/default.nix
+++ b/home-manager/stvnliu/shells/fish/default.nix
@@ -1,65 +1,65 @@
-{
- pkgs,
- config,
- lib,
- ...
-}: let
+{ pkgs
+, config
+, lib
+, ...
+}:
+let
cfg = config.myShells.fish;
in
- with lib; {
- options = {
- myShells.fish = {enable = mkEnableOption "Enables fish and components.";};
- };
- config = mkIf cfg.enable {
- programs.fish = {
- enable = true;
- shellInit = ''
- ${builtins.readFile ./init/zoxide.fish}
- ${builtins.readFile ./init/nh.fish}
- ${builtins.readFile ./init/tailscale.fish}
- ${builtins.readFile ./init/pass.fish}
- function fish_greeting
- ${(pkgs.fortune.override {withOffensive = true;})}/bin/fortune -as
- end
- funcsave -q fish_greeting
+with lib; {
+ options = {
+ myShells.fish = { enable = mkEnableOption "Enables fish and components."; };
+ };
+ config = mkIf cfg.enable {
+ programs.fish = {
+ enable = true;
+ shellInit = ''
+ ${builtins.readFile ./init/zoxide.fish}
+ ${builtins.readFile ./init/nh.fish}
+ ${builtins.readFile ./init/tailscale.fish}
+ ${builtins.readFile ./init/pass.fish}
+ function fish_greeting
+ ${(pkgs.fortune.override {withOffensive = true;})}/bin/fortune -as
+ end
+ funcsave -q fish_greeting
- ${pkgs.thefuck}/bin/thefuck --alias | source
- '';
- shellAliases = import ../aliases {inherit pkgs;};
- plugins = with pkgs.fishPlugins; [
- {
- name = "z";
- src = z.src;
- }
- {
- name = "plugin-git";
- src = plugin-git.src;
- }
- {
- name = "transient-fish";
- src = transient-fish.src;
- }
- {
- name = "done";
- src = done.src;
- }
- {
- name = "gruvbox";
- src = gruvbox.src;
- }
- {
- name = "colored-man-pages";
- src = colored-man-pages.src;
- }
- {
- name = "puffer";
- src = puffer.src;
- }
- {
- name = "pisces";
- src = pisces.src;
- }
- ];
- };
+ ${pkgs.thefuck}/bin/thefuck --alias | source
+ '';
+ shellAliases = import ../aliases { inherit pkgs; };
+ plugins = with pkgs.fishPlugins; [
+ {
+ name = "z";
+ src = z.src;
+ }
+ {
+ name = "plugin-git";
+ src = plugin-git.src;
+ }
+ {
+ name = "transient-fish";
+ src = transient-fish.src;
+ }
+ {
+ name = "done";
+ src = done.src;
+ }
+ {
+ name = "gruvbox";
+ src = gruvbox.src;
+ }
+ {
+ name = "colored-man-pages";
+ src = colored-man-pages.src;
+ }
+ {
+ name = "puffer";
+ src = puffer.src;
+ }
+ {
+ name = "pisces";
+ src = pisces.src;
+ }
+ ];
};
- }
+ };
+}
diff --git a/home-manager/stvnliu/shells/nushell/default.nix b/home-manager/stvnliu/shells/nushell/default.nix
index 059c68a..0b048e0 100644
--- a/home-manager/stvnliu/shells/nushell/default.nix
+++ b/home-manager/stvnliu/shells/nushell/default.nix
@@ -1,26 +1,26 @@
-{
- pkgs,
- config,
- lib,
- ...
-}: let
+{ pkgs
+, config
+, lib
+, ...
+}:
+let
cfg = config.myShells.nushell;
in
- with lib; {
- options = {
- myShells.nushell = {enable = mkEnableOption "Enables nushell config";};
- };
- config = mkIf cfg.enable {
- programs = {
- nushell = {
- enable = true;
- configFile.source = ./init/config.nu;
- shellAliases = import ../aliases/default.nix {inherit pkgs;};
- };
- carapace = {
- enable = true;
- enableNushellIntegration = true;
- };
+with lib; {
+ options = {
+ myShells.nushell = { enable = mkEnableOption "Enables nushell config"; };
+ };
+ config = mkIf cfg.enable {
+ programs = {
+ nushell = {
+ enable = true;
+ configFile.source = ./init/config.nu;
+ shellAliases = import ../aliases/default.nix { inherit pkgs; };
+ };
+ carapace = {
+ enable = true;
+ enableNushellIntegration = true;
};
};
- }
+ };
+}
diff --git a/home-manager/stvnliu/shells/starship/default.nix b/home-manager/stvnliu/shells/starship/default.nix
index 3cf3aed..3231dc3 100644
--- a/home-manager/stvnliu/shells/starship/default.nix
+++ b/home-manager/stvnliu/shells/starship/default.nix
@@ -1,27 +1,27 @@
-{
- lib,
- pkgs,
- config,
- ...
-}: let
+{ lib
+, pkgs
+, config
+, ...
+}:
+let
cfg = config.myShells.prompts.starship;
in
- with lib; {
- options = {
- myShells.prompts.starship.enable = mkEnableOption "Enables starship prompts.";
- myShells.prompts.starship.confPath = mkOption {
- type = types.path;
- default = ./presets/default.toml;
- };
+with lib; {
+ options = {
+ myShells.prompts.starship.enable = mkEnableOption "Enables starship prompts.";
+ myShells.prompts.starship.confPath = mkOption {
+ type = types.path;
+ default = ./presets/default.toml;
};
- config = mkIf cfg.enable {
- myShells.prompts.starship.confPath = ./presets/pure-direnv.toml;
- programs.starship = {
- enable = true;
- enableZshIntegration = config.myShells.zsh.enable;
- enableFishIntegration = config.myShells.fish.enable;
- enableNushellIntegration = config.myShells.nushell.enable;
- settings = builtins.fromTOML (builtins.readFile cfg.confPath);
- };
+ };
+ config = mkIf cfg.enable {
+ myShells.prompts.starship.confPath = ./presets/pure-direnv.toml;
+ programs.starship = {
+ enable = true;
+ enableZshIntegration = config.myShells.zsh.enable;
+ enableFishIntegration = config.myShells.fish.enable;
+ enableNushellIntegration = config.myShells.nushell.enable;
+ settings = builtins.fromTOML (builtins.readFile cfg.confPath);
};
- }
+ };
+}
diff --git a/home-manager/stvnliu/shells/zoxide.nix b/home-manager/stvnliu/shells/zoxide.nix
index 9f33410..a9f7300 100644
--- a/home-manager/stvnliu/shells/zoxide.nix
+++ b/home-manager/stvnliu/shells/zoxide.nix
@@ -1,8 +1,7 @@
-{
- pkgs,
- config,
- lib,
- ...
+{ pkgs
+, config
+, lib
+, ...
}: {
programs.zoxide = {
enable = true;
diff --git a/home-manager/stvnliu/shells/zsh.nix b/home-manager/stvnliu/shells/zsh.nix
index c329684..9dded59 100644
--- a/home-manager/stvnliu/shells/zsh.nix
+++ b/home-manager/stvnliu/shells/zsh.nix
@@ -1,36 +1,36 @@
-{
- pkgs,
- lib,
- config,
- ...
-}: let
+{ pkgs
+, lib
+, config
+, ...
+}:
+let
cfg = config.shell.zsh;
in
- with lib; {
- options.myShells.zsh = {
- enable = mkEnableOption "Enables zsh and components.";
- };
- config = {
- programs.zsh = {
+with lib; {
+ options.myShells.zsh = {
+ enable = mkEnableOption "Enables zsh and components.";
+ };
+ config = {
+ programs.zsh = {
+ enable = true;
+ syntaxHighlighting.enable = true;
+ shellAliases = import ./aliases { inherit pkgs; };
+ dirHashes = {
+ docs = "$HOME/Documents";
+ dl = "$HOME/Downloads";
+ dev = "$HOME/devel";
+ screen = "$HOME/Pictures/Screenshots";
+ };
+ oh-my-zsh = {
enable = true;
- syntaxHighlighting.enable = true;
- shellAliases = import ./aliases {inherit pkgs;};
- dirHashes = {
- docs = "$HOME/Documents";
- dl = "$HOME/Downloads";
- dev = "$HOME/devel";
- screen = "$HOME/Pictures/Screenshots";
- };
- oh-my-zsh = {
- enable = true;
- plugins = [
- "git"
- "rsync"
- "zoxide"
- ];
- theme = "agnoster";
- };
+ plugins = [
+ "git"
+ "rsync"
+ "zoxide"
+ ];
+ theme = "agnoster";
};
- home.packages = with pkgs; [zoxide];
};
- }
+ home.packages = with pkgs; [ zoxide ];
+ };
+}
diff --git a/home-manager/stvnliu/spicetify.nix b/home-manager/stvnliu/spicetify.nix
index e21389c..620b0c0 100644
--- a/home-manager/stvnliu/spicetify.nix
+++ b/home-manager/stvnliu/spicetify.nix
@@ -1,11 +1,12 @@
-{
- pkgs,
- lib,
- inputs,
- ...
-}: let
+{ pkgs
+, lib
+, inputs
+, ...
+}:
+let
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
-in {
+in
+{
# allow spotify to be installed if you don't have unfree enabled already
nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) [
diff --git a/home-manager/stvnliu/stylix.nix b/home-manager/stvnliu/stylix.nix
index 6f5a796..a33a96a 100644
--- a/home-manager/stvnliu/stylix.nix
+++ b/home-manager/stvnliu/stylix.nix
@@ -1,10 +1,11 @@
-{
- pkgs,
- config,
- ...
-}: let
+{ pkgs
+, config
+, ...
+}:
+let
globalOpacity = 0.75;
-in {
+in
+{
stylix = {
enable = true;
autoEnable = true;
diff --git a/home-manager/stvnliu/wechat/default.nix b/home-manager/stvnliu/wechat/default.nix
index c0126db..0362926 100644
--- a/home-manager/stvnliu/wechat/default.nix
+++ b/home-manager/stvnliu/wechat/default.nix
@@ -1,4 +1,4 @@
-{pkgs, ...}: {
+{ pkgs, ... }: {
nixpkgs.config.permittedInsecurePackages = [
"openssl-1.1.1w"
];
diff --git a/home-manager/stvnliu/xdg.nix b/home-manager/stvnliu/xdg.nix
index 2899822..72c8fee 100644
--- a/home-manager/stvnliu/xdg.nix
+++ b/home-manager/stvnliu/xdg.nix
@@ -1,6 +1,7 @@
-{pkgs, ...}: {
+{ pkgs, ... }: {
xdg = {
enable = true;
+ userDirs.enable = true;
mimeApps = {
enable = true;
defaultApplications = {