style: format Swarselsystems.org to nixpkgs-fmt

This commit is contained in:
Swarsel 2024-08-10 17:36:22 +02:00
parent d96c4de8dd
commit 38c1ddac38
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
10 changed files with 1257 additions and 1299 deletions

File diff suppressed because it is too large Load diff

View file

@ -15,15 +15,15 @@
options.swarselsystems.swayfxConfig = lib.mkOption { options.swarselsystems.swayfxConfig = lib.mkOption {
type = lib.types.str; type = lib.types.str;
default = " default = "
blur enable blur enable
blur_xray disable blur_xray disable
blur_passes 1 blur_passes 1
blur_radius 1 blur_radius 1
shadows enable shadows enable
corner_radius 2 corner_radius 2
titlebar_separator disable titlebar_separator disable
default_dim_inactive 0.02 default_dim_inactive 0.02
"; ";
internal = true; internal = true;
}; };
config.swarselsystems.swayfxConfig = lib.mkIf (!config.swarselsystems.isNixos) " "; config.swarselsystems.swayfxConfig = lib.mkIf (!config.swarselsystems.isNixos) " ";

View file

@ -0,0 +1,52 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
pass-fuzzel
cura5
cdw
cdb
bak
timer
e
swarselcheck
waybarupdate
opacitytoggle
fs-diff
update-checker
(pkgs.writeScriptBin "project" ''
#! ${pkgs.bash}/bin/bash
if [ "$1" == "rust" ]; then
cp ~/.dotfiles/templates/rust_flake.nix ./flake.nix
cp ~/.dotfiles/templates/toolchain.toml .
elif [ "$1" == "cpp" ]; then
cp ~/.dotfiles/templates/cpp_flake.nix ./flake.nix
elif [ "$1" == "python" ]; then
cp ~/.dotfiles/templates/py_flake.nix ./flake.nix
elif [ "$1" == "cuda" ]; then
cp ~/.dotfiles/templates/cu_flake.nix ./flake.nix
elif [ "$1" == "other" ]; then
cp ~/.dotfiles/templates/other_flake.nix ./flake.nix
elif [ "$1" == "latex" ]; then
if [ "$2" == "" ]; then
echo "No filename specified, usage: 'project latex <NAME>'"
exit 0
fi
cp ~/.dotfiles/templates/tex_standard.tex ./"$2".tex
exit 0
else
echo "No valid argument given. Valid arguments are rust cpp python, cuda"
exit 0
fi
echo "use flake" >> .envrc
direnv allow
'')
];
}

View file

@ -2,6 +2,7 @@
{ {
imports = [ imports = [
./packages.nix ./packages.nix
./custom-packages.nix
./sops.nix ./sops.nix
./ssh.nix ./ssh.nix
./stylix.nix ./stylix.nix

View file

@ -148,52 +148,5 @@
font-awesome_5 font-awesome_5
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
pass-fuzzel
cura5
cdw
cdb
bak
timer
e
swarselcheck
waybarupdate
opacitytoggle
fs-diff
update-checker
(pkgs.writeScriptBin "project" ''
#! ${pkgs.bash}/bin/bash
if [ "$1" == "rust" ]; then
cp ~/.dotfiles/templates/rust_flake.nix ./flake.nix
cp ~/.dotfiles/templates/toolchain.toml .
elif [ "$1" == "cpp" ]; then
cp ~/.dotfiles/templates/cpp_flake.nix ./flake.nix
elif [ "$1" == "python" ]; then
cp ~/.dotfiles/templates/py_flake.nix ./flake.nix
elif [ "$1" == "cuda" ]; then
cp ~/.dotfiles/templates/cu_flake.nix ./flake.nix
elif [ "$1" == "other" ]; then
cp ~/.dotfiles/templates/other_flake.nix ./flake.nix
elif [ "$1" == "latex" ]; then
if [ "$2" == "" ]; then
echo "No filename specified, usage: 'project latex <NAME>'"
exit 0
fi
cp ~/.dotfiles/templates/tex_standard.tex ./"$2".tex
exit 0
else
echo "No valid argument given. Valid arguments are rust cpp python, cuda"
exit 0
fi
echo "use flake" >> .envrc
direnv allow
'')
]; ];
} }

View file

@ -255,29 +255,29 @@ in
swayfxSettings = config.swarselsystems.swayfxConfig; swayfxSettings = config.swarselsystems.swayfxConfig;
in in
" "
exec_always autotiling exec_always autotiling
set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\" set $exit \"exit: [s]leep, [l]ock, [p]oweroff, [r]eboot, [u]ser logout\"
mode $exit { mode $exit {
bindsym --to-code { bindsym --to-code {
s exec \"systemctl suspend\", mode \"default\" 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 \" 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\" p exec \"systemctl poweroff\"
r exec \"systemctl reboot\" r exec \"systemctl reboot\"
u exec \"swaymsg exit\" u exec \"swaymsg exit\"
Return mode \"default\" Return mode \"default\"
Escape mode \"default\" Escape mode \"default\"
${modifier}+Escape mode \"default\" ${modifier}+Escape mode \"default\"
} }
} }
exec systemctl --user import-environment exec systemctl --user import-environment
${swayfxSettings} ${swayfxSettings}
"; ";
}; };
} }

View file

@ -76,11 +76,11 @@
files = [ files = [
# ssh stuff # ssh stuff
/* /*
"/etc/ssh/ssh_host_ed25519_key" "/etc/ssh/ssh_host_ed25519_key"
"/etc/ssh/ssh_host_ed25519_key.pub" "/etc/ssh/ssh_host_ed25519_key.pub"
"/etc/ssh/ssh_host_rsa_key" "/etc/ssh/ssh_host_rsa_key"
"/etc/ssh/ssh_host_rsa_key.pub" "/etc/ssh/ssh_host_rsa_key.pub"
*/ */
]; ];
}; };

View file

@ -21,22 +21,22 @@ _:
folders = { folders = {
"Default Folder" = { "Default Folder" = {
path = "/home/swarsel/Sync"; path = "/home/swarsel/Sync";
devices = [ "sync (@oracle)" ]; devices = [ "sync (@oracle) magicant" ];
id = "default"; id = "default";
}; };
"Obsidian" = { "Obsidian" = {
path = "/home/swarsel/Nextcloud/Obsidian"; path = "/home/swarsel/Nextcloud/Obsidian";
devices = [ "sync (@oracle)" ]; devices = [ "sync (@oracle) magicant" ];
id = "yjvni-9eaa7"; id = "yjvni-9eaa7";
}; };
"Org" = { "Org" = {
path = "/home/swarsel/Nextcloud/Org"; path = "/home/swarsel/Nextcloud/Org";
devices = [ "sync (@oracle)" ]; devices = [ "sync (@oracle) magicant" ];
id = "a7xnl-zjj3d"; id = "a7xnl-zjj3d";
}; };
"Vpn" = { "Vpn" = {
path = "/home/swarsel/Vpn"; path = "/home/swarsel/Vpn";
devices = [ "sync (@oracle)" ]; devices = [ "sync (@oracle) magicant" ];
id = "hgp9s-fyq3p"; id = "hgp9s-fyq3p";
}; };
}; };

View file

@ -18,10 +18,10 @@
}; };
programs.zsh.initExtra = " programs.zsh.initExtra = "
export GPG_TTY=\"$(tty)\" export GPG_TTY=\"$(tty)\"
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
gpgconf --launch gpg-agent gpgconf --launch gpg-agent
"; ";
swarselsystems = { swarselsystems = {
isLaptop = true; isLaptop = true;

View file

@ -3,45 +3,7 @@ let
matrixDomain = "matrix2.swarsel.win"; matrixDomain = "matrix2.swarsel.win";
in in
{ {
<< vminitbare>>
services = {
xserver.xkb = {
layout = "us";
variant = "altgr-intl";
};
openssh = {
enable = true;
settings.PermitRootLogin = "yes";
listenAddresses = [{
port = 22;
addr = "0.0.0.0";
}];
};
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
proxmoxLXC = {
manageNetwork = true; # manage network myself
manageHostName = false; # manage hostname myself
};
networking = {
useDHCP = true;
enableIPv6 = false;
};
users.users.root.openssh.authorizedKeys.keyFiles = [
../../../secrets/keys/authorized_keys
];
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
environment.shellAliases = {
nswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
};
imports = [ imports = [
(modulesPath + "/virtualisation/proxmox-lxc.nix") (modulesPath + "/virtualisation/proxmox-lxc.nix")