mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
style: format Swarselsystems.org to nixpkgs-fmt
This commit is contained in:
parent
d96c4de8dd
commit
38c1ddac38
10 changed files with 1257 additions and 1299 deletions
|
|
@ -1893,7 +1893,6 @@ My old laptop, replaced by a new one, since most basic functions have stopped to
|
|||
|
||||
|
||||
#+begin_src nix :tangle profiles/home-manager/default.nix
|
||||
|
||||
{ inputs, outputs, config, ... }:
|
||||
{
|
||||
|
||||
|
|
@ -1945,8 +1944,7 @@ My old laptop, replaced by a new one, since most basic functions have stopped to
|
|||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
keybindings = {
|
||||
};
|
||||
keybindings = { };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1964,7 +1962,6 @@ This is basically just adjusted to the core count, path to the =hwmon= (this was
|
|||
|
||||
|
||||
#+begin_src nix :tangle profiles/fourside/default.nix
|
||||
|
||||
{ inputs, outputs, config, pkgs, ... }:
|
||||
{
|
||||
|
||||
|
|
@ -2088,7 +2085,6 @@ My work machine.
|
|||
|
||||
|
||||
#+begin_src nix :tangle profiles/nbl-imba-2/default.nix
|
||||
|
||||
{ inputs, outputs, config, pkgs, lib, ... }:
|
||||
{
|
||||
|
||||
|
|
@ -4132,7 +4128,6 @@ As such, I also define three additional overlays:
|
|||
*** Packages
|
||||
|
||||
#+begin_src nix :tangle pkgs/default.nix
|
||||
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs) callPackage;
|
||||
|
|
@ -4217,7 +4212,6 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/cura5/default.nix
|
||||
|
||||
{ appimageTools, fetchurl, writeScriptBin, pkgs }:
|
||||
|
||||
|
||||
|
|
@ -4253,7 +4247,6 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/cdw/default.nix
|
||||
|
||||
{ writeShellApplication, fzf }:
|
||||
|
||||
writeShellApplication {
|
||||
|
|
@ -4271,7 +4264,6 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/cdb/default.nix
|
||||
|
||||
{ writeShellApplication, fzf }:
|
||||
|
||||
writeShellApplication {
|
||||
|
|
@ -4288,7 +4280,6 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/bak/default.nix
|
||||
|
||||
{ writeShellApplication }:
|
||||
|
||||
writeShellApplication {
|
||||
|
|
@ -4305,7 +4296,6 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/timer/default.nix
|
||||
|
||||
{ writeShellApplication, speechd }:
|
||||
|
||||
writeShellApplication {
|
||||
|
|
@ -4590,7 +4580,6 @@ done
|
|||
*** Overlays
|
||||
|
||||
#+begin_src nix :tangle overlays/default.nix
|
||||
|
||||
{ inputs, ... }: {
|
||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
||||
modifications = final: _prev: {
|
||||
|
|
@ -4886,7 +4875,8 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
{
|
||||
options.swarselsystems.isNixos = lib.mkEnableOption "nixos host";
|
||||
config.swarselsystems.startup = lib.mkIf (!config.swarselsystems.isNixos) [
|
||||
{ command = "sleep 60 && nixGL nextcloud --background";
|
||||
{
|
||||
command = "sleep 60 && nixGL nextcloud --background";
|
||||
}
|
||||
{ command = "sleep 60 && nixGL vesktop --start-minimized -enable-features=UseOzonePlatform -ozone-platform=wayland"; }
|
||||
{ command = "sleep 60 && nixGL syncthingtray --wait"; }
|
||||
|
|
@ -4977,7 +4967,6 @@ These are system-level settings specific to NixOS machines. All settings that ar
|
|||
First, we enable the use of =home-manager= as a NixoS module
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/default.nix
|
||||
|
||||
{ lib, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
|
|
@ -5015,9 +5004,11 @@ First, we enable the use of =home-manager= as a NixoS module
|
|||
./xdg-portal.nix
|
||||
];
|
||||
|
||||
nix = let
|
||||
nix =
|
||||
let
|
||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
||||
in {
|
||||
in
|
||||
{
|
||||
settings = {
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
|
|
@ -5756,22 +5747,22 @@ Do not touch this.
|
|||
folders = {
|
||||
"Default Folder" = {
|
||||
path = "/home/swarsel/Sync";
|
||||
devices = [ "sync (@oracle)" ];
|
||||
devices = [ "sync (@oracle) magicant" ];
|
||||
id = "default";
|
||||
};
|
||||
"Obsidian" = {
|
||||
path = "/home/swarsel/Nextcloud/Obsidian";
|
||||
devices = [ "sync (@oracle)" ];
|
||||
devices = [ "sync (@oracle) magicant" ];
|
||||
id = "yjvni-9eaa7";
|
||||
};
|
||||
"Org" = {
|
||||
path = "/home/swarsel/Nextcloud/Org";
|
||||
devices = [ "sync (@oracle)" ];
|
||||
devices = [ "sync (@oracle) magicant" ];
|
||||
id = "a7xnl-zjj3d";
|
||||
};
|
||||
"Vpn" = {
|
||||
path = "/home/swarsel/Vpn";
|
||||
devices = [ "sync (@oracle)" ];
|
||||
devices = [ "sync (@oracle) magicant" ];
|
||||
id = "hgp9s-fyq3p";
|
||||
};
|
||||
};
|
||||
|
|
@ -5841,6 +5832,7 @@ This allows me to use my big scanner/printer's scanning function over the networ
|
|||
This allows me to use my big scanner/printer's printing function over the network. Most of the settings are driver related.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/networkdevices.nix
|
||||
|
||||
# enable discovery and usage of network devices (esp. printers)
|
||||
services.printing = {
|
||||
enable = true;
|
||||
|
|
@ -5856,6 +5848,7 @@ This allows me to use my big scanner/printer's printing function over the networ
|
|||
BrowseProtocols all
|
||||
'';
|
||||
};
|
||||
|
||||
#+end_src
|
||||
|
||||
****** Avahi (device discovery)
|
||||
|
|
@ -5894,7 +5887,6 @@ This is being set to allow myself to use all functions of nautilus in NixOS
|
|||
This is a super-convenient package that lets my remap my =CAPS= key to =ESC= if pressed shortly, and =CTRL= if being held.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/interceptiontools.nix
|
||||
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Make CAPS work as a dual function ESC/CTRL key
|
||||
|
|
@ -6225,7 +6217,6 @@ This section houses the greetd related settings. I do not really want to use a d
|
|||
Used for storing sessions in e.g. Nextcloud
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/gnome-keyring.nix
|
||||
|
||||
_:
|
||||
{
|
||||
services.gnome.gnome-keyring = {
|
||||
|
|
@ -6424,6 +6415,7 @@ This section sets up all the imports that are used in the home-manager section.
|
|||
{
|
||||
imports = [
|
||||
./packages.nix
|
||||
./custom-packages.nix
|
||||
./sops.nix
|
||||
./ssh.nix
|
||||
./stylix.nix
|
||||
|
|
@ -6645,7 +6637,8 @@ Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499
|
|||
font-awesome_5
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
|
||||
];
|
||||
}
|
||||
#+end_src
|
||||
|
||||
***** Self-defined
|
||||
|
|
@ -6657,8 +6650,11 @@ Programming languages and default lsp's are defined here: [[#h:0e7e8bea-ec58-499
|
|||
|
||||
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/packages.nix
|
||||
#+begin_src nix :tangle profiles/common/home/custom-packages.nix
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
pass-fuzzel
|
||||
cura5
|
||||
cdw
|
||||
|
|
@ -6890,7 +6886,6 @@ Some programs lack a dmenu launcher - I define them myself here.
|
|||
TODO: Non-NixOS machines (=sp3) should not use these by default, but instead the programs prefixed with "nixGL". I need to figure out how to automate this process, as it is not feasible to write desktop entries for all programs installed on that machine.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/desktop.nix
|
||||
|
||||
_:
|
||||
{
|
||||
xdg.desktopEntries = {
|
||||
|
|
@ -6950,7 +6945,6 @@ This section should be used in order to symlink already existing configuration f
|
|||
As for the `home.sessionVariables`, it should be noted that environment variables that are needed at system start should NOT be loaded here, but instead in `programs.zsh.config.extraSessionCommands` (in the home-manager programs section). This is also where all the wayland related variables are stored.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/symlink.nix
|
||||
|
||||
_:
|
||||
{
|
||||
home.file = {
|
||||
|
|
@ -6978,7 +6972,6 @@ As for the `home.sessionVariables`, it should be noted that environment variable
|
|||
Also, we link some files to the users XDG configuration home:
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/symlink.nix
|
||||
|
||||
xdg.configFile = {
|
||||
"tridactyl/tridactylrc".source = ../../../programs/firefox/tridactyl/tridactylrc;
|
||||
"tridactyl/themes/base16-codeschool.css".source = ../../../programs/firefox/tridactyl/themes/base16-codeschool.css;
|
||||
|
|
@ -7410,7 +7403,6 @@ Here we set some aliases (some of them should be shellApplications instead) as w
|
|||
Normally I use 4 mail accounts - here I set them all up. Three of them are Google accounts (sadly), which are a chore to setup. The last is just a sender account that I setup SMTP for here.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/mail.nix
|
||||
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.mbsync = {
|
||||
|
|
@ -7624,7 +7616,6 @@ The rest of this configuration is found here:
|
|||
- [[#h:f3cf9bdc-6826-4d8e-ba5a-253ef098a9b8][Waybar items - LAPTOPS]]
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/waybar.nix
|
||||
|
||||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
programs.waybar = {
|
||||
|
|
@ -7976,7 +7967,6 @@ Services that can be defined through home-manager should be defined here.
|
|||
Used for storing sessions in e.g. Nextcloud
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/gnome-keyring.nix
|
||||
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
services.gnome-keyring = lib.mkIf (!config.swarselsystems.isNixos) {
|
||||
|
|
@ -8088,7 +8078,8 @@ Currently, I am too lazy to explain every option here, but most of it is very se
|
|||
let
|
||||
inherit (config.wayland.windowManager.sway.config) modifier;
|
||||
in
|
||||
lib.recursiveUpdate {
|
||||
lib.recursiveUpdate
|
||||
{
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+f" = "exec firefox";
|
||||
"${modifier}+Shift+f" = "exec swaymsg fullscreen";
|
||||
|
|
@ -8158,7 +8149,8 @@ Currently, I am too lazy to explain every option here, but most of it is very se
|
|||
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||
"XF86MonBrightnessDown" = "exec brightnessctl set 5%-";
|
||||
"XF86Display" = "exec wl-mirror eDP-1";
|
||||
} config.swarselsystems.keybindings;
|
||||
}
|
||||
config.swarselsystems.keybindings;
|
||||
modes = {
|
||||
resize = {
|
||||
Down = "resize grow height 10 px or 10 ppt";
|
||||
|
|
@ -8377,7 +8369,6 @@ Currently, I am too lazy to explain every option here, but most of it is very se
|
|||
**** Gaming
|
||||
|
||||
#+begin_src nix :tangle profiles/optional/home/gaming.nix
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
|
@ -8409,7 +8400,6 @@ Currently, I am too lazy to explain every option here, but most of it is very se
|
|||
**** Work
|
||||
|
||||
#+begin_src nix :tangle profiles/optional/home/work.nix :noweb yes
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
|
|
|
|||
52
profiles/common/home/custom-packages.nix
Normal file
52
profiles/common/home/custom-packages.nix
Normal 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
|
||||
'')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
imports = [
|
||||
./packages.nix
|
||||
./custom-packages.nix
|
||||
./sops.nix
|
||||
./ssh.nix
|
||||
./stylix.nix
|
||||
|
|
|
|||
|
|
@ -148,52 +148,5 @@
|
|||
font-awesome_5
|
||||
noto-fonts
|
||||
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
|
||||
'')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,22 +21,22 @@ _:
|
|||
folders = {
|
||||
"Default Folder" = {
|
||||
path = "/home/swarsel/Sync";
|
||||
devices = [ "sync (@oracle)" ];
|
||||
devices = [ "sync (@oracle) magicant" ];
|
||||
id = "default";
|
||||
};
|
||||
"Obsidian" = {
|
||||
path = "/home/swarsel/Nextcloud/Obsidian";
|
||||
devices = [ "sync (@oracle)" ];
|
||||
devices = [ "sync (@oracle) magicant" ];
|
||||
id = "yjvni-9eaa7";
|
||||
};
|
||||
"Org" = {
|
||||
path = "/home/swarsel/Nextcloud/Org";
|
||||
devices = [ "sync (@oracle)" ];
|
||||
devices = [ "sync (@oracle) magicant" ];
|
||||
id = "a7xnl-zjj3d";
|
||||
};
|
||||
"Vpn" = {
|
||||
path = "/home/swarsel/Vpn";
|
||||
devices = [ "sync (@oracle)" ];
|
||||
devices = [ "sync (@oracle) magicant" ];
|
||||
id = "hgp9s-fyq3p";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,45 +3,7 @@ let
|
|||
matrixDomain = "matrix2.swarsel.win";
|
||||
in
|
||||
{
|
||||
|
||||
|
||||
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 -;";
|
||||
};
|
||||
|
||||
<< vminitbare>>
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue