From b4b0b44729c5ac193c514c51534bc8a16198d7b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Leon=20Schwarz=C3=A4ugl?=
-This file has 60522 words spanning 15453 lines and was last revised on 2024-12-29 02:23:09 +0100.
+This file has 57175 words spanning 14786 lines and was last revised on 2024-12-29 20:11:24 +0100.
@@ -763,7 +734,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 02:23:09 +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-29 20:11:24 +0100)
-
@@ -286,13 +286,13 @@
outputs = inputs@ [...], the inputs@ makes it so th
-{
+{
description = "SwarseFlake - Nix Flake for all SwarselSystems";
nixConfig = {
@@ -883,124 +853,82 @@ In outputs = inputs@ [...], the inputs@ makes it so th
"https://nix-community.cachix.org"
"https://cache.ngi0.nixos.org/"
];
-
extra-trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"cache.ngi0.nixos.org-1:KqH5CBLNSyX184S9BKZJo1LxrxJ9ltnY2uAs5c/f1MA="
];
};
-
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
-
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
-
systems.url = "github:nix-systems/default-linux";
-
- # user-level configuration
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
-
- # overlay to access bleeding edge emacs
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
-
- # nix user repository
- # i use this mainly to not have to build all firefox extensions
- # myself as well as for the emacs-init package (tbd)
nur.url = "github:nix-community/NUR";
-
- # provides GL to non-NixOS hosts
nixgl.url = "github:guibou/nixGL";
-
- # manages all theming using Home-Manager
stylix.url = "github:danth/stylix";
-
- # nix secrets management
sops-nix.url = "github:Mic92/sops-nix";
-
- # enable secure boot on NixOS
lanzaboote.url = "github:nix-community/lanzaboote";
-
- # nix for android
nix-on-droid = {
url = "github:nix-community/nix-on-droid/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
-
- # generate NixOS images
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
-
- # hardware quirks on nix
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
};
-
- # dynamic library loading
nix-alien = {
url = "github:thiagokokada/nix-alien";
};
-
- # automatic nintendo switch payload injection
nswitch-rcm-nix = {
url = "github:Swarsel/nswitch-rcm-nix";
};
-
- # weekly updated nix-index database
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
-
disko = {
- url = "github:nix-community/disko";
- inputs.nixpkgs.follows = "nixpkgs";
+ url = "github:nix-community/disko";
+ inputs.nixpkgs.follows = "nixpkgs";
};
-
impermanence.url = "github:nix-community/impermanence";
-
zjstatus = {
url = "github:dj95/zjstatus";
};
-
fw-fanctrl = {
url = "github:TamtamHero/fw-fanctrl/packaging/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
-
nix-darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
-
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
-
nix-secrets = {
url = "git+ssh://git@github.com/Swarsel/nix-secrets.git?ref=main&shallow=1";
flake = false;
inputs = { };
};
-
nix-topology.url = "github:oddlama/nix-topology";
};
-
outputs =
inputs@{ self
, nixpkgs
, home-manager
- , nix-darwin
, systems
, ...
}:
@@ -1055,94 +983,83 @@ In outputs = inputs@ [...], the inputs@ makes it so th
];
appSet = lib.swarselsystems.mkApps system appNames self;
in
- {
- inherit appSet;
- default = appSet.bootstrap;
- });
+ {
+ inherit appSet;
+ default = appSet.bootstrap;
+ });
devShells = lib.swarselsystems.forAllSystems (system:
let
- pkgs = nixpkgs.legacyPackages.${system};
+ pkgs = lib.swarselsystems.pkgsFor.${system};
checks = self.checks.${system};
in
- {
- default = pkgs.mkShell {
- NIX_CONFIG = "experimental-features = nix-command flakes";
- inherit (checks.pre-commit-check) shellHook;
- buildInputs = checks.pre-commit-check.enabledPackages;
- nativeBuildInputs = with pkgs; [
- nix
- home-manager
- git
- just
- age
- ssh-to-age
- sops
- statix
- deadnix
- nixpkgs-fmt
- ];
- };
- }
+ {
+ default = pkgs.mkShell {
+ NIX_CONFIG = "experimental-features = nix-command flakes";
+ inherit (checks.pre-commit-check) shellHook;
+ buildInputs = checks.pre-commit-check.enabledPackages;
+ nativeBuildInputs = [
+ pkgs.nix
+ pkgs.home-manager
+ pkgs.git
+ pkgs.just
+ pkgs.age
+ pkgs.ssh-to-age
+ pkgs.sops
+ pkgs.statix
+ pkgs.deadnix
+ pkgs.nixpkgs-fmt
+ ];
+ };
+ }
);
checks = lib.swarselsystems.forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
- import ./checks { inherit self inputs system pkgs; }
+ import ./checks { inherit self inputs system pkgs; }
);
-
nixosConfigurations =
- lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "nixos") "nixos";
-
+ lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "nixos") "nixos";
homeConfigurations =
- # "swarsel@home-manager" = inputs.home-manager.lib.homeManagerConfiguration {
- # pkgs = lib.swarselsystems.pkgsFor.x86_64-linux;
- # extraSpecialArgs = { inherit inputs outputs; };
- # modules = homeModules ++ mixedModules ++ [
- # ./hosts/home-manager
- # ];
- # };
-
- lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "home") "home" lib.swarselsystems.pkgsFor.x86_64-linux;
-
+ # "swarsel@home-manager" = inputs.home-manager.lib.homeManagerConfiguration {
+ # pkgs = lib.swarselsystems.pkgsFor.x86_64-linux;
+ # extraSpecialArgs = { inherit inputs outputs; };
+ # modules = homeModules ++ mixedModules ++ [
+ # ./hosts/home-manager
+ # ];
+ # };
+ lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "home") "home" lib.swarselsystems.pkgsFor.x86_64-linux;
darwinConfigurations =
- lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "darwin") "darwin";
-
+ lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "darwin") "darwin";
nixOnDroidConfigurations =
- # magicant = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
- # pkgs = lib.swarselsystems.pkgsFor.aarch64-linux;
- # modules = [
- # ./hosts/magicant
- # ];
- # };
-
- lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "android") "android" lib.swarselsystems.pkgsFor.aarch64-linux;
-
+ # magicant = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
+ # pkgs = lib.swarselsystems.pkgsFor.aarch64-linux;
+ # modules = [
+ # ./hosts/magicant
+ # ];
+ # };
+ lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "android") "android" lib.swarselsystems.pkgsFor.aarch64-linux;
topology =
- lib.swarselsystems.forEachSystem (pkgs: import inputs.nix-topology {
- inherit pkgs;
- modules = [
- # Your own file to define global topology. Works in principle like a nixos module but uses different options.
- # ./topology.nix
- { inherit (self) nixosConfigurations; }
- ];
- });
+ lib.swarselsystems.forEachSystem (pkgs: import inputs.nix-topology {
+ inherit pkgs;
+ modules = [
+ # Your own file to define global topology. Works in principle like a nixos module but uses different options.
+ # ./topology.nix
+ { inherit (self) nixosConfigurations; }
+ ];
+ });
-
- };
+ };
}
-
-
-
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
-
nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.05";
-
systems.url = "github:nix-systems/default-linux";
-
-# user-level configuration
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
-
-# overlay to access bleeding edge emacs
emacs-overlay = {
url = "github:nix-community/emacs-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
-
-# nix user repository
-# i use this mainly to not have to build all firefox extensions
-# myself as well as for the emacs-init package (tbd)
nur.url = "github:nix-community/NUR";
-
-# provides GL to non-NixOS hosts
nixgl.url = "github:guibou/nixGL";
-
-# manages all theming using Home-Manager
stylix.url = "github:danth/stylix";
-
-# nix secrets management
sops-nix.url = "github:Mic92/sops-nix";
-
-# enable secure boot on NixOS
lanzaboote.url = "github:nix-community/lanzaboote";
-
-# nix for android
nix-on-droid = {
url = "github:nix-community/nix-on-droid/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
-
-# generate NixOS images
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
-
-# hardware quirks on nix
nixos-hardware = {
url = "github:NixOS/nixos-hardware/master";
};
-
-# dynamic library loading
nix-alien = {
url = "github:thiagokokada/nix-alien";
};
-
-# automatic nintendo switch payload injection
nswitch-rcm-nix = {
url = "github:Swarsel/nswitch-rcm-nix";
};
-
-# weekly updated nix-index database
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
-
disko = {
- url = "github:nix-community/disko";
- inputs.nixpkgs.follows = "nixpkgs";
+ url = "github:nix-community/disko";
+ inputs.nixpkgs.follows = "nixpkgs";
};
-
impermanence.url = "github:nix-community/impermanence";
-
zjstatus = {
url = "github:dj95/zjstatus";
};
-
fw-fanctrl = {
url = "github:TamtamHero/fw-fanctrl/packaging/nix";
inputs.nixpkgs.follows = "nixpkgs";
};
-
nix-darwin = {
url = "github:lnl7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
-
pre-commit-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
-
nix-secrets = {
url = "git+ssh://git@github.com/Swarsel/nix-secrets.git?ref=main&shallow=1";
flake = false;
inputs = { };
};
-
nix-topology.url = "github:oddlama/nix-topology";
@@ -1481,42 +1360,42 @@ apps = lib.swarselsystems.forAllSystems (system:
];
appSet = lib.swarselsystems.mkApps system appNames self;
in
- {
- inherit appSet;
- default = appSet.bootstrap;
- });
+ {
+ inherit appSet;
+ default = appSet.bootstrap;
+ });
devShells = lib.swarselsystems.forAllSystems (system:
let
- pkgs = nixpkgs.legacyPackages.${system};
+ pkgs = lib.swarselsystems.pkgsFor.${system};
checks = self.checks.${system};
in
- {
- default = pkgs.mkShell {
- NIX_CONFIG = "experimental-features = nix-command flakes";
- inherit (checks.pre-commit-check) shellHook;
- buildInputs = checks.pre-commit-check.enabledPackages;
- nativeBuildInputs = with pkgs; [
- nix
- home-manager
- git
- just
- age
- ssh-to-age
- sops
- statix
- deadnix
- nixpkgs-fmt
- ];
- };
- }
+ {
+ default = pkgs.mkShell {
+ NIX_CONFIG = "experimental-features = nix-command flakes";
+ inherit (checks.pre-commit-check) shellHook;
+ buildInputs = checks.pre-commit-check.enabledPackages;
+ nativeBuildInputs = [
+ pkgs.nix
+ pkgs.home-manager
+ pkgs.git
+ pkgs.just
+ pkgs.age
+ pkgs.ssh-to-age
+ pkgs.sops
+ pkgs.statix
+ pkgs.deadnix
+ pkgs.nixpkgs-fmt
+ ];
+ };
+ }
);
checks = lib.swarselsystems.forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
- import ./checks { inherit self inputs system pkgs; }
+ import ./checks { inherit self inputs system pkgs; }
);
@@ -1604,9 +1483,9 @@ lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "android") "a
lib.swarselsystems.forEachSystem (pkgs: import inputs.nix-topology {
@@ -1638,16 +1517,16 @@ This section mainly exists house different `default.nix` files to define some mo
Every host is housed in the hosts/ directory, which is then subdivided by each respective system (nixos/, home-manager/, nix-on-droid/, darwin/). As described earlier, some of these configurations (nixos and darwin) can be defined automatically in this flake. For home-manager and nix-on-droid, the system architecture must be defined manually.
This is the template that I use for new deployments of personal machines. Servers are usually highly tailored to their specific task and I do not consider it worth a time to craft a template for that. Also, at least at the current time, I only provide a template for NixOS hosts, as I rarely ever use anything else.
{ self, inputs, outputs, config, pkgs, lib, ... }:
let
@@ -1731,9 +1610,9 @@ in
Acceptance of arbitraty argumments is here needed because disko passes diskoFile to this file.
{ self, inputs, outputs, config, pkgs, lib, ... }:
let
@@ -1909,7 +1788,7 @@ in
inputs.home-manager.nixosModules.home-manager
{
- home-manager.users.swarsel.imports = outputs.mixedModules ++ [
+ home-manager.users.swarsel.imports = outputs.mixedModules ++ [
"${profilesPath}/optional/home/gaming.nix"
"${profilesPath}/optional/home/work.nix"
] ++ (builtins.attrValues outputs.homeManagerModules);
@@ -1935,15 +1814,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;
@@ -1961,143 +1840,147 @@ in
'';
};
- swarselsystems = lib.recursiveUpdate {
- wallpaper = self + /wallpaper/lenovowp.png;
- hasBluetooth = true;
- hasFingerprint = true;
- isImpermanence = false;
- isSecureBoot = true;
- isCrypted = true;
- } sharedOptions;
+ swarselsystems = lib.recursiveUpdate
+ {
+ wallpaper = self + /wallpaper/lenovowp.png;
+ hasBluetooth = true;
+ hasFingerprint = true;
+ isImpermanence = false;
+ isSecureBoot = true;
+ isCrypted = true;
+ }
+ sharedOptions;
- home-manager.users.swarsel.swarselsystems = lib.recursiveUpdate {
- isLaptop = true;
- isNixos = true;
- flakePath = "/home/swarsel/.dotfiles";
- cpuCount = 16;
- # temperatureHwmon = {
- # isAbsolutePath = true;
- # path = "/sys/devices/platform/thinkpad_hwmon/hwmon/";
- # input-filename = "temp1_input";
- # };
- # ------ -----
- # | DP-4 | |eDP-1|
- # ------ -----
- startup = [
- { command = "nextcloud --background"; }
- { command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
- { command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
- { command = "ANKI_WAYLAND=1 anki"; }
- { command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
- { command = "nm-applet"; }
- { command = "teams-for-linux"; }
- { command = "1password"; }
- { command = "feishin"; }
- ];
- sharescreen = "eDP-2";
- lowResolution = "1280x800";
- highResolution = "2560x1600";
- monitors = {
- main = {
- name = "BOE 0x0BC9 Unknown";
- mode = "2560x1600"; # TEMPLATE
- scale = "1";
- position = "2560,0";
- workspace = "15:L";
- output = "eDP-2";
+ home-manager.users.swarsel.swarselsystems = lib.recursiveUpdate
+ {
+ isLaptop = true;
+ isNixos = true;
+ flakePath = "/home/swarsel/.dotfiles";
+ cpuCount = 16;
+ # temperatureHwmon = {
+ # isAbsolutePath = true;
+ # path = "/sys/devices/platform/thinkpad_hwmon/hwmon/";
+ # input-filename = "temp1_input";
+ # };
+ # ------ -----
+ # | DP-4 | |eDP-1|
+ # ------ -----
+ startup = [
+ { command = "nextcloud --background"; }
+ { command = "vesktop --start-minimized --enable-speech-dispatcher --ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime"; }
+ { command = "element-desktop --hidden --enable-features=UseOzonePlatform --ozone-platform=wayland --disable-gpu-driver-bug-workarounds"; }
+ { command = "ANKI_WAYLAND=1 anki"; }
+ { command = "OBSIDIAN_USE_WAYLAND=1 obsidian"; }
+ { command = "nm-applet"; }
+ { command = "teams-for-linux"; }
+ { command = "1password"; }
+ { command = "feishin"; }
+ ];
+ sharescreen = "eDP-2";
+ lowResolution = "1280x800";
+ highResolution = "2560x1600";
+ monitors = {
+ main = {
+ name = "BOE 0x0BC9 Unknown";
+ mode = "2560x1600"; # TEMPLATE
+ scale = "1";
+ position = "2560,0";
+ workspace = "15:L";
+ output = "eDP-2";
+ };
+ homedesktop = {
+ name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
+ mode = "2560x1440";
+ scale = "1";
+ position = "0,0";
+ workspace = "1:一";
+ output = "DP-11";
+ };
+ work_back_middle = {
+ name = "LG Electronics LG Ultra HD 0x000305A6";
+ mode = "2560x1440";
+ scale = "1";
+ position = "5120,0";
+ workspace = "1:一";
+ output = "DP-10";
+ };
+ work_front_left = {
+ name = "LG Electronics LG Ultra HD 0x0007AB45";
+ mode = "3840x2160";
+ scale = "1";
+ position = "5120,0";
+ workspace = "1:一";
+ output = "DP-7";
+ };
+ work_back_right = {
+ name = "HP Inc. HP Z32 CN41212T55";
+ mode = "3840x2160";
+ scale = "1";
+ position = "5120,0";
+ workspace = "1:一";
+ output = "DP-3";
+ };
+ work_middle_middle_main = {
+ name = "HP Inc. HP 732pk CNC4080YL5";
+ mode = "3840x2160";
+ scale = "1";
+ position = "-1280,0";
+ workspace = "11:M";
+ output = "DP-8";
+ };
+ work_middle_middle_side = {
+ name = "Hewlett Packard HP Z24i CN44250RDT";
+ mode = "1920x1200";
+ transform = "270";
+ scale = "1";
+ position = "-2480,0";
+ workspace = "12:S";
+ output = "DP-9";
+ };
+ work_seminary = {
+ name = "Applied Creative Technology Transmitter QUATTRO201811";
+ mode = "1280x720";
+ scale = "1";
+ position = "10000,10000"; # i.e. this screen is inaccessible by moving the mouse
+ workspace = "12:S";
+ output = "DP-4";
+ };
};
- homedesktop = {
- name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
- mode = "2560x1440";
- scale = "1";
- position = "0,0";
- workspace = "1:一";
- output = "DP-11";
+ inputs = {
+ "12972:18:Framework_Laptop_16_Keyboard_Module_-_ANSI_Keyboard" = {
+ xkb_layout = "us";
+ xkb_variant = "altgr-intl";
+ };
+ "1133:45081:MX_Master_2S_Keyboard" = {
+ xkb_layout = "us";
+ xkb_variant = "altgr-intl";
+ };
+ "2362:628:PIXA3854:00_093A:0274_Touchpad" = {
+ dwt = "enabled";
+ tap = "enabled";
+ natural_scroll = "enabled";
+ middle_emulation = "enabled";
+ };
+ "1133:50504:Logitech_USB_Receiver" = {
+ xkb_layout = "us";
+ xkb_variant = "altgr-intl";
+ };
+ "1133:45944:MX_KEYS_S" = {
+ xkb_layout = "us";
+ xkb_variant = "altgr-intl";
+ };
};
- work_back_middle = {
- name = "LG Electronics LG Ultra HD 0x000305A6";
- mode = "2560x1440";
- scale = "1";
- position = "5120,0";
- workspace = "1:一";
- output = "DP-10";
+ keybindings = {
+ "Mod4+Ctrl+Shift+p" = "exec screenshare";
};
- work_front_left = {
- name = "LG Electronics LG Ultra HD 0x0007AB45";
- mode = "3840x2160";
- scale = "1";
- position = "5120,0";
- workspace = "1:一";
- output = "DP-7";
+ shellAliases = {
+ ans2-15_3-9 = ". ~/.venvs/ansible39_2_15_0/bin/activate";
+ ans3-9 = ". ~/.venvs/ansible39/bin/activate";
+ ans = ". ~/.venvs/ansible/bin/activate";
+ ans2-15 = ". ~/.venvs/ansible2.15.0/bin/activate";
};
- work_back_right = {
- name = "HP Inc. HP Z32 CN41212T55";
- mode = "3840x2160";
- scale = "1";
- position = "5120,0";
- workspace = "1:一";
- output = "DP-3";
- };
- work_middle_middle_main = {
- name = "HP Inc. HP 732pk CNC4080YL5";
- mode = "3840x2160";
- scale = "1";
- position = "-1280,0";
- workspace = "11:M";
- output = "DP-8";
- };
- work_middle_middle_side = {
- name = "Hewlett Packard HP Z24i CN44250RDT";
- mode = "1920x1200";
- transform = "270";
- scale = "1";
- position = "-2480,0";
- workspace = "12:S";
- output = "DP-9";
- };
- work_seminary = {
- name = "Applied Creative Technology Transmitter QUATTRO201811";
- mode = "1280x720";
- scale = "1";
- position = "10000,10000"; # i.e. this screen is inaccessible by moving the mouse
- workspace = "12:S";
- output = "DP-4";
- };
- };
- inputs = {
- "12972:18:Framework_Laptop_16_Keyboard_Module_-_ANSI_Keyboard" = {
- xkb_layout = "us";
- xkb_variant = "altgr-intl";
- };
- "1133:45081:MX_Master_2S_Keyboard" = {
- xkb_layout = "us";
- xkb_variant = "altgr-intl";
- };
- "2362:628:PIXA3854:00_093A:0274_Touchpad" = {
- dwt = "enabled";
- tap = "enabled";
- natural_scroll = "enabled";
- middle_emulation = "enabled";
- };
- "1133:50504:Logitech_USB_Receiver" = {
- xkb_layout = "us";
- xkb_variant = "altgr-intl";
- };
- "1133:45944:MX_KEYS_S" = {
- xkb_layout = "us";
- xkb_variant = "altgr-intl";
- };
- };
- keybindings = {
- "Mod4+Ctrl+Shift+p" = "exec screenshare";
- };
- shellAliases = {
- ans2-15_3-9 = ". ~/.venvs/ansible39_2_15_0/bin/activate";
- ans3-9 = ". ~/.venvs/ansible39/bin/activate";
- ans = ". ~/.venvs/ansible/bin/activate";
- ans2-15 = ". ~/.venvs/ansible2.15.0/bin/activate";
- };
- } sharedOptions;
+ }
+ sharedOptions;
}
@@ -2105,9 +1988,9 @@ in
{ config, lib, modulesPath, ... }:
{
@@ -2153,9 +2036,9 @@ in
{
disko.devices = {
@@ -2247,9 +2130,9 @@ in
This is my main server that I run at home. It handles most tasks that require bigger amounts of storage than I can receive for free at OCI. Also it houses some data that I find too sensitive to hand over to Oracle.
{ self, inputs, outputs, config, ... }:
let
@@ -2268,7 +2151,7 @@ in
inputs.home-manager.nixosModules.home-manager
{
home-manager.users.swarsel.imports = [
- "${profilesPath}/server/home"
+ "${profilesPath}/server/home"
] ++ (builtins.attrValues outputs.homeManagerModules);
}
@@ -2327,9 +2210,9 @@ in
{ config, lib, modulesPath, ... }:
@@ -2609,20 +2492,20 @@ in
This is a slim setup for developing base configuration. I do not track the hardware-configuration for this host here because I often switch this configuration between running on a QEMU VM and a physical laptop and do not want to constantly adapt the config here to reflect the current state.
{ self, inputs, outputs, config, pkgs, lib, ... }:
let
@@ -2633,7 +2516,7 @@ let
in
{
- imports = [
+ imports = [
inputs.disko.nixosModules.disko
"${self}/hosts/nixos/toto/disk-config.nix"
./hardware-configuration.nix
@@ -2654,7 +2537,7 @@ in
inputs.home-manager.nixosModules.home-manager
{
- home-manager.users.swarsel.imports = [
+ home-manager.users.swarsel.imports = [
inputs.sops-nix.homeManagerModules.sops
"${profilesPath}/common/home/settings.nix"
"${profilesPath}/common/home/sops.nix"
@@ -2697,22 +2580,26 @@ in
firewall.enable = false;
};
- swarselsystems = lib.recursiveUpdate {
- wallpaper = self + /wallpaper/lenovowp.png;
- isImpermanence = true;
- isCrypted = true;
- isSecureBoot = false;
- isSwap = true;
- swapSize = "8G";
- # rootDisk = "/dev/nvme0n1";
- rootDisk = "/dev/vda";
- } sharedOptions;
+ swarselsystems = lib.recursiveUpdate
+ {
+ wallpaper = self + /wallpaper/lenovowp.png;
+ isImpermanence = true;
+ isCrypted = true;
+ isSecureBoot = false;
+ isSwap = true;
+ swapSize = "8G";
+ # rootDisk = "/dev/nvme0n1";
+ rootDisk = "/dev/vda";
+ }
+ sharedOptions;
- home-manager.users.swarsel.swarselsystems = lib.recursiveUpdate {
- isLaptop = false;
- isNixos = true;
- flakePath = "/home/swarsel/.dotfiles";
- } sharedOptions;
+ home-manager.users.swarsel.swarselsystems = lib.recursiveUpdate
+ {
+ isLaptop = false;
+ isNixos = true;
+ flakePath = "/home/swarsel/.dotfiles";
+ }
+ sharedOptions;
}
@@ -2721,9 +2608,9 @@ in
# NOTE: ... is needed because dikso passes diskoFile
{ lib
@@ -2873,10 +2760,10 @@ For added convenience, the live environment displays a helpful text on login, we
[32m~SwarselSystems~[0m
-IP of primary interface: [31m\4[0m
-The Password for all users & root is '[31msetup[0m'.
-Install the system remotely by running '[33mbootstrap -n <CONFIGURATION_NAME> -d <IP_FROM_ABOVE> [0m' on a machine with deployed secrets.
-Alternatively, run '[33mswarsel-install -n <CONFIGURATION_NAME>[0m' for a local install. For your convenience, an example call is in the bash history (press up on the keyboard to access).
+ IP of primary interface: [31m\4[0m
+ The Password for all users & root is '[31msetup[0m'.
+ Install the system remotely by running '[33mbootstrap -n <CONFIGURATION_NAME> -d <IP_FROM_ABOVE> [0m' on a machine with deployed secrets.
+ Alternatively, run '[33mswarsel-install -n <CONFIGURATION_NAME>[0m' for a local install. For your convenience, an example call is in the bash history (press up on the keyboard to access).
@@ -3013,14 +2900,14 @@ in
This is the "reference implementation" of a setup that runs without NixOS, only relying on home-manager. I try to test this every now and then and keep it supported. However, manual steps are needed to get the system to work fully, depending on what distribution you are running on.
{ self, inputs, outputs, config, ... }:
+{ self, outputs, config, ... }:
{
imports = outputs.homeModules ++ outputs.mixedModules ++ (builtins.attrValues outputs.homeManagerModules);
@@ -3058,9 +2945,9 @@ This is the "reference implementation" of a setup that runs without NixOS, only
This is just a demo host. It applies all the configuration found in the common parts of the flake, but disables all secrets-related features (as they would not work without the proper SSH keys).
@@ -3202,8 +3089,8 @@ let "vershell" "eontimer" ]; - in - lib.swarselsystems.mkPackages packageNames pkgs +in +lib.swarselsystems.mkPackages packageNames pkgs @@ -3922,14 +3809,14 @@ function update_sops_file() { SOPS_FILE=".sops.yaml" sed -i "{ - # Remove any * and & entries for this host - /[*&]$key_name/ d; - # Inject a new age: entry - # n matches the first line following age: and p prints it, then we transform it while reusing the spacing - /age:/{n; p; s/\(.*- \*\).*/\1$key_name/}; - # Inject a new hosts or user: entry - /&$key_type/{n; p; s/\(.*- &\).*/\1$key_name $key/} - }" $SOPS_FILE + # Remove any * and & entries for this host + /[*&]$key_name/ d; + # Inject a new age: entry + # n matches the first line following age: and p prints it, then we transform it while reusing the spacing + /age:/{n; p; s/\(.*- \*\).*/\1$key_name/}; + # Inject a new hosts or user: entry + /&$key_type/{n; p; s/\(.*- &\).*/\1$key_name $key/} + }" $SOPS_FILE green "Updating .sops.yaml" cd - } @@ -4196,9 +4083,9 @@ writeShellApplication {This program builds a configuration locally.
@@ -4307,9 +4194,9 @@ writeShellApplication {This program sets up a new NixOS host locally.
@@ -4494,9 +4381,9 @@ writeShellApplication {This program sets up a new NixOS host locally.
@@ -4576,7 +4463,6 @@ green "Disabling initialSetup" sed -i '/swarselsystems\.initialSetup = true;/d' /home/"$target_user"/.dotfiles/hosts/nixos/"$target_config"/hardware-configuration.nix sudo nixos-rebuild --flake .#"$target_config" switch green "Post-install finished!" -This script allows for quick git branch switching.
@@ -4659,9 +4545,9 @@ writeShellApplication {This script allows for quick git branch switching.
@@ -4753,15 +4639,15 @@ let }; retroarch = prev.retroarch.withCores (cores: with cores; [ - snes9x # snes - nestopia # nes - dosbox # dos - scummvm # scumm - vba-m # gb/a - mgba # gb/a - melonds # ds - dolphin # gc/wii - ]); + snes9x # snes + nestopia # nes + dosbox # dos + scummvm # scumm + vba-m # gb/a + mgba # gb/a + melonds # ds + dolphin # gc/wii + ]); # #river = prev.river.overrideAttrs (oldAttrs: rec { # pname = "river"; @@ -4931,9 +4817,9 @@ I usually usemutableUsers = false in my NixOS configuration. Howev
{ lib, ... }:
{
@@ -5358,16 +5244,16 @@ Set in firefox about:config > toolkit.legacyUserProfileCustomizations.s
{ self, lib, pkgs, ... }:
- let
- lock-false = {
- Value = false;
- Status = "locked";
- };
- lock-true = {
- Value = true;
- Status = "locked";
- };
- in
+let
+ lock-false = {
+ Value = false;
+ Status = "locked";
+ };
+ lock-true = {
+ Value = true;
+ Status = "locked";
+ };
+in
{
options.swarselsystems.firefox = lib.mkOption {
type = lib.types.attrs;
@@ -5516,9 +5402,9 @@ Set in firefox about:config > toolkit.legacyUserProfileCustomizations.s
This section defines all functions of my own that I add to lib. These are used in all places over the config, with many of them being used in flake.nix.
{ self, pkgs, home-manager, config, ... }:
{
stylix = {
-
enable = true;
base16Scheme = "${self}/wallpaper/swarsel.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
@@ -6546,7 +6431,6 @@ By default, stylix wants to style
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};
-
sansSerif = {
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
package = pkgs.cantarell-fonts;
@@ -6555,19 +6439,15 @@ By default, stylix wants to style
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};
-
monospace = {
package = pkgs.nerd-fonts.fira-mono; # has overrides
-
name = "FiraCode Nerd Font Mono";
};
-
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
-
targets.grub.enable = false; # the styling makes grub more ugly
image = config.swarselsystems.wallpaper;
};
@@ -6727,7 +6607,6 @@ This allows me to use my big scanner/printer's scanning function over the networ
enable = true;
extraBackends = [ pkgs.sane-airscan ];
};
-
-services.avahi = {
+services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
@@ -7162,10 +7039,10 @@ in
];
files = [
- "/etc/ssh/ssh_host_ed25519_key"
- "/etc/ssh/ssh_host_ed25519_key.pub"
- "/etc/ssh/ssh_host_rsa_key"
- "/etc/ssh/ssh_host_rsa_key.pub"
+ "/etc/ssh/ssh_host_ed25519_key"
+ "/etc/ssh/ssh_host_ed25519_key.pub"
+ "/etc/ssh/ssh_host_rsa_key"
+ "/etc/ssh/ssh_host_rsa_key.pub"
];
};
@@ -7398,9 +7275,9 @@ Since I hide the waybar completely during normal operation, I run the risk of no
This dynamically uses systemd boot or Lanzaboote depending on `config.swarselsystems.initialSetup` and `config.swarselsystems.isSecureBoot`.
@@ -7450,39 +7327,39 @@ let in { imports = [ - "${profilesPath}/common/nixos/settings.nix" - "${profilesPath}/common/nixos/home-manager.nix" - "${profilesPath}/common/nixos/xserver.nix" - "${profilesPath}/common/nixos/gc.nix" - "${profilesPath}/common/nixos/store.nix" - "${profilesPath}/common/nixos/time.nix" - "${profilesPath}/common/nixos/users.nix" - "${profilesPath}/common/nixos/nix-ld.nix" - ./settings.nix - ./packages.nix - ./sops.nix - ./ssh.nix - ./nfs.nix - ./nginx.nix - ./kavita.nix - ./jellyfin.nix - ./navidrome.nix - ./spotifyd.nix - ./mpd.nix - ./matrix.nix - ./pipewire.nix - ./nextcloud.nix - ./immich.nix - ./paperless.nix - ./transmission.nix - ./syncthing.nix - ./restic.nix - ./monitoring.nix - ./jenkins.nix - ./emacs.nix - ./forgejo.nix - ./ankisync.nix - ./freshrss.nix + "${profilesPath}/common/nixos/settings.nix" + "${profilesPath}/common/nixos/home-manager.nix" + "${profilesPath}/common/nixos/xserver.nix" + "${profilesPath}/common/nixos/gc.nix" + "${profilesPath}/common/nixos/store.nix" + "${profilesPath}/common/nixos/time.nix" + "${profilesPath}/common/nixos/users.nix" + "${profilesPath}/common/nixos/nix-ld.nix" + ./settings.nix + ./packages.nix + ./sops.nix + ./ssh.nix + ./nfs.nix + ./nginx.nix + ./kavita.nix + ./jellyfin.nix + ./navidrome.nix + ./spotifyd.nix + ./mpd.nix + ./matrix.nix + ./pipewire.nix + ./nextcloud.nix + ./immich.nix + ./paperless.nix + ./transmission.nix + ./syncthing.nix + ./restic.nix + ./monitoring.nix + ./jenkins.nix + ./emacs.nix + ./forgejo.nix + ./ankisync.nix + ./freshrss.nix ]; } @@ -8668,7 +8545,7 @@ in isSystemUser = true; }; - users.groups.syncthing = {}; + users.groups.syncthing = { }; services.syncthing = { enable = true; @@ -9060,7 +8937,7 @@ It serves both a Greader API at_:
{
- imports = [
+ imports = [
./settings.nix
./packages.nix
./custom-packages.nix
@@ -10086,7 +9965,6 @@ This section has been notably empty ever since switching to stylix. Only Emacs i
{ self, lib, config, pkgs, ... }:
{
stylix = lib.mkIf (!config.swarselsystems.isNixos) {
-
enable = true;
base16Scheme = "${self}/wallpaper/swarsel.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
@@ -10110,7 +9988,6 @@ This section has been notably empty ever since switching to stylix. Only Emacs i
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};
-
sansSerif = {
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
package = pkgs.cantarell-fonts;
@@ -10119,19 +9996,15 @@ This section has been notably empty ever since switching to stylix. Only Emacs i
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};
-
monospace = {
package = pkgs.nerd-fonts.fira-mono; # has overrides
-
name = "FiraCode Nerd Font Mono";
};
-
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
-
image = config.swarselsystems.wallpaper;
targets = {
emacs.enable = false;
@@ -10245,7 +10118,7 @@ _:
This section should be used in order to symlink already existing configuration files using `home.file` and setting session variables using `home.sessionVariables`. @@ -10291,10 +10164,10 @@ Also in firefox `about:config > toolkit.legacyUserProfileCustomizations.style
xdg.configFile = {
- "tridactyl/tridactylrc".source = self + /programs/firefox/tridactyl/tridactylrc;
- "tridactyl/themes/base16-codeschool.css".source = self + /programs/firefox/tridactyl/themes/base16-codeschool.css;
- };
+xdg.configFile = {
+ "tridactyl/tridactylrc".source = self + /programs/firefox/tridactyl/tridactylrc;
+ "tridactyl/themes/base16-codeschool.css".source = self + /programs/firefox/tridactyl/themes/base16-codeschool.css;
+};
}
- { pkgs, ... }:
+{ pkgs, ... }:
let
tmux-super-fingers = pkgs.tmuxPlugins.mkTmuxPlugin
{
@@ -12360,30 +12205,29 @@ in
swayfxSettings = config.swarselsystems.swayfxConfig;
in
"
- exec_always autotiling
- set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
- mode $exit {
+ exec_always autotiling
+ set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
- bindsym --to-code {
- s exec \"systemctl suspend\", mode \"default\"
- l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize && systemctl suspend \", mode \"default \"
- p exec \"systemctl poweroff\"
- r exec \"systemctl reboot\"
- u exec \"swaymsg exit\"
+ mode $exit {
+ bindsym --to-code {
+ s exec \"systemctl suspend\", mode \"default\"
+ l exec \"swaylock --screenshots --clock --effect-blur 7x5 --effect-vignette 0.5:0.5 --fade-in 0.2 --daemonize && systemctl suspend \", mode \"default \"
+ p exec \"systemctl poweroff\"
+ r exec \"systemctl reboot\"
+ u exec \"swaymsg exit\"
- Return mode \"default\"
- Escape mode \"default\"
- ${modifier}+Escape mode \"default\"
- }
+ Return mode \"default\"
+ Escape mode \"default\"
+ ${modifier}+Escape mode \"default\"
}
+ }
- exec systemctl --user import-environment
- exec swayidle -w
+ exec systemctl --user import-environment
+ exec swayidle -w
- ${swayfxSettings}
-
- ";
+ ${swayfxSettings}
+ ";
};
}
@@ -12475,7 +12319,7 @@ let
profilesPath = "${self}/profiles";
in
{
- imports = [
+ imports = [
"${profilesPath}/common/home/settings.nix"
./symlink.nix
];
@@ -12686,38 +12530,38 @@ The rest of the settings is at (fset 'epg-wait-for-status
(add-hook 'emacs-startup-hook
(lambda ()
(progn
- ;; (setq gc-cons-threshold (* 1000 1000 8)
- ;; (setq gc-cons-threshold #x40000000
- (setq gc-cons-threshold (* 32 1024 1024)
+ (setq gc-cons-threshold (* 32 1024 1024)
gc-cons-percentage 0.1
jit-lock-defer-time 0.05
read-process-output-max (* 1024 1024)
@@ -13223,14 +13065,7 @@ Used here: General org-mode
(defun swarsel/org-mode-setup ()
- ;; (org-indent-mode)
(variable-pitch-mode 1)
- ;;(auto-fill-mode 0)
- ;; (setq display-line-numbers-type 'relative
- ;; display-line-numbers-current-absolute 1
- ;; display-line-numbers-width-start nil
- ;; display-line-numbers-width 6
- ;; display-line-numbers-grow-only 1)
(add-hook 'org-tab-first-hook 'org-end-of-line)
(visual-line-mode 1))
@@ -13283,20 +13118,20 @@ We set a hook that runs everytime we save the file. It would be a bit more effic
(let ((default-directory (expand-file-name "~/.dotfiles")))
(shell-command "nixpkgs-fmt . > /dev/null")))
- (defun swarsel/org-babel-tangle-config ()
+(defun swarsel/org-babel-tangle-config ()
(interactive)
- (when (string-equal (buffer-file-name)
- swarsel-swarsel-org-filepath)
- ;; Dynamic scoping to the rescue
- (let ((org-confirm-babel-evaluate nil))
- ;; (org-html-export-to-html)
- (org-babel-tangle)
- (swarsel/run-formatting)
- )))
+ (when (string-equal (buffer-file-name)
+ swarsel-swarsel-org-filepath)
+ ;; Dynamic scoping to the rescue
+ (let ((org-confirm-babel-evaluate nil))
+ ;; (org-html-export-to-html)
+ (org-babel-tangle)
+ (swarsel/run-formatting)
+ )))
- (setq org-html-htmlize-output-type nil)
+(setq org-html-htmlize-output-type nil)
- ;; (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'swarsel/org-babel-tangle-config)))
+;; (add-hook 'org-mode-hook (lambda () (add-hook 'after-save-hook #'swarsel/org-babel-tangle-config)))
-The standard Emacs behaviour for the Python process shell is a bit annoying. This is my attempt at making it show automatically on opening a python buffer and making it refresh on its own as well. This does not nicely work yet. -
- --;; run the python inferior shell immediately upon entering a python buffer -;; (add-hook 'python-mode-hook 'swarsel/run-python) - -;; (defun swarsel/run-python () -;; (save-selected-window -;; (switch-to-buffer-other-window (process-buffer (python-shell-get-or-create-process (python-shell-parse-command)))))) - -;; reload python shell automatically -(defun my-python-shell-run () - (interactive) - (when (get-buffer-process "*Python*") - (set-process-query-on-exit-flag (get-buffer-process "*Python*") nil) - (kill-process (get-buffer-process "*Python*")) - ;; Uncomment If you want to clean the buffer too. - ;;(kill-buffer "*Python*") - ;; Not so fast! - (sleep-for 0.5)) - (run-python (python-shell-parse-command) nil nil) - (python-shell-send-buffer) - ;; Pop new window only if shell isnt visible - ;; in any frame. - (unless (get-buffer-window "*Python*" t) - (python-shell-switch-to-shell))) - -(defun my-python-shell-run-region () - (interactive) - (python-shell-send-region (region-beginning) (region-end)) - (python-shell-switch-to-shell)) -
This function searches for common delimiters in region and removes them, summarizing all captured lines by it. @@ -13443,7 +13236,7 @@ This function searches for common delimiters in region and removes them, summari
This formats the org code block at point in accordance to the nixpkgs-fmt formatter
@@ -13457,30 +13250,30 @@ This formats the org code block at point in accordance to the
@@ -13512,126 +13305,112 @@ I also define some keybinds to some combinations directly. Those are used mostly+@@ -13748,7 +13501,7 @@ Many people dislike the Emacs backup files; I do enjoy them, but have to admit t- ;; Make ESC quit prompts - (global-set-key (kbd "<escape>") 'keyboard-escape-quit) +;; Make ESC quit prompts +(global-set-key (kbd "<escape>") 'keyboard-escape-quit) - ;; Set up general keybindings - (use-package general - :config - (general-create-definer swarsel/leader-keys - :keymaps '(normal insert visual emacs) - :prefix "SPC" - :global-prefix "C-SPC") +;; Set up general keybindings +(use-package general + :config + (general-create-definer swarsel/leader-keys + :keymaps '(normal insert visual emacs) + :prefix "SPC" + :global-prefix "C-SPC") - (swarsel/leader-keys - "e" '(:ignore e :which-key "evil") - "eo" '(evil-jump-backward :which-key "cursor jump backwards") - "eO" '(evil-jump-forward :which-key "cursor jump forwards") - "t" '(:ignore t :which-key "toggles") - "ts" '(hydra-text-scale/body :which-key "scale text") - "te" '(swarsel/toggle-evil-state :which-key "emacs/evil") - "tl" '(display-line-numbers-mode :which-key "line numbers") - "tp" '(evil-cleverparens-mode :wk "cleverparens") - "to" '(olivetti-mode :wk "olivetti") - "td" '(darkroom-tentative-mode :wk "darkroom") - "tw" '((lambda () (interactive) (toggle-truncate-lines)) :which-key "line wrapping") - "m" '(:ignore m :which-key "modes/programs") - "mm" '((lambda () (interactive) (mu4e)) :which-key "mu4e") - "mg" '((lambda () (interactive) (magit-list-repositories)) :which-key "magit-list-repos") - "mc" '((lambda () (interactive) (swarsel/open-calendar)) :which-key "calendar") - "mp" '(popper-toggle :which-key "popper") - "md" '(dirvish :which-key "dirvish") - "mr" '(bjm/elfeed-load-db-and-open :which-key "elfeed") - "o" '(:ignore o :which-key "org") - "op" '((lambda () (interactive) (org-present)) :which-key "org-present") - "oa" '((lambda () (interactive) (org-agenda)) :which-key "org-agenda") - "oa" '((lambda () (interactive) (org-refile)) :which-key "org-refile") - "ob" '((lambda () (interactive) (org-babel-mark-block)) :which-key "Mark whole src-block") - "ol" '((lambda () (interactive) (org-insert-link)) :which-key "insert link") - "oc" '((lambda () (interactive) (org-store-link)) :which-key "copy (=store) link") - "os" '(shfmt-region :which-key "format sh-block") - "od" '((lambda () (interactive) (org-babel-demarcate-block)) :which-key "demarcate (split) src-block") - "on" '(nixpkgs-fmt-region :which-key "format nix-block") - "ot" '(swarsel/org-babel-tangle-config :which-key "tangle file") - "oe" '(org-html-export-to-html :which-key "export to html") - "c" '(:ignore c :which-key "capture") - "ct" '((lambda () (interactive) (org-capture nil "tt")) :which-key "task") - ;; "cj" '((lambda () (interactive) (org-capture nil "jj")) :which-key "journal") - ;; "cs" '(markdown-download-screenshot :which-key "screenshot") - "l" '(:ignore l :which-key "links") - "lc" '((lambda () (interactive) (progn (find-file swarsel-swarsel-org-filepath) (org-overview) )) :which-key "SwarselSystems.org") - "le" '((lambda () (interactive) (progn (find-file swarsel-swarsel-org-filepath) (goto-char (org-find-exact-headline-in-buffer "Emacs") ) (org-overview) (org-cycle) )) :which-key "Emacs.org") - "ln" '((lambda () (interactive) (progn (find-file swarsel-swarsel-org-filepath) (goto-char (org-find-exact-headline-in-buffer "System") ) (org-overview) (org-cycle))) :which-key "Nixos.org") - "ls" '((lambda () (interactive) (find-file "/smb:Swarsel@winters:")) :which-key "Server") - "lo" '(dired swarsel-obsidian-vault-directory :which-key "obsidian") - ;; "la" '((lambda () (interactive) (find-file swarsel-org-anki-filepath)) :which-key "anki") - ;; "ln" '((lambda () (interactive) (find-file swarsel-nix-org-filepath)) :which-key "Nix.org") - "lp" '((lambda () (interactive) (projectile-switch-project)) :which-key "switch project") - "lg" '((lambda () (interactive) (magit-list-repositories)) :which-key "list git repos") - ;; "a" '(:ignore a :which-key "anki") - ;; "ap" '(anki-editor-push-tree :which-key "push new cards") - ;; "an" '((lambda () (interactive) (org-capture nil "a")) :which-key "new card") - ;; "as" '(swarsel-anki-set-deck-and-notetype :which-key "change deck and notetype") - "h" '(:ignore h :which-key "help") - "hy" '(yas-describe-tables :which-key "yas tables") - "hb" '(embark-bindings :which-key "current key bindings") - "h" '(:ignore t :which-key "describe") - "he" 'view-echo-area-messages - "hf" 'describe-function - "hF" 'describe-face - "hl" '(view-lossage :which-key "show command keypresses") - "hL" 'find-library - "hm" 'describe-mode - "ho" 'describe-symbol - "hk" 'describe-key - "hK" 'describe-keymap - "hp" 'describe-package - "hv" 'describe-variable - "hd" 'devdocs-lookup - "w" '(:ignore t :which-key "window") - "wl" 'windmove-right - "w <right>" 'windmove-right - "wh" 'windmove-left - "w <left>" 'windmove-left - "wk" 'windmove-up - "w <up>" 'windmove-up - "wj" 'windmove-down - "w <down>" 'windmove-down - "wr" 'winner-redo - "wd" 'delete-window - "w=" 'balance-windows-area - "wD" 'kill-buffer-and-window - "wu" 'winner-undo - "wr" 'winner-redo - "w/" 'evil-window-vsplit -"w\\" 'evil-window-vsplit - "w-" 'evil-window-split - "wm" '(delete-other-windows :wk "maximize") - "<right>" 'up-list - "<left>" 'down-list - )) + (swarsel/leader-keys + "e" '(:ignore e :which-key "evil") + "eo" '(evil-jump-backward :which-key "cursor jump backwards") + "eO" '(evil-jump-forward :which-key "cursor jump forwards") + "t" '(:ignore t :which-key "toggles") + "ts" '(hydra-text-scale/body :which-key "scale text") + "te" '(swarsel/toggle-evil-state :which-key "emacs/evil") + "tl" '(display-line-numbers-mode :which-key "line numbers") + "tp" '(evil-cleverparens-mode :wk "cleverparens") + "to" '(olivetti-mode :wk "olivetti") + "td" '(darkroom-tentative-mode :wk "darkroom") + "tw" '((lambda () (interactive) (toggle-truncate-lines)) :which-key "line wrapping") + "m" '(:ignore m :which-key "modes/programs") + "mm" '((lambda () (interactive) (mu4e)) :which-key "mu4e") + "mg" '((lambda () (interactive) (magit-list-repositories)) :which-key "magit-list-repos") + "mc" '((lambda () (interactive) (swarsel/open-calendar)) :which-key "calendar") + "mp" '(popper-toggle :which-key "popper") + "md" '(dirvish :which-key "dirvish") + "mr" '(bjm/elfeed-load-db-and-open :which-key "elfeed") + "o" '(:ignore o :which-key "org") + "op" '((lambda () (interactive) (org-present)) :which-key "org-present") + "oa" '((lambda () (interactive) (org-agenda)) :which-key "org-agenda") + "oa" '((lambda () (interactive) (org-refile)) :which-key "org-refile") + "ob" '((lambda () (interactive) (org-babel-mark-block)) :which-key "Mark whole src-block") + "ol" '((lambda () (interactive) (org-insert-link)) :which-key "insert link") + "oc" '((lambda () (interactive) (org-store-link)) :which-key "copy (=store) link") + "os" '(shfmt-region :which-key "format sh-block") + "od" '((lambda () (interactive) (org-babel-demarcate-block)) :which-key "demarcate (split) src-block") + "on" '(nixpkgs-fmt-region :which-key "format nix-block") + "ot" '(swarsel/org-babel-tangle-config :which-key "tangle file") + "oe" '(org-html-export-to-html :which-key "export to html") + "c" '(:ignore c :which-key "capture") + "ct" '((lambda () (interactive) (org-capture nil "tt")) :which-key "task") + "l" '(:ignore l :which-key "links") + "lc" '((lambda () (interactive) (progn (find-file swarsel-swarsel-org-filepath) (org-overview) )) :which-key "SwarselSystems.org") + "le" '((lambda () (interactive) (progn (find-file swarsel-swarsel-org-filepath) (goto-char (org-find-exact-headline-in-buffer "Emacs") ) (org-overview) (org-cycle) )) :which-key "Emacs.org") + "ln" '((lambda () (interactive) (progn (find-file swarsel-swarsel-org-filepath) (goto-char (org-find-exact-headline-in-buffer "System") ) (org-overview) (org-cycle))) :which-key "Nixos.org") + "lp" '((lambda () (interactive) (projectile-switch-project)) :which-key "switch project") + "lg" '((lambda () (interactive) (magit-list-repositories)) :which-key "list git repos") + "h" '(:ignore h :which-key "help") + "hy" '(yas-describe-tables :which-key "yas tables") + "hb" '(embark-bindings :which-key "current key bindings") + "h" '(:ignore t :which-key "describe") + "he" 'view-echo-area-messages + "hf" 'describe-function + "hF" 'describe-face + "hl" '(view-lossage :which-key "show command keypresses") + "hL" 'find-library + "hm" 'describe-mode + "ho" 'describe-symbol + "hk" 'describe-key + "hK" 'describe-keymap + "hp" 'describe-package + "hv" 'describe-variable + "hd" 'devdocs-lookup + "w" '(:ignore t :which-key "window") + "wl" 'windmove-right + "w <right>" 'windmove-right + "wh" 'windmove-left + "w <left>" 'windmove-left + "wk" 'windmove-up + "w <up>" 'windmove-up + "wj" 'windmove-down + "w <down>" 'windmove-down + "wr" 'winner-redo + "wd" 'delete-window + "w=" 'balance-windows-area + "wD" 'kill-buffer-and-window + "wu" 'winner-undo + "wr" 'winner-redo + "w/" 'evil-window-vsplit + "w\\" 'evil-window-vsplit + "w-" 'evil-window-split + "wm" '(delete-other-windows :wk "maximize") + "<right>" 'up-list + "<left>" 'down-list + )) - ;; General often used hotkeys - (general-define-key - "C-M-a" (lambda () (interactive) (org-capture nil "a")) ; make new anki card - ;; "C-M-d" 'swarsel-obsidian-daily ; open daily obsidian file and create if not exist - ;; "C-M-S" 'swarsel-anki-set-deck-and-notetype ; switch deck and notetype for new anki cards - ;; "C-M-s" 'markdown-download-screenshot ; wrapper for org-download-screenshot - "C-c d" 'crux-duplicate-current-line-or-region - "C-c D" 'crux-duplicate-and-comment-current-line-or-region - "<DUMMY-m>" 'swarsel/last-buffer - "M-\\" 'indent-region - "C-<f9>" 'my-python-shell-run - "<Paste>" 'yank - "<Cut>" 'kill-region - "<Copy>" 'kill-ring-save - "<undo>" 'evil-undo - "<redo>" 'evil-redo - "C-S-c C-S-c" 'mc/edit-lines - "C->" 'mc/mark-next-like-this - "C-<" 'mc/mark-previous-like-this - "C-c C-<" 'mc/mark-all-like-this - ) +;; General often used hotkeys +(general-define-key + "C-M-a" (lambda () (interactive) (org-capture nil "a")) ; make new anki card + "C-c d" 'crux-duplicate-current-line-or-region + "C-c D" 'crux-duplicate-and-comment-current-line-or-region + "<DUMMY-m>" 'swarsel/last-buffer + "M-\\" 'indent-region + "<Paste>" 'yank + "<Cut>" 'kill-region + "<Copy>" 'kill-ring-save + "<undo>" 'evil-undo + "<redo>" 'evil-redo + "C-S-c C-S-c" 'mc/edit-lines + "C->" 'mc/mark-next-like-this + "C-<" 'mc/mark-previous-like-this + "C-c C-<" 'mc/mark-all-like-this + )@@ -13648,41 +13427,15 @@ In this section I setup some aliases that I use for various directories on my sy;; set Nextcloud directory for journals etc. -(setq swarsel-sync-directory "~/Nextcloud" - swarsel-emacs-directory "~/.emacs.d" - swarsel-dotfiles-directory "~/.dotfiles" - swarsel-projects-directory "~/Documents/GitHub") - -(setq swarsel-emacs-org-filepath (expand-file-name "Emacs.org" swarsel-dotfiles-directory) - swarsel-nix-org-filepath (expand-file-name "Nix.org" swarsel-dotfiles-directory) - swarsel-swarsel-org-filepath (expand-file-name "SwarselSystems.org" swarsel-dotfiles-directory) - ) - - -;; set Emacs main configuration .org names -(setq swarsel-emacs-org-file "Emacs.org" - swarsel-anki-org-file "Anki.org" - swarsel-tasks-org-file "Tasks.org" - swarsel-archive-org-file "Archive.org" - swarsel-org-folder-name "Org" - swarsel-obsidian-daily-folder-name "⭐ Personal/Journal" - swarsel-obsidian-folder-name "Obsidian" - swarsel-obsidian-vault-name "Main") - - -;; set directory paths -(setq swarsel-org-directory (expand-file-name swarsel-org-folder-name swarsel-sync-directory)) ; path to org folder -(setq swarsel-obsidian-directory (expand-file-name swarsel-obsidian-folder-name swarsel-sync-directory)) ; path to obsidian -(setq swarsel-obsidian-vault-directory (expand-file-name swarsel-obsidian-vault-name swarsel-obsidian-directory)) ; path to obsidian vault -(setq swarsel-obsidian-daily-directory (expand-file-name swarsel-obsidian-daily-folder-name swarsel-obsidian-vault-directory)) ; path to obsidian daily folder - -;; filepaths to certain documents -(setq swarsel-org-anki-filepath (expand-file-name swarsel-anki-org-file swarsel-org-directory) ; path to anki export file - swarsel-org-tasks-filepath (expand-file-name swarsel-tasks-org-file swarsel-org-directory) - swarsel-org-archive-filepath (expand-file-name swarsel-archive-org-file swarsel-org-directory)) - - - +(setq + swarsel-emacs-directory "~/.emacs.d" + swarsel-dotfiles-directory "~/.dotfiles" + swarsel-swarsel-org-filepath (expand-file-name "SwarselSystems.org" swarsel-dotfiles-directory) + swarsel-tasks-org-file "Tasks.org" + swarsel-archive-org-file "Archive.org" + swarsel-work-projects-directory "~/Documents/Work" + swarsel-private-projects-directory "~/Documents/Private" + )4.3. General init.el setup + UI
-In this general section I have settings that I either consider to be integral to my experience when using emacs or have no other section that I feel they belong to. +In this general section I have settings that I either consider to be integral to my experience when using Emacs or have no other section that I feel they belong to.
@@ -13877,8 +13630,8 @@ This sets up automatic garbage collection when the frame is unused. (run-with-idle-timer 15 t (lambda () ;; (message "Garbage Collector has run for %.06fsec" - (k-time (garbage-collect))))) - ;; ) + (k-time (garbage-collect))))) +;; )@@ -14086,6 +13839,18 @@ This minor-mode adds functionality for doing better surround-commands; for examp :config (global-evil-surround-mode 1)) +
+(use-package evil-visual-mark-mode + :config (evil-visual-mark-mode)) +
;; (setq auth-sources '( "~/.emacs.d/.caldav" "~/.emacs.d/.authinfo.gpg")
- ;; auth-source-cache-expiry nil) ; default is 2h
+;; auth-source-cache-expiry nil) ; default is 2h
(setq auth-sources '( "~/.emacs.d/.authinfo")
auth-source-cache-expiry nil)
@@ -14679,157 +14440,29 @@ This part of the configuration mostly makes some aesthetic changes, enables neat
(setq org-startup-folded t)
(setq org-support-shift-select t)
- ;; (setq org-agenda-start-with-log-mode t)
- ;; (setq org-log-done 'time)
- ;; (setq org-log-into-drawer t)
+ (setq org-agenda-start-with-log-mode t)
+ (setq org-log-done 'time)
+ (setq org-log-into-drawer t)
(setq org-startup-with-inline-images t)
(setq org-export-headline-levels 6)
(setq org-image-actual-width nil)
(setq org-format-latex-options '(:foreground "White" :background default :scale 2.0 :html-foreground "Black" :html-background "Transparent" :html-scale 1.0 :matchers ("begin" "$1" "$" "$$" "\\(" "\\[")))
-
--Here I setup a plethora of keywords, keybinds and paths to give my org-agenda more power. -
+ (setq org-agenda-files '("/home/swarsel/Nextcloud/Org/Tasks.org" + "/home/swarsel/Nextcloud/Org/Archive.org" + )) -
-(setq org-agenda-files '("/home/swarsel/Nextcloud/Org/Tasks.org"
- "/home/swarsel/Nextcloud/Org/Archive.org"
- "/home/swarsel/Nextcloud/Org/Anki.org"
- "/home/swarsel/Calendars/leon_cal.org"))
-
-(setq org-refile-targets
- '((swarsel-archive-org-file :maxlevel . 1)
- (swarsel-anki-org-file :maxlevel . 1)
- (swarsel-tasks-org-file :maxlevel . 1)))
-
-(setq org-todo-keywords
- '((sequence "TODO(t)" "NEXT(n)" "|" "DONE(d!)")
- (sequence "BACKLOG(b)" "PLAN(p)" "READY(r)" "ACTIVE(a)" "REVIEW(v)" "WAIT(w@/!)" "HOLD(h)" "|" "COMPLETED(c)" "CANC(k@)")))
-
-
-;; Configure custom agenda views
-(setq org-agenda-custom-commands
- '(("d" "Dashboard"
- ((agenda "" ((org-deadline-warning-days 7)))
- (todo "NEXT"
- ((org-agenda-overriding-header "Next Tasks")))
- (tags-todo "agenda/ACTIVE" ((org-agenda-overriding-header "Active Projects")))))
-
- ("n" "Next Tasks"
- ((todo "NEXT"
- ((org-agenda-overriding-header "Next Tasks")))))
-
- ("W" "Work Tasks" tags-todo "+work-email")
-
-
- ("w" "Workflow Status"
- ((todo "WAIT"
- ((org-agenda-overriding-header "Waiting on External")
- (org-agenda-files org-agenda-files)))
- (todo "REVIEW"
- ((org-agenda-overriding-header "In Review")
- (org-agenda-files org-agenda-files)))
- (todo "PLAN"
- ((org-agenda-overriding-header "In Planning")
- (org-agenda-todo-list-sublevels nil)
- (org-agenda-files org-agenda-files)))
- (todo "BACKLOG"
- ((org-agenda-overriding-header "Project Backlog")
- (org-agenda-todo-list-sublevels nil)
- (org-agenda-files org-agenda-files)))
- (todo "READY"
- ((org-agenda-overriding-header "Ready for Work")
- (org-agenda-files org-agenda-files)))
- (todo "ACTIVE"
- ((org-agenda-overriding-header "Active Projects")
- (org-agenda-files org-agenda-files)))
- (todo "COMPLETED"
- ((org-agenda-overriding-header "Completed Projects")
- (org-agenda-files org-agenda-files)))
- (todo "CANC"
- ((org-agenda-overriding-header "Cancelled Projects")
- (org-agenda-files org-agenda-files)))))))
-
-
-
--I wrote these capture templates to allow myself to quickly create Anki cards from within Emacs. I nearly never use this feature, but it cannot hurt to have. -
- -
-(setq org-capture-templates
- `(
- ("a" "Anki basic"
- entry
- (file+headline swarsel-org-anki-filepath "Dispatch")
- (function swarsel-anki-make-template-string))
-
- ("A" "Anki cloze"
- entry
- (file+headline org-swarsel-anki-file "Dispatch")
- "* %<%H:%M>\n:PROPERTIES:\n:ANKI_NOTE_TYPE: Cloze\n:ANKI_DECK: 🦁 All::01 ❤️ Various::00 ✨ Allgemein\n:END:\n** Text\n%?\n** Extra\n")
- ("t" "Tasks / Projects")
- ("tt" "Task" entry (file+olp swarsel-org-tasks-filepath "Inbox")
- "* TODO %?\n %U\n %a\n %i" :empty-lines 1)
- ))
-)
-
--Again, my understanding of the font-faces in Emacs is limited. This is mostly just tuned so that my org-files look acceptable. -
- -- - -;; Set faces for heading levels -(with-eval-after-load 'org-faces (dolist (face '((org-level-1 . 1.1) - (org-level-2 . 0.9) - (org-level-3 . 0.9) - (org-level-4 . 0.9) - (org-level-5 . 0.9) - (org-level-6 . 0.9) - (org-level-7 . 0.9) - (org-level-8 . 0.9))) - (set-face-attribute (car face) nil :font swarsel-alt-font :weight 'medium :height (cdr face))) - - ;; Ensure that anything that should be fixed-pitch in Org files appears that way - (set-face-attribute 'org-block nil :inherit 'fixed-pitch) - (set-face-attribute 'org-table nil :inherit 'fixed-pitch) - (set-face-attribute 'org-formula nil :inherit 'fixed-pitch) - (set-face-attribute 'org-code nil :inherit '(shadow fixed-pitch)) - (set-face-attribute 'org-verbatim nil :inherit '(shadow fixed-pitch)) - (set-face-attribute 'org-special-keyword nil :inherit '(font-lock-comment-face fixed-pitch)) - (set-face-attribute 'org-meta-line nil :inherit '(font-lock-comment-face fixed-pitch)) - (set-face-attribute 'org-checkbox nil :inherit 'fixed-pitch)) + (setq org-refile-targets + '((swarsel-archive-org-file :maxlevel . 1) + (swarsel-tasks-org-file :maxlevel . 1))) + )
This package makes emphasis-markers appear when the cursor moves over them. Very useful as I enjoy the clean look of not always seeing them, but it is annoying not to be able to edit them properly. @@ -14850,7 +14483,7 @@ This package makes emphasis-markers appear when the cursor moves over them. Very
I like org-mode buffers to be centered, as I do not find that enormous lines are of big use. @@ -14870,7 +14503,7 @@ Function definition in: Visual
There is a weird bug in org-mode that makes it so that headings were not folding correctly sometimes. This setting seems to fix it. @@ -14885,7 +14518,7 @@ There is a weird bug in org-mode that makes it so that headings were not folding
org-babel allows to run blocks in other programming languages within an org-mode buffer, similar to what e.g. jupyterhub offers for python. @@ -14896,7 +14529,7 @@ It also offers a very useful utility of exporting org-mode buffers to different
(setq org-src-preserve-indentation nil)
- (org-babel-do-load-languages
- 'org-babel-load-languages
- '((emacs-lisp . t)
- (python . t)
- (js . t)
- (shell . t)
- ))
+(org-babel-do-load-languages
+ 'org-babel-load-languages
+ '((emacs-lisp . t)
+ (python . t)
+ (js . t)
+ (shell . t)
+ ))
- (push '("conf-unix" . conf-unix) org-src-lang-modes)
+(push '("conf-unix" . conf-unix) org-src-lang-modes)
+
+(setq org-export-with-broken-links 'mark)
+(setq org-confirm-babel-evaluate nil)
+
+;; tangle is too slow, try to speed it up
+(defadvice org-babel-tangle-single-block (around inhibit-redisplay activate protect compile)
+ "inhibit-redisplay and inhibit-message to avoid flicker."
+ (let ((inhibit-redisplay t)
+ (inhibit-message t))
+ ad-do-it))
+
+(defadvice org-babel-tangle (around time-it activate compile)
+ "Display the execution time"
+ (let ((tim (current-time)))
+ ad-do-it
+ (message "org-tangle took %f sec" (float-time (time-subtract (current-time) tim)))))
- (setq org-export-with-broken-links 'mark)
- (setq org-confirm-babel-evaluate nil)
@@ -14949,7 +14596,7 @@ Usage: Type <, followed by one of the below keywords and press <
This provides several utilities for LaTeX in Emacs, including many completions and convenience functions for math-mode. @@ -14977,7 +14624,7 @@ This provides several utilities for LaTeX in Emacs, including many completions a
This package allows to download and copy images into org-mode buffers. Sadly it does not work in a very stable manner - if you copy images that are also links to another page (like is often the case in a Google image search), Emacs might crash from this. @@ -14985,27 +14632,13 @@ This package allows to download and copy images into org-mode buffers. Sadly it
-(use-package org-download
- :after org
- :defer nil
- :custom
- (org-download-method 'directory)
- (org-download-image-dir "./images")
- (org-download-heading-lvl 0)
- (org-download-timestamp "org_%Y%m%d-%H%M%S_")
- ;;(org-image-actual-width 500)
- (org-download-screenshot-method "grim -g \"$(slurp)\" %s")
- :bind
- ("C-M-y" . org-download-screenshot)
- :config
- (require 'org-download))
This package automatically toggles LaTeX-fragments in org-files. It seems to also work in markdown-files which is a nice addition, as my Obsidian notes are held in markdown. @@ -15022,7 +14655,7 @@ This package automatically toggles LaTeX-fragments in org-files. It seems to als
This just makes org-mode a little bit more beautiful, mostly by making the begin_src and end_src tags in source-blocks turn into more beautiful icons, as well as hiding #+ tags before them, as well as in the properties section of the file.
@@ -15041,7 +14674,7 @@ This just makes org-mode a little bit more beautiful, mostly by making the
Recently I have grown fond of holding presentations using Emacs :) @@ -15317,30 +14950,8 @@ Adds functions for formatting shellscripts.
-Olivetti is a mode specialized for writing prose in Emacs. I went for a very simple setup with little distractions. -
- --This mode is not automatically activated anywhere because I only rarely need it. -
- --(use-package olivetti - :init - (setq olivetti-body-width 100) - (setq olivetti-recall-visual-line-mode-entry-state t)) - --
@@ -15372,30 +14983,12 @@ This mode is not automatically activated anywhere because I only rarely need it. (define-key elfeed-search-mode-map (kbd "k") 'previous-line) (define-key elfeed-show-mode-map (kbd "S-SPC") 'scroll-down-command) --
-Darkroom is package that reduces all forms of distraction to a minimum - this can be useful when simply reading a file for example. For this mode I have increased the text scale by a large margin to make for comfortable reading -This mode is not automatically activated anywhere because I only rarely need it. -
- --(use-package darkroom - :init - (setq darkroom-text-scale-increase 3)) -
This is the ripgrep command for Emacs. @@ -15410,7 +15003,7 @@ This is the ripgrep command for Emacs.
Tree-sitter is a parsing library integrated into Emacs to provide better syntax highlighting and code analysis. It generates concrete syntax trees for source code, enabling more accurate and efficient text processing. Emacs' tree-sitter integration enhances language support, offering features like incremental parsing and precise syntax-aware editing. This improves the development experience by providing robust and dynamic syntax features, making it easier for me to navigate and manipulate code. @@ -15469,7 +15062,7 @@ In order to update the language grammars, run the next command below.
@@ -15482,7 +15075,7 @@ In order to update the language grammars, run the next command below.
avy provides the ability to search for any character on the screen (not only in the current buffer!) - I enjoy this utility a lot and use it possibly even more often than the native vim commands.
@@ -15496,27 +15089,12 @@ In order to update the language grammars, run the next command below.
:config
(setq avy-all-windows 'all-frames))
-
-
-With this it is possible to work on the same file collaboratively. I have never tried it out, but it sounds cool. -
- --(use-package crdt) -
devdocs is a very nice package that provides documentation from https:devdocs.io. This is very useful since e.g. pyright provides only a very bad documentation and I do not want to leave Emacs all the time just to read documentation.
@@ -15552,7 +15130,7 @@ To install a documentation, use the devdocs=install command and sel
projectile is useful for keeping track of your git projects within Emacs. I mostly use it to quickly switch between projects. @@ -15569,7 +15147,7 @@ projectile is useful for keeping track of your git projects within Emacs. I most :init ;; NOTE: Set this to the folder where you keep your Git repos! (when (file-directory-p swarsel-projects-directory) - (setq projectile-project-search-path (list swarsel-projects-directory))) + (setq projectile-project-search-path (list swarsel-work-projects-directory swarsel-private-projects-directory))) (setq projectile-switch-project-action #'magit-status)) @@ -15577,7 +15155,7 @@ projectile is useful for keeping track of your git projects within Emacs. I most
magit is the best git utility I have ever used - it has a beautiful interface and is very verbose. Here I mostly just setup the list of repositories that I want to expost to magit. @@ -15591,9 +15169,8 @@ Also, Emacs needs a little extra love to accept my Yubikey for git commits etc.
(use-package magit
:config
- (setq magit-repository-directories `((,swarsel-projects-directory . 1)
- (,swarsel-emacs-directory . 0)
- (,swarsel-obsidian-directory . 0)
+ (setq magit-repository-directories `((,swarsel-work-projects-directory . 1)
+ (,swarsel-private-projects-directory . 1)
("~/.dotfiles/" . 0)))
:custom
(magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1)) ; stay in the same window
@@ -15602,7 +15179,7 @@ Also, Emacs needs a little extra love to accept my Yubikey for git commits etc.
The following settings are needed to make sure emacs works for magit commits and pushes. It is not a beautiful solution since commiting uses pinentry-emacs and pushing uses pinentry-gtk2, but it works for now at least. @@ -15622,7 +15199,7 @@ The following settings are needed to make sure emacs works for magit commits and
NOTE: Make sure to configure a GitHub token before using this package! @@ -15638,9 +15215,7 @@ NOTE: Make sure to configure a GitHub token before using this package!
(1) in practice: github -<> settings -<> developer option -<> create classic token with repo; user; read:org permissions -(2) install GnuGP (and add to PATH) -(3) create ~/.authinfo.gpg with the following info scheme: -machine api.github.com login USERNAMEforge password 012345abcdef… +(2)machine api.github.com login USERNAMEforge password 012345abcdef…
@@ -15651,16 +15226,13 @@ machine api.github.com login USERNAMEforge password 012345abcdef (with-eval-after-load 'forge (add-to-list 'forge-alist - '("sgit.iue.tuwien.ac.at" - "sgit.iue.tuwien.ac.at/api/v1" - "sgit.iue.tuwien.ac.at" - forge-gitea-repository))) + ))This is just a nice utility to browse different versions of a file of a git project within Emacs. @@ -15677,7 +15249,7 @@ This is just a nice utility to browse different versions of a file of a git proj
Complimentary to the delimiters-packages above, this package sets the background color of the delimiters, which makes it easier to see at a glance where we are in a delimiter-tree. @@ -15736,7 +15308,7 @@ Complimentary to the delimiters-packages above, this package sets the background
This is the company equivalent to the vertico gang.
@@ -15753,12 +15325,6 @@ Navigation functions defined here:
-;; (use-package corfu
-;; :custom
-;; (corfu-cycle t)
-;; :init
-;; (global-corfu-mode))
-
(use-package corfu
:init
(global-corfu-mode)
@@ -15767,7 +15333,7 @@ Navigation functions defined here:
cape adds even more completion capabilities by adding a lot of completion logic that is exposed as separate functions. I tried out adding these to the completion-at-points-functions alist, but I felt like it cluttered my suggestions too much. Hence I now just call the respective functions when I need them. For this I setup the C-z keybinding in General evil.
@@ -15836,22 +15402,6 @@ I leave the commented out alist extensions here in case I want to try them out a
("C-z ^" . cape-tex)
("C-z &" . cape-sgml)
("C-z r" . cape-rfc1345)
- ;; Add to the global default value of `completion-at-point-functions' which is
- ;; used by `completion-at-point'. The order of the functions matters, the
- ;; first function returning a result wins. Note that the list of buffer-local
- ;; completion functions takes precedence over the global list.
- ;; (add-to-list 'completion-at-point-functions #'cape-dabbrev)
- ;; (add-to-list 'completion-at-point-functions #'cape-file)
- ;; (add-to-list 'completion-at-point-functions #'cape-elisp-block)
- ;; (add-to-list 'completion-at-point-functions #'cape-history)
- ;; (add-to-list 'completion-at-point-functions #'cape-keyword)
- ;; (add-to-list 'completion-at-point-functions #'cape-tex)
- ;; (add-to-list 'completion-at-point-functions #'cape-sgml)
- ;; (add-to-list 'completion-at-point-functions #'cape-rfc1345)
- ;; (add-to-list 'completion-at-point-functions #'cape-abbrev)
- ;; (add-to-list 'completion-at-point-functions #'cape-dict)
- ;; (add-to-list 'completion-at-point-functions #'cape-elisp-symbol)
- ;; (add-to-list 'completion-at-point-functions #'cape-line)
)
@@ -15859,7 +15409,7 @@ I leave the commented out alist extensions here in case I want to try them out a
This sets up rustic-mode with tree-sitter support - there is still one issue to iron out with automatic adding of dependency crates, but everything else works fine now. @@ -15886,7 +15436,7 @@ This sets up rustic-mode with tree-sitter support - there is still one issue to
Tramp allows for SSH access of files over Emacs. I have no ideas what the options here mean, but this is a recommended configuration that I found (sadly I lost the link). I need to research more what these options really do. @@ -15926,7 +15476,7 @@ Tramp allows for SSH access of files over Emacs. I have no ideas what the option
This is a simple highlighting utility that uses the margin to visually show the differences since the last git commit. @@ -15948,7 +15498,7 @@ This is a simple highlighting utility that uses the margin to visually show the
This package allows for swift commenting out and in of code snippets. For some reason, it is a bit broken in my config, as it sometimes comments out too much, sometimes too little, and sometimes it splits lines during commenting. Also, in org-mode when inside a src-block, it often times jumps to the top of the block. @@ -15967,94 +15517,8 @@ Still, this is avery convenient package.
-yasnippet allows to define snippets that can be quickly expanded by hitting the TAB key after inputting a keyword.
-
-I used to run this together with the yasnippet-snippets package, but the snippets in there I did not find all too useful for myself. I need to create some custom snippets here one day.
-
-(use-package yasnippet - :init (yas-global-mode 1) - :config - (yas-reload-all)) - --
-The following block is mostly inspired from https://code.kulupu.party/thesuess/WTFmacs/ and sets up a few prefixes that make LaTeX-math-mode nicer to use even with auctex and cape enabled. -
- -
-
-(setq wtf/latex-mathbb-prefix "''")
-(setq swarsel/latex-mathcal-prefix "``")
-
-(use-package yasnippet
- :config
-
- (setq wtf/english-alphabet
- '("a" "b" "c" "d" "e" "f" "g" "h" "i" "j" "k" "l" "m" "n" "o" "p" "q" "r" "s" "t" "u" "v" "w" "x" "y" "z"))
-
- (dolist (elem wtf/english-alphabet)
- (when (string-equal elem (downcase elem))
- (add-to-list 'wtf/english-alphabet (upcase elem))))
-
-
- (yas-define-snippets
- 'latex-mode
- (mapcar
- (lambda (elem)
- (list (concat wtf/latex-mathbb-prefix elem) (concat "\\mathbb{" elem "}") (concat "Mathbb letter " elem)))
- wtf/english-alphabet))
-
- (yas-define-snippets
- 'latex-mode
- (mapcar
- (lambda (elem)
- (list (concat swarsel/latex-mathcal-prefix elem) (concat "\\mathcal{" elem "}") (concat "Mathcal letter " elem)))
- wtf/english-alphabet))
-
- (setq swtf/latex-math-symbols
- '(("x" . "\\times")
- ("*" . "\\cdot")
- ("." . "\\ldots")
- ("op" . "\\operatorname{$1}$0")
- ("o" . "\\circ")
- ("V" . "\\forall")
- ("v" . "\\vee")
- ("w" . "\\wedge")
- ("q" . "\\quad")
- ("f" . "\\frac{$1}{$2}$0")
- ("s" . "\\sum_{$1}^{$2}$0")
- ("p" . "\\prod_{$1}^{$2}$0")
- ("e" . "\\exists")
- ("i" . "\\int_{$1}^{$2}$0")
- ("c" . "\\cap")
- ("u" . "\\cup")
- ("0" . "\\emptyset")))
-
- )
-
-
-
-
After having tried out lsp-mode and lsp-bridge for a while each, I must say that eglot feels the most clean and fast to me.
@@ -16066,7 +15530,7 @@ After having tried out lsp-mode and lsp-bridge for a w
(use-package eglot
:config
(add-to-list 'eglot-server-programs
- '(yaml-ts-mode . ("ansible-language-server" "--stdio")))
+ '(yaml-ts-mode . ("ansible-language-server" "--stdio")))
:hook
((python-mode
python-ts-mode
@@ -16109,7 +15573,7 @@ After having tried out lsp-mode and lsp-bridge for a w
This brings back warnings and errors on the sideline for eglot; a feature that I have been missing from lsp-mode for a while. @@ -16121,32 +15585,15 @@ This brings back warnings and errors on the sideline for eglot; a feature that I :hook (flymake-mode . sideline-mode) :init (setq sideline-flymake-display-mode 'point) ; 'point to show errors only on point - ; 'line to show errors on the current line + ; 'line to show errors on the current line (setq sideline-backends-right '(sideline-flymake))) - -
-This simple shows the path to the current file on the top of the buffer - I just think it looks kind of neat, even though it is not extremely useful :) -
- --(use-package breadcrumb - ;; :config (breadcrumb-mode) - ) -
This setting ensures that hard links are preserved during the backup process, which is useful for maintaining the integrity of files that are linked in multiple locations. @@ -16161,7 +15608,7 @@ This setting ensures that hard links are preserved during the backup process, wh
Dirvish is an improvement upon the dired-framework and has more features like file preview etc. Sadly it has an incompatibility with openwith which is why I have disabled that package.
@@ -16220,46 +15667,12 @@ Dirvish is an improvement upon the dired-framework and has more features like fi
("M-e" . dirvish-emerge-menu)
("M-j" . dirvish-fd-jump)))
-
-
-This enables pdf-previewing in dirvish and gives a much better pdf-viewer than is shipped normally by emacs. -
- -
-;; (use-package pdf-tools
-;; :init
-;; (if (not (boundp 'pdf-tools-directory))
-;; (pdf-tools-install))
-;; :mode ("\\.pdf" . pdf-view-mode))
-
-
--This is a jupyter client. Using it is a bit cumbersome though, so I have not fully explored all features. -
- --(use-package ein) -
Base emacs undo logic is very useful, but not easy to understand for me. I prefer undo-tree, which makes switching between branches easier and also allows quickly switching back to a much older state using the visualizer. @@ -16289,16 +15702,12 @@ While we are at it, we are also setting up a persistent undo-file for every file :config (setq undo-tree-history-directory-alist '(("." . "~/.emacs.d/undo")))) -;; (add-hook 'prog-mode-hook 'undo-tree-mode) -;; (add-hook 'text-mode-hook 'undo-tree-mode) -;; (add-hook 'org-mode-hook 'undo-tree-mode) -;; (add-hook 'latex-mode-hook 'undo-tree-mode)
Hydra allows for the writing of macro-style functions. I have not yet looked into this all too much, but it seems to be a potent feature. @@ -16312,7 +15721,7 @@ Hydra allows for the writing of macro-style functions. I have not yet looked int
I only wrote this in order to try out hydra; rarely do I really need this. However, it can be useful for Presentations. It simply scales the text size. @@ -16333,185 +15742,12 @@ I only wrote this in order to try out hydra; rarely do I really need this. Howev
-This provides an interface to Obsidian for Emacs - as much as I want to like it, I actually enjoy using the official Obsidian app more - even though that cannot be used by Emacs directly. -
- --My workflow for Obsidian is now as follows: -
- --look at them in the official client -
- --I hope that this package will improve, then I will come back to it one day. -
-;; (use-package obsidian
-;; :ensure t
-;; :demand t
-;; :config
-;; (obsidian-specify-path swarsel-obsidian-vault-directory)
-;; (global-obsidian-mode t)
-;; :custom
-;; ;; This directory will be used for `obsidian-capture' if set.
-;; (obsidian-inbox-directory "Inbox")
-;; (bind-key (kbd "C-c M-o") 'obsidian-hydra/body 'obsidian-mode-map)
-;; :bind (:map obsidian-mode-map
-;; ;; Replace C-c C-o with Obsidian.el's implementation. It's ok to use another key binding.
-;; ("C-c C-o" . obsidian-follow-link-at-point)
-;; ;; Jump to backlinks
-;; ("C-c C-b" . obsidian-backlink-jump)
-;; ;; If you prefer you can use `obsidian-insert-link'
-;; ("C-c C-l" . obsidian-insert-wikilink)))
-
-
--This section is here to make Anki usable from within Emacs - an endeavour that I have mostly given up on. -
-
-;; (use-package anki-editor
-;; :after org
-;; :bind (:map org-mode-map
-;; ("<f12>" . anki-editor-cloze-region-auto-incr)
-;; ("<f11>" . anki-editor-cloze-region-dont-incr)
-;; ("<f10>" . anki-editor-reset-cloze-number)
-;; ("<f9>" . anki-editor-push-tree))
-;; :hook (org-capture-after-finalize . anki-editor-reset-cloze-number) ; Reset cloze-number after each capture.
-;; :config
-;; (setq anki-editor-create-decks t ;; Allow anki-editor to create a new deck if it doesn't exist
-;; anki-editor-org-tags-as-anki-tags t)
-
-;; (defun anki-editor-cloze-region-auto-incr (&optional arg)
-;; "Cloze region without hint and increase card number."
-;; (interactive)
-;; (anki-editor-cloze-region swarsel-anki-editor-cloze-number "")
-;; (setq swarsel-anki-editor-cloze-number (1+ swarsel-anki-editor-cloze-number))
-;; (forward-sexp))
-;; (defun anki-editor-cloze-region-dont-incr (&optional arg)
-;; "Cloze region without hint using the previous card number."
-;; (interactive)
-;; (anki-editor-cloze-region (1- swarsel-anki-editor-cloze-number) "")
-;; (forward-sexp))
-;; (defun anki-editor-reset-cloze-number (&optional arg)
-;; "Reset cloze number to ARG or 1"
-;; (interactive)
-;; (setq swarsel-anki-editor-cloze-number (or arg 1)))
-;; (defun anki-editor-push-tree ()
-;; "Push all notes under a tree."
-;; (interactive)
-;; (anki-editor-push-notes '(4))
-;; (anki-editor-reset-cloze-number))
-;; ;; Initialize
-;; (anki-editor-reset-cloze-number)
-;; )
-
-;; (require 'anki-editor)
-
-
--;; (defvar swarsel-anki-deck nil) -;; (defvar swarsel-anki-notetype nil) -;; (defvar swarsel-anki-fields nil) - -;; (defun swarsel-anki-set-deck-and-notetype () -;; (interactive) -;; (setq swarsel-anki-deck (completing-read "Choose a deck: " -;; (sort (anki-editor-deck-names) #'string-lessp))) -;; (setq swarsel-anki-notetype (completing-read "Choose a note type: " -;; (sort (anki-editor-note-types) #'string-lessp))) -;; (setq swarsel-anki-fields (progn -;; (anki-editor--anki-connect-invoke-result "modelFieldNames" `((modelName . ,swarsel-anki-notetype))))) -;; ) - -;; (defun swarsel-anki-make-template-string () -;; (if (not swarsel-anki-deck) -;; (call-interactively 'swarsel-anki-set-deck-and-notetype)) -;; (setq swarsel-temp swarsel-anki-fields) -;; (concat (concat "* %<%H:%M>\n:PROPERTIES:\n:ANKI_NOTE_TYPE: " swarsel-anki-notetype "\n:ANKI_DECK: " swarsel-anki-deck "\n:END:\n** ")(pop swarsel-temp) "\n%?\n** " (mapconcat 'identity swarsel-temp "\n\n** ") "\n\n")) - -;; (defun swarsel-today() -;; (format-time-string "%Y-%m-%d")) - -;; (defun swarsel-obsidian-daily () -;; (interactive) -;; (if (not (file-exists-p (expand-file-name (concat (swarsel-today) ".md") swarsel-obsidian-daily-directory))) -;; (write-region "" nil (expand-file-name (concat (swarsel-today) ".md") swarsel-obsidian-daily-directory)) -;; ) -;; (find-file (expand-file-name (concat (swarsel-today) ".md") swarsel-obsidian-daily-directory))) - --
-This seems not to be needed - I do not yet dare to delete it though. -
- --;; (let ((mu4epath -;; (concat -;; (f-dirname -;; (file-truename -;; (executable-find "mu"))) -;; "/../share/emacs/site-lisp/mu4e"))) -;; (when (and -;; (string-prefix-p "/nix/store/" mu4epath) -;; (file-directory-p mu4epath)) -;; (add-to-list 'load-path mu4epath))) - --
In this section we are setting up mu4e, a mail client for emacs using mu with mbsync as backend. The mail accounts themselves are setup in the NixOS configuration, so we only need to add Emacs specific settings here.
@@ -16573,7 +15809,7 @@ The hook functions are defined here:
-
This adds the simple utility of sending desktop notifications whenever a new mail is received. I am using 4.4.43.3. mu4e-alert
+4.4.35.2. mu4e-alert
libnotify because I want to use this with notify-send.
@@ -16594,7 +15830,7 @@ This adds the simple utility of sending desktop notifications whenever a new mai
This provides a beautiful calender to emacs. @@ -16662,7 +15898,7 @@ Yes, I am aware that I am exposing my university-calendar to the public here. I
This sets up the dashboard, which is really quite useless. But, it looks cool and makes me happy whenever I start an emacsclient without a file name as argument :)
@@ -16735,131 +15971,38 @@ This sets up the dashboard, which is really quite useless. But, it
(use-package vterm
- :ensure t)
+ :ensure t)
-(defun sudo-find-file (file-name)
-"Like find file, but opens the file as root."
-(interactive "FSudo Find File: ")
-(let ((tramp-file-name (concat "/sudo::" (expand-file-name file-name))))
- (find-file tramp-file-name)))
-;;; vterm/config.el -*- lexical-binding: t; -*-
-
- ;; Original functions overwrites tramp path with a guessed path.
- ;; However it breaks if remote fqdn/hostname is not resolvale by local machine
- ;; could also break on port forwarding, multihops,
- ;; custom protocol such as: docker, vagrant, ...
- ;; *if* you try to shell-side configure them.
- ;; Easily testable with vagrant ssh port on localhost.
- ;; My workflow is to open a tramp dired on / of the remote to get a
- ;; "foothold" then open vterms from there.
- (defun vterm--get-directory (path)
- "[OVERLOADED] Get normalized directory to PATH."
- (when path
- (let (directory)
- (if (string-match "^\\(.*?\\)@\\(.*?\\):\\(.*?\\)$" path)
- (progn
- (let ((user (match-string 1 path))
- (host (match-string 2 path))
- (dir (match-string 3 path)))
- (if (and (string-equal user user-login-name)
- (string-equal host (system-name)))
- (progn
- (when (file-directory-p dir)
- (setq directory (file-name-as-directory dir))))
- (setq directory
- ;; Bellow is what i altered
- (file-name-as-directory (concat (file-remote-p default-directory) dir))))))
- (when (file-directory-p path)
- (setq directory (file-name-as-directory path))))
- directory)))
- ;; Injects the payload to the vterm buffer.
- (defun me/vterm-load-config ()
- "Pass local configuration files to vterm.
-
-Allows remote vterm to be shell-side configured,
-without altering remote config.
-Also adds my personal configuration that does not rely
-too much on external packages.
-Prints a reasuring message to proove good faith."
- (interactive)
- (let (;; Bellow messages to reassure other users that look at history
- (reasuring-message (format "Configuring shell of user %s to be emacs comptible"
- user-full-name))
- (reasuring-notice "This action is shell local, it will not affect other shells")
- ;; Bellow lies my configuration
- (basic-func-script (f-read-text (concat (getenv "HOME")
- "/.emacs.d/shells/sources/functions.sh")))
- ;; Bellow lies the vterm shell-side configuration
- ;; Must be sourced last
- (vterm-func-script (f-read-text (concat
- (file-name-directory (find-library-name "vterm"))
- "/etc/emacs-vterm-bash.sh"))))
- (vterm-insert (format "# START: %s\n" reasuring-message))
- (vterm-insert (format "# %s\n" reasuring-notice))
- ;; Create one single block in history
- (vterm-insert "{\n")
- (vterm-insert basic-func-script)
- (vterm-insert vterm-func-script)
- (vterm-insert "}\n")
- ;; End the single block in history
- (vterm-insert (format "# %s\n" reasuring-notice))
- (vterm-insert (format "# STOP: %s\n" reasuring-message))
- )
- )
-
- ;; find-file-other-window does not works great on remote:
- ;; if given an absolute path on a remote host,
- ;; the path will be understood as a local file since no
- ;; tramp prefix is present, and bash does not care
- ;; about tramp prefixes.
- ;; Bellow we solve context before sending it to
- ;; ffow
- (defun me/vterm--find-file-other-window-wrapper (file)
- "Help vterm find a FILE."
- (find-file-other-window (me/vterm--ffow-resolver file)))
- (defun me/vterm--ffow-resolver (file)
- "Help vterm resolve FILE."
- (cond
- ;; "/sudo::"
- ;; doom--sudo-file-path do the trick for us
- ((s-starts-with-p "/sudo::" file)
- (sudo-find-file
- (concat (file-remote-p default-directory)
- (substring-no-properties file 7))))
- ;; "/" means we want the "Relative root"
- ;; try appending the remote prefix if relevent
- ((s-starts-with-p "/" file)
- (concat (file-remote-p default-directory) file))
- ;; we got a relative path
- ;; we don't need to help ffow to find it
- (t
- file)))
-
- ;; The variable vterm-eval-cmds is a SERIOUSLY SENSIBLE variable !
- ;; Do not be the guy that adds RCE into their config !
-
- ;; Allow customed ffow to be called from vterm
- ;; ffow should be as safe as find-file which is already trusted
- ;; we append our resolver that only manipulate strings,
- ;; Proove me wrong but i think it's safe.
- (add-to-list 'vterm-eval-cmds '("find-file-other-window"
- me/vterm--find-file-other-window-wrapper))
(use-package multiple-cursors) ++
+(setq mu4e--log-max-size 1000) +(setq message-log-max 30) +(setq comint-buffer-maximum-size 50) +(add-hook 'comint-output-filter-functions 'comint-truncate-buffer) +
-enable = true;
+enable = true;
base16Scheme = "${self}/wallpaper/swarsel.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
polarity = "dark";
@@ -16922,7 +16064,6 @@ fonts = {
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};
-
sansSerif = {
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
package = pkgs.cantarell-fonts;
@@ -16931,27 +16072,23 @@ fonts = {
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};
-
monospace = {
package = pkgs.nerd-fonts.fira-mono; # has overrides
-
name = "FiraCode Nerd Font Mono";
};
-
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
-
This section now holds some of the configuration files that cannot be defined directly within NixOS configuration. These files are usually symlinked using home.file.
This file defines a few workflows that I often need to run when working on my configuration. This works similar to make, but is geared towards general tasks and as such requires no extra handling (as long as there are no dependencies involved) or .PHONY recipes.
default:
- @just --list
+@just --list
check:
- nix flake check --keep-going
+nix flake check --keep-going
check-trace:
- nix flake check --show-trace
+nix flake check --show-trace
update:
- nix flake update
+nix flake update
iso:
- rm -rf result
- nix build .#nixosConfigurations.iso.config.system.build.isoImage && ln -sf result/iso/*.iso latest.iso
+rm -rf result
+nix build .#nixosConfigurations.iso.config.system.build.isoImage && ln -sf result/iso/*.iso latest.iso
iso-flake FLAKE SYSTEM="x86_64" FORMAT="iso":
- nixos-generate --flake .#{{FLAKE}} -f {{FORMAT}} --system {{SYSTEM}}
+nixos-generate --flake .#{{FLAKE}} -f {{FORMAT}} --system {{SYSTEM}}
iso-install DRIVE: iso
- sudo dd if=$(eza --sort changed result/iso/*.iso | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
+sudo dd if=$(eza --sort changed result/iso/*.iso | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
dd DRIVE ISO:
- sudo dd if=$(eza --sort changed {{ISO}} | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
+sudo dd if=$(eza --sort changed {{ISO}} | tail -n1) of={{DRIVE}} bs=4M status=progress oflag=sync
sync USER HOST:
- rsync -av --filter=':- .gitignore' -e "ssh -l {{USER}}" . {{USER}}@{{HOST}}:.dotfiles/
+rsync -av --filter=':- .gitignore' -e "ssh -l {{USER}}" . {{USER}}@{{HOST}}:.dotfiles/
This file is used to tell statix which checks and folders/fiels to ignore, as well as to specify the nix version that it should use.
repeated_keys check, which checks
disabled = [ - "repeated_keys" +"repeated_keys" ] nix_version = '2.4' ignore = ['.direnv'] @@ -17511,7 +16648,7 @@ ignore = ['.direnv']