mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
chore: clean up repository
- consolidate Wiki.org and SwarselSystems.org - remove obsoleted profiles
This commit is contained in:
parent
3415c8b0cb
commit
e1a65b47a6
11 changed files with 3032 additions and 3239 deletions
2344
SwarselSystems.org
2344
SwarselSystems.org
File diff suppressed because it is too large
Load diff
536
Wiki.org
536
Wiki.org
|
|
@ -1,536 +0,0 @@
|
|||
#+title: Useful Nix bits
|
||||
|
||||
This pages houses a few configuration snippets that might be useful if you are new to the nix ecosystem. It will be infrequently updated as I come across things that I deem to be interesting to such a reader.
|
||||
|
||||
* Importing a NixOS module that is not in nixpkgs
|
||||
|
||||
This requires changes in multiple locations. As an example we will use an early version of the mautrix-signal module by Niklas Korz.
|
||||
|
||||
1) Add the module source to flake.nix:
|
||||
|
||||
#+begin_src nix flake.nix
|
||||
{
|
||||
inputs = {
|
||||
[...]
|
||||
# provides expressions for mautrix-signal
|
||||
nixpkgs-mautrix-signal ={
|
||||
url = github:niklaskorz/nixpkgs/nixos-23.11-mautrix-signal;
|
||||
};
|
||||
[...]
|
||||
};
|
||||
|
||||
outputs = inputs@{
|
||||
self,
|
||||
[...]
|
||||
nixpkgs-mautrix-signal,
|
||||
[...]
|
||||
}: let
|
||||
[...]
|
||||
pkgsmautrix = import nixpkgs-mautrix-signal { inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
[...]
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
matrix = nixpkgs.lib.nixosSystem {
|
||||
pkgs = pkgsmautrix;
|
||||
# this is to import a service module that is not on nixpkgs
|
||||
# this way avoids infinite recursion errors
|
||||
specialArgs.unstable = nixpkgs-mautrix-signal;
|
||||
modules = [
|
||||
[...]
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
2) Import the module in the configuration:
|
||||
|
||||
#+begin_src nix configuration.nix
|
||||
|
||||
[...]
|
||||
imports = [
|
||||
[...]
|
||||
(unstable + "/nixos/modules/services/matrix/mautrix-signal.nix")
|
||||
];
|
||||
|
||||
[...]
|
||||
#+end_src
|
||||
|
||||
* 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
|
||||
programs.firefox = {
|
||||
[...]
|
||||
profiles.default = {
|
||||
[...]
|
||||
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
[...]
|
||||
(buildFirefoxXpiAddon {
|
||||
pname = ":emoji:";
|
||||
version = "0.1.3";
|
||||
addonId = "gonelf@gmail.com";
|
||||
url = "https://addons.mozilla.org/firefox/downloads/file/3365324/emojidots-0.1.3.xpi";
|
||||
sha256 = "4f7cc25c478fe52eb82f37c9ff4978dcaa3f95020398c5b184e517f6efa2c201";
|
||||
meta = with lib;
|
||||
{
|
||||
description = "emoji autocomplete anywhere on the internet";
|
||||
mozPermissions = [ "https://gist.githubusercontent.com/gonelf/d8ae3ccb7902b501c4a5dd625d4089da/raw/5eeda197ba92f8c8139e846a1225d5640077e06f/emoji_pretty.json" "tabs" "storage"];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
})
|
||||
[...]
|
||||
#+end_src
|
||||
|
||||
* Define shell utility as package
|
||||
|
||||
#+begin_src nix configuration.nix
|
||||
|
||||
home.packages = with pkgs; [ # or for NixOS environment.systemPackages = with pkgs; [
|
||||
[...]
|
||||
(pkgs.writeShellApplication {
|
||||
name = "pass-fuzzel";
|
||||
runtimeInputs = [ pkgs.pass pkgs.fuzzel ];
|
||||
text = ''
|
||||
shopt -s nullglob globstar
|
||||
|
||||
typeit=0
|
||||
if [[ $# -ge 1 && $1 == "--type" ]]; then
|
||||
typeit=1
|
||||
shift
|
||||
fi
|
||||
|
||||
export PASSWORD_STORE_DIR=~/.local/share/password-store
|
||||
prefix=''${PASSWORD_STORE_DIR-~/.local/share/password-store}
|
||||
password_files=( "$prefix"/**/*.gpg )
|
||||
password_files=( "''${password_files[@]#"$prefix"/}" )
|
||||
password_files=( "''${password_files[@]%.gpg}" )
|
||||
|
||||
password=$(printf '%s\n' "''${password_files[@]}" | fuzzel --dmenu "$@")
|
||||
|
||||
[[ -n $password ]] || exit
|
||||
|
||||
if [[ $typeit -eq 0 ]]; then
|
||||
pass show -c "$password" &>/tmp/pass-fuzzel
|
||||
else
|
||||
pass show "$password" | { IFS= read -r pass; printf %s "$pass"; } | wtype -
|
||||
fi
|
||||
notify-send -u critical -a pass -t 1000 "Copied/Typed Password"
|
||||
'';
|
||||
})
|
||||
|
||||
[...]
|
||||
|
||||
#+end_src
|
||||
|
||||
* Add program with prebuild binaries to nix store
|
||||
|
||||
#+begin_src nix configuration.nix
|
||||
|
||||
home.packages = with pkgs; [ # or for NixOS environment.systemPackages = with pkgs; [
|
||||
[...]
|
||||
(stdenv.mkDerivation {
|
||||
name = "oama";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
name = "oama";
|
||||
url = "https://github.com/pdobsan/oama/releases/download/0.13.1/oama-0.13.1-Linux-x86_64-static.tgz";
|
||||
sha256 = "sha256-OTdCObVfnMPhgZxVtZqehgUXtKT1iyqozdkPIV+i3Gc=";
|
||||
};
|
||||
|
||||
phases = [
|
||||
"unpackPhase"
|
||||
];
|
||||
|
||||
unpackPhase = ''
|
||||
mkdir -p $out/bin
|
||||
tar xvf $src -C $out/
|
||||
mv $out/oama-0.13.1-Linux-x86_64-static/oama $out/bin/
|
||||
'';
|
||||
|
||||
})
|
||||
|
||||
[...]
|
||||
#+end_src
|
||||
|
||||
* Patch a utilty for nix paths:
|
||||
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
|
||||
|
||||
* Reference configurations
|
||||
|
||||
Configurations that I have retired or are there for the general study.
|
||||
|
||||
** non-nixos
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:42339b42-c64b-4d0c-a80c-5c44d3423fce
|
||||
:END:
|
||||
|
||||
My Surface Pro 3, only used for on-the-go university work. Be careful when pushing large changes to this machine, as it easily runs out of memory on large switches. At the moment the only machine running non-NixOS, so special care must be taken not to break this one during updates.
|
||||
|
||||
**** Channel setup
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:42e45181-9d78-4266-a9a0-9621032f38b0
|
||||
:END:
|
||||
|
||||
This installs nixGL, which is needed to run GL apps installed through home-manager, since this machine is not using NixOS.
|
||||
|
||||
This is not super clean (because it is not fully replicative), but I do not really care.
|
||||
|
||||
1) Install nixGL:
|
||||
|
||||
#+begin_src nix :tangle no
|
||||
nix-channel --add https://github.com/guibou/nixGL/archive/main.tar.gz nixgl && nix-channel --update
|
||||
nix-env -iA nixgl.auto.nixGLDefault # or replace `nixGLDefault` with your desired wrapper
|
||||
#+end_src
|
||||
|
||||
This is needed in order to use EGL. Prefix programs that use it with `nixGL`
|
||||
|
||||
**** Home manager
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:929d56f5-e16f-4341-901c-24e8a8450398
|
||||
:END:
|
||||
|
||||
Special things to note here: We are running xcape to allow =CAPS= to act as =CTRL= and =ESC=. Also we are using =nixGL= in most places.
|
||||
|
||||
#+begin_src nix :noweb yes :tangle profiles/surface/home.nix
|
||||
|
||||
{ config, pkgs, lib, fetchFromGitHub, ... }:
|
||||
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
home.username = "leons";
|
||||
home.homeDirectory = "/home/leons";
|
||||
|
||||
home.stateVersion = "23.05"; # Please read the comment before changing.
|
||||
|
||||
stylix.image = ../../wallpaper/surfacewp.png;
|
||||
<<theme>>
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
services.xcape = {
|
||||
enable = true;
|
||||
mapExpression = {
|
||||
Control_L = "Escape";
|
||||
};
|
||||
};
|
||||
#keyboard config
|
||||
home.keyboard.layout = "us";
|
||||
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
|
||||
# waybar config
|
||||
programs.waybar.settings.mainBar.cpu.format = "{icon0} {icon1} {icon2} {icon3}";
|
||||
|
||||
programs.waybar.settings.mainBar.temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input";
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark" "mpris" "custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
"battery"
|
||||
"custom/left-arrow-dark"
|
||||
"temperature"
|
||||
"custom/left-arrow-light"
|
||||
"disk"
|
||||
"custom/left-arrow-dark"
|
||||
"memory"
|
||||
"custom/left-arrow-light"
|
||||
"cpu"
|
||||
"custom/left-arrow-dark"
|
||||
"tray"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1" ];
|
||||
services.blueman-applet.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
# nixgl.auto.nixGLDefault
|
||||
evince
|
||||
# nodejs_20
|
||||
|
||||
# messaging
|
||||
# we use gomuks for RAM preservation, but keep schildi around for files and images
|
||||
];
|
||||
|
||||
programs.zsh.initExtra = "
|
||||
export GPG_TTY=\"$(tty)\"
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
gpgconf --launch gpg-agent
|
||||
";
|
||||
|
||||
# sway config
|
||||
wayland.windowManager.sway= {
|
||||
config = rec {
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us";
|
||||
xkb_options = "ctrl:nocaps,grp:win_space_toggle";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
};
|
||||
|
||||
output = {
|
||||
eDP-1 = {
|
||||
mode = "2160x1440@59.955Hz";
|
||||
scale = "1";
|
||||
bg = "~/.dotfiles/wallpaper/surfacewp.png fill";
|
||||
};
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
"${modifier}+F2" = "exec brightnessctl set +5%";
|
||||
"${modifier}+F1"= "exec brightnessctl set 5%-";
|
||||
"${modifier}+n" = "exec sway output eDP-1 transform normal, splith";
|
||||
"${modifier}+Ctrl+p" = "exec nixGL wl-mirror eDP-1";
|
||||
"${modifier}+t" = "exec sway output eDP-1 transform 90, splitv";
|
||||
"${modifier}+XF86AudioLowerVolume" = "exec grim -g \"$(slurp)\" -t png - | wl-copy -t image/png";
|
||||
"${modifier}+XF86AudioRaiseVolume" = "exec grim -g \"$(slurp)\" -t png - | wl-copy -t image/png";
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkgomuks.sh\"";
|
||||
};
|
||||
|
||||
startup = [
|
||||
{ command = "sleep 60 && nixGL nextcloud --background";}
|
||||
# { command = "sleep 60 && nixGL spotify";}
|
||||
{ command = "sleep 60 && nixGL discord --start-minimized -enable-features=UseOzonePlatform -ozone-platform=wayland";}
|
||||
# { command = "sleep 60 && nixGL schildichat-desktop --hidden";}
|
||||
{ command = "sleep 60 && nixGL syncthingtray --wait"; }
|
||||
{ command = "sleep 60 && ANKI_WAYLAND=1 nixGL anki";}
|
||||
{ command = "nm-applet --indicator";}
|
||||
{ command = "sleep 60 && OBSIDIAN_USE_WAYLAND=1 nixGL obsidian -enable-features=UseOzonePlatform -ozone-platform=wayland";}
|
||||
];
|
||||
|
||||
keycodebindings = {
|
||||
"124" = "exec systemctl suspend";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = "
|
||||
exec swaymsg input 7062:6917:NTRG0001:01_1B96:1B05 map_to_output eDP-1
|
||||
exec swaymsg input 7062:6917:NTRG0001:01_1B96:1B05_Stylus map_to_output eDP-1
|
||||
";
|
||||
};
|
||||
}
|
||||
|
||||
#+end_src
|
||||
** nixos
|
||||
**** Onett (Lenovo Y510P)
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:6bc7b9c7-ccfd-42d7-982a-97907aa28b80
|
||||
:END:
|
||||
|
||||
My laptop, sadly soon to be replaced by a new one, since most basic functions are stopping to work lately.
|
||||
|
||||
***** NixOS
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:20fc100c-045d-468a-9bf2-824037e6785b
|
||||
:END:
|
||||
|
||||
#+begin_src nix :noweb yes :tangle profiles/onett/nixos.nix
|
||||
|
||||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
|
||||
<<wrap>>
|
||||
|
||||
services = {
|
||||
greetd.settings.initial_session.user ="swarsel";
|
||||
xserver.videoDrivers = ["nvidia"];
|
||||
};
|
||||
|
||||
|
||||
hardware = {
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
sync.enable = true;
|
||||
};
|
||||
};
|
||||
pulseaudio.configFile = pkgs.runCommand "default.pa" {} ''
|
||||
sed 's/module-udev-detect$/module-udev-detect tsched=0/' \
|
||||
${pkgs.pulseaudio}/etc/pulse/default.pa > $out
|
||||
'';
|
||||
bluetooth.enable = true;
|
||||
};
|
||||
|
||||
stylix.image = ../../wallpaper/lenovowp.png;
|
||||
<<theme>>
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
networking.hostName = "onett"; # Define your hostname.
|
||||
networking.enableIPv6 = false;
|
||||
|
||||
users.users.swarsel = {
|
||||
isNormalUser = true;
|
||||
description = "Leon S";
|
||||
extraGroups = [ "networkmanager" "wheel" "lp"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
||||
#+end_src
|
||||
|
||||
***** Home Manager
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: h:d35847ae-2207-4417-9858-b0ea7e2b1a0b
|
||||
:END:
|
||||
|
||||
#+begin_src nix :noweb yes :tangle profiles/onett/home.nix
|
||||
|
||||
{ config, pkgs, lib, fetchFromGitHub, ... }:
|
||||
|
||||
{
|
||||
|
||||
<<gpgagent>>
|
||||
|
||||
home = {
|
||||
username = "swarsel";
|
||||
homeDirectory = "/home/swarsel";
|
||||
stateVersion = "23.05"; # Please read the comment before changing.
|
||||
keyboard.layout = "de";
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
|
||||
# # waybar config
|
||||
programs.waybar.settings.mainBar = {
|
||||
cpu.format = "{icon0} {icon1} {icon2} {icon3} {icon4} {icon5} {icon6} {icon7}";
|
||||
temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input";
|
||||
};
|
||||
<<waybarlaptop>>
|
||||
|
||||
services.blueman-applet.enable = true;
|
||||
|
||||
wayland.windowManager.sway= {
|
||||
config = rec {
|
||||
input = {
|
||||
"1:1:AT_Translated_Set_2_keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
# xkb_options = "ctrl:nocaps,grp:win_space_toggle";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"2362:33538:ipad_keyboard_Keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_options = "altwin:swap_lalt_lwin,ctrl:nocaps,grp:win_space_toggle";
|
||||
xkb_variant = "colemak_dh";
|
||||
};
|
||||
"36125:53060:splitkb.com_Kyria_rev3" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
|
||||
"type:touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
};
|
||||
|
||||
output = {
|
||||
eDP-1 = {
|
||||
mode = "1920x1080";
|
||||
scale = "1";
|
||||
bg = "~/.dotfiles/wallpaper/lenovowp.png fill";
|
||||
position = "1920,0";
|
||||
};
|
||||
VGA-1 = {
|
||||
mode = "1920x1080";
|
||||
scale = "1";
|
||||
bg = "~/.dotfiles/wallpaper/lenovowp.png fill";
|
||||
position = "0,0";
|
||||
};
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
"${modifier}+F2" = "exec brightnessctl set +5%";
|
||||
"${modifier}+F1"= "exec brightnessctl set 5%-";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||
"XF86MonBrightnessDown"= "exec brightnessctl set 5%-";
|
||||
"${modifier}+Ctrl+p" = "exec wl-mirror eDP-1";
|
||||
"XF86HomePage" = "exec wtype -P Escape -p Escape";
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkschildi.sh\"";
|
||||
};
|
||||
keycodebindings = {
|
||||
"94" = "exec wtype c";
|
||||
"Shift+94" = "exec wtype C";
|
||||
"Ctrl+94" = "exec wtype -M ctrl c -m ctrl";
|
||||
"Ctrl+Shift+94" = "exec wtype -M ctrl -M shift c -m ctrl -m shift";
|
||||
};
|
||||
|
||||
startup = [
|
||||
<<startupnixos>>
|
||||
];
|
||||
};
|
||||
|
||||
extraConfig = "
|
||||
";
|
||||
};
|
||||
}
|
||||
|
||||
#+end_src
|
||||
2520
index.html
2520
index.html
File diff suppressed because it is too large
Load diff
|
|
@ -1,33 +0,0 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ehci_pci" "ata_piix" "usb_storage" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/147e3682-eb15-4e96-9cac-4f2fb5888a69";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp7s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp8s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
{ config, pkgs, lib, fetchFromGitHub, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
enableExtraSocket = true;
|
||||
pinentryPackage = pkgs.pinentry.gtk2;
|
||||
defaultCacheTtl = 600;
|
||||
maxCacheTtl = 7200;
|
||||
extraConfig = ''
|
||||
allow-loopback-pinentry
|
||||
allow-emacs-pinentry
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
home = {
|
||||
username = "swarsel";
|
||||
homeDirectory = "/home/swarsel";
|
||||
stateVersion = "23.05"; # Please read the comment before changing.
|
||||
keyboard.layout = "de";
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
|
||||
# # waybar config
|
||||
programs.waybar.settings.mainBar = {
|
||||
cpu.format = "{icon0} {icon1} {icon2} {icon3} {icon4} {icon5} {icon6} {icon7}";
|
||||
temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input";
|
||||
};
|
||||
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
"custom/pseudobat"
|
||||
"battery"
|
||||
"custom/left-arrow-dark"
|
||||
"group/hardware"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1"
|
||||
];
|
||||
|
||||
|
||||
services.blueman-applet.enable = true;
|
||||
|
||||
wayland.windowManager.sway= {
|
||||
config = rec {
|
||||
input = {
|
||||
"1:1:AT_Translated_Set_2_keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
# xkb_options = "ctrl:nocaps,grp:win_space_toggle";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"2362:33538:ipad_keyboard_Keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_options = "altwin:swap_lalt_lwin,ctrl:nocaps,grp:win_space_toggle";
|
||||
xkb_variant = "colemak_dh";
|
||||
};
|
||||
"36125:53060:splitkb.com_Kyria_rev3" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
|
||||
"type:touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
};
|
||||
|
||||
output = {
|
||||
eDP-1 = {
|
||||
mode = "1920x1080";
|
||||
scale = "1";
|
||||
bg = "~/.dotfiles/wallpaper/lenovowp.png fill";
|
||||
position = "1920,0";
|
||||
};
|
||||
VGA-1 = {
|
||||
mode = "1920x1080";
|
||||
scale = "1";
|
||||
bg = "~/.dotfiles/wallpaper/lenovowp.png fill";
|
||||
position = "0,0";
|
||||
};
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
"${modifier}+F2" = "exec brightnessctl set +5%";
|
||||
"${modifier}+F1"= "exec brightnessctl set 5%-";
|
||||
"XF86MonBrightnessUp" = "exec brightnessctl set +5%";
|
||||
"XF86MonBrightnessDown"= "exec brightnessctl set 5%-";
|
||||
"${modifier}+Ctrl+p" = "exec wl-mirror eDP-1";
|
||||
"XF86HomePage" = "exec wtype -P Escape -p Escape";
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkschildi.sh\"";
|
||||
};
|
||||
keycodebindings = {
|
||||
"94" = "exec wtype c";
|
||||
"Shift+94" = "exec wtype C";
|
||||
"Ctrl+94" = "exec wtype -M ctrl c -m ctrl";
|
||||
"Ctrl+Shift+94" = "exec wtype -M ctrl -M shift c -m ctrl -m shift";
|
||||
};
|
||||
|
||||
startup = [
|
||||
|
||||
{ command = "nextcloud --background";}
|
||||
{ command = "discord --start-minimized";}
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{ command = "ANKI_WAYLAND=1 anki";}
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{ command = "nm-applet";}
|
||||
|
||||
];
|
||||
};
|
||||
|
||||
extraConfig = "
|
||||
";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,108 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
services = {
|
||||
greetd.settings.initial_session.user ="swarsel";
|
||||
xserver.videoDrivers = ["nvidia"];
|
||||
};
|
||||
|
||||
|
||||
hardware = {
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
sync.enable = true;
|
||||
};
|
||||
};
|
||||
pulseaudio.configFile = pkgs.runCommand "default.pa" {} ''
|
||||
sed 's/module-udev-detect$/module-udev-detect tsched=0/' \
|
||||
${pkgs.pulseaudio}/etc/pulse/default.pa > $out
|
||||
'';
|
||||
bluetooth.enable = true;
|
||||
};
|
||||
|
||||
stylix.image = ../../wallpaper/lenovowp.png;
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
base16Scheme = ../../wallpaper/swarsel.yaml;
|
||||
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
|
||||
polarity = "dark";
|
||||
opacity.popups = 0.5;
|
||||
cursor = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors";
|
||||
size = 16;
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
terminal = 10;
|
||||
applications = 11;
|
||||
};
|
||||
serif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = (pkgs.nerdfonts.override { fonts = [ "FiraCode"]; });
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
networking.hostName = "onett"; # Define your hostname.
|
||||
networking.enableIPv6 = false;
|
||||
|
||||
users.users.swarsel = {
|
||||
isNormalUser = true;
|
||||
description = "Leon S";
|
||||
extraGroups = [ "networkmanager" "wheel" "lp"];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
system.stateVersion = "23.05"; # Did you read the comment?
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -1,94 +0,0 @@
|
|||
{ config, pkgs, lib, fetchFromGitHub, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
enableExtraSocket = true;
|
||||
pinentryPackage = pkgs.pinentry-gtk2;
|
||||
extraConfig = ''
|
||||
allow-emacs-pinentry
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
home = {
|
||||
username = "homelen";
|
||||
homeDirectory = "/home/homelen";
|
||||
stateVersion = "23.05"; # Please read the comment before changing.
|
||||
keyboard.layout = "us";
|
||||
packages = with pkgs; [
|
||||
];
|
||||
};
|
||||
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
|
||||
services.blueman-applet.enable = true;
|
||||
|
||||
# waybar config
|
||||
programs.waybar.settings.mainBar = {
|
||||
cpu.format = "{icon0} {icon1} {icon2} {icon3} {icon4} {icon5} {icon6} {icon7}";
|
||||
temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input";
|
||||
};
|
||||
|
||||
programs.waybar.settings.mainBar."custom/pseudobat"= {
|
||||
format= "";
|
||||
on-click-right= "wlogout -p layer-shell";
|
||||
};
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
"custom/pseudobat"
|
||||
"battery"
|
||||
"custom/left-arrow-dark"
|
||||
"group/hardware"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1"
|
||||
];
|
||||
|
||||
|
||||
wayland.windowManager.sway= {
|
||||
config = rec {
|
||||
input = {
|
||||
"36125:53060:splitkb.com_Kyria_rev3" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
|
||||
output = {
|
||||
DP-1 = {
|
||||
mode = "2560x1440";
|
||||
scale = "1";
|
||||
bg = "~/.dotfiles/wallpaper/standwp.png fill";
|
||||
};
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkschildi.sh\"";
|
||||
};
|
||||
|
||||
startup = [
|
||||
|
||||
{ command = "nextcloud --background";}
|
||||
{ command = "discord --start-minimized";}
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{ command = "ANKI_WAYLAND=1 anki";}
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{ command = "nm-applet";}
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,98 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "homelen";
|
||||
greetd.settings.initial_session.user="homelen";
|
||||
};
|
||||
|
||||
stylix.image = ../../wallpaper/standwp.png;
|
||||
|
||||
stylix = {
|
||||
base16Scheme = ../../wallpaper/swarsel.yaml;
|
||||
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
|
||||
polarity = "dark";
|
||||
opacity.popups = 0.5;
|
||||
cursor = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors";
|
||||
size = 16;
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
terminal = 10;
|
||||
applications = 11;
|
||||
};
|
||||
serif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = (pkgs.nerdfonts.override { fonts = [ "FiraCode"]; });
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
devices = ["nodev" ];
|
||||
useOSProber = true;
|
||||
};
|
||||
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
networking = {
|
||||
hostName = "stand"; # Define your hostname.
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
# networkmanager.enable = true;
|
||||
};
|
||||
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
};
|
||||
|
||||
users.users.homelen = {
|
||||
isNormalUser = true;
|
||||
description = "Leon S";
|
||||
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05"; # Did you read the comment? Dont change this basically
|
||||
|
||||
}
|
||||
|
|
@ -1,177 +0,0 @@
|
|||
{ config, pkgs, lib, fetchFromGitHub, ... }:
|
||||
|
||||
{
|
||||
programs.home-manager.enable = true;
|
||||
home.username = "leons";
|
||||
home.homeDirectory = "/home/leons";
|
||||
|
||||
home.stateVersion = "23.05"; # Please read the comment before changing.
|
||||
|
||||
stylix.image = ../../wallpaper/surfacewp.png;
|
||||
|
||||
stylix = {
|
||||
enable = true;
|
||||
base16Scheme = ../../wallpaper/swarsel.yaml;
|
||||
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
|
||||
polarity = "dark";
|
||||
opacity.popups = 0.5;
|
||||
cursor = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors";
|
||||
size = 16;
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
terminal = 10;
|
||||
applications = 11;
|
||||
};
|
||||
serif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = (pkgs.nerdfonts.override { fonts = [ "FiraCode"]; });
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
allowUnfreePredicate = (_: true);
|
||||
};
|
||||
};
|
||||
services.xcape = {
|
||||
enable = true;
|
||||
mapExpression = {
|
||||
Control_L = "Escape";
|
||||
};
|
||||
};
|
||||
#keyboard config
|
||||
home.keyboard.layout = "us";
|
||||
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
|
||||
# waybar config
|
||||
programs.waybar.settings.mainBar.cpu.format = "{icon0} {icon1} {icon2} {icon3}";
|
||||
|
||||
programs.waybar.settings.mainBar.temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon3/temp3_input";
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark" "mpris" "custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
"battery"
|
||||
"custom/left-arrow-dark"
|
||||
"temperature"
|
||||
"custom/left-arrow-light"
|
||||
"disk"
|
||||
"custom/left-arrow-dark"
|
||||
"memory"
|
||||
"custom/left-arrow-light"
|
||||
"cpu"
|
||||
"custom/left-arrow-dark"
|
||||
"tray"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1" ];
|
||||
services.blueman-applet.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
# nixgl.auto.nixGLDefault
|
||||
evince
|
||||
# nodejs_20
|
||||
|
||||
# messaging
|
||||
# we use gomuks for RAM preservation, but keep schildi around for files and images
|
||||
];
|
||||
|
||||
programs.zsh.initExtra = "
|
||||
export GPG_TTY=\"$(tty)\"
|
||||
export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
|
||||
gpgconf --launch gpg-agent
|
||||
";
|
||||
|
||||
# sway config
|
||||
wayland.windowManager.sway= {
|
||||
config = rec {
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "us";
|
||||
xkb_options = "ctrl:nocaps,grp:win_space_toggle";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
};
|
||||
|
||||
output = {
|
||||
eDP-1 = {
|
||||
mode = "2160x1440@59.955Hz";
|
||||
scale = "1";
|
||||
bg = "~/.dotfiles/wallpaper/surfacewp.png fill";
|
||||
};
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
"${modifier}+F2" = "exec brightnessctl set +5%";
|
||||
"${modifier}+F1"= "exec brightnessctl set 5%-";
|
||||
"${modifier}+n" = "exec sway output eDP-1 transform normal, splith";
|
||||
"${modifier}+Ctrl+p" = "exec nixGL wl-mirror eDP-1";
|
||||
"${modifier}+t" = "exec sway output eDP-1 transform 90, splitv";
|
||||
"${modifier}+XF86AudioLowerVolume" = "exec grim -g \"$(slurp)\" -t png - | wl-copy -t image/png";
|
||||
"${modifier}+XF86AudioRaiseVolume" = "exec grim -g \"$(slurp)\" -t png - | wl-copy -t image/png";
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkgomuks.sh\"";
|
||||
};
|
||||
|
||||
startup = [
|
||||
{ command = "sleep 60 && nixGL nextcloud --background";}
|
||||
# { command = "sleep 60 && nixGL spotify";}
|
||||
{ command = "sleep 60 && nixGL discord --start-minimized -enable-features=UseOzonePlatform -ozone-platform=wayland";}
|
||||
# { command = "sleep 60 && nixGL schildichat-desktop --hidden";}
|
||||
{ command = "sleep 60 && nixGL syncthingtray --wait"; }
|
||||
{ command = "sleep 60 && ANKI_WAYLAND=1 nixGL anki";}
|
||||
{ command = "nm-applet --indicator";}
|
||||
{ command = "sleep 60 && OBSIDIAN_USE_WAYLAND=1 nixGL obsidian -enable-features=UseOzonePlatform -ozone-platform=wayland";}
|
||||
];
|
||||
|
||||
keycodebindings = {
|
||||
"124" = "exec systemctl suspend";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = "
|
||||
exec swaymsg input 7062:6917:NTRG0001:01_1B96:1B05 map_to_output eDP-1
|
||||
exec swaymsg input 7062:6917:NTRG0001:01_1B96:1B05_Stylus map_to_output eDP-1
|
||||
";
|
||||
};
|
||||
}
|
||||
|
|
@ -1,127 +0,0 @@
|
|||
{ config, pkgs, lib, fetchFromGitHub, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
home = {
|
||||
username = "swarsel";
|
||||
homeDirectory = "/home/swarsel";
|
||||
stateVersion = "23.05"; # TEMPLATE -- Please read the comment before changing.
|
||||
keyboard.layout = "us"; # TEMPLATE
|
||||
home.packages = with pkgs; [
|
||||
# ---------------------------------------------------------------
|
||||
# if schildichat works on this machine, use it, otherwise go for element
|
||||
# element-desktop
|
||||
# ---------------------------------------------------------------
|
||||
];
|
||||
};
|
||||
# update path if the sops private key is stored somewhere else
|
||||
sops.age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/sops" ];
|
||||
|
||||
# waybar config - TEMPLATE - update for cores and temp
|
||||
programs.waybar.settings.mainBar = {
|
||||
#cpu.format = "{icon0} {icon1} {icon2} {icon3}";
|
||||
cpu.format = "{icon0} {icon1} {icon2} {icon3} {icon4} {icon5} {icon6} {icon7}";
|
||||
temperature.hwmon-path = "/sys/devices/platform/coretemp.0/hwmon/hwmon1/temp3_input";
|
||||
};
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# is this machine always connected to power? If yes, use this block:
|
||||
#
|
||||
# programs.waybar.settings.mainBar."custom/pseudobat"= {
|
||||
# format= "";
|
||||
# on-click-right= "wlogout -p layer-shell";
|
||||
# };
|
||||
# programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
|
||||
# "mpris"
|
||||
# "custom/left-arrow-light"
|
||||
# "network"
|
||||
# "custom/left-arrow-dark"
|
||||
# "pulseaudio"
|
||||
# "custom/left-arrow-light"
|
||||
# "custom/pseudobat"
|
||||
# "battery"
|
||||
# "custom/left-arrow-dark"
|
||||
# "group/hardware"
|
||||
# "custom/left-arrow-light"
|
||||
# "clock#2"
|
||||
# "custom/left-arrow-dark"
|
||||
# "clock#1"
|
||||
# ];
|
||||
#
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
# if not always connected to power (laptop), use this (default):
|
||||
|
||||
programs.waybar.settings.mainBar.modules-right = ["custom/outer-left-arrow-dark"
|
||||
"mpris"
|
||||
"custom/left-arrow-light"
|
||||
"network"
|
||||
"custom/left-arrow-dark"
|
||||
"pulseaudio"
|
||||
"custom/left-arrow-light"
|
||||
"custom/pseudobat"
|
||||
"battery"
|
||||
"custom/left-arrow-dark"
|
||||
"group/hardware"
|
||||
"custom/left-arrow-light"
|
||||
"clock#2"
|
||||
"custom/left-arrow-dark"
|
||||
"clock#1"
|
||||
];
|
||||
|
||||
# -----------------------------------------------------------------
|
||||
|
||||
wayland.windowManager.sway= {
|
||||
config = rec {
|
||||
# update for actual inputs here,
|
||||
input = {
|
||||
"36125:53060:splitkb.com_Kyria_rev3" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
# "1:1:AT_Translated_Set_2_keyboard" = { # TEMPLATE
|
||||
# xkb_layout = "us";
|
||||
# xkb_options = "grp:win_space_toggle";
|
||||
# # xkb_options = "ctrl:nocaps,grp:win_space_toggle";
|
||||
# xkb_variant = "altgr-intl";
|
||||
# };
|
||||
"type:touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "enabled";
|
||||
middle_emulation = "enabled";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
output = {
|
||||
DP-1 = {
|
||||
mode = "1920x1280"; # TEMPLATE
|
||||
scale = "1";
|
||||
bg = "~/.dotfiles/wallpaper/t14swp.png fill";
|
||||
};
|
||||
};
|
||||
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in {
|
||||
# TEMPLATE
|
||||
"${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkschildi.sh\"";
|
||||
# "${modifier}+w" = "exec \"bash ~/.dotfiles/scripts/checkelement.sh\"";
|
||||
};
|
||||
|
||||
startup = [
|
||||
|
||||
{ command = "nextcloud --background";}
|
||||
{ command = "discord --start-minimized";}
|
||||
{ command = "element-desktop --hidden -enable-features=UseOzonePlatform -ozone-platform=wayland --disable-gpu-driver-bug-workarounds";}
|
||||
{ command = "ANKI_WAYLAND=1 anki";}
|
||||
{ command = "OBSIDIAN_USE_WAYLAND=1 obsidian";}
|
||||
{ command = "nm-applet";}
|
||||
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
{ config, lib, pkgs, inputs, ... }:
|
||||
|
||||
{
|
||||
|
||||
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
||||
services = {
|
||||
getty.autologinUser = "swarsel";
|
||||
greetd.settings.initial_session.user="swarsel";
|
||||
};
|
||||
|
||||
# Bootloader
|
||||
# boot.loader.grub.enable = true;
|
||||
# boot.loader.grub.device = "/dev/sda"; # TEMPLATE - if only one disk, this will work
|
||||
# boot.loader.grub.useOSProber = true;
|
||||
|
||||
# --------------------------------------
|
||||
# you might need a configuration like this instead:
|
||||
# Bootloader
|
||||
# boot.loader.grub.enable = true;
|
||||
# boot.loader.grub.devices = ["nodev" ];
|
||||
# boot.loader.grub.useOSProber = true;
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
# --------------------------------------
|
||||
|
||||
networking.hostName = "twoson"; # Define your hostname.
|
||||
|
||||
stylix.image = ../../wallpaper/t14swp.png;
|
||||
|
||||
stylix = {
|
||||
base16Scheme = ../../wallpaper/swarsel.yaml;
|
||||
# base16Scheme = "${pkgs.base16-schemes}/share/themes/shapeshifter.yaml";
|
||||
polarity = "dark";
|
||||
opacity.popups = 0.5;
|
||||
cursor = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors";
|
||||
size = 16;
|
||||
};
|
||||
fonts = {
|
||||
sizes = {
|
||||
terminal = 10;
|
||||
applications = 11;
|
||||
};
|
||||
serif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
|
||||
sansSerif = {
|
||||
# package = (pkgs.nerdfonts.override { fonts = [ "FiraMono" "FiraCode"]; });
|
||||
package = pkgs.cantarell-fonts;
|
||||
# package = pkgs.montserrat;
|
||||
name = "Cantarell";
|
||||
# name = "FiraCode Nerd Font Propo";
|
||||
# name = "Montserrat";
|
||||
};
|
||||
|
||||
monospace = {
|
||||
package = (pkgs.nerdfonts.override { fonts = [ "FiraCode"]; });
|
||||
name = "FiraCode Nerd Font Mono";
|
||||
};
|
||||
|
||||
emoji = {
|
||||
package = pkgs.noto-fonts-emoji;
|
||||
name = "Noto Color Emoji";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
# Configure keymap in X11 (only used for login)
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
};
|
||||
|
||||
users.users.swarsel = {
|
||||
isNormalUser = true;
|
||||
description = "TEMPLATE";
|
||||
extraGroups = [ "networkmanager" "wheel" "lp" "audio" "video" ];
|
||||
packages = with pkgs; [];
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
|
||||
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue