Skip to content

Commit

Permalink
chore: remove unneeded Emacs packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Swarsel committed Dec 29, 2024
1 parent b3c492d commit 7e6d7fe
Show file tree
Hide file tree
Showing 15 changed files with 1,732 additions and 3,037 deletions.
3,665 changes: 1,459 additions & 2,206 deletions SwarselSystems.org

Large diffs are not rendered by default.

49 changes: 0 additions & 49 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,119 +6,78 @@
"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";
};

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://[email protected]/Swarsel/nix-secrets.git?ref=main&shallow=1";
flake = false;
inputs = { };
};

nix-topology.url = "github:oddlama/nix-topology";

};

outputs =
inputs@{ self
, nixpkgs
Expand Down Expand Up @@ -215,10 +174,8 @@
import ./checks { inherit self inputs system pkgs; }
);


nixosConfigurations =
lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "nixos") "nixos";

homeConfigurations =

# "swarsel@home-manager" = inputs.home-manager.lib.homeManagerConfiguration {
Expand All @@ -230,11 +187,8 @@
# };

lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "home") "home" lib.swarselsystems.pkgsFor.x86_64-linux;


darwinConfigurations =
lib.swarselsystems.mkFullHostConfigs (lib.swarselsystems.readHosts "darwin") "darwin";

nixOnDroidConfigurations =

# magicant = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
Expand All @@ -246,8 +200,6 @@

lib.swarselsystems.mkHalfHostConfigs (lib.swarselsystems.readHosts "android") "android" lib.swarselsystems.pkgsFor.aarch64-linux;



topology =

lib.swarselsystems.forEachSystem (pkgs: import inputs.nix-topology {
Expand All @@ -259,6 +211,5 @@
];
});


};
}
20 changes: 10 additions & 10 deletions justfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
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/
6 changes: 0 additions & 6 deletions profiles/common/home/stylix.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ 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";
Expand All @@ -25,7 +24,6 @@
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};

sansSerif = {
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
package = pkgs.cantarell-fonts;
Expand All @@ -34,19 +32,15 @@
# 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;
Expand Down
35 changes: 17 additions & 18 deletions profiles/common/home/sway.nix
Original file line number Diff line number Diff line change
Expand Up @@ -262,29 +262,28 @@ 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}
";
};
}
28 changes: 0 additions & 28 deletions profiles/common/home/zsh.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,34 +91,6 @@
zle -N my-backward-delete-whole-word
# bind this new widget to `ctrl+alt+w`
bindkey '^W' my-backward-delete-whole-word
vterm_printf() {
if [ -n "$TMUX" ] && ([ "''${TERM%%-*}" = "tmux" ] || [ "''${TERM%%-*}" = "screen" ]); then
# Tell tmux to pass the escape sequences through
printf "\ePtmux;\e\e]%s\007\e\\" "$1"
elif [ "''${TERM%%-*}" = "screen" ]; then
# GNU screen (screen, screen-256color, screen-256color-bce)
printf "\eP\e]%s\007\e\\" "$1"
else
printf "\e]%s\e\\" "$1"
fi
}
vterm_prompt_end() {
vterm_printf "51;A$(whoami)@$(hostname):$(pwd)"
}
setopt PROMPT_SUBST
PROMPT=$PROMPT'%{$(vterm_prompt_end)%}'
vterm_cmd() {
local vterm_elisp
vterm_elisp=""
while [ $# -gt 0 ]; do
vterm_elisp="$vterm_elisp""$(printf '"%s" ' "$(printf "%s" "$1" | sed -e 's|\\|\\\\|g' -e 's|"|\\"|g')")"
shift
done
vterm_printf "51;E$vterm_elisp"
}
'';
};
}
18 changes: 9 additions & 9 deletions profiles/common/nixos/sops.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ in
WIREGUARDPUB=${config.sops.placeholder.wireguardpub}
WIREGUARDENDPOINT=${config.sops.placeholder.wireguardendpoint}
'';
".authinfo" = {
owner = "swarsel";
path = "${config.users.users.swarsel.home}/.emacs.d/.authinfo";
content = ''
machine stash.swarsel.win:443 port https login ${config.sops.placeholder.stashuser} password ${config.sops.placeholder.stashpass}
machine gitlab.com/api/v4 login ${config.sops.placeholder.githubforgeuser} password ${config.sops.placeholder.githubforgepass}
machine api.github.com login ${config.sops.placeholder.gitlabforgeuser} password ${config.sops.placeholder.gitlabforgepass}
'';
};
# ".authinfo" = {
# owner = "swarsel";
# path = "${config.users.users.swarsel.home}/.emacs.d/.authinfo";
# content = ''
# machine stash.swarsel.win:443 port https login ${config.sops.placeholder.stashuser} password ${config.sops.placeholder.stashpass}
# machine gitlab.com/api/v4 login ${config.sops.placeholder.githubforgeuser} password ${config.sops.placeholder.githubforgepass}
# machine api.github.com login ${config.sops.placeholder.gitlabforgeuser} password ${config.sops.placeholder.gitlabforgepass}
# '';
# };
};
};
}
6 changes: 0 additions & 6 deletions profiles/common/nixos/stylix.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ self, pkgs, home-manager, config, ... }:
{
stylix = {

enable = true;
base16Scheme = "${self}/wallpaper/swarsel.yaml";
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
Expand All @@ -25,7 +24,6 @@
# name = "FiraCode Nerd Font Propo";
# name = "Montserrat";
};

sansSerif = {
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
package = pkgs.cantarell-fonts;
Expand All @@ -34,19 +32,15 @@
# 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;
};
Expand Down
2 changes: 1 addition & 1 deletion profiles/optional/nixos/work.nix
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ in
openssh = {
enable = true;
extraConfig = ''
'';
'';
};

syncthing = {
Expand Down
4 changes: 1 addition & 3 deletions programs/emacs/early-init.el
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
(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)
Expand Down
Loading

0 comments on commit 7e6d7fe

Please sign in to comment.