some minor fixes

This commit is contained in:
cnst
2024-09-28 17:35:56 +02:00
parent 397f7ca772
commit 3cb158b36f
16 changed files with 91 additions and 57 deletions

View File

@@ -17,7 +17,6 @@ in {
"$passwordManager" = "keepassxc"; "$passwordManager" = "keepassxc";
"$tuirun" = "tuirun-toggle.sh"; "$tuirun" = "tuirun-toggle.sh";
"$menu" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --"; "$menu" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
"$menuw" = "pkill anyrun || anyrun | xargs hyprctl dispatch exec --";
"$browser" = "firefox"; "$browser" = "firefox";
"$browserinc" = "firefox --private-window"; "$browserinc" = "firefox --private-window";
"$ranger" = "rangerscript"; "$ranger" = "rangerscript";
@@ -50,7 +49,6 @@ in {
"$mod, P, pseudo," # dwindle "$mod, P, pseudo," # dwindle
"$mod, J, togglesplit," # dwindle "$mod, J, togglesplit," # dwindle
"$mod, C, exec, hyprctl dispatch exec copyq toggle" "$mod, C, exec, hyprctl dispatch exec copyq toggle"
"$mod, TAB, exec, $menuw"
# Move focus with mainMod + arrow keys # Move focus with mainMod + arrow keys
"$mod, left, movefocus, l" "$mod, left, movefocus, l"

View File

@@ -29,10 +29,10 @@ in {
nixdev = "nix develop ~/.nix-config -c $SHELL"; nixdev = "nix develop ~/.nix-config -c $SHELL";
nixconfig = "cd /home/$USER/.nix-config/"; nixconfig = "cd /home/$USER/.nix-config/";
ll = "ls -l"; ll = "ls -l";
nixupdate = "nh os switch -v -H $HOST && sudo nix run /home/$USER/.nix-config"; nixupdate = "nh os switch -v -H $HOST";
nixup = "nh os switch -H $HOST && sudo nix run /home/$USER/.nix-config"; nixup = "nh os switch -H $HOST";
flakeupdate = "nh os switch -u -v -H $HOST && sudo nix run /home/$USER/.nix-config"; flakeupdate = "nh os switch -u -v -H $HOST";
flakeup = "nh os switch -u -H $HOST && sudo nix run /home/$USER/.nix-config"; flakeup = "nh os switch -u -H $HOST";
".." = "cd .."; ".." = "cd ..";
"..." = "cd ../../"; "..." = "cd ../../";
"...." = "cd ../../../"; "...." = "cd ../../../";

View File

@@ -29,10 +29,10 @@ in {
nixdev = "nix develop ~/.nix-config -c $SHELL"; nixdev = "nix develop ~/.nix-config -c $SHELL";
nixconfig = "cd /home/$USER/.nix-config/"; nixconfig = "cd /home/$USER/.nix-config/";
ll = "ls -l"; ll = "ls -l";
nixupdate = "nh os switch -v -H $HOST && sudo nix run /home/$USER/.nix-config"; nixupdate = "nh os switch -v -H $HOST";
nixup = "nh os switch -H $HOST && sudo nix run /home/$USER/.nix-config"; nixup = "nh os switch -H $HOST";
flakeupdate = "nh os switch -u -v -H $HOST && sudo nix run /home/$USER/.nix-config"; flakeupdate = "nh os switch -u -v -H $HOST";
flakeup = "nh os switch -u -H $HOST && sudo nix run /home/$USER/.nix-config"; flakeup = "nh os switch -u -H $HOST";
".." = "cd .."; ".." = "cd ..";
"..." = "cd ../../"; "..." = "cd ../../";
"...." = "cd ../../../"; "...." = "cd ../../../";

View File

@@ -8,7 +8,6 @@
in { in {
users.users.cnst = { users.users.cnst = {
isNormalUser = true; isNormalUser = true;
# hashedPasswordFile = config.age.secrets.openai.path;
shell = pkgs.zsh; shell = pkgs.zsh;
extraGroups = ifTheyExist [ extraGroups = ifTheyExist [
"wheel" "wheel"
@@ -36,17 +35,7 @@ in {
./modules.nix ./modules.nix
]; ];
# boot = { environment.variables.FLAKE = "/home/cnst/.nix-config";
# consoleLogLevel = 3;
# kernelPackages = lib.mkForce pkgs.linuxPackages_latest;
# kernelParams = [
# "amd_pstate=active"
# "quiet"
# "splash"
# ];
# };
# environment.variables.COPILOT_API_KEY = config.age.secrets.cnstcopilot.path;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = lib.mkDefault "23.11"; system.stateVersion = lib.mkDefault "23.11";

View File

@@ -66,11 +66,20 @@
}; };
}; };
}; };
nix = {
nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep 3 --keep-since 21d";
};
};
};
studio = { studio = {
blender = { blender = {
enable = false; enable = true;
hip = { hip = {
enable = false; enable = true;
}; };
}; };
gimp = { gimp = {

View File

@@ -42,6 +42,8 @@ in {
} }
]; ];
environment.variables.FLAKE = "/home/cnst/.nix-config";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = lib.mkDefault "23.11"; system.stateVersion = lib.mkDefault "23.11";
} }

View File

@@ -66,6 +66,15 @@
}; };
}; };
}; };
nix = {
nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep 3 --keep-since 21d";
};
};
};
studio = { studio = {
blender = { blender = {
enable = false; enable = false;

View File

@@ -3,7 +3,6 @@
inputs, inputs,
homeImports, homeImports,
self, self,
pkgs,
... ...
}: { }: {
flake.nixosConfigurations = let flake.nixosConfigurations = let
@@ -34,7 +33,6 @@
shared shared
++ [ ++ [
./cnix ./cnix
"${mod}/nix/nh/cnst"
"${mod}/dev" "${mod}/dev"
{ {
home-manager = { home-manager = {
@@ -52,7 +50,6 @@
shared shared
++ [ ++ [
./toothpc ./toothpc
"${mod}/nix/nh/toothpick"
"${mod}/dev" "${mod}/dev"
{ {
home-manager = { home-manager = {
@@ -70,7 +67,6 @@
shared shared
++ [ ++ [
./cnixpad ./cnixpad
"${mod}/nix/nh/cnst"
"${mod}/dev" "${mod}/dev"
{ {
home-manager = { home-manager = {

View File

@@ -35,6 +35,8 @@ in {
./modules.nix ./modules.nix
]; ];
environment.variables.FLAKE = "/home/toothpick/.nix-config";
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = lib.mkDefault "23.11"; system.stateVersion = lib.mkDefault "23.11";
} }

View File

@@ -67,6 +67,15 @@
}; };
}; };
}; };
nix = {
nh = {
enable = true;
clean = {
enable = true;
extraArgs = "--keep 3 --keep-since 21d";
};
};
};
studio = { studio = {
blender = { blender = {
enable = false; enable = false;

View File

@@ -13,6 +13,7 @@
"${systemModules}/hardware/graphics/nvidia" "${systemModules}/hardware/graphics/nvidia"
"${systemModules}/hardware/logitech" "${systemModules}/hardware/logitech"
"${systemModules}/hardware/network" "${systemModules}/hardware/network"
"${systemModules}/nix/nh"
"${systemModules}/studio/blender" "${systemModules}/studio/blender"
"${systemModules}/studio/gimp" "${systemModules}/studio/gimp"
"${systemModules}/studio/inkscape" "${systemModules}/studio/inkscape"

View File

@@ -0,0 +1,33 @@
{
config,
lib,
...
}: let
inherit (lib) mkIf mkEnableOption mkOption;
cfg = config.modules.nix.nh;
in {
options = {
modules.nix.nh = {
enable = mkEnableOption "Enables nix helper";
clean = {
enable = mkEnableOption "Enables nix helper cleaning";
extraArgs = mkOption {
type = lib.types.str;
description = "Extra arguments for the clean command";
default = "";
};
};
};
};
config = mkIf cfg.enable {
programs = {
nh = {
enable = cfg.enable;
clean = {
enable = cfg.clean.enable;
extraArgs = cfg.clean.extraArgs;
};
};
};
};
}

View File

@@ -1,3 +1,4 @@
# Yanked from https://github.com/fufexan/dotfiles
{ {
inputs, inputs,
lib, lib,
@@ -21,10 +22,13 @@
console.useXkbConfig = true; console.useXkbConfig = true;
nix = { nix = let
flakeInputs = lib.filterAttrs (_: v: lib.isType "flake" v) inputs;
in {
package = pkgs.lix; package = pkgs.lix;
# pin the registry to avoid downloading and evaling a new nixpkgs version every time # pin the registry to avoid downloading and evaling a new nixpkgs version every time
registry = lib.mapAttrs (_: v: {flake = v;}) inputs; registry = lib.mapAttrs (_: v: {flake = v;}) flakeInputs;
# set the path for channels compat # set the path for channels compat
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
@@ -42,11 +46,11 @@
trusted-users = ["root" "@wheel"]; trusted-users = ["root" "@wheel"];
}; };
gc = { # gc = {
automatic = true; # automatic = true;
dates = "weekly"; # dates = "weekly";
# Keep the last 3 generations # # Keep the last 3 generations
options = "--delete-older-than 30d"; # options = "--delete-older-than 30d";
}; # };
}; };
} }

View File

@@ -1,9 +0,0 @@
{
environment.variables.FLAKE = "/home/cnst/.nix-config";
programs = {
nh = {
enable = true;
flake = "/home/cnst/.nix-config";
};
};
}

View File

@@ -1,9 +0,0 @@
{
environment.variables.FLAKE = "/home/toothpick/.nix-config";
programs = {
nh = {
enable = true;
flake = "/home/toothpick/.nix-config";
};
};
}

View File

@@ -1,9 +1,9 @@
{ {
nixpkgs = { nixpkgs = {
overlays = [ overlays = [
(_: prev: { # (_: prev: {
python312 = prev.python312.override {packageOverrides = _: pysuper: {nose = pysuper.pynose;};}; # python312 = prev.python312.override {packageOverrides = _: pysuper: {nose = pysuper.pynose;};};
}) # })
]; ];
config = { config = {
allowUnfree = true; allowUnfree = true;