refactor: consolidate Nix.org and Emacs.org

The configuration options that used to be stored in Emacs.org and
Nix.org are now no longer split into two files. Instead, there now
is a single file SwarselSystems.org that holds both these configs.
This commit is contained in:
Swarsel 2024-06-20 16:18:07 +02:00
parent bc8c52554d
commit 0e7daf0d13
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
24 changed files with 17061 additions and 8348 deletions

8
.github/README.md vendored
View file

@ -23,10 +23,10 @@ That being said, there is a lot of general configuration that you *probably* can
The files that are possibly of biggest interest are found here: The files that are possibly of biggest interest are found here:
- [SwarselSystems.org](../SwarselSystems.org)
- [flake.nix](../flake.nix) - [flake.nix](../flake.nix)
- [Nix.org](../Nix.org)
- [early-init.el](../programs/emacs/early-init.el) - [early-init.el](../programs/emacs/early-init.el)
- [Emacs.org](../Emacs.org) - [init](../programs/emacs/init.el)
This is a nix flakes based setup that manages multiple hosts, including mixed (NixOS with home-manager as a submodule) as well as standalone home-manager machines, also using some overlays etc. There even is a configuration for an Android build. It is all wrapped in literal configuration .org files, because that allows me to have easy access without actually having to remember where the specific configuration files are all located. early-init.el is not tangled for the reason that adding it would break the emacs-overlay parsing. This is a nix flakes based setup that manages multiple hosts, including mixed (NixOS with home-manager as a submodule) as well as standalone home-manager machines, also using some overlays etc. There even is a configuration for an Android build. It is all wrapped in literal configuration .org files, because that allows me to have easy access without actually having to remember where the specific configuration files are all located. early-init.el is not tangled for the reason that adding it would break the emacs-overlay parsing.
@ -52,9 +52,9 @@ Below is a rough general guide to setup this system on a new NixOS host. **Again
For a pure Home-Manager configuration, you need a few different steps. The biggest change is that you then want to call `home-manager --flake .#<your-username>@<your-hostname> switch` as the last step instead of `nixos-rebuild [...]`. A complete general guide for that case cannot really be given since you are most likely setting up the flake on a existing machine that already has a lot of configuration. If you are setting up a new system, I would recommend to use NixOS unless circumstances force you to use something else. For a pure Home-Manager configuration, you need a few different steps. The biggest change is that you then want to call `home-manager --flake .#<your-username>@<your-hostname> switch` as the last step instead of `nixos-rebuild [...]`. A complete general guide for that case cannot really be given since you are most likely setting up the flake on a existing machine that already has a lot of configuration. If you are setting up a new system, I would recommend to use NixOS unless circumstances force you to use something else.
###### To do that: ###### To do that:
1) adapt [Nix.org](../Nix.org) 1) adapt [SwarselSystems.org](../SwarselSystems.org)
1) adapt system specific options: 1) adapt system specific options:
- Make a copy of "System Specific Configurations/TEMPLATE". - Make a copy of "System/System Specific Configurations/TEMPLATE".
- Adapt all references to TEMPLATE to your host- and usernames etc - pay special attention to the header lines in each nix source block, i.e. the "#+begin_src nix [...] :tangle profiles/TEMPLATE/[...]" lines. - Adapt all references to TEMPLATE to your host- and usernames etc - pay special attention to the header lines in each nix source block, i.e. the "#+begin_src nix [...] :tangle profiles/TEMPLATE/[...]" lines.
- Add the settings needed for your specific machine. - Add the settings needed for your specific machine.

4076
Emacs.html

File diff suppressed because it is too large Load diff

3243
Emacs.org

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -62,6 +62,9 @@ This requires changes in multiple locations. As an example we will use an early
* Build a firefox addon * Build a firefox addon
1) app id can be found in the manifest.json file of the .xpi (.xpi is just a normal archive)
2) url can be found by copy url of the "add extension" button on the addon page
3) the rest of the information is also found in the manifest.json, but might not be needed
#+begin_src nix configuration.nix #+begin_src nix configuration.nix
programs.firefox = { programs.firefox = {
@ -159,3 +162,28 @@ This requires changes in multiple locations. As an example we will use an early
* Patch a utilty for nix paths: * Patch a utilty for nix paths:
See https://drakerossman.com/blog/how-to-patch-a-package-source-on-nixos See https://drakerossman.com/blog/how-to-patch-a-package-source-on-nixos
* let-block for overriding a package in nixpkgs (here: replacing airsonic with airsonic-advanced)
This can be useful if a module does not let you use your own package yourself.
#+begin_src nix :tangle no
pkgs = import nixpkgs { inherit system;
overlays = [ emacs-overlay.overlay
nur.overlay
nixgl.overlay
(self: super: {
airsonic = super.airsonic.overrideAttrs (_: rec {
version = "11.0.2-kagemomiji";
name = "airsonic-advanced-${version}";
src = super.fetchurl {
url = "https://github.com/kagemomiji/airsonic-advanced/releases/download/11.0.2/airsonic.war";
sha256 = "PgErtEizHraZgoWHs5jYJJ5NsliDd9VulQfS64ackFo=";
};
});
})
];
config.allowUnfree = true;
};
#+end_src

22
flake.lock generated
View file

@ -917,27 +917,6 @@
"type": "github" "type": "github"
} }
}, },
"pia": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1687263775,
"narHash": "sha256-sSVNT3o+4RcdnUqdVloPc3UvM3LancTY6htyzAHrC0w=",
"ref": "development",
"rev": "190f8040cc4837fb6b3c43032711e1536ef2270b",
"revCount": 10,
"type": "git",
"url": "https://git.sr.ht/~rprospero/nixos-pia"
},
"original": {
"ref": "development",
"type": "git",
"url": "https://git.sr.ht/~rprospero/nixos-pia"
}
},
"pre-commit-hooks-nix": { "pre-commit-hooks-nix": {
"inputs": { "inputs": {
"flake-compat": [ "flake-compat": [
@ -983,7 +962,6 @@
"nixpkgs": "nixpkgs_5", "nixpkgs": "nixpkgs_5",
"nixpkgs-mautrix-signal": "nixpkgs-mautrix-signal", "nixpkgs-mautrix-signal": "nixpkgs-mautrix-signal",
"nur": "nur", "nur": "nur",
"pia": "pia",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"stylix": "stylix" "stylix": "stylix"
} }

View file

@ -26,7 +26,7 @@
# provides GL to non-NixOS hosts # provides GL to non-NixOS hosts
nixgl.url = github:guibou/nixGL; nixgl.url = github:guibou/nixGL;
# manages all themeing using Home-Manager # manages all theming using Home-Manager
stylix.url = github:danth/stylix; stylix.url = github:danth/stylix;
# nix secrets management # nix secrets management
@ -47,12 +47,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# privateinternetaccess nixos integration - not sure if I will keep using
pia = {
url = "git+https://git.sr.ht/~rprospero/nixos-pia?ref=development";
inputs.nixpkgs.follows = "nixpkgs";
};
# provides expressions for mautrix-signal # provides expressions for mautrix-signal
nixpkgs-mautrix-signal ={ nixpkgs-mautrix-signal ={
url = github:niklaskorz/nixpkgs/nixos-23.11-mautrix-signal; url = github:niklaskorz/nixpkgs/nixos-23.11-mautrix-signal;
@ -88,7 +82,6 @@
stylix, stylix,
sops-nix, sops-nix,
lanzaboote, lanzaboote,
pia,
nixpkgs-mautrix-signal, nixpkgs-mautrix-signal,
nix-gaming, nix-gaming,
nixos-hardware, nixos-hardware,
@ -255,7 +248,6 @@
specialArgs = {inherit inputs pkgs; }; specialArgs = {inherit inputs pkgs; };
modules = [ modules = [
sops-nix.nixosModules.sops sops-nix.nixosModules.sops
pia.nixosModule
./profiles/server1/transmission/nixos.nix ./profiles/server1/transmission/nixos.nix
]; ];
}; };
@ -345,14 +337,6 @@
packages.x86_64-linux = { packages.x86_64-linux = {
proxmox-lxc = nixos-generators.nixosGenerate {
inherit system;
modules = [
./profiles/server1/TEMPLATE/nixos.nix
];
format = "proxmox-lxc";
};
}; };
}; };

12574
index.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -126,14 +126,11 @@
startup = [ startup = [
{ command = "nextcloud --background";} { command = "nextcloud --background";}
# { command = "spotify";}
{ command = "discord --start-minimized";} { command = "discord --start-minimized";}
# { command = "element-desktop --hidden";}
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";} { command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
{ command = "ANKI_WAYLAND=1 anki";} { command = "ANKI_WAYLAND=1 anki";}
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";} { command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
{ command = "nm-applet";} { command = "nm-applet";}
# { command = "sleep 60 && syncthingtray --wait"; }
]; ];
}; };

View file

@ -32,7 +32,6 @@
stylix.image = ../../wallpaper/TEMPLATEwp.png; stylix.image = ../../wallpaper/TEMPLATEwp.png;
stylix = { stylix = {
base16Scheme = ../../wallpaper/swarsel.yaml; base16Scheme = ../../wallpaper/swarsel.yaml;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";

View file

@ -153,7 +153,7 @@
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
# cura # cura
(let cura5 = appimageTools.wrapType2 rec { (let cura5 = appimageTools.wrapType2 rec {
name = "cura5"; name = "cura5";
version = "5.4.0"; version = "5.4.0";
@ -291,17 +291,6 @@
''; '';
}) })
# (pkgs.writeShellApplication {
# name = "cdr";
# runtimeInputs = [ pkgs.fzf ];
# text = ''
# cdr () {
# cd "$( (find /home/swarsel/Documents/GitHub -maxdepth 1 && echo /home/swarsel/.dotfiles) | fzf )"
# }
# cdr
# '';
# })
(pkgs.writeShellApplication { (pkgs.writeShellApplication {
name = "bak"; name = "bak";
text = '' text = ''
@ -311,26 +300,15 @@
]; ];
# MIGHT NEED TO ENABLE THIS ON SURFACE!!
sops.defaultSopsFile = "${config.home.homeDirectory}/.dotfiles/secrets/general/secrets.yaml"; sops.defaultSopsFile = "${config.home.homeDirectory}/.dotfiles/secrets/general/secrets.yaml";
sops.validateSopsFiles = false; sops.validateSopsFiles = false;
# sops.age.keyFile = "${config.home.homeDirectory}/.ssh/key.txt";
# This will generate a new key if the key specified above does not exist
# sops.age.generateKey = true;
# sops.gnupg.home = "/home/swarsel/.dotfiles/secrets/keys";
# since we are using the home-manager implementation, we need to specify the runtime path for each secret # since we are using the home-manager implementation, we need to specify the runtime path for each secret
sops.secrets.mrswarsel = {path = "/run/user/1000/secrets/mrswarsel";}; sops.secrets.mrswarsel = {path = "/run/user/1000/secrets/mrswarsel";};
sops.secrets.nautilus = {path = "/run/user/1000/secrets/nautilus";}; sops.secrets.nautilus = {path = "/run/user/1000/secrets/nautilus";};
sops.secrets.leon = {path = "/run/user/1000/secrets/leon";}; sops.secrets.leon = {path = "/run/user/1000/secrets/leon";};
sops.secrets.swarselmail = {path = "/run/user/1000/secrets/swarselmail";}; sops.secrets.swarselmail = {path = "/run/user/1000/secrets/swarselmail";};
sops.secrets.caldav = {path = "${config.home.homeDirectory}/.emacs.d/.caldav";}; sops.secrets.caldav = {path = "${config.home.homeDirectory}/.emacs.d/.caldav";};
# sops.secrets.leon = { };
# sops.secrets.nautilus = { };
# sops.secrets.mrswarsel = { };
programs.ssh= { programs.ssh= {
enable = true; enable = true;
@ -465,33 +443,6 @@ programs.ssh= {
stylix.targets.emacs.enable = false; stylix.targets.emacs.enable = false;
# fonts.fontconfig.enable = true;
# gtk = {
# enable = true;
# theme = {
# name = "Arc-Dark";
# package = pkgs.arc-theme;
# };
# cursorTheme = {
# name = "capitaine-cursors";
# package = pkgs.capitaine-cursors;
# };
# gtk3.extraConfig = {
# Settings = ''
# gtk-application-prefer-dark-theme=1
# '';
# };
# gtk4.extraConfig = {
# Settings = ''
# gtk-application-prefer-dark-theme=1
# '';
# };
# };
xdg.desktopEntries = { xdg.desktopEntries = {
cura = { cura = {
@ -518,8 +469,6 @@ xdg.desktopEntries = {
# categories = [ "Application"]; # categories = [ "Application"];
# }; # };
# currently unused but kept for possible future use-case
# not needed as long as schildichat is working properly
element = { element = {
name = "Element Matrix Client"; name = "Element Matrix Client";
genericName = "Element"; genericName = "Element";
@ -552,14 +501,8 @@ home.file = {
home.sessionVariables = { home.sessionVariables = {
EDITOR = "bash ~/.dotfiles/scripts/editor.sh"; EDITOR = "bash ~/.dotfiles/scripts/editor.sh";
EDITORBAK = "bash ~/.dotfiles/scripts/editor.sh";
# GTK_THEME = "Arc-Dark";
}; };
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
};
# zsh Integration is enabled by default for these # zsh Integration is enabled by default for these
programs.bottom.enable = true; programs.bottom.enable = true;
programs.imv.enable = true; programs.imv.enable = true;
@ -575,11 +518,18 @@ programs.nix-index.enable = true;
programs.ripgrep.enable = true; programs.ripgrep.enable = true;
programs.pandoc.enable = true; programs.pandoc.enable = true;
programs.fzf.enable = true; programs.fzf.enable = true;
programs.zoxide.enable = true;
programs.password-store = {
enable = true;
package = pkgs.pass.withExtensions (exts: [exts.pass-otp]);
};
programs.direnv = { programs.direnv = {
enable = true; enable = true;
nix-direnv.enable = true; nix-direnv.enable = true;
}; };
programs.zoxide.enable = true;
programs.eza = { programs.eza = {
enable = true; enable = true;
icons = true; icons = true;
@ -589,6 +539,7 @@ programs.eza = {
"--group-directories-first" "--group-directories-first"
]; ];
}; };
programs.git = { programs.git = {
enable = true; enable = true;
aliases = { aliases = {
@ -631,19 +582,9 @@ programs.fuzzel = {
settings = { settings = {
main = { main = {
layer = "overlay"; layer = "overlay";
# font = "Monospace:size=8";
lines = "10"; lines = "10";
width = "40"; width = "40";
}; };
colors = {
# background="293744dd";
# text="f8f8f2ff";
# match="8be9fdff";
# selection-match="8be9fdff";
# selection="44475add";
# selection-text="f8f8f2ff";
# border="ffd700ff";
};
border.radius = "0"; border.radius = "0";
}; };
}; };
@ -760,7 +701,6 @@ programs.kitty = {
"ctrl+shift+home" = "no_op"; "ctrl+shift+home" = "no_op";
"ctrl+shift+end" = "no_op"; "ctrl+shift+end" = "no_op";
}; };
# theme = "citylights";
}; };
programs.zsh = { programs.zsh = {
@ -945,7 +885,7 @@ accounts.email = {
programs.emacs = { programs.emacs = {
enable = true; enable = true;
package = (pkgs.emacsWithPackagesFromUsePackage { package = (pkgs.emacsWithPackagesFromUsePackage {
config = ../../Emacs.org; # tangling my Emacs.org file here instead of directly putting init.el allows avoidance of automatically installing packages in blocks using UTF-8 characters, which would break the nix evaluation happening in this line. This line is also the reason why (for now) the Emacs configuration lives in a different .org file config = ../../programs/emacs/init.el;
package = pkgs.emacs-pgtk; package = pkgs.emacs-pgtk;
alwaysEnsure = true; alwaysEnsure = true;
alwaysTangle = true; alwaysTangle = true;
@ -1451,13 +1391,6 @@ programs.firefox = {
don-t-fuck-with-paste don-t-fuck-with-paste
plasma-integration plasma-integration
# build the rest of my firefox addons myself
# app id can be found in the manifest.json file of the .xpi
# (.xpi is just a normal archive)
# url can be found by copy url of the "add extension" button on the addon page
# the rest of the information is also found in the manifest.json, but might not be
# needed
# (let version = "3.4.5.0"; # (let version = "3.4.5.0";
# in buildFirefoxXpiAddon { # in buildFirefoxXpiAddon {
# pname = "bypass-paywalls-clean"; # pname = "bypass-paywalls-clean";
@ -1475,7 +1408,6 @@ programs.firefox = {
# }; # };
# }) # })
(buildFirefoxXpiAddon { (buildFirefoxXpiAddon {
pname = ":emoji:"; pname = ":emoji:";
version = "0.1.3"; version = "0.1.3";
@ -1542,13 +1474,6 @@ programs.firefox = {
}; };
}; };
# programs.browserpass = {
# enable = true;
# browsers = [
# "firefox"
# ];
# };
services.gnome-keyring = { services.gnome-keyring = {
enable = true; enable = true;
}; };
@ -1557,7 +1482,6 @@ services.mbsync = {
enable = true; enable = true;
}; };
services.kdeconnect = { services.kdeconnect = {
enable = true; enable = true;
indicator = true; indicator = true;
@ -1570,7 +1494,6 @@ services.syncthing = {
}; };
}; };
# this enables the emacs server
services.emacs = { services.emacs = {
enable = true; enable = true;
# socketActivation.enable = false; # socketActivation.enable = false;
@ -1763,12 +1686,6 @@ wayland.windowManager.sway = {
class = ".*"; class = ".*";
}; };
} }
{
command = "opacity 0.95";
criteria = {
app_id = ".*";
};
}
{ {
command = "opacity 1"; command = "opacity 1";
criteria = { criteria = {
@ -1790,13 +1707,13 @@ wayland.windowManager.sway = {
{ {
command = "opacity 0.8, sticky enable, border normal, move container to scratchpad"; command = "opacity 0.8, sticky enable, border normal, move container to scratchpad";
criteria = { criteria = {
title="kittyterm"; title="^kittyterm$";
}; };
} }
{ {
command = "opacity 0.95, sticky enable, border normal, move container to scratchpad"; command = "opacity 0.95, sticky enable, border normal, move container to scratchpad";
criteria = { criteria = {
title="spotifytui"; title="^spotifytui$";
}; };
} }
# { # {

View file

@ -5,25 +5,14 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
# login keymap services.xserver = {
services.xserver = {
xkb.layout = "us"; xkb.layout = "us";
xkb.variant = "altgr-intl"; xkb.variant = "altgr-intl";
}; };
# mount NAS drive nix.settings.experimental-features = ["nix-command" "flakes"];
# works only at home, but w/e
# fileSystems."/mnt/smb" = {
# device = "//192.168.1.3/Eternor";
# fsType = "cifs";
# options = let
# # this line prevents hanging on network split
# automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
# in ["${automount_opts},credentials=/etc/nixos/smb-secrets,uid=1000,gid=100"];
# };
# # enable flakes - urgent line!! # use ozone for wayland - chromium apps
nix.settings.experimental-features = ["nix-command" "flakes"];
environment.sessionVariables.NIXOS_OZONE_WL = "1"; environment.sessionVariables.NIXOS_OZONE_WL = "1";
# wordlist for look # wordlist for look
@ -36,60 +25,46 @@
gst-libav gst-libav
]); ]);
# correct time between linux and windows time.hardwareClockInLocalTime = true;
time.hardwareClockInLocalTime = true;
# dont style GRUB with stylix # dont style GRUB with stylix
stylix.targets.grub.enable = false; # the styling makes grub more ugly stylix.targets.grub.enable = false; # the styling makes grub more ugly
# cura fix security.polkit.enable = true;
# xdg.portal = {
# enable = true;
# extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
# wlr.enable = true;
# config = {
# common = {
# default = [
# "*"
# ];
# };
# };
# };
# wayland-related
security.polkit.enable = true;
hardware.opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
};
# systemd # systemd
systemd.extraConfig = '' systemd.extraConfig = ''
DefaultTimeoutStartSec=60s DefaultTimeoutStartSec=60s
DefaultTimeoutStopSec=15s DefaultTimeoutStopSec=15s
''; '';
# audio hardware.opengl = {
sound.enable = true; enable = true;
# nixpkgs.config.pulseaudio = true; driSupport = true;
hardware.pulseaudio= { driSupport32Bit = true;
};
sound.enable = true;
hardware.pulseaudio= {
enable = true; enable = true;
package = pkgs.pulseaudioFull; package = pkgs.pulseaudioFull;
}; };
hardware.enableAllFirmware = true;
hardware.bluetooth.powerOnBoot = true; hardware.enableAllFirmware = true;
hardware.bluetooth.settings = {
hardware.bluetooth.powerOnBoot = true;
hardware.bluetooth.settings = {
General = { General = {
Enable = "Source,Sink,Media,Socket"; Enable = "Source,Sink,Media,Socket";
}; };
}; };
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true;
time.timeZone = "Europe/Vienna"; networking.networkmanager.enable = true;
i18n.defaultLocale = "en_US.UTF-8"; time.timeZone = "Europe/Vienna";
i18n.extraLocaleSettings = {
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "de_AT.UTF-8"; LC_ADDRESS = "de_AT.UTF-8";
LC_IDENTIFICATION = "de_AT.UTF-8"; LC_IDENTIFICATION = "de_AT.UTF-8";
LC_MEASUREMENT = "de_AT.UTF-8"; LC_MEASUREMENT = "de_AT.UTF-8";
@ -99,7 +74,7 @@
LC_PAPER = "de_AT.UTF-8"; LC_PAPER = "de_AT.UTF-8";
LC_TELEPHONE = "de_AT.UTF-8"; LC_TELEPHONE = "de_AT.UTF-8";
LC_TIME = "de_AT.UTF-8"; LC_TIME = "de_AT.UTF-8";
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
# yubikey packages # yubikey packages
@ -144,7 +119,7 @@ environment.systemPackages = with pkgs; [
# (python3.withPackages(ps: with ps; [ jupyter ipython pyqt5 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 { (stdenv.mkDerivation {
name = "oama"; name = "oama";
src = pkgs.fetchurl { src = pkgs.fetchurl {
@ -163,12 +138,9 @@ environment.systemPackages = with pkgs; [
mv $out/oama-0.13.1-Linux-x86_64-static/oama $out/bin/ mv $out/oama-0.13.1-Linux-x86_64-static/oama $out/bin/
''; '';
}) })
];
];
programs.dconf.enable = true; programs.dconf.enable = true;
programs.evince.enable = true; programs.evince.enable = true;
@ -184,13 +156,13 @@ environment.pathsToLink = [ "/share/zsh" ];
services.blueman.enable = true; services.blueman.enable = true;
# enable scanners over network # enable scanners over network
hardware.sane = { hardware.sane = {
enable = true; enable = true;
extraBackends = [ pkgs.sane-airscan ]; extraBackends = [ pkgs.sane-airscan ];
}; };
# enable discovery and usage of network devices (esp. printers) # enable discovery and usage of network devices (esp. printers)
services.printing.enable = true; services.printing.enable = true;
services.printing.drivers = [ services.printing.drivers = [
pkgs.gutenprint pkgs.gutenprint
@ -210,11 +182,10 @@ BrowseProtocols all
openFirewall = true; openFirewall = true;
}; };
# nautilus file manager services.gvfs.enable = true;
services.gvfs.enable = true;
# Make CAPS work as a dual function ESC/CTRL key # Make CAPS work as a dual function ESC/CTRL key
services.interception-tools = { services.interception-tools = {
enable = true; enable = true;
udevmonConfig = let udevmonConfig = let
dualFunctionKeysConfig = builtins.toFile "dual-function-keys.yaml" '' dualFunctionKeysConfig = builtins.toFile "dual-function-keys.yaml" ''
@ -236,7 +207,7 @@ BrowseProtocols all
EVENTS: EVENTS:
EV_KEY: [KEY_CAPSLOCK] EV_KEY: [KEY_CAPSLOCK]
''; '';
}; };
programs.ssh.startAgent = false; programs.ssh.startAgent = false;

View file

@ -102,14 +102,11 @@
startup = [ startup = [
{ command = "nextcloud --background";} { command = "nextcloud --background";}
# { command = "spotify";}
{ command = "discord --start-minimized";} { command = "discord --start-minimized";}
# { command = "element-desktop --hidden";}
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";} { command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
{ command = "ANKI_WAYLAND=1 anki";} { command = "ANKI_WAYLAND=1 anki";}
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";} { command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
{ command = "nm-applet";} { command = "nm-applet";}
# { command = "sleep 60 && syncthingtray --wait"; }
]; ];
}; };

View file

@ -55,7 +55,6 @@
stylix.image = ../../wallpaper/lenovowp.png; stylix.image = ../../wallpaper/lenovowp.png;
stylix = { stylix = {
base16Scheme = ../../wallpaper/swarsel.yaml; base16Scheme = ../../wallpaper/swarsel.yaml;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";

View file

@ -115,14 +115,11 @@
startup = [ startup = [
{ command = "nextcloud --background";} { command = "nextcloud --background";}
# { command = "spotify";}
{ command = "discord --start-minimized";} { command = "discord --start-minimized";}
# { command = "element-desktop --hidden";}
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";} { command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
{ command = "ANKI_WAYLAND=1 anki";} { command = "ANKI_WAYLAND=1 anki";}
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";} { command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
{ command = "nm-applet";} { command = "nm-applet";}
# { command = "sleep 60 && syncthingtray --wait"; }
]; ];
}; };

View file

@ -34,7 +34,6 @@
stylix.image = ../../wallpaper/lenovowp.png; stylix.image = ../../wallpaper/lenovowp.png;
stylix = { stylix = {
base16Scheme = ../../wallpaper/swarsel.yaml; base16Scheme = ../../wallpaper/swarsel.yaml;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";

View file

@ -82,14 +82,11 @@
startup = [ startup = [
{ command = "nextcloud --background";} { command = "nextcloud --background";}
# { command = "spotify";}
{ command = "discord --start-minimized";} { command = "discord --start-minimized";}
# { command = "element-desktop --hidden";}
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";} { command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
{ command = "ANKI_WAYLAND=1 anki";} { command = "ANKI_WAYLAND=1 anki";}
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";} { command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
{ command = "nm-applet";} { command = "nm-applet";}
# { command = "sleep 60 && syncthingtray --wait"; }
]; ];
}; };

View file

@ -16,7 +16,6 @@
stylix.image = ../../wallpaper/standwp.png; stylix.image = ../../wallpaper/standwp.png;
stylix = { stylix = {
base16Scheme = ../../wallpaper/swarsel.yaml; base16Scheme = ../../wallpaper/swarsel.yaml;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";

View file

@ -9,7 +9,6 @@
stylix.image = ../../wallpaper/surfacewp.png; stylix.image = ../../wallpaper/surfacewp.png;
stylix = { stylix = {
base16Scheme = ../../wallpaper/swarsel.yaml; base16Scheme = ../../wallpaper/swarsel.yaml;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";

View file

@ -89,14 +89,11 @@
startup = [ startup = [
{ command = "nextcloud --background";} { command = "nextcloud --background";}
# { command = "spotify";}
{ command = "discord --start-minimized";} { command = "discord --start-minimized";}
# { command = "element-desktop --hidden";}
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";} { command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
{ command = "ANKI_WAYLAND=1 anki";} { command = "ANKI_WAYLAND=1 anki";}
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";} { command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
{ command = "nm-applet";} { command = "nm-applet";}
# { command = "sleep 60 && syncthingtray --wait"; }
]; ];

View file

@ -36,7 +36,6 @@
stylix.image = ../../wallpaper/surfacewp.png; stylix.image = ../../wallpaper/surfacewp.png;
stylix = { stylix = {
base16Scheme = ../../wallpaper/swarsel.yaml; base16Scheme = ../../wallpaper/swarsel.yaml;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";

View file

@ -115,14 +115,11 @@
startup = [ startup = [
{ command = "nextcloud --background";} { command = "nextcloud --background";}
# { command = "spotify";}
{ command = "discord --start-minimized";} { command = "discord --start-minimized";}
# { command = "element-desktop --hidden";}
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";} { command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
{ command = "ANKI_WAYLAND=1 anki";} { command = "ANKI_WAYLAND=1 anki";}
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";} { command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
{ command = "nm-applet";} { command = "nm-applet";}
# { command = "sleep 60 && syncthingtray --wait"; }
]; ];
}; };

View file

@ -32,7 +32,6 @@
stylix.image = ../../wallpaper/t14swp.png; stylix.image = ../../wallpaper/t14swp.png;
stylix = { stylix = {
base16Scheme = ../../wallpaper/swarsel.yaml; base16Scheme = ../../wallpaper/swarsel.yaml;
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml"; # base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";

View file

@ -172,6 +172,12 @@ create a new one."
(visual-fill-column-mode 1)) (visual-fill-column-mode 1))
(defun swarsel/org-babel-tangle-config () (defun swarsel/org-babel-tangle-config ()
(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)))
(when (string-equal (buffer-file-name) (when (string-equal (buffer-file-name)
swarsel-emacs-org-filepath) swarsel-emacs-org-filepath)
;; Dynamic scoping to the rescue ;; Dynamic scoping to the rescue
@ -280,11 +286,13 @@ create a new one."
;; "cj" '((lambda () (interactive) (org-capture nil "jj")) :which-key "journal") ;; "cj" '((lambda () (interactive) (org-capture nil "jj")) :which-key "journal")
;; "cs" '(markdown-download-screenshot :which-key "screenshot") ;; "cs" '(markdown-download-screenshot :which-key "screenshot")
"l" '(:ignore l :which-key "links") "l" '(:ignore l :which-key "links")
"le" '((lambda () (interactive) (find-file swarsel-emacs-org-filepath)) :which-key "Emacs.org") "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@192.168.1.3:")) :which-key "Server") "ls" '((lambda () (interactive) (find-file "/smb:Swarsel@192.168.1.3:")) :which-key "Server")
"lo" '(dired swarsel-obsidian-vault-directory :which-key "obsidian") "lo" '(dired swarsel-obsidian-vault-directory :which-key "obsidian")
;; "la" '((lambda () (interactive) (find-file swarsel-org-anki-filepath)) :which-key "anki") ;; "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") ;; "ln" '((lambda () (interactive) (find-file swarsel-nix-org-filepath)) :which-key "Nix.org")
"lp" '((lambda () (interactive) (projectile-switch-project)) :which-key "switch project") "lp" '((lambda () (interactive) (projectile-switch-project)) :which-key "switch project")
"lg" '((lambda () (interactive) (magit-list-repositories)) :which-key "list git repos") "lg" '((lambda () (interactive) (magit-list-repositories)) :which-key "list git repos")
;; "a" '(:ignore a :which-key "anki") ;; "a" '(:ignore a :which-key "anki")
@ -343,7 +351,9 @@ create a new one."
swarsel-projects-directory "~/Documents/GitHub") swarsel-projects-directory "~/Documents/GitHub")
(setq swarsel-emacs-org-filepath (expand-file-name "Emacs.org" swarsel-dotfiles-directory) (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-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 ;; set Emacs main configuration .org names
@ -368,11 +378,6 @@ create a new one."
swarsel-org-tasks-filepath (expand-file-name swarsel-tasks-org-file swarsel-org-directory) 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)) swarsel-org-archive-filepath (expand-file-name swarsel-archive-org-file swarsel-org-directory))
;; set paths to authentication files (forge)
;; (setq auth-source-pass-filename "~/.local/share/password-store"
(setq auth-sources '( "~/.emacs.d/.caldav" "~/.emacs.d/.authinfo.gpg")
auth-source-cache-expiry nil) ; default is 2h
;; Change the user-emacs-directory to keep unwanted things out of ~/.emacs.d ;; Change the user-emacs-directory to keep unwanted things out of ~/.emacs.d
(setq user-emacs-directory (expand-file-name "~/.cache/emacs/") (setq user-emacs-directory (expand-file-name "~/.cache/emacs/")
url-history-file (expand-file-name "url/history" user-emacs-directory)) url-history-file (expand-file-name "url/history" user-emacs-directory))
@ -740,6 +745,9 @@ create a new one."
(setq-default indicate-buffer-boundaries t) (setq-default indicate-buffer-boundaries t)
(setq auth-sources '( "~/.emacs.d/.caldav" "~/.emacs.d/.authinfo.gpg")
auth-source-cache-expiry nil) ; default is 2h
(use-package org (use-package org
;;:diminish (org-indent-mode) ;;:diminish (org-indent-mode)
:hook (org-mode . swarsel/org-mode-setup) :hook (org-mode . swarsel/org-mode-setup)
@ -873,6 +881,7 @@ create a new one."
'org-babel-load-languages 'org-babel-load-languages
'((emacs-lisp . t) '((emacs-lisp . t)
(python . t) (python . t)
(js . t)
(shell . t) (shell . t)
)) ))