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, ... }:
|
||||
{
|
||||
|
||||
|
|
@ -2267,9 +2263,9 @@ In the long run, I am thinking about a transition to kubernetes or using just a
|
|||
:END:
|
||||
|
||||
#+begin_src nix :tangle profiles/server1/TEMPLATE/nixos.nix
|
||||
{ pkgs, modulesPath, ... }:
|
||||
{ pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
];
|
||||
|
|
@ -2307,7 +2303,7 @@ In the long run, I am thinking about a transition to kubernetes or using just a
|
|||
# users.users.root.password = "TEMPLATE";
|
||||
|
||||
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
|
||||
}
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
|
|
@ -3034,7 +3030,7 @@ Make sure to also do this for doublepuppet.yaml
|
|||
matrixDomain = "matrix2.swarsel.win";
|
||||
in
|
||||
{
|
||||
<<vminitbare>>
|
||||
<< vminitbare>>
|
||||
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
|
|
@ -4132,8 +4128,7 @@ As such, I also define three additional overlays:
|
|||
*** Packages
|
||||
|
||||
#+begin_src nix :tangle pkgs/default.nix
|
||||
|
||||
{pkgs, ...}:
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
inherit (pkgs) callPackage;
|
||||
in
|
||||
|
|
@ -4203,7 +4198,7 @@ As such, I also define three additional overlays:
|
|||
#+end_src
|
||||
|
||||
#+begin_src nix :tangle pkgs/pass-fuzzel/default.nix
|
||||
{writeShellApplication, libnotify, pass, fuzzel, wtype}:
|
||||
{ writeShellApplication, libnotify, pass, fuzzel, wtype }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "pass-fuzzel";
|
||||
|
|
@ -4217,8 +4212,7 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/cura5/default.nix
|
||||
|
||||
{appimageTools, fetchurl, writeScriptBin, pkgs}:
|
||||
{ appimageTools, fetchurl, writeScriptBin, pkgs }:
|
||||
|
||||
|
||||
let
|
||||
|
|
@ -4253,8 +4247,7 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/cdw/default.nix
|
||||
|
||||
{writeShellApplication, fzf}:
|
||||
{ writeShellApplication, fzf }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "cdw";
|
||||
|
|
@ -4271,8 +4264,7 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/cdb/default.nix
|
||||
|
||||
{writeShellApplication, fzf}:
|
||||
{ writeShellApplication, fzf }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "cdb";
|
||||
|
|
@ -4288,8 +4280,7 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/bak/default.nix
|
||||
|
||||
{writeShellApplication}:
|
||||
{ writeShellApplication }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "bak";
|
||||
|
|
@ -4305,8 +4296,7 @@ As such, I also define three additional overlays:
|
|||
|
||||
|
||||
#+begin_src nix :tangle pkgs/timer/default.nix
|
||||
|
||||
{writeShellApplication, speechd}:
|
||||
{ writeShellApplication, speechd }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "timer";
|
||||
|
|
@ -4346,7 +4336,7 @@ As such, I also define three additional overlays:
|
|||
#+end_src
|
||||
|
||||
#+begin_src nix :tangle pkgs/e/default.nix
|
||||
{ writeShellApplication, emacs-pgtk, sway, jq}:
|
||||
{ writeShellApplication, emacs-pgtk, sway, jq }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "e";
|
||||
|
|
@ -4456,7 +4446,7 @@ As such, I also define three additional overlays:
|
|||
#+end_src
|
||||
|
||||
#+begin_src nix :tangle pkgs/swarselcheck/default.nix
|
||||
{ writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, sway, jq}:
|
||||
{ writeShellApplication, kitty, element-desktop-wayland, vesktop, spotify-player, sway, jq }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "swarselcheck";
|
||||
|
|
@ -4497,7 +4487,7 @@ As such, I also define three additional overlays:
|
|||
#+end_src
|
||||
|
||||
#+begin_src nix :tangle pkgs/waybarupdate/default.nix
|
||||
{ writeShellApplication, git}:
|
||||
{ writeShellApplication, git }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "waybarupdate";
|
||||
|
|
@ -4518,7 +4508,7 @@ As such, I also define three additional overlays:
|
|||
#+end_src
|
||||
|
||||
#+begin_src nix :tangle pkgs/opacitytoggle/default.nix
|
||||
{ writeShellApplication, sway}:
|
||||
{ writeShellApplication, sway }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "opacitytoggle";
|
||||
|
|
@ -4553,7 +4543,7 @@ done
|
|||
#+end_src
|
||||
|
||||
#+begin_src nix :tangle pkgs/fs-diff/default.nix
|
||||
{ writeShellApplication, sway}:
|
||||
{ writeShellApplication, sway }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "fs-diff";
|
||||
|
|
@ -4577,7 +4567,7 @@ done
|
|||
#+end_src
|
||||
|
||||
#+begin_src nix :tangle pkgs/update-checker/default.nix
|
||||
{ writeShellApplication, nvd}:
|
||||
{ writeShellApplication, nvd }:
|
||||
|
||||
writeShellApplication {
|
||||
name = "update-checker";
|
||||
|
|
@ -4590,7 +4580,6 @@ done
|
|||
*** Overlays
|
||||
|
||||
#+begin_src nix :tangle overlays/default.nix
|
||||
|
||||
{ inputs, ... }: {
|
||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
||||
modifications = final: _prev: {
|
||||
|
|
@ -4834,7 +4823,7 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
in
|
||||
{
|
||||
options.swarselsystems.monitors = mkOption {
|
||||
type = types.attrsOf (types.attrsOf types.str );
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
default = { };
|
||||
};
|
||||
}
|
||||
|
|
@ -4849,11 +4838,11 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
in
|
||||
{
|
||||
options.swarselsystems.inputs = mkOption {
|
||||
type = types.attrsOf (types.attrsOf types.str );
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
default = { };
|
||||
};
|
||||
options.swarselsystems.kyria = mkOption {
|
||||
type = types.attrsOf (types.attrsOf types.str );
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
default = {
|
||||
"36125:53060:splitkb.com_splitkb.com_Kyria_rev3" = {
|
||||
xkb_layout = "us";
|
||||
|
|
@ -4862,11 +4851,11 @@ Modules that need to be loaded on the NixOS level. Note that these will not be a
|
|||
};
|
||||
};
|
||||
options.swarselsystems.touchpad = mkOption {
|
||||
type = types.attrsOf (types.attrsOf types.str );
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
default = { };
|
||||
};
|
||||
options.swarselsystems.standardinputs = mkOption {
|
||||
type = types.attrsOf (types.attrsOf types.str );
|
||||
type = types.attrsOf (types.attrsOf types.str);
|
||||
default = lib.recursiveUpdate (lib.recursiveUpdate config.swarselsystems.touchpad config.swarselsystems.kyria) config.swarselsystems.inputs;
|
||||
internal = true;
|
||||
};
|
||||
|
|
@ -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"
|
||||
|
|
@ -5029,7 +5020,7 @@ First, we enable the use of =home-manager= as a NixoS module
|
|||
warn-dirty = false;
|
||||
};
|
||||
channel.enable = false;
|
||||
registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs;
|
||||
registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs;
|
||||
nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs;
|
||||
};
|
||||
|
||||
|
|
@ -5051,7 +5042,7 @@ First, we enable the use of =home-manager= as a NixoS module
|
|||
Next, we setup the keymap in case we are not in a graphical session. At this point, I always resort to us/altgr-intl, as it is extremly comfortable to use
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/xserver.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services.xserver = {
|
||||
xkb = {
|
||||
|
|
@ -5119,7 +5110,7 @@ Next, we will setup some environment variables that need to be set on the system
|
|||
Needed for control over system-wide privileges etc.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/polkit.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
|
||||
security.pam.services = {
|
||||
|
|
@ -5141,7 +5132,7 @@ Needed for control over system-wide privileges etc.
|
|||
The nix store fills up over time, until =/boot/efi= is filled. This snippet cleans it automatically on a weekly basis.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/gc.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
|
|
@ -5160,7 +5151,7 @@ The nix store fills up over time, until =/boot/efi= is filled. This snippet clea
|
|||
This enables hardlinking identical files in the nix store, to save on disk space. I have read this incurs a significant I/O overhead, I need to keep an eye on this.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/store.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
nix.optimise = {
|
||||
automatic = true;
|
||||
|
|
@ -5178,7 +5169,7 @@ This enables hardlinking identical files in the nix store, to save on disk space
|
|||
There is a persistent bug over Linux kernels that makes the user wait 1m30s on system shutdown due to the reason =a stop job is running for session 1 of user ...=. I do not want to wait that long and am confident no important data is lost by doing this.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/systemd.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
# systemd
|
||||
systemd.extraConfig = ''
|
||||
|
|
@ -5196,7 +5187,7 @@ There is a persistent bug over Linux kernels that makes the user wait 1m30s on s
|
|||
Enable OpenGL, Sound, Bluetooth and various drivers.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/hardware.nix
|
||||
{ pkgs, config, lib, ...}:
|
||||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
|
||||
hardware = {
|
||||
|
|
@ -5239,7 +5230,7 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
|
|||
**** Pipewire
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/pipewire.nix
|
||||
_ : {
|
||||
_: {
|
||||
security.rtkit.enable = true; # this is required for pipewire real-time access
|
||||
|
||||
services.pipewire = {
|
||||
|
|
@ -5262,7 +5253,7 @@ Enable OpenGL, Sound, Bluetooth and various drivers.
|
|||
Here I only enable =networkmanager=. Most of the 'real' network config is done in [[#h:88bf4b90-e94b-46fb-aaf1-a381a512860d][System specific configuration]].
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/network.nix
|
||||
{ lib, config, ...}:
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
networking = {
|
||||
nftables.enable = lib.mkDefault true;
|
||||
|
|
@ -5489,7 +5480,7 @@ Here I only enable =networkmanager=. Most of the 'real' network config is done i
|
|||
Setup timezone and locale. I want to use the US layout, but have the rest adapted to my country and timezone. Also, there is an issue with running Windows/Linux dualboot on the same machine where the hardware clock desyncs between the two OS'es. We fix that bug here as well.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/time.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
time = {
|
||||
timeZone = "Europe/Vienna";
|
||||
|
|
@ -5582,7 +5573,7 @@ By default, [[https://github.com/danth/stylix][stylix]] wants to style GRUB as w
|
|||
image = config.swarselsystems.wallpaper;
|
||||
};
|
||||
home-manager.users.swarsel = {
|
||||
stylix= {
|
||||
stylix = {
|
||||
targets = {
|
||||
emacs.enable = false;
|
||||
waybar.enable = false;
|
||||
|
|
@ -5707,7 +5698,7 @@ Mostly used to install some compilers and lsp's that I want to have available wh
|
|||
Some programs profit from being installed through dedicated NixOS settings on system-level; these go here. Notably the zsh setup goes here and cannot be deleted under any circumstances.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/programs.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
|
|
@ -5733,7 +5724,7 @@ Do not touch this.
|
|||
|
||||
#+begin_src nix :tangle profiles/common/nixos/syncthing.nix
|
||||
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
|
|
@ -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";
|
||||
};
|
||||
};
|
||||
|
|
@ -5795,7 +5786,7 @@ Setting up some hardware services as well as keyboard related settings. Here we
|
|||
Enables the blueman service including the nice system tray icon.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/blueman.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
|
|
@ -5806,7 +5797,7 @@ Enables the blueman service including the nice system tray icon.
|
|||
Enables the blueman service including the nice system tray icon.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/safeeyes.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services.safeeyes.enable = true;
|
||||
}
|
||||
|
|
@ -5823,7 +5814,7 @@ In this section we enable compatibility with several network devices I have at h
|
|||
This allows me to use my big scanner/printer's scanning function over the network.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/networkdevices.nix
|
||||
{pkgs, ...}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# enable scanners over network
|
||||
hardware.sane = {
|
||||
|
|
@ -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)
|
||||
|
|
@ -5880,7 +5873,7 @@ Avahi is the service used for the network discovery.
|
|||
This is being set to allow myself to use all functions of nautilus in NixOS
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/gvfs.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services.gvfs.enable = true;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -5929,7 +5921,7 @@ This is a super-convenient package that lets my remap my =CAPS= key to =ESC= if
|
|||
***** power-profiles-daemon
|
||||
|
||||
#+begin_src nix :tangle profiles/common/nixos/power-profiles-daemon.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services.power-profiles-daemon.enable = true;
|
||||
}
|
||||
|
|
@ -6130,12 +6122,12 @@ This section houses the greetd related settings. I do not really want to use a d
|
|||
|
||||
boot.initrd.systemd.services.rollback = lib.mkIf config.swarselsystems.impermanence {
|
||||
description = "Rollback BTRFS root subvolume to a pristine state";
|
||||
wantedBy = ["initrd.target"];
|
||||
wantedBy = [ "initrd.target" ];
|
||||
# make sure it's done after encryption
|
||||
# i.e. LUKS/TPM process
|
||||
after = ["systemd-cryptsetup@enc.service"];
|
||||
after = [ "systemd-cryptsetup@enc.service" ];
|
||||
# mount the root fs before clearing
|
||||
before = ["sysroot.mount"];
|
||||
before = [ "sysroot.mount" ];
|
||||
unitConfig.DefaultDependencies = "no";
|
||||
serviceConfig.Type = "oneshot";
|
||||
script = ''
|
||||
|
|
@ -6225,8 +6217,7 @@ 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 = {
|
||||
enable = true;
|
||||
|
|
@ -6332,7 +6323,7 @@ Used for storing sessions in e.g. Nextcloud
|
|||
**** VirtualBox
|
||||
|
||||
#+begin_src nix :tangle profiles/optional/nixos/virtualbox.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
virtualisation.virtualbox = {
|
||||
host = {
|
||||
|
|
@ -6344,13 +6335,13 @@ Used for storing sessions in e.g. Nextcloud
|
|||
enable = false;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
#+end_src
|
||||
|
||||
**** Auto-login
|
||||
|
||||
#+begin_src nix :tangle profiles/optional/nixos/autologin.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
|
|
@ -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
|
||||
|
|
@ -6756,7 +6752,7 @@ I use sops-nix to handle secrets that I want to have available on my machines at
|
|||
It is very convenient to have SSH aliases in place for machines that I use. This is mainly used for some server machines and some university clusters. We also enable agent forwarding to have our Yubikey SSH key accessible on the remote host.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/ssh.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
|
|
@ -6852,7 +6848,7 @@ It is very convenient to have SSH aliases in place for machines that I use. This
|
|||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
#+end_src
|
||||
|
||||
**** Theme (stylix)
|
||||
|
|
@ -6890,8 +6886,7 @@ 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,8 +6945,7 @@ 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 = {
|
||||
"init.el" = {
|
||||
|
|
@ -6978,12 +6972,11 @@ 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;
|
||||
};
|
||||
}
|
||||
}
|
||||
#+end_src
|
||||
|
||||
**** Sourcing environment variables
|
||||
|
|
@ -6992,7 +6985,7 @@ Also, we link some files to the users XDG configuration home:
|
|||
:END:
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/env.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
home.sessionVariables = {
|
||||
EDITOR = "e -w";
|
||||
|
|
@ -7015,7 +7008,7 @@ This houses the configurations for all programs managed by home-manager.
|
|||
This section is for programs that require no further configuration. zsh Integration is enabled by default for these.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/programs.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs = {
|
||||
bottom.enable = true;
|
||||
|
|
@ -7041,7 +7034,7 @@ This section is for programs that require no further configuration. zsh Integrat
|
|||
nix-index provides a way to find out which packages are provided by which derivations. By default it also comes with a replacement for =command-not-found.sh=, however, the implementation is based on a channel based setup. I like consistency, so I replace the command with one that provides a flakes-based output.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/nix-index.nix
|
||||
{pkgs, ...}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nix-index =
|
||||
let
|
||||
|
|
@ -7081,7 +7074,7 @@ Enables password store with the =pass-otp= extension which allows me to store an
|
|||
};
|
||||
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
|
||||
};
|
||||
}
|
||||
}
|
||||
#+end_src
|
||||
|
||||
**** direnv
|
||||
|
|
@ -7092,7 +7085,7 @@ Enables password store with the =pass-otp= extension which allows me to store an
|
|||
Enables direnv, which I use for nearly all of my nix dev flakes.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/direnv.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
|
|
@ -7109,7 +7102,7 @@ Enables direnv, which I use for nearly all of my nix dev flakes.
|
|||
Eza provides me with a better =ls= command and some other useful aliases.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/eza.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs.eza = {
|
||||
enable = true;
|
||||
|
|
@ -7131,7 +7124,7 @@ Eza provides me with a better =ls= command and some other useful aliases.
|
|||
Here I set up my git config, automatic signing of commits, useful aliases for my ost used commands (for when I am not using [[#h:d2c7323d-f8c6-4f23-b70a-930e3e4ecce5][Magit]]) as well as a git template defined in [[#h:5ef03803-e150-41bc-b603-e80d60d96efc][Linking dotfiles]].
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/git.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
|
|
@ -7180,7 +7173,7 @@ Here I set up my git config, automatic signing of commits, useful aliases for my
|
|||
Here I only need to set basic layout options - the rest is being managed by stylix.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/fuzzel.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
|
|
@ -7204,7 +7197,7 @@ Here I only need to set basic layout options - the rest is being managed by styl
|
|||
Starship makes my =zsh= look cooler! I have symbols for most programming languages and toolchains, also I build my own powerline.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/starship.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
|
|
@ -7309,7 +7302,7 @@ Starship makes my =zsh= look cooler! I have symbols for most programming languag
|
|||
scala.symbol = " ";
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
#+end_src
|
||||
|
||||
**** Kitty
|
||||
|
|
@ -7322,7 +7315,7 @@ Kitty is the terminal emulator of choice for me, it is nice to configure using n
|
|||
The theme is handled by stylix.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/kitty.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
|
@ -7410,8 +7403,7 @@ 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, ...}:
|
||||
{ config, ... }:
|
||||
{
|
||||
programs.mbsync = {
|
||||
enable = true;
|
||||
|
|
@ -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 = {
|
||||
|
|
@ -7699,8 +7690,8 @@ The rest of this configuration is found here:
|
|||
};
|
||||
|
||||
temperature = {
|
||||
hwmon-path = lib.mkIf (!config.swarselsystems.temperatureHwmon.isAbsolutePath) config.swarselsystems.temperatureHwmon.path ;
|
||||
hwmon-path-abs = lib.mkIf config.swarselsystems.temperatureHwmon.isAbsolutePath config.swarselsystems.temperatureHwmon.path ;
|
||||
hwmon-path = lib.mkIf (!config.swarselsystems.temperatureHwmon.isAbsolutePath) config.swarselsystems.temperatureHwmon.path;
|
||||
hwmon-path-abs = lib.mkIf config.swarselsystems.temperatureHwmon.isAbsolutePath config.swarselsystems.temperatureHwmon.path;
|
||||
input-filename = lib.mkIf config.swarselsystems.temperatureHwmon.isAbsolutePath config.swarselsystems.temperatureHwmon.input-filename;
|
||||
critical-threshold = 80;
|
||||
format-critical = " {temperatureC}°C";
|
||||
|
|
@ -7976,8 +7967,7 @@ 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, ...} :
|
||||
{ lib, config, ... }:
|
||||
{
|
||||
services.gnome-keyring = lib.mkIf (!config.swarselsystems.isNixos) {
|
||||
enable = true;
|
||||
|
|
@ -7993,7 +7983,7 @@ Used for storing sessions in e.g. Nextcloud
|
|||
This enables phone/computer communication, including sending clipboard, files etc. Sadly on Wayland many of the features are broken (like remote control).
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/kdeconnect.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
|
|
@ -8012,7 +8002,7 @@ Desktop notifications!
|
|||
The `extraConfig` section here CANNOT be reindented. This has something to do with how nix handles multiline strings, when indented Mako will fail to start. This might be a mako bug as well.
|
||||
|
||||
#+begin_src nix :tangle profiles/common/home/mako.nix
|
||||
_ :
|
||||
_:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
|
|
@ -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,10 +8400,9 @@ 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, ... }:
|
||||
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
teams-for-linux
|
||||
google-chrome
|
||||
|
|
@ -8456,7 +8446,7 @@ Currently, I am too lazy to explain every option here, but most of it is very se
|
|||
};
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
|
|
|
|||
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";
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@
|
|||
};
|
||||
|
||||
programs.zsh.initExtra = "
|
||||
export GPG_TTY=\"$(tty)\"
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
gpgconf --launch gpg-agent
|
||||
export GPG_TTY=\"$(tty)\"
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
gpgconf --launch gpg-agent
|
||||
";
|
||||
|
||||
swarselsystems = {
|
||||
|
|
|
|||
|
|
@ -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