Skip to content

Commit

Permalink
refactor: reduced and finally finished reoganization of dotfiles
Browse files Browse the repository at this point in the history
- removed femttano user from configuration - I don't need it
- set up only openbox desktop
- simplified syncthing config - I replaced magic config variables by
hardcoded $HOME path to my main user
- converted wacom home-manager service -> nixos systemd service
- added gaming disk to steam.nix
- simplified grub theme - I write a hardcorded theme, cause I don't
often need to change
- extend Golang extraConfig
- fixes for other commites files
  • Loading branch information
Wittano committed Nov 2, 2024
1 parent 7a4758f commit f2766d8
Show file tree
Hide file tree
Showing 11 changed files with 235 additions and 177 deletions.
11 changes: 0 additions & 11 deletions home-manager/fish.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,16 +52,6 @@ in
options.programs.fish.wittano = {
enable = mkEnableOption "Enable custom fish shell config";
enableDirenv = mkEnableOption "Enable direnv";
systemConfigPath = mkOption {
type = with types; nullOr str;
description = "Location to nix-dotfiles directory";
default = null;
};
profileName = mkOption {
type = with types; nullOr str;
description = "System profile name";
default = null;
};
completions = mkOption {
type = with types; attrsOf (either str path);
default = { };
Expand Down Expand Up @@ -106,7 +96,6 @@ in
in
{
xc = "xprop | grep CLASS";
re = mkIf (cfg.systemConfigPath != null && cfg.profileName != null) "sudo nixos-rebuild switch --flake ${cfg.systemConfigPath}#${profileName}";

# Programs
neofetch = "nix run nixpkgs#neofetch";
Expand Down
12 changes: 1 addition & 11 deletions home-manager/games.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ let
runtimeInputs = with pkgs; [ wget cabextract coreutils sudo ];
text = builtins.readFile ./scripts/fixAge2Sync.sh;
runtimeEnv = {
STEAM_GAME_DIR = gamingCfg.disk.path;
STEAM_GAME_DIR = "/mnt/gaming/SteamLibrary";
};
};
fixSteamSystemTray = pkgs.writeScriptBin "fixSteamSystemTray"
Expand Down Expand Up @@ -59,11 +59,6 @@ in
options.programs.games = {
enable = mkEnableOption "Install unrelated(with Steam, lutris or other launchers) games";
enableDev = mkEnableOption "Enable developer tools to moddling games";
picomExceptions = mkOption {
type = with types; listOf (either str package);
default = [ ];
description = "List of installed games or games related staff, which picom should avoid override window properties e.g. rounded corners, window transparency";
};
};

config = mkIf cfg.enable {
Expand All @@ -77,10 +72,5 @@ in
"\.exe$"
"XIVlauncher.Core"
];

programs.jetbrains.ides = mkIf cfg.enableDev [ "dotnet" ];

# Install wacom drivers if osu-lazor is installed
# modules.hardware.wacom.enable = lists.any (x: strings.hasPrefix "osu" x.name) games;
};
}
29 changes: 16 additions & 13 deletions home-manager/ide.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ config, lib, unstable, pkgs, ... }:
{ config, lib, unstable ? pkgs, pkgs, ... }:
with lib;
with lib.my;
let
Expand Down Expand Up @@ -55,24 +55,27 @@ let
};
cpp.package = clion;
zig = cpp;
go.package = goland.overrideAttrs (attrs: {
postFixup = (attrs.postFixup or "") + lib.optionalString pkgs.stdenv.isLinux ''
if [ -f $out/goland/plugins/go-plugin/lib/dlv/linux/dlv ]; then
rm $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
fi
ln -s ${unstable.delve}/bin/dlv $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
'';
});
go = {
package = goland.overrideAttrs (attrs: {
postFixup = (attrs.postFixup or "") + lib.optionalString pkgs.stdenv.isLinux ''
if [ -f $out/goland/plugins/go-plugin/lib/dlv/linux/dlv ]; then
rm $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
fi
ln -s ${unstable.delve}/bin/dlv $out/goland/plugins/go-plugin/lib/dlv/linux/dlv
'';
});
extraConfig = {
home.packages = with pkgs; [ golangci-lint ];
};
};
dotnet.package = rider;
rust.package = rust-rover;
jvm.package = idea-ultimate;
sql.package = datagrip;
web.package = webstorm;
andorid.package = unstable.andorid-studio;
haskell.extraConfig = {
programs.nixvim.enable = true;
};
haskell.extraConfig = fork.extraConfig;
fork.extraConfig = {
programs.nixvim.enable = true;
};
Expand Down
16 changes: 2 additions & 14 deletions home-manager/lutris.nix
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
{ lib, config, unstable, ... }:
with lib;
let
cfg = config.modules.desktop.gaming.lutris;
in
{
options = {
modules.desktop.gaming.lutris = {
enable = mkEnableOption "Enable lutris and utilties to run games";
};
};
options.programs.lutris.enable = mkEnableOption "Enable lutris and utilties to run games";

config = mkIf cfg.enable {
config = mkIf config.programs.lutris.enable {
home.packages = with unstable; [
# Lutris
lutris
Expand All @@ -23,10 +16,5 @@ in
# FSH
steam-run
];

# services.picom.wittano.excpetions = home.packages ++ [
# "wine"
# "\.exe$"
# ];
};
}
27 changes: 20 additions & 7 deletions home-manager/rofi.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, pkgs, lib, desktopName, ... }:
{ config, pkgs, lib, ... }:
with lib;
with lib.my;
let
cfg = config.programs.rofi.wittano;
toybox = pkgs.toybox;
systemd = pkgs.systemd;

Expand All @@ -20,9 +20,9 @@ let
${systemd}/bin/poweroff
;;
"$LOGOUT")
DESKTOP=$(${toybox}/bin/pgrep ${desktopName})
DESKTOP=$(${toybox}/bin/pgrep ${cfg.desktopName})
if [ -n "$DESKTOP" ]; then
echo "Kill ${desktopName} $DESKTOP"
echo "Kill ${cfg.desktopName} $DESKTOP"
kill -9 "$DESKTOP"
fi
;;
Expand All @@ -38,12 +38,25 @@ let
};
in
{
options.programs.rofi.wittano.enable = mkEnableOption "Enable custom rofi config";
options.programs.rofi.wittano = {
enable = mkEnableOption "Enable custom rofi config";
desktopName = mkOption {
type = with types; nullOr str;
default = null;
};
};

config = mkIf config.programs.rofi.wittano.enable {
config = mkIf cfg.enable {
fonts.fontconfig.enable = true;

home.packages = with pkgs; [ nerdfonts switchOffScript oranchelo-icon-theme ];
home.packages =
let
script =
if cfg.desktopName != null
then [ switchOffScript ]
else [ ];
in
with pkgs; [ nerdfonts oranchelo-icon-theme ] ++ script;

programs.rofi = {
enable = true;
Expand Down
Loading

0 comments on commit f2766d8

Please sign in to comment.