diff --git a/SwarselSystems.org b/SwarselSystems.org index caf1dae..bb95876 100644 --- a/SwarselSystems.org +++ b/SwarselSystems.org @@ -492,7 +492,7 @@ This file defines the templates that are being exposed by the flake. These can b "default" ]; in - lib.swarselsystems.mkTemplates templateNames + lib.swarselsystems.mkTemplates templateNames #+end_src @@ -4419,7 +4419,8 @@ A breakdown of each function: path = "${self}/templates/${name}"; description = "${name} project "; }; - }) names); + }) + names); eachMonitor = _: monitor: { inherit (monitor) name; @@ -4657,57 +4658,57 @@ Mostly used to install some compilers and lsp's that I want to have available wh # lsp-related ------------------------------- # nix # latex - texlab + # texlab ghostscript_headless # wireguard wireguard-tools # rust - rust-analyzer - clippy - rustfmt + # rust-analyzer + # clippy + # rustfmt # go - go - gopls + # go + # gopls # nix nixd # zig zig zls # cpp - clang-tools + # clang-tools # + cuda - cudatoolkit + # cudatoolkit # ansible # ansible-lint # ansible-language-server # molecule #lsp-bridge / python - gcc - gdb + # gcc + # gdb # (python3.withPackages (ps: with ps; [ jupyter ipython pyqt5 epc orjson sexpdata six setuptools paramiko numpy pandas scipy matplotlib requests debugpy flake8 gnureadline python-lsp-server ])) # (python3.withPackages(ps: with ps; [ jupyter ipython pyqt5 numpy pandas scipy matplotlib requests debugpy flake8 gnureadline python-lsp-server])) # -------------------------------------------- - (stdenv.mkDerivation { - name = "oama"; + # (stdenv.mkDerivation { + # name = "oama"; - src = pkgs.fetchurl { - name = "oama"; - url = "https://github.com/pdobsan/oama/releases/download/0.13.1/oama-0.13.1-Linux-x86_64-static.tgz"; - sha256 = "sha256-OTdCObVfnMPhgZxVtZqehgUXtKT1iyqozdkPIV+i3Gc="; - }; + # src = pkgs.fetchurl { + # name = "oama"; + # url = "https://github.com/pdobsan/oama/releases/download/0.13.1/oama-0.13.1-Linux-x86_64-static.tgz"; + # sha256 = "sha256-OTdCObVfnMPhgZxVtZqehgUXtKT1iyqozdkPIV+i3Gc="; + # }; - phases = [ - "unpackPhase" - ]; + # phases = [ + # "unpackPhase" + # ]; - unpackPhase = '' - mkdir -p $out/bin - tar xvf $src -C $out/ - mv $out/oama-0.13.1-Linux-x86_64-static/oama $out/bin/ - ''; + # unpackPhase = '' + # mkdir -p $out/bin + # tar xvf $src -C $out/ + # mv $out/oama-0.13.1-Linux-x86_64-static/oama $out/bin/ + # ''; - }) + # }) ]; } @@ -12164,8 +12165,8 @@ Lastly, I load the =highlight-indent-guides= package. This adds a neat visual in (set-face-attribute 'highlight-indent-guides-stack-even-face nil :background "gray40") (set-face-attribute 'highlight-indent-guides-stack-odd-face nil :background "gray50")) - (use-package aggressive-indent) - (global-aggressive-indent-mode 1) + ;; (use-package aggressive-indent) + ;; (global-aggressive-indent-mode 1) #+end_src diff --git a/index.html b/index.html index f60b0e5..1347bb4 100644 --- a/index.html +++ b/index.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +-This file has 57175 words spanning 14786 lines and was last revised on 2024-12-29 20:11:24 +0100. +This file has 57884 words spanning 14894 lines and was last revised on 2024-12-31 21:56:30 +0100.
@@ -734,7 +737,7 @@ This section defines my Emacs configuration. For a while, I considered to use ry
-My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-12-29 20:11:24 +0100) +My emacs is built using the emacs-overlay nix flake, which builds a bleeding edge emacs on wayland (pgtk) with utilities like treesitter support. By executing the below source block, the current build setting can be updated at any time, and you can see my most up-to-date build options (last updated: 2024-12-31 21:56:30 +0100)
@@ -746,7 +749,7 @@ system-configuration-options---prefix=/nix/store/qg96jwf3hwpzyydpibyg6vz1dk525cmj-emacs-pgtk-20241209.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --without-xwidgets --with-dbus --with-selinux +--prefix=/nix/store/hzdmp1fxycaibbpk8lr0imjzi8n7yr4i-emacs-pgtk-20241230.0 --disable-build-details --with-modules --with-pgtk --with-compress-install --with-toolkit-scroll-bars --with-native-compilation --without-imagemagick --with-mailutils --without-small-ja-dic --with-tree-sitter --without-xinput2 --without-xwidgets --with-dbus --with-selinux@@ -826,7 +829,7 @@ These blocks are later inserted here: -
This sections puts together the flake.nix file from the Noweb-Ref blocks section. This tangles the flake.nix file; This block only needs to be touched when updating the general structure of the flake. For everything else, see the respective noweb-ref block.
@@ -1014,6 +1017,8 @@ In outputs = inputs@ [...], the inputs@ makes it so th
}
);
+ templates = import ./templates { inherit lib; };
+
checks = lib.swarselsystems.forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
@@ -1064,59 +1069,8 @@ In outputs = inputs@ [...], the inputs@ makes it so th
-This file defines a number of checks that can either be run by calling nix flake check or while in a nix-shell or nix develop. This helps me make sure that my flake confirms to my self-imposed standards. The GitHub actions perform less checks than are being done here (they are only checking the formatting, as well as statix and deadnix)
-
{ self, inputs, pkgs, system, ... }:
-{
- pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
- src = "${self}";
- hooks = {
- check-added-large-files.enable = true;
- check-case-conflicts.enable = true;
- check-executables-have-shebangs.enable = true;
- check-shebang-scripts-are-executable.enable = false;
- check-merge-conflicts.enable = true;
- deadnix.enable = true;
- detect-private-keys.enable = true;
- end-of-file-fixer.enable = true;
- fix-byte-order-marker.enable = true;
- flake-checker.enable = true;
- forbid-new-submodules.enable = true;
- mixed-line-endings.enable = true;
- nixpkgs-fmt.enable = true;
- statix.enable = true;
- trim-trailing-whitespace.enable = true;
-
- destroyed-symlinks = {
- enable = true;
- entry = "${inputs.pre-commit-hooks.checks.${system}.pre-commit-hooks}/bin/destroyed-symlinks";
- };
-
- shellcheck = {
- enable = true;
- entry = "${pkgs.shellcheck}/bin/shellcheck --shell=bash";
- };
-
- shfmt = {
- enable = true;
- entry = "${pkgs.shfmt}/bin/shfmt -i 4 -sr -d -s -l";
- };
-
- };
- };
-}
-
-Here we define inputs and outputs of the flake. First, the following list is for the outputs of the flake. @@ -1257,7 +1211,7 @@ nix-topology.url = "github:oddlama/nix-topology";
Here I define a few variables that I need for my system specifications. First and foremost, pkgs, which gets passed the emacs-overlay, nur, and nixgl modules to it. With this, I can grab all these packages by referencing pkgs.<name> instead of having to put e.g. nixgl.auto.nixGLDefault.
@@ -1313,7 +1267,7 @@ mixedModules = [
In this section I am creating some attributes that define general concepts of my configuration: @@ -1391,6 +1345,8 @@ devShells = lib.swarselsystems.forAllSystems (system: } ); +templates = import ./templates { inherit lib; }; + checks = lib.swarselsystems.forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; @@ -1398,12 +1354,89 @@ checks = lib.swarselsystems.forAllSystems (system: import ./checks { inherit self inputs system pkgs; } ); + +
+This file defines a number of checks that can either be run by calling nix flake check or while in a nix-shell or nix develop. This helps me make sure that my flake confirms to my self-imposed standards. The GitHub actions perform less checks than are being done here (they are only checking the formatting, as well as statix and deadnix)
+
{ self, inputs, pkgs, system, ... }:
+{
+ pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run {
+ src = "${self}";
+ hooks = {
+ check-added-large-files.enable = true;
+ check-case-conflicts.enable = true;
+ check-executables-have-shebangs.enable = true;
+ check-shebang-scripts-are-executable.enable = false;
+ check-merge-conflicts.enable = true;
+ deadnix.enable = true;
+ detect-private-keys.enable = true;
+ end-of-file-fixer.enable = true;
+ fix-byte-order-marker.enable = true;
+ flake-checker.enable = true;
+ forbid-new-submodules.enable = true;
+ mixed-line-endings.enable = true;
+ nixpkgs-fmt.enable = true;
+ statix.enable = true;
+ trim-trailing-whitespace.enable = true;
+
+ destroyed-symlinks = {
+ enable = true;
+ entry = "${inputs.pre-commit-hooks.checks.${system}.pre-commit-hooks}/bin/destroyed-symlinks";
+ };
+
+ shellcheck = {
+ enable = true;
+ entry = "${pkgs.shellcheck}/bin/shellcheck --shell=bash";
+ };
+
+ shfmt = {
+ enable = true;
+ entry = "${pkgs.shfmt}/bin/shfmt -i 4 -sr -d -s -l";
+ };
+
+ };
+ };
+}
+
+
+This file defines the templates that are being exposed by the flake. These can be used by running nix flake init -t github:Swarsel/.dotfiles#<TEMPLATE_NAME>.
+
{ lib, ... }:
+let
+ templateNames = [
+ "python"
+ "rust"
+ "go"
+ "cpp"
+ "latex"
+ "default"
+ ];
+in
+lib.swarselsystems.mkTemplates templateNames
+
This section used to be much longer, since I performed all of my imports right here in the past. Since then, I have however refactored and now my important hosts can be defined in little space. Once I have fully transitioned my server to NixOS too this section will become even smaller once more.
@@ -1422,7 +1455,7 @@ Note: The preceding
And this defines darwin systems (MacOS), which I only have one of, that serves as a template mostly.
@@ -1440,7 +1473,7 @@ Note: The preceding
In contrast, this defines home-manager systems, which I only have one of, that serves as a template mostly.
@@ -1462,7 +1495,7 @@ lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "home") "home
Nix on Android also demands an own flake output, which is provided here.
@@ -1484,7 +1517,7 @@ lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "android") "a
-Also, we disable the warnings that trigger when rebuilding with a dirty flake. At this point, I am also disabling channels and pinning the flake registry - the latter lets me use the local version of nixpkgs for commands like
Also, the system state version is set here. No need to touch it.
+A breakdown of the flags being set:
+
+In emacs, there are two packages for managing dev environments - emacs-direnv (direnv) and envrc. Direnv uses the global Emacs environment whereas envrc is buffer-local. I do not really care about this difference. What is more important to me is that emacs should not block upon handling a bigger flake.nix while setting up the dev environment. This seems to be better handled by envrc.
+nixosConfigurations is found in
-2.7. darwinConfigurations
+2.8. darwinConfigurations
darwinConfigurations is found in
-2.8. homeConfigurations
+2.9. homeConfigurations
2.9. nixOnDroidConfigurations
+2.10. nixOnDroidConfigurations
2.10. topologyConfigurations
+2.11. topologyConfigurations
@@ -1763,7 +1796,7 @@ My work machine. Built for more security, this is the gold standard of my config
3.1.2.1.1. Main Configuration
{ self, inputs, outputs, config, pkgs, lib, ... }:
+{ self, inputs, outputs, pkgs, lib, ... }:
let
profilesPath = "${self}/profiles";
sharedOptions = {
@@ -1796,12 +1829,6 @@ in
] ++ (builtins.attrValues outputs.nixosModules);
- nixpkgs = {
- overlays = [ outputs.overlays.default ];
- config = {
- allowUnfree = true;
- };
- };
networking.networkmanager.wifi.scanRandMacAddress = false;
@@ -1814,15 +1841,15 @@ in
resumeDevice = "/dev/disk/by-label/nixos";
};
- hardware = {
- amdgpu = {
- opencl.enable = true;
- amdvlk = {
- enable = true;
- support32Bit.enable = true;
- };
- };
- };
+ # hardware = {
+ # amdgpu = {
+ # opencl.enable = true;
+ # amdvlk = {
+ # enable = true;
+ # support32Bit.enable = true;
+ # };
+ # };
+ # };
programs.fw-fanctrl.enable = true;
@@ -1848,6 +1875,7 @@ in
isImpermanence = false;
isSecureBoot = true;
isCrypted = true;
+ isLinux = true;
}
sharedOptions;
@@ -2134,7 +2162,7 @@ This is my main server that I run at home. It handles most tasks that require bi
3.1.2.2.1. Main Configuration
{ self, inputs, outputs, config, ... }:
+{ self, inputs, outputs, ... }:
let
profilesPath = "${self}/profiles";
in
@@ -2157,14 +2185,6 @@ in
] ++ (builtins.attrValues outputs.nixosModules);
-
- nixpkgs = {
- overlays = [ outputs.overlays.default ];
- config = {
- allowUnfree = true;
- };
- };
-
boot = {
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
@@ -2184,6 +2204,7 @@ in
hasFingerprint = false;
isImpermanence = false;
isBtrfs = false;
+ isLinux = true;
flakePath = "/home/swarsel/.dotfiles";
server = {
enable = true;
@@ -2476,6 +2497,7 @@ in
hasBluetooth = false;
hasFingerprint = false;
isImpermanence = false;
+ isLinux = true;
isBtrfs = false;
flakePath = "/root/.dotfiles";
server = {
@@ -2507,7 +2529,7 @@ This is a slim setup for developing base configuration. I do not track the hardw
3.1.4.1.1. Main Configuration
{ self, inputs, outputs, config, pkgs, lib, ... }:
+{ self, inputs, outputs, pkgs, lib, ... }:
let
profilesPath = "${self}/profiles";
sharedOptions = {
@@ -2548,13 +2570,6 @@ in
] ++ (builtins.attrValues outputs.nixosModules);
- nixpkgs = {
- overlays = [ outputs.overlays.default ];
- config = {
- allowUnfree = true;
- };
- };
-
environment.systemPackages = with pkgs; [
curl
git
@@ -2587,6 +2602,7 @@ in
isCrypted = true;
isSecureBoot = false;
isSwap = true;
+ isLinux = true;
swapSize = "8G";
# rootDisk = "/dev/nvme0n1";
rootDisk = "/dev/vda";
@@ -2958,7 +2974,7 @@ I also set the WLR_RENDERER_ALLOW_SOFTWARE=1 to allow this configur
{ self, inputs, outputs, config, pkgs, lib, ... }:
+{ self, inputs, outputs, pkgs, lib, ... }:
let
profilesPath = "${self}/profiles";
in
@@ -3006,6 +3022,7 @@ in
wallpaper = self + /wallpaper/lenovowp.png;
initialSetup = true;
isPublic = true;
+ isLinux = true;
};
home-manager.users.swarsel.swarselsystems = {
@@ -3088,6 +3105,7 @@ let
"ts2t"
"vershell"
"eontimer"
+ "project"
];
in
lib.swarselsystems.mkPackages packageNames pkgs
@@ -3497,10 +3515,10 @@ fi
{ self, name, writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, jq }:
+{ self, name, writeShellApplication, kitty, element-desktop, vesktop, spotify-player, jq }:
writeShellApplication {
inherit name;
- runtimeInputs = [ kitty element-desktop-wayland vesktop spotify-player jq ];
+ runtimeInputs = [ kitty element-desktop vesktop spotify-player jq ];
text = builtins.readFile "${self}/scripts/${name}.sh";
}
@@ -4603,6 +4621,30 @@ python3Packages.buildPythonApplication rec {
}
+
+3.2.1.25. project
+set -euo pipefail
+
+if [ ! -d "$(pwd)/.git" ]; then
+ git init
+fi
+nix flake init --template "$FLAKE"#"$1"
+direnv allow
+
+{ self, name, writeShellApplication }:
+writeShellApplication {
+ inherit name;
+ text = builtins.readFile "${self}/scripts/${name}.sh";
+}
mutableUsers = false in my NixOS configuration. Howev
options.swarselsystems.isCrypted = lib.mkEnableOption "uses full disk encryption";
options.swarselsystems.isPublic = lib.mkEnableOption "is a public machine (no secrets)";
options.swarselsystems.initialSetup = lib.mkEnableOption "initial setup (no sops keys available)";
+ options.swarselsystems.isLinux = lib.mkEnableOption "whether this is a linux machine";
options.swarselsystems.isBtrfs = lib.mkEnableOption "use btrfs filesystem";
options.swarselsystems.isImpermanence = lib.mkEnableOption "use impermanence on this system";
@@ -5458,7 +5501,7 @@ A breakdown of each function:
in
systemFunc {
inherit pkgs;
- extraSpecialArgs = { inherit inputs outputs; };
+ extraSpecialArgs = { inherit inputs outputs lib self; };
modules = [ "${self}/hosts/${type}/${host}" ];
};
};
@@ -5494,6 +5537,16 @@ A breakdown of each function:
})
names);
+ mkTemplates = names: builtins.listToAttrs (map
+ (name: {
+ inherit name;
+ value = {
+ path = "${self}/templates/${name}";
+ description = "${name} project ";
+ };
+ })
+ names);
+
eachMonitor = _: monitor: {
inherit (monitor) name;
value = builtins.removeAttrs monitor [ "workspace" "name" "output" ];
@@ -5591,16 +5644,54 @@ This section is for setting things that should be used on hosts that are using t
3.3.1.2. General NixOS settings (stateVersion)
nix shell (without it, we will always download the newest version of nixpkgs for these commands).
+We disable the warnings that trigger when rebuilding with a dirty flake. At this point, I am also disabling channels and pinning the flake registry - the latter lets me use the local version of nixpkgs for commands like nix shell (without it, we will always download the newest version of nixpkgs for these commands).
+
+
nixpgks.config.allowUnfree: allows packages with an unfree license to be built
+
+
nix command from nix 2.4cache.ngi0.nixos.org in flake.nix templatefun arg can be expressed as arg |> fun. Associatively, it is weaker than functions: a |> b |> d c |> e = e ((d c) (b a))nix developauto sets this to the number of CPUs (which is all) - on systems with many cores this can lead to OOM situations. The default is now 1, but used to be auto, I set this manually just to be safe in the future.nixpkgs directly in nix replnix.registry, but for the legacy nix commands{ lib, inputs, ... }:
+{ lib, config, outputs, inputs, ... }:
{
+
+ nixpkgs = {
+ overlays = [ outputs.overlays.default ];
+ config = {
+ allowUnfree = true;
+ };
+ };
+
nix =
let
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
@@ -5611,11 +5702,21 @@ Also, the system state version is set here. No need to touch it.
"nix-command"
"flakes"
"ca-derivations"
+ "cgroups"
"pipe-operators"
];
- trusted-users = [ "swarsel" ];
+ trusted-users = [ "@wheel" "swarsel" ];
+ connect-timeout = 5;
+ bash-prompt-prefix = "[33m$SHLVL:\\w [0m";
+ bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"[31m\"; else printf \"[32m\"; fi)\[\e[1m\]λ\[\e[0m\] [0m";
+ fallback = true;
+ min-free = 128000000;
+ max-free = 1000000000;
flake-registry = "";
+ auto-optimise-store = true;
warn-dirty = false;
+ max-jobs = 1;
+ use-cgroups = lib.mkIf config.swarselsystems.isLinux true;
};
channel.enable = false;
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
@@ -5699,57 +5800,57 @@ Mostly used to install some compilers and lsp's that I want to have available wh
# lsp-related -------------------------------
# nix
# latex
- texlab
+ # texlab
ghostscript_headless
# wireguard
wireguard-tools
# rust
- rust-analyzer
- clippy
- rustfmt
+ # rust-analyzer
+ # clippy
+ # rustfmt
# go
- go
- gopls
+ # go
+ # gopls
# nix
nixd
# zig
zig
zls
# cpp
- clang-tools
+ # clang-tools
# + cuda
- cudatoolkit
+ # cudatoolkit
# ansible
- ansible-lint
- ansible-language-server
- molecule
+ # ansible-lint
+ # ansible-language-server
+ # molecule
#lsp-bridge / python
- gcc
- gdb
- (python3.withPackages (ps: with ps; [ jupyter ipython pyqt5 epc orjson sexpdata six setuptools paramiko numpy pandas scipy matplotlib requests debugpy flake8 gnureadline python-lsp-server ]))
+ # gcc
+ # gdb
+ # (python3.withPackages (ps: with ps; [ jupyter ipython pyqt5 epc orjson sexpdata six setuptools paramiko numpy pandas scipy matplotlib requests debugpy flake8 gnureadline python-lsp-server ]))
# (python3.withPackages(ps: with ps; [ jupyter ipython pyqt5 numpy pandas scipy matplotlib requests debugpy flake8 gnureadline python-lsp-server]))
# --------------------------------------------
- (stdenv.mkDerivation {
- name = "oama";
+ # (stdenv.mkDerivation {
+ # name = "oama";
- src = pkgs.fetchurl {
- name = "oama";
- url = "https://github.com/pdobsan/oama/releases/download/0.13.1/oama-0.13.1-Linux-x86_64-static.tgz";
- sha256 = "sha256-OTdCObVfnMPhgZxVtZqehgUXtKT1iyqozdkPIV+i3Gc=";
- };
+ # src = pkgs.fetchurl {
+ # name = "oama";
+ # url = "https://github.com/pdobsan/oama/releases/download/0.13.1/oama-0.13.1-Linux-x86_64-static.tgz";
+ # sha256 = "sha256-OTdCObVfnMPhgZxVtZqehgUXtKT1iyqozdkPIV+i3Gc=";
+ # };
- phases = [
- "unpackPhase"
- ];
+ # phases = [
+ # "unpackPhase"
+ # ];
- unpackPhase = ''
- mkdir -p $out/bin
- tar xvf $src -C $out/
- mv $out/oama-0.13.1-Linux-x86_64-static/oama $out/bin/
- '';
+ # unpackPhase = ''
+ # mkdir -p $out/bin
+ # tar xvf $src -C $out/
+ # mv $out/oama-0.13.1-Linux-x86_64-static/oama $out/bin/
+ # '';
- })
+ # })
];
}
@@ -6409,8 +6510,7 @@ By default, stylix wants to style
{
stylix = {
enable = true;
- base16Scheme = "${self}/wallpaper/swarsel.yaml";
- # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
+ base16Scheme = "${self}/programs/stylix/swarsel.yaml";
polarity = "dark";
opacity.popups = 0.5;
cursor = {
@@ -6864,8 +6964,8 @@ When a program does not work, start with
nix-ldd <program>. T
gdk-pixbuf
glew110
glib
- gnome2.GConf
- gnome2.pango
+ stable.gnome2.GConf
+ pango
gtk2
gtk3
icu
@@ -7192,6 +7292,7 @@ I am using distrobox to quickly circumvent isses that I cannot immediately solve
virtualisation.podman = {
enable = true;
+ package = pkgs.stable.podman;
};
}
@@ -9152,6 +9253,7 @@ This opens a few gaming ports and installs the steam configuration suite for gam
programs.steam = {
enable = true;
+ package = pkgs.stable.steam;
extraCompatPackages = [
pkgs.proton-ge-bin
];
@@ -9556,19 +9658,36 @@ Again, we adapt nix to our needs, enable the home-manager command f
{ lib, config, pkgs, ... }:
+{ lib, inputs, config, ... }:
{
- nix = {
- package = lib.mkDefault pkgs.nix;
- settings = {
- experimental-features = [
- "nix-command"
- "flakes"
- "ca-derivations"
- "pipe-operators"
- ];
+ nix =
+ let
+ flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
+ in
+ lib.mkIf (!config.swarselsystems.isNixos) {
+ settings = {
+ experimental-features = [
+ "nix-command"
+ "flakes"
+ "ca-derivations"
+ "cgroups"
+ "pipe-operators"
+ ];
+ trusted-users = [ "@wheel" "swarsel" ];
+ connect-timeout = 5;
+ bash-prompt-prefix = "[33m$SHLVL:\\w [0m";
+ bash-prompt = "$(if [[ $? -gt 0 ]]; then printf \"[31m\"; else printf \"[32m\"; fi)\[\e[1m\]λ\[\e[0m\] [0m";
+ fallback = true;
+ min-free = 128000000;
+ max-free = 1000000000;
+ flake-registry = "";
+ auto-optimise-store = true;
+ warn-dirty = false;
+ max-jobs = 1;
+ use-cgroups = lib.mkIf config.swarselsystems.isLinux true;
+ };
+ registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
};
- };
programs.home-manager.enable = lib.mkIf (!config.swarselsystems.isNixos) true;
@@ -9581,6 +9700,7 @@ Again, we adapt
nix to our needs, enable the home-manager command f
FLAKE = "${config.home.homeDirectory}/.dotfiles";
};
};
+
}
zsh look cooler! I have symbols for most programm
enableZshIntegration = true;
settings = {
add_newline = false;
- format = "$character";
+ format = "$shlvl$character";
right_format = "$all";
command_timeout = 3000;
@@ -10430,7 +10520,7 @@ Starship makes my zsh look cooler! I have symbols for most programm
git_status = {
style = "bg:#394260";
- format = "[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)";
+ format = "[[($all_status$ahead_behind)](fg:#769ff0 bg:#394260)]($style) ";
};
character = {
@@ -10438,7 +10528,23 @@ Starship makes my zsh look cooler! I have symbols for most programm
error_symbol = "[λ](bold red)";
};
- aws.symbol = " ";
+ shlvl = {
+ disabled = false;
+ symbol = "↳";
+ format = "[$symbol]($style) ";
+ repeat = true;
+ repeat_offset = 1;
+ style = "blue";
+ };
+
+ nix_shell = {
+ disabled = false;
+ heuristic = true;
+ format = "[$symbol$name]($style)";
+ symbol = " ";
+ };
+
+ aws.symbol = " ";
buf.symbol = " ";
c.symbol = " ";
conda.symbol = " ";
@@ -10461,7 +10567,6 @@ Starship makes my zsh look cooler! I have symbols for most programm
memory_usage.symbol = " ";
meson.symbol = " ";
nim.symbol = " ";
- nix_shell.symbol = " ";
nodejs.symbol = " ";
os.symbols = {
@@ -12416,7 +12521,7 @@ The rest of the settings is at highlight-indent-guides package. This adds a nea
(set-face-attribute 'highlight-indent-guides-stack-even-face nil :background "gray40")
(set-face-attribute 'highlight-indent-guides-stack-odd-face nil :background "gray50"))
-(use-package aggressive-indent)
-(global-aggressive-indent-mode 1)
+;; (use-package aggressive-indent)
+;; (global-aggressive-indent-mode 1)
4.3.7.7. evil-textobj-tree-sitter
+
+(use-package evil-textobj-tree-sitter)
+;; bind `function.outer`(entire function block) to `f` for use in things like `vaf`, `yaf`
+(define-key evil-outer-text-objects-map "f" (evil-textobj-tree-sitter-get-textobj "function.outer"))
+;; bind `function.inner`(function block without name and args) to `f` for use in things like `vif`, `yif`
+(define-key evil-inner-text-objects-map "f" (evil-textobj-tree-sitter-get-textobj "function.inner"))
+
+;; You can also bind multiple items and we will match the first one we can find
+(define-key evil-outer-text-objects-map "a" (evil-textobj-tree-sitter-get-textobj ("conditional.outer" "loop.outer")))
-(use-package emacs
- :ensure nil
- :init
- (setq treesit-language-source-alist
- '((bash . ("https://github.com/tree-sitter/tree-sitter-bash"))
- (c . ("https://github.com/tree-sitter/tree-sitter-c"))
- (cmake . ("https://github.com/uyha/tree-sitter-cmake"))
- (cpp . ("https://github.com/tree-sitter/tree-sitter-cpp"))
- (css . ("https://github.com/tree-sitter/tree-sitter-css"))
- (elisp . ("https://github.com/Wilfred/tree-sitter-elisp"))
- (go . ("https://github.com/tree-sitter/tree-sitter-go"))
- (html . ("https://github.com/tree-sitter/tree-sitter-html"))
- (javascript . ("https://github.com/tree-sitter/tree-sitter-javascript"))
- (json . ("https://github.com/tree-sitter/tree-sitter-json"))
- (julia . ("https://github.com/tree-sitter/tree-sitter-julia"))
- (latex . ("https://github.com/latex-lsp/tree-sitter-latex"))
- (make . ("https://github.com/alemuller/tree-sitter-make"))
- (markdown . ("https://github.com/ikatyang/tree-sitter-markdown"))
- (nix . ("https://github.com/nix-community/tree-sitter-nix"))
- (R . ("https://github.com/r-lib/tree-sitter-r"))
- (python . ("https://github.com/tree-sitter/tree-sitter-python"))
- (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "typescript/src" "typescript"))
- (rust . ("https://github.com/tree-sitter/tree-sitter-rust"))
- (sql . ("https://github.com/m-novikov/tree-sitter-sql"))
- (toml . ("https://github.com/tree-sitter/tree-sitter-toml"))
- (tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))
- (yaml . ("https://github.com/ikatyang/tree-sitter-yaml"))))
- )
+;; (use-package emacs
+;; :ensure nil
+;; :init
+;; (setq treesit-language-source-alist
+;; '((bash . ("https://github.com/tree-sitter/tree-sitter-bash"))
+;; (c . ("https://github.com/tree-sitter/tree-sitter-c"))
+;; (cmake . ("https://github.com/uyha/tree-sitter-cmake"))
+;; (cpp . ("https://github.com/tree-sitter/tree-sitter-cpp"))
+;; (css . ("https://github.com/tree-sitter/tree-sitter-css"))
+;; (elisp . ("https://github.com/Wilfred/tree-sitter-elisp"))
+;; (go . ("https://github.com/tree-sitter/tree-sitter-go"))
+;; (html . ("https://github.com/tree-sitter/tree-sitter-html"))
+;; (javascript . ("https://github.com/tree-sitter/tree-sitter-javascript"))
+;; (json . ("https://github.com/tree-sitter/tree-sitter-json"))
+;; (julia . ("https://github.com/tree-sitter/tree-sitter-julia"))
+;; (latex . ("https://github.com/latex-lsp/tree-sitter-latex"))
+;; (make . ("https://github.com/alemuller/tree-sitter-make"))
+;; (markdown . ("https://github.com/ikatyang/tree-sitter-markdown"))
+;; (nix . ("https://github.com/nix-community/tree-sitter-nix"))
+;; (R . ("https://github.com/r-lib/tree-sitter-r"))
+;; (python . ("https://github.com/tree-sitter/tree-sitter-python"))
+;; (typescript . ("https://github.com/tree-sitter/tree-sitter-typescript" "typescript/src" "typescript"))
+;; (rust . ("https://github.com/tree-sitter/tree-sitter-rust"))
+;; (sql . ("https://github.com/m-novikov/tree-sitter-sql"))
+;; (toml . ("https://github.com/tree-sitter/tree-sitter-toml"))
+;; (tsx . ("https://github.com/tree-sitter/tree-sitter-typescript" "master" "typescript/src"))
+;; (yaml . ("https://github.com/ikatyang/tree-sitter-yaml"))))
+;; )
(use-package treesit-auto
+ :custom
+ (setq treesit-auto-install t)
:config
- (global-treesit-auto-mode)
- (setq treesit-auto-install 'prompt))
+ (treesit-auto-add-to-auto-mode-alist 'all)
+ (global-treesit-auto-mode))
@@ -15064,11 +15189,18 @@ In order to update the language grammars, run the next command below.
4.4.13. direnv (envrc)
-(use-package direnv
- :custom (direnv-always-show-summary nil)
- :config (direnv-mode))
+;; (use-package direnv
+;; :custom (direnv-always-show-summary nil)
+;; :config (direnv-mode))
+
+(use-package envrc
+ :hook (after-init . envrc-global-mode))
lsp-mode and lsp-bridge for a w
c-ts-mode
c++-mode
c++-ts-mode
+ go-mode
+ go-ts-mode
rust-ts-mode
rustic-mode
tex-mode
@@ -16042,8 +16174,7 @@ This is where the theme for the whole OS is defined. Originally, this noweb-ref
enable = true;
-base16Scheme = "${self}/wallpaper/swarsel.yaml";
-# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
+base16Scheme = "${self}/programs/stylix/swarsel.yaml";
polarity = "dark";
opacity.popups = 0.5;
cursor = {
@@ -16648,7 +16779,7 @@ ignore = ['.direnv']