Compare commits
290 commits
backup_pre
...
main
9
Makefile
|
@ -1,6 +1,11 @@
|
||||||
.PHONY: build
|
.PHONY: default build flathub
|
||||||
|
|
||||||
HOST := $(shell hostname)
|
HOST := $(shell hostname)
|
||||||
|
|
||||||
|
default: build
|
||||||
|
|
||||||
build:
|
build:
|
||||||
nix build .#nixosConfigurations.$(HOST).config.system.build.toplevel
|
nix build -j 1 --keep-going .#nixosConfigurations.$(HOST).config.system.build.toplevel
|
||||||
|
|
||||||
|
flathub:
|
||||||
|
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
|
60
README.org
|
@ -1,10 +1,62 @@
|
||||||
#+title: README
|
#+title: README
|
||||||
#+author: Evie Litherland-Smith
|
#+author: Evie Litherland-Smith
|
||||||
#+email: evie@xenia.me.uk
|
#+email: evie@xenia.me.uk
|
||||||
System configuration files for NixOS.
|
My personal NixOS + home-manager configuration files.
|
||||||
|
|
||||||
Fairly minimal setup and installation, to be paired with [[https://git.xenia.me.uk/pixelifytica/home-manager.git][a
|
To set up without cloning the repository (assuming an already running
|
||||||
home-manager config]] to get the full user setup.
|
NixOS system), run:
|
||||||
|
#+begin_src bash
|
||||||
|
sudo nixos-rebuild switch --flake "git+https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main"\#$(hostname)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
Further reading:
|
* Password store setup
|
||||||
|
** Transfer GPG key(s)
|
||||||
|
#+begin_src bash
|
||||||
|
# Export keys on existing machine
|
||||||
|
gpg -a --export > publickeys.asc
|
||||||
|
gpg -a --export-secret-keys > privatekeys.asc
|
||||||
|
# Import key on new machine
|
||||||
|
gpg --import privatekeys.asc; gpg --import publickeys.asc
|
||||||
|
# Edit (for each key) to set trust
|
||||||
|
gpg --edit-key evie@xenia.me.uk
|
||||||
|
#+end_src
|
||||||
|
** Clone password-store repository
|
||||||
|
#+begin_src bash
|
||||||
|
git clone https://git.xenia.me.uk/pixelifytica/pass $PASSWORD_STORE_DIR
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* Email setup
|
||||||
|
** Passwords for mbsync
|
||||||
|
Run src_bash{mbsync-ensure-pass} to check for passwords required by
|
||||||
|
~mbsync~, and query for missing passwords.
|
||||||
|
|
||||||
|
Static app-specific passwords are stored in ~password-store~, fetch from
|
||||||
|
there to add to secret service.
|
||||||
|
** Proton
|
||||||
|
*** Bridge
|
||||||
|
Start Proton Mail Bridge application, if needed configure to store
|
||||||
|
using =SecretService= and log in. Application will auto-start with
|
||||||
|
desktop session.
|
||||||
|
|
||||||
|
Use password from Bridge for ~mbsync~.
|
||||||
|
** Outlook
|
||||||
|
*** Davmail
|
||||||
|
Run src_bash{davmail-setup} to automate this process.
|
||||||
|
|
||||||
|
On first run (or if token expires), stop systemd service and run manually to complete manual auth. Token will stay valid for a little while (no idea how long specifically).
|
||||||
|
#+begin_src bash
|
||||||
|
# Restart service to ensure ~/.davmail.properties exists
|
||||||
|
systemctl --user restart davmail.service
|
||||||
|
# Run to use manual authentication
|
||||||
|
systemctl --user stop davmail.service && davmail -notray ~/.davmail.properties
|
||||||
|
# Restart again so that service picks up available ports
|
||||||
|
systemctl --user restart davmail.service
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* Flathub setup
|
||||||
|
#+begin_src bash
|
||||||
|
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
* Further reading:
|
||||||
- https://nixos.org/
|
- https://nixos.org/
|
||||||
|
|
|
@ -1,19 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [
|
|
||||||
../services/caddy.nix
|
|
||||||
../services/forgejo.nix
|
|
||||||
../services/grafana.nix
|
|
||||||
../services/minecraft.nix
|
|
||||||
../services/nix-serve.nix
|
|
||||||
../services/radicale.nix
|
|
||||||
../services/sshd.nix
|
|
||||||
../services/syncthing.nix
|
|
||||||
# ../services/znc.nix
|
|
||||||
];
|
|
||||||
boot.loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
users.mutableUsers = false;
|
|
||||||
system.autoUpgrade.operation = "switch";
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
{...}: {imports = [./laptop.nix];}
|
|
|
@ -1,19 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
imports = [./desktop.nix];
|
|
||||||
boot = {
|
|
||||||
loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
initrd = {
|
|
||||||
secrets = {"/crypto_keyfile.bin" = null;};
|
|
||||||
luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb" = {
|
|
||||||
device = "/dev/disk/by-uuid/47d34268-5100-4eba-b34d-220f4239c1cb";
|
|
||||||
keyFile = "/crypto_keyfile.bin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment = {
|
|
||||||
etc."ppp/options".text = ''
|
|
||||||
ipcp-accept-remote
|
|
||||||
'';
|
|
||||||
systemPackages = with pkgs; [openfortivpn samba];
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,20 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
imports = [./laptop.nix];
|
|
||||||
boot.initrd = {
|
|
||||||
secrets = {"/crypto_keyfile.bin" = null;};
|
|
||||||
luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd" = {
|
|
||||||
device = "/dev/disk/by-uuid/761eeb11-3091-4142-9232-4fb33165eccd";
|
|
||||||
keyFile = "/crypto_keyfile.bin";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
environment = {
|
|
||||||
etc."ppp/options".text = ''
|
|
||||||
ipcp-accept-remote
|
|
||||||
'';
|
|
||||||
systemPackages = with pkgs; [openfortivpn];
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
samba.enable = true;
|
|
||||||
hardware.bolt.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
{config, ...}: {
|
|
||||||
imports = [./desktop.nix];
|
|
||||||
boot = {
|
|
||||||
initrd.kernelModules = ["amdgpu"];
|
|
||||||
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback];
|
|
||||||
extraModprobeConfig = ''
|
|
||||||
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
hardware = {
|
|
||||||
opengl = {
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
|
||||||
steam-hardware.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,135 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
iosevkaCustom,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
nix = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
cores = 0;
|
|
||||||
max-jobs = "auto";
|
|
||||||
trusted-users = ["root"];
|
|
||||||
experimental-features = ["nix-command" "flakes"];
|
|
||||||
auto-optimise-store = true;
|
|
||||||
};
|
|
||||||
channel.enable = true;
|
|
||||||
gc = {
|
|
||||||
automatic = true;
|
|
||||||
options = "--delete-older-than 7d";
|
|
||||||
};
|
|
||||||
optimise.automatic = true;
|
|
||||||
extraOptions = ''
|
|
||||||
keep-outputs = false
|
|
||||||
keep-derivations = false
|
|
||||||
min-free = ${toString (100 * 1024 * 1024)}
|
|
||||||
max-free = ${toString (1024 * 1024 * 1024)}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
system = {
|
|
||||||
stateVersion = "23.05";
|
|
||||||
autoUpgrade = {
|
|
||||||
enable = true;
|
|
||||||
persistent = true;
|
|
||||||
allowReboot = false;
|
|
||||||
flake = "git+${config.nix.registry.my-nixos.to.url}";
|
|
||||||
dates = "02:00";
|
|
||||||
randomizedDelaySec = "45min";
|
|
||||||
flags = [
|
|
||||||
"--accept-flake-config"
|
|
||||||
"--option"
|
|
||||||
"extra-binary-caches"
|
|
||||||
"https://nix.xenia.me.uk"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
boot.loader = {
|
|
||||||
systemd-boot.enable = true;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
};
|
|
||||||
networking = {
|
|
||||||
networkmanager.enable = true;
|
|
||||||
firewall.enable = true;
|
|
||||||
nameservers = ["9.9.9.9"];
|
|
||||||
};
|
|
||||||
users.users.root.openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC4M1zV3yLMMI1tYwdY9QDXJDlOBugm7UXKC+Xk89yHq pixelifytica@Vanguard"
|
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICPypUUGVAdpl0SHrUDVw0RureuFNsljrXQvrf0uc055 pixelifytica@Northstar"
|
|
||||||
];
|
|
||||||
environment = {
|
|
||||||
pathsToLink = ["/share/zsh"];
|
|
||||||
sessionVariables = {
|
|
||||||
XDG_CONFIG_HOME = "$HOME/.config";
|
|
||||||
XDG_CACHE_HOME = "$HOME/.cache";
|
|
||||||
XDG_DATA_HOME = "$HOME/.local/share";
|
|
||||||
XDG_STATE_HOME = "$HOME/.local/state";
|
|
||||||
};
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
libsecret
|
|
||||||
coreutils-full
|
|
||||||
gnumake
|
|
||||||
git
|
|
||||||
file
|
|
||||||
zip
|
|
||||||
unzip
|
|
||||||
curl
|
|
||||||
wget
|
|
||||||
dig
|
|
||||||
wireguard-tools
|
|
||||||
(quickemu.override {qemu = qemu_full;})
|
|
||||||
];
|
|
||||||
localBinInPath = true;
|
|
||||||
};
|
|
||||||
programs = {
|
|
||||||
command-not-found.enable = false;
|
|
||||||
ssh.startAgent = true;
|
|
||||||
nano = {
|
|
||||||
enable = true;
|
|
||||||
syntaxHighlight = true;
|
|
||||||
nanorc = ''
|
|
||||||
set nowrap
|
|
||||||
set tabstospaces
|
|
||||||
set tabsize 2
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
upower.enable = true;
|
|
||||||
power-profiles-daemon.enable = true;
|
|
||||||
system76-scheduler = {
|
|
||||||
enable = true;
|
|
||||||
useStockConfig = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
virtualisation.podman.enable = true;
|
|
||||||
time.timeZone = "Europe/London";
|
|
||||||
i18n.defaultLocale = "en_GB.UTF-8";
|
|
||||||
console = {
|
|
||||||
font = iosevkaCustom.names.iosevka-custom-nerdfont;
|
|
||||||
useXkbConfig = true;
|
|
||||||
};
|
|
||||||
fonts = {
|
|
||||||
packages = with pkgs;
|
|
||||||
with iosevkaCustom.packages; [
|
|
||||||
iosevka-custom-nerdfont
|
|
||||||
iosevka-custom-aile
|
|
||||||
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) # Status bar
|
|
||||||
emacs-all-the-icons-fonts # Emacs
|
|
||||||
weather-icons # Emacs
|
|
||||||
lmodern # LaTeX
|
|
||||||
noto-fonts-emoji # Emoji
|
|
||||||
];
|
|
||||||
fontconfig = {
|
|
||||||
enable = true;
|
|
||||||
defaultFonts = with iosevkaCustom.names; {
|
|
||||||
serif = [iosevka-custom-aile];
|
|
||||||
sansSerif = [iosevka-custom-aile];
|
|
||||||
monospace = [iosevka-custom-nerdfont];
|
|
||||||
emoji = ["Noto Color Emoji"];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,58 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [./default.nix];
|
|
||||||
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
|
|
||||||
system.autoUpgrade.operation = "boot";
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
environment = {
|
|
||||||
plasma6 =
|
|
||||||
lib.mkIf config.services.desktopManager.plasma6.enable
|
|
||||||
{excludePackages = with pkgs.kdePackages; [plasma-browser-integration];};
|
|
||||||
systemPackages = with pkgs; [
|
|
||||||
xdg-utils
|
|
||||||
hunspell
|
|
||||||
hunspellDicts.en_GB-large
|
|
||||||
];
|
|
||||||
};
|
|
||||||
programs = {
|
|
||||||
dconf.enable = true;
|
|
||||||
noisetorch.enable = true;
|
|
||||||
kdeconnect.enable = true;
|
|
||||||
gamescope = {
|
|
||||||
enable = true;
|
|
||||||
capSysNice = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
services = {
|
|
||||||
flatpak.enable = true;
|
|
||||||
printing.enable = true;
|
|
||||||
pipewire = {
|
|
||||||
enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
alsa = {
|
|
||||||
enable = true;
|
|
||||||
support32Bit = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xserver = {
|
|
||||||
enable = true;
|
|
||||||
xkb = {
|
|
||||||
layout = "gb";
|
|
||||||
variant = "";
|
|
||||||
options = "ctrl:nocaps";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
displayManager.sddm = {
|
|
||||||
enable = true;
|
|
||||||
wayland.enable = true;
|
|
||||||
};
|
|
||||||
desktopManager.plasma6 = {
|
|
||||||
enable = true;
|
|
||||||
enableQt5Integration = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
127
flake.lock
|
@ -1,5 +1,60 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"base16": {
|
||||||
|
"inputs": {
|
||||||
|
"fromYaml": "fromYaml"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721224776,
|
||||||
|
"narHash": "sha256-iakVQHg2DSmdOc5dNBwrDt9JLRxX5MT+IIbxfZEpGdo=",
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "base16.nix",
|
||||||
|
"rev": "c89c8123310257f3ddc04cc59aa4b5573c6d515f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "base16.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"fromYaml": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1721222302,
|
||||||
|
"narHash": "sha256-5vL4w9+tS9yd8WpIiDUtxN1IuxCVK2nebZMs/hCXXis=",
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "fromYaml",
|
||||||
|
"rev": "93bad85d1633b8b27287b438c0bd394094c24d06",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "SenchoPens",
|
||||||
|
"repo": "fromYaml",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1720042825,
|
||||||
|
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.05",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"iosevka-custom": {
|
"iosevka-custom": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
|
@ -18,6 +73,26 @@
|
||||||
"url": "https://git.xenia.me.uk/pixelifytica/iosevka.git"
|
"url": "https://git.xenia.me.uk/pixelifytica/iosevka.git"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nix-index-database": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725161148,
|
||||||
|
"narHash": "sha256-WfAHq3Ag3vLNFfWxKHjFBFdPI6JIideWFJod9mx1eoo=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-index-database",
|
||||||
|
"rev": "32058e9138248874773630c846563b1a78ee7a5b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nix-index-database",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1717602782,
|
"lastModified": 1717602782,
|
||||||
|
@ -36,11 +111,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719838683,
|
"lastModified": 1725407940,
|
||||||
"narHash": "sha256-Zw9rQjHz1ilNIimEXFeVa1ERNRBF8DoXDhLAZq5B4pE=",
|
"narHash": "sha256-tiN5Rlg/jiY0tyky+soJZoRzLKbPyIdlQ77xVgREDNM=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "d032c1a6dfad4eedec7e35e91986becc699d7d69",
|
"rev": "6f6c45b5134a8ee2e465164811e451dcb5ad86e3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -50,10 +125,54 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"plasma-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": [
|
||||||
|
"home-manager"
|
||||||
|
],
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725575977,
|
||||||
|
"narHash": "sha256-1e9zB0dMRwdAbhxVATlL25rExMDh4gZ/3AXdkpU8408=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "plasma-manager",
|
||||||
|
"rev": "b82b9ba85c156a5e7f865cc94ed2a4df20cbbf39",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "plasma-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"base16": "base16",
|
||||||
|
"home-manager": "home-manager",
|
||||||
"iosevka-custom": "iosevka-custom",
|
"iosevka-custom": "iosevka-custom",
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nix-index-database": "nix-index-database",
|
||||||
|
"nixpkgs": "nixpkgs_2",
|
||||||
|
"plasma-manager": "plasma-manager",
|
||||||
|
"tt-schemes": "tt-schemes"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"tt-schemes": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1725273692,
|
||||||
|
"narHash": "sha256-XOxESrzdIpcYMLS+s4D16M4c8gAk3sLyAQUvsb+lQLk=",
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "schemes",
|
||||||
|
"rev": "992b6c372a00e284a7dc26b19a0d11b7afcba1f1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "tinted-theming",
|
||||||
|
"repo": "schemes",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
180
flake.nix
|
@ -2,136 +2,82 @@
|
||||||
description = "Evie's machine configurations";
|
description = "Evie's machine configurations";
|
||||||
|
|
||||||
nixConfig = {
|
nixConfig = {
|
||||||
extra-substituters = ["https://nix.xenia.me.uk"];
|
extra-substituters = [ "https://nix.xenia.me.uk" ];
|
||||||
extra-trusted-public-keys = ["nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI="];
|
extra-trusted-public-keys = [ "nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI=" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager/release-24.05";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
plasma-manager = {
|
||||||
|
url = "github:nix-community/plasma-manager";
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
home-manager.follows = "home-manager";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
nix-index-database = {
|
||||||
|
url = "github:nix-community/nix-index-database";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git";
|
iosevka-custom.url = "git+https://git.xenia.me.uk/pixelifytica/iosevka.git";
|
||||||
|
base16.url = "github:SenchoPens/base16.nix";
|
||||||
|
tt-schemes = {
|
||||||
|
url = "github:tinted-theming/schemes";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
nixpkgs,
|
inputs@{ nixpkgs, ... }:
|
||||||
iosevka-custom,
|
{
|
||||||
...
|
nixosConfigurations = {
|
||||||
}: let
|
## Server
|
||||||
defaultSpecialArgs = {system ? "x86_64-linux", ...}: {
|
Legion = nixpkgs.lib.nixosSystem {
|
||||||
iosevkaCustom = {
|
specialArgs = {
|
||||||
packages = iosevka-custom.outputs.packages.${system};
|
inherit inputs;
|
||||||
names = iosevka-custom.outputs.names;
|
username = "pixelifytica";
|
||||||
};
|
hostName = "Legion";
|
||||||
};
|
|
||||||
defaultModules = {
|
|
||||||
hostName ? "Atlas",
|
|
||||||
userName ? "pixelifytica",
|
|
||||||
loginShell ? "zsh",
|
|
||||||
...
|
|
||||||
}: [
|
|
||||||
./configuration/default.nix
|
|
||||||
./configuration/${hostName}.nix
|
|
||||||
./hardware-configuration/${hostName}.nix
|
|
||||||
({
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
networking = {inherit hostName;};
|
|
||||||
nix = {
|
|
||||||
settings.trusted-users = [userName];
|
|
||||||
registry = {
|
|
||||||
my-nixos = {
|
|
||||||
from = {
|
|
||||||
type = "indirect";
|
|
||||||
id = "my-nixos";
|
|
||||||
};
|
|
||||||
to = {
|
|
||||||
type = "git";
|
|
||||||
url = "https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
my-home-manager = {
|
|
||||||
from = {
|
|
||||||
type = "indirect";
|
|
||||||
id = "my-home-manager";
|
|
||||||
};
|
|
||||||
to = {
|
|
||||||
type = "git";
|
|
||||||
url = "https://git.xenia.me.uk/pixelifytica/home-manager.git?ref=main";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
modules = [ ./system/default.nix ];
|
||||||
};
|
};
|
||||||
programs.${loginShell}.enable = true;
|
## Personal
|
||||||
users.users.${userName} = {
|
Vanguard = nixpkgs.lib.nixosSystem {
|
||||||
shell = pkgs.${loginShell};
|
specialArgs = {
|
||||||
group = "users";
|
inherit inputs;
|
||||||
isNormalUser = true;
|
username = "pixelifytica";
|
||||||
description = "Evie Litherland-Smith";
|
hostName = "Vanguard";
|
||||||
extraGroups = ["networkmanager" "wheel" "video" "input" "uinput"];
|
};
|
||||||
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
modules = [ ./system/default.nix ];
|
||||||
openssh = {inherit (config.users.users.root.openssh) authorizedKeys;};
|
|
||||||
};
|
};
|
||||||
})
|
Northstar = nixpkgs.lib.nixosSystem {
|
||||||
];
|
specialArgs = {
|
||||||
in {
|
inherit inputs;
|
||||||
devShells.x86_64-linux.default = let
|
username = "pixelifytica";
|
||||||
pkgs = import nixpkgs {system = "x86_64-linux";};
|
hostName = "Northstar";
|
||||||
in
|
};
|
||||||
pkgs.mkShellNoCC {
|
modules = [ ./system/default.nix ];
|
||||||
packages = with pkgs; [nil pre-commit];
|
|
||||||
shellHook = "pre-commit install --install-hooks";
|
|
||||||
};
|
|
||||||
nixosConfigurations = {
|
|
||||||
## Server
|
|
||||||
Legion = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = defaultSpecialArgs {inherit system;};
|
|
||||||
modules = defaultModules {
|
|
||||||
hostName = "Legion";
|
|
||||||
userName = "pixelifytica";
|
|
||||||
loginShell = "zsh";
|
|
||||||
};
|
};
|
||||||
};
|
## Work
|
||||||
## Personal
|
Tone = nixpkgs.lib.nixosSystem {
|
||||||
Northstar = nixpkgs.lib.nixosSystem rec {
|
specialArgs = {
|
||||||
system = "x86_64-linux";
|
inherit inputs;
|
||||||
specialArgs = defaultSpecialArgs {inherit system;};
|
username = "elitherl";
|
||||||
modules = defaultModules {
|
hostName = "Tone";
|
||||||
hostName = "Northstar";
|
};
|
||||||
userName = "pixelifytica";
|
modules = [ ./system/default.nix ];
|
||||||
loginShell = "zsh";
|
|
||||||
};
|
};
|
||||||
};
|
Ronin = nixpkgs.lib.nixosSystem {
|
||||||
Vanguard = nixpkgs.lib.nixosSystem rec {
|
specialArgs = {
|
||||||
system = "x86_64-linux";
|
inherit inputs;
|
||||||
specialArgs = defaultSpecialArgs {inherit system;};
|
username = "elitherl";
|
||||||
modules = defaultModules {
|
hostName = "Ronin";
|
||||||
hostName = "Vanguard";
|
};
|
||||||
userName = "pixelifytica";
|
modules = [ ./system/default.nix ];
|
||||||
loginShell = "zsh";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
## Work
|
|
||||||
Tone = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = defaultSpecialArgs {inherit system;};
|
|
||||||
modules = defaultModules {
|
|
||||||
hostName = "Tone";
|
|
||||||
userName = "elitherl";
|
|
||||||
loginShell = "zsh";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
Scorch = nixpkgs.lib.nixosSystem rec {
|
|
||||||
system = "x86_64-linux";
|
|
||||||
specialArgs = defaultSpecialArgs {inherit system;};
|
|
||||||
modules = defaultModules {
|
|
||||||
hostName = "Scorch";
|
|
||||||
userName = "elitherl";
|
|
||||||
loginShell = "zsh";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
BIN
pfp/personal.png
Normal file
After Width: | Height: | Size: 178 KiB |
BIN
pfp/personal_micro.jpg
Normal file
After Width: | Height: | Size: 22 KiB |
BIN
pfp/work.jpg
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
pfp/work_micro.jpg
Normal file
After Width: | Height: | Size: 21 KiB |
|
@ -1,5 +0,0 @@
|
||||||
{pkgs, ...}: {
|
|
||||||
environment.systemPackages = with pkgs; [steamcmd];
|
|
||||||
networking.firewall.allowedTCPPorts = [8777];
|
|
||||||
services.caddy.virtualHosts."astro.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8777";
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
{...}: {
|
|
||||||
imports = [./caddy.nix];
|
|
||||||
services = {
|
|
||||||
forgejo = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
server = {
|
|
||||||
ROOT_URL = "https://git.xenia.me.uk";
|
|
||||||
DOMAIN = "git.xenia.me.uk";
|
|
||||||
HTTP_ADDR = "127.0.0.1";
|
|
||||||
HTTP_PORT = 3100;
|
|
||||||
DISABLE_SSH = true;
|
|
||||||
};
|
|
||||||
ui = {DEFAULT_THEME = "forgejo-auto";};
|
|
||||||
admin = {DISABLE_REGULAR_ORG_CREATION = true;};
|
|
||||||
service = {DISABLE_REGISTRATION = true;};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
caddy.virtualHosts."git.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:3100";
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
{config, ...}: {
|
|
||||||
services.minecraft-server = {
|
|
||||||
enable = true;
|
|
||||||
eula = true;
|
|
||||||
openFirewall = true;
|
|
||||||
declarative = true;
|
|
||||||
whitelist = {
|
|
||||||
"pixelifytica" = "b1848d60-4ddd-4fa4-a328-fb269910b6ae";
|
|
||||||
"HomeInTheClouds" = "d49f0aee-f217-477b-9516-9d5906f7fc87";
|
|
||||||
};
|
|
||||||
serverProperties = {
|
|
||||||
server-port = 25565;
|
|
||||||
difficulty = "easy";
|
|
||||||
gamemode = "survival";
|
|
||||||
force-gamemode = true;
|
|
||||||
max-players = 10;
|
|
||||||
# level-seed = 238902389203;
|
|
||||||
motd = "NixOS Minecraft server!";
|
|
||||||
white-list = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Caddy forwarding
|
|
||||||
services.caddy.virtualHosts."craft.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:${toString config.services.minecraft-server.serverProperties.server-port}";
|
|
||||||
}
|
|
20
system/Legion.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./services/caddy.nix
|
||||||
|
./services/forgejo.nix
|
||||||
|
./services/grafana.nix
|
||||||
|
./services/home-assistant.nix
|
||||||
|
./services/minecraft.nix
|
||||||
|
./services/nix-serve.nix
|
||||||
|
./services/satisfactory/default.nix
|
||||||
|
./services/sshd.nix
|
||||||
|
./services/syncthing.nix
|
||||||
|
];
|
||||||
|
boot.loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
users.mutableUsers = false;
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
}
|
31
system/Northstar.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ pkgs, username, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./laptop.nix ];
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
home.packages = [ pkgs.prusa-slicer ];
|
||||||
|
wayland.windowManager.sway.config = {
|
||||||
|
workspaceOutputAssign = [
|
||||||
|
{
|
||||||
|
output = "eDP-1";
|
||||||
|
workspace = "1";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.kanshi = {
|
||||||
|
enable = true;
|
||||||
|
settings = [
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "default";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = "eDP-1";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
105
system/Ronin.nix
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
{ pkgs, username, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./laptop.nix ];
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
imports = [ ./home/work.nix ];
|
||||||
|
wayland.windowManager.sway.config = {
|
||||||
|
output = {
|
||||||
|
# Work
|
||||||
|
"Dell Inc. DELL P3223QE CCG8YN3".scale = "1.5";
|
||||||
|
# Home
|
||||||
|
"Acer Technologies ED270R TJMEE0043W01".mode = "1920x1080@120Hz";
|
||||||
|
"Microstep MSI G27CQ4 E2 Unknown" = {
|
||||||
|
mode = "2560x1440@120Hz";
|
||||||
|
scale = "1.25";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
workspaceOutputAssign = [
|
||||||
|
{
|
||||||
|
output = "eDP-1";
|
||||||
|
workspace = "1";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
services.kanshi = {
|
||||||
|
enable = true;
|
||||||
|
settings =
|
||||||
|
let
|
||||||
|
laptopScreen.criteria = "eDP-1";
|
||||||
|
workMonitor.criteria = "Dell Inc. DELL P3223QE CCG8YN3";
|
||||||
|
homeMonitor1.criteria = "Acer Technologies ED270R TJMEE0043W01";
|
||||||
|
homeMonitor2.criteria = "Microstep MSI G27CQ4 E2 Unknown";
|
||||||
|
in
|
||||||
|
[
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "default";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
inherit (laptopScreen) criteria;
|
||||||
|
status = "enable";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "work";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
inherit (laptopScreen) criteria;
|
||||||
|
status = "disable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
inherit (workMonitor) criteria;
|
||||||
|
status = "enable";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
profile = {
|
||||||
|
name = "home";
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
inherit (laptopScreen) criteria;
|
||||||
|
status = "disable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
inherit (homeMonitor1) criteria;
|
||||||
|
status = "enable";
|
||||||
|
position = "0,140";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
inherit (homeMonitor2) criteria;
|
||||||
|
status = "enable";
|
||||||
|
position = "1920,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot.initrd = {
|
||||||
|
secrets = {
|
||||||
|
"/crypto_keyfile.bin" = null;
|
||||||
|
};
|
||||||
|
luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd" = {
|
||||||
|
device = "/dev/disk/by-uuid/761eeb11-3091-4142-9232-4fb33165eccd";
|
||||||
|
keyFile = "/crypto_keyfile.bin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
etc."ppp/options".text = ''
|
||||||
|
ipcp-accept-remote
|
||||||
|
'';
|
||||||
|
systemPackages = with pkgs; [ openfortivpn ];
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
samba.enable = true;
|
||||||
|
hardware.bolt.enable = true;
|
||||||
|
};
|
||||||
|
}
|
31
system/Tone.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{ pkgs, username, ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./desktop.nix ];
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
imports = [ ./home/work.nix ];
|
||||||
|
wayland.windowManager.sway.config = {
|
||||||
|
output."Dell Inc. DELL P3223QE CCG8YN3".scale = "1.5";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
initrd = {
|
||||||
|
secrets = {
|
||||||
|
"/crypto_keyfile.bin" = null;
|
||||||
|
};
|
||||||
|
luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb" = {
|
||||||
|
device = "/dev/disk/by-uuid/47d34268-5100-4eba-b34d-220f4239c1cb";
|
||||||
|
keyFile = "/crypto_keyfile.bin";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
etc."ppp/options".text = ''
|
||||||
|
ipcp-accept-remote
|
||||||
|
'';
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
openfortivpn
|
||||||
|
samba
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
92
system/Vanguard.nix
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
username,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ ./desktop.nix ];
|
||||||
|
home-manager.users.${username} = {
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
krita
|
||||||
|
kdenlive
|
||||||
|
helvum
|
||||||
|
prusa-slicer
|
||||||
|
blender
|
||||||
|
freecad
|
||||||
|
openscad
|
||||||
|
kicad-small
|
||||||
|
mangohud
|
||||||
|
wineWowPackages.waylandFull
|
||||||
|
winetricks
|
||||||
|
lutris
|
||||||
|
cartridges
|
||||||
|
prismlauncher
|
||||||
|
(writeShellScriptBin "steamscope" ''
|
||||||
|
gamescope -w 2560 -h 1440 -r 120 --adaptive-sync --force-grab-cursor --fullscreen -e -- steam -gamepadui
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
programs.obs-studio = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.obs-studio-plugins; [
|
||||||
|
wlrobs
|
||||||
|
obs-vkcapture
|
||||||
|
obs-pipewire-audio-capture
|
||||||
|
input-overlay
|
||||||
|
];
|
||||||
|
};
|
||||||
|
wayland.windowManager.sway.config = {
|
||||||
|
output = {
|
||||||
|
"Acer Technologies ED270R TJMEE0043W01" = {
|
||||||
|
mode = "1920x1080@120Hz";
|
||||||
|
position = "0 140";
|
||||||
|
adaptive_sync = "off";
|
||||||
|
};
|
||||||
|
"Microstep MSI G27CQ4 E2 Unknown" = {
|
||||||
|
mode = "2560x1440@120Hz";
|
||||||
|
scale = "1.25";
|
||||||
|
position = "1920 0";
|
||||||
|
adaptive_sync = "on";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
workspaceOutputAssign = [
|
||||||
|
{
|
||||||
|
output = "DP-1";
|
||||||
|
workspace = "2";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
output = "DP-2";
|
||||||
|
workspace = "1";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
startup = [ { command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-1 --primary"; } ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot = {
|
||||||
|
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||||
|
extraModprobeConfig = ''
|
||||||
|
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
hardware = {
|
||||||
|
amdgpu.initrd.enable = true;
|
||||||
|
opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
};
|
||||||
|
steam-hardware.enable = true;
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
gamemode.enable = true;
|
||||||
|
steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
gamescopeSession.enable = true;
|
||||||
|
};
|
||||||
|
gamescope = {
|
||||||
|
enable = true;
|
||||||
|
capSysNice = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
234
system/default.nix
Normal file
|
@ -0,0 +1,234 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
username,
|
||||||
|
hostName,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
./${hostName}.nix
|
||||||
|
./hardware-configuration/${hostName}.nix
|
||||||
|
];
|
||||||
|
nix = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.nixVersions.latest;
|
||||||
|
settings = {
|
||||||
|
cores = 0;
|
||||||
|
max-jobs = "auto";
|
||||||
|
trusted-users = [
|
||||||
|
"root"
|
||||||
|
username
|
||||||
|
];
|
||||||
|
experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
auto-optimise-store = true;
|
||||||
|
};
|
||||||
|
channel.enable = true;
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
optimise.automatic = true;
|
||||||
|
registry.my-nixos = {
|
||||||
|
from = {
|
||||||
|
type = "indirect";
|
||||||
|
id = "my-nixos";
|
||||||
|
};
|
||||||
|
to = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://git.xenia.me.uk/pixelifytica/nixos.git?ref=main";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraOptions = ''
|
||||||
|
keep-outputs = false
|
||||||
|
keep-derivations = false
|
||||||
|
min-free = ${toString (100 * 1024 * 1024)}
|
||||||
|
max-free = ${toString (1024 * 1024 * 1024)}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
nixpkgs = {
|
||||||
|
config.allowUnfreePredicate =
|
||||||
|
pkg:
|
||||||
|
builtins.elem (lib.getName pkg) [
|
||||||
|
"steam"
|
||||||
|
"steam-original"
|
||||||
|
"steam-run"
|
||||||
|
"steamcmd"
|
||||||
|
];
|
||||||
|
overlays = [ (final: prev: { inherit (inputs.plasma-manager.packages.${prev.system}) rc2nix; }) ];
|
||||||
|
};
|
||||||
|
system = {
|
||||||
|
stateVersion = "23.05";
|
||||||
|
autoUpgrade = {
|
||||||
|
enable = true;
|
||||||
|
persistent = true;
|
||||||
|
allowReboot = false;
|
||||||
|
flake = "git+${config.nix.registry.my-nixos.to.url}";
|
||||||
|
dates = "02:00";
|
||||||
|
randomizedDelaySec = "5min";
|
||||||
|
flags = [
|
||||||
|
"--accept-flake-config"
|
||||||
|
"--option"
|
||||||
|
"extra-binary-caches"
|
||||||
|
"https://nix.xenia.me.uk"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
systemd.services = lib.mkIf config.system.autoUpgrade.enable {
|
||||||
|
nixos-upgrade.serviceConfig = {
|
||||||
|
CPUQuota = "75%";
|
||||||
|
CPUWeight = 20;
|
||||||
|
IOWeight = 20;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
boot.loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
networking = {
|
||||||
|
inherit hostName;
|
||||||
|
networkmanager.enable = true;
|
||||||
|
firewall.enable = true;
|
||||||
|
nameservers = [ "9.9.9.9" ];
|
||||||
|
};
|
||||||
|
users.users =
|
||||||
|
let
|
||||||
|
authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC4M1zV3yLMMI1tYwdY9QDXJDlOBugm7UXKC+Xk89yHq pixelifytica@Vanguard"
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICPypUUGVAdpl0SHrUDVw0RureuFNsljrXQvrf0uc055 pixelifytica@Northstar"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
root.openssh = {
|
||||||
|
inherit authorizedKeys;
|
||||||
|
};
|
||||||
|
${username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
group = "users";
|
||||||
|
description = "Evie Litherland-Smith";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"video"
|
||||||
|
"input"
|
||||||
|
"uinput"
|
||||||
|
"dialout"
|
||||||
|
];
|
||||||
|
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
|
||||||
|
openssh = {
|
||||||
|
inherit authorizedKeys;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home-manager = {
|
||||||
|
useGlobalPkgs = true;
|
||||||
|
useUserPackages = true;
|
||||||
|
backupFileExtension = "backup";
|
||||||
|
users.${username} = {
|
||||||
|
imports = [ ./home/default.nix ];
|
||||||
|
home = {
|
||||||
|
inherit username;
|
||||||
|
stateVersion = "23.05";
|
||||||
|
homeDirectory = "/home/${username}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
accentColourName = "base0E";
|
||||||
|
# Emulating stylix behaviour, rewrite at some point
|
||||||
|
fonts =
|
||||||
|
let
|
||||||
|
monospace.name = inputs.iosevka-custom.outputs.names.iosevka-custom-nerdfont;
|
||||||
|
serif.name = inputs.iosevka-custom.outputs.names.iosevka-custom-aile;
|
||||||
|
sansSerif.name = serif.name;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit monospace serif sansSerif;
|
||||||
|
sizes = {
|
||||||
|
applications = 12;
|
||||||
|
desktop = 14;
|
||||||
|
popups = 16;
|
||||||
|
terminal = 12;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
environment = {
|
||||||
|
sessionVariables = {
|
||||||
|
XDG_CONFIG_HOME = "$HOME/.config";
|
||||||
|
XDG_CACHE_HOME = "$HOME/.cache";
|
||||||
|
XDG_DATA_HOME = "$HOME/.local/share";
|
||||||
|
XDG_STATE_HOME = "$HOME/.local/state";
|
||||||
|
};
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
coreutils-full
|
||||||
|
gnumake
|
||||||
|
git
|
||||||
|
file
|
||||||
|
zip
|
||||||
|
unzip
|
||||||
|
curl
|
||||||
|
wget
|
||||||
|
dig
|
||||||
|
wireguard-tools
|
||||||
|
quickemu
|
||||||
|
];
|
||||||
|
localBinInPath = true;
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
command-not-found.enable = false;
|
||||||
|
ssh.startAgent = true;
|
||||||
|
fish.enable = true;
|
||||||
|
nano = {
|
||||||
|
enable = true;
|
||||||
|
syntaxHighlight = true;
|
||||||
|
nanorc = ''
|
||||||
|
set nowrap
|
||||||
|
set tabstospaces
|
||||||
|
set tabsize 2
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
passSecretService.enable = true;
|
||||||
|
upower.enable = true;
|
||||||
|
power-profiles-daemon.enable = true;
|
||||||
|
system76-scheduler = {
|
||||||
|
enable = true;
|
||||||
|
useStockConfig = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
virtualisation.podman.enable = true;
|
||||||
|
time.timeZone = "Europe/London";
|
||||||
|
i18n.defaultLocale = "en_GB.UTF-8";
|
||||||
|
console.useXkbConfig = true;
|
||||||
|
fonts = {
|
||||||
|
packages =
|
||||||
|
(with inputs.iosevka-custom.outputs.packages.${pkgs.system}; [
|
||||||
|
iosevka-custom-nerdfont
|
||||||
|
iosevka-custom-aile
|
||||||
|
])
|
||||||
|
++ (with pkgs; [
|
||||||
|
lmodern # LaTeX
|
||||||
|
noto-fonts-emoji # Emoji
|
||||||
|
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
|
||||||
|
]);
|
||||||
|
fontconfig = {
|
||||||
|
enable = true;
|
||||||
|
defaultFonts = with inputs.iosevka-custom.outputs.names; {
|
||||||
|
serif = [ iosevka-custom-aile ];
|
||||||
|
sansSerif = [ iosevka-custom-aile ];
|
||||||
|
monospace = [ iosevka-custom-nerdfont ];
|
||||||
|
emoji = [ "Noto Color Emoji" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
98
system/desktop.nix
Normal file
|
@ -0,0 +1,98 @@
|
||||||
|
{ pkgs, username, ... }:
|
||||||
|
{
|
||||||
|
home-manager.users.${username}.imports = [ ./home/desktop.nix ];
|
||||||
|
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
environment = {
|
||||||
|
sessionVariables = {
|
||||||
|
NIXOS_OZONE_WL = "1";
|
||||||
|
QT_QPA_PLATFORM = "wayland";
|
||||||
|
GRIM_DEFAULT_DIR = "$HOME/Pictures/Screenshots";
|
||||||
|
};
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
libsecret
|
||||||
|
libnotify
|
||||||
|
xdg-utils
|
||||||
|
hunspell
|
||||||
|
hunspellDicts.en_GB-large
|
||||||
|
];
|
||||||
|
};
|
||||||
|
security = {
|
||||||
|
polkit.enable = true;
|
||||||
|
pam.loginLimits = [
|
||||||
|
{
|
||||||
|
domain = "@users";
|
||||||
|
item = "rtprio";
|
||||||
|
type = "-";
|
||||||
|
value = 1;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
dconf.enable = true;
|
||||||
|
noisetorch.enable = true;
|
||||||
|
kdeconnect.enable = true;
|
||||||
|
file-roller.enable = true;
|
||||||
|
thunar = {
|
||||||
|
enable = true;
|
||||||
|
plugins = with pkgs.xfce; [
|
||||||
|
thunar-archive-plugin
|
||||||
|
thunar-volman
|
||||||
|
];
|
||||||
|
};
|
||||||
|
sway.enable = true;
|
||||||
|
xwayland.enable = true;
|
||||||
|
};
|
||||||
|
gtk.iconCache.enable = true;
|
||||||
|
services = {
|
||||||
|
dbus.packages = [ pkgs.gcr ];
|
||||||
|
flatpak.enable = true;
|
||||||
|
printing.enable = true;
|
||||||
|
tumbler.enable = true;
|
||||||
|
udisks2.enable = true;
|
||||||
|
gvfs = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.gnome3.gvfs;
|
||||||
|
};
|
||||||
|
pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
alsa = {
|
||||||
|
enable = true;
|
||||||
|
support32Bit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
greetd = {
|
||||||
|
enable = true;
|
||||||
|
settings =
|
||||||
|
let
|
||||||
|
default_session.command = "sway";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit default_session;
|
||||||
|
initial_session = {
|
||||||
|
inherit (default_session) command;
|
||||||
|
user = username;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
xkb = {
|
||||||
|
layout = "gb";
|
||||||
|
variant = "";
|
||||||
|
options = "ctrl:nocaps";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
style = "adwaita";
|
||||||
|
platformTheme = "gnome";
|
||||||
|
};
|
||||||
|
xdg.portal = {
|
||||||
|
enable = true;
|
||||||
|
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
|
||||||
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,32 +1,44 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/b9d4ba04-a867-4ca6-88f9-79dc6a982e94";
|
device = "/dev/disk/by-uuid/b9d4ba04-a867-4ca6-88f9-79dc6a982e94";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/8F05-4C3A";
|
device = "/dev/disk/by-uuid/8F05-4C3A";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [
|
||||||
};
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/a10ee1da-3b0d-4f6b-b20a-d6a32ae1f668"; }
|
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ { device = "/dev/disk/by-uuid/a10ee1da-3b0d-4f6b-b20a-d6a32ae1f668"; } ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
@ -1,34 +1,43 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/84b28760-3643-4ad8-9ff6-ff78b57067f8";
|
device = "/dev/disk/by-uuid/84b28760-3643-4ad8-9ff6-ff78b57067f8";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-d1062931-ee58-4848-adf9-09452daeb6eb".device = "/dev/disk/by-uuid/d1062931-ee58-4848-adf9-09452daeb6eb";
|
boot.initrd.luks.devices."luks-d1062931-ee58-4848-adf9-09452daeb6eb".device = "/dev/disk/by-uuid/d1062931-ee58-4848-adf9-09452daeb6eb";
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/ABE3-88E7";
|
device = "/dev/disk/by-uuid/ABE3-88E7";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [
|
||||||
};
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/ba43345c-a652-497f-84d0-86064805446b"; }
|
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ { device = "/dev/disk/by-uuid/ba43345c-a652-497f-84d0-86064805446b"; } ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
@ -1,33 +1,44 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"vmd"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_pci_sdmmc"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/44c11386-0af8-4954-93bc-963a8e071672";
|
device = "/dev/disk/by-uuid/44c11386-0af8-4954-93bc-963a8e071672";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-bf1eab3a-6d92-430d-a282-8dd4c9efe2c7".device = "/dev/disk/by-uuid/bf1eab3a-6d92-430d-a282-8dd4c9efe2c7";
|
boot.initrd.luks.devices."luks-bf1eab3a-6d92-430d-a282-8dd4c9efe2c7".device = "/dev/disk/by-uuid/bf1eab3a-6d92-430d-a282-8dd4c9efe2c7";
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/85D5-B6EC";
|
device = "/dev/disk/by-uuid/85D5-B6EC";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [ { device = "/dev/disk/by-uuid/e65e5e4d-2084-4e6b-9255-3b36cba1529f"; } ];
|
||||||
[ { device = "/dev/disk/by-uuid/e65e5e4d-2084-4e6b-9255-3b36cba1529f"; }
|
|
||||||
];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
@ -1,13 +1,24 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = [
|
||||||
[ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -17,16 +28,14 @@
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-08822b9c-e9d6-424c-bc75-373f8667526d".device =
|
boot.initrd.luks.devices."luks-08822b9c-e9d6-424c-bc75-373f8667526d".device = "/dev/disk/by-uuid/08822b9c-e9d6-424c-bc75-373f8667526d";
|
||||||
"/dev/disk/by-uuid/08822b9c-e9d6-424c-bc75-373f8667526d";
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" = {
|
fileSystems."/boot/efi" = {
|
||||||
device = "/dev/disk/by-uuid/6009-89FC";
|
device = "/dev/disk/by-uuid/6009-89FC";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [ { device = "/dev/disk/by-uuid/ff9627a7-820c-4628-a040-2b665688b893"; } ];
|
||||||
[{ device = "/dev/disk/by-uuid/ff9627a7-820c-4628-a040-2b665688b893"; }];
|
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
@ -37,6 +46,5 @@
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
hardware.cpu.intel.updateMicrocode =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
}
|
|
@ -1,39 +1,51 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
|
||||||
];
|
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
"sr_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{ device = "/dev/disk/by-uuid/379a999a-0753-4cbf-b868-e275902f0f73";
|
device = "/dev/disk/by-uuid/379a999a-0753-4cbf-b868-e275902f0f73";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-0d50df5f-9456-4296-9156-f5b818e11552".device = "/dev/disk/by-uuid/0d50df5f-9456-4296-9156-f5b818e11552";
|
boot.initrd.luks.devices."luks-0d50df5f-9456-4296-9156-f5b818e11552".device = "/dev/disk/by-uuid/0d50df5f-9456-4296-9156-f5b818e11552";
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" = {
|
||||||
{ device = "/dev/disk/by-uuid/3297-A70D";
|
device = "/dev/disk/by-uuid/3297-A70D";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = [ "fmask=0022" "dmask=0022" ];
|
options = [
|
||||||
};
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
fileSystems."/mnt/secondary" =
|
|
||||||
{ device = "/dev/disk/by-uuid/036f1fcb-0674-4ae5-a2fe-cb4f7ada001d";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[ { device = "/dev/disk/by-uuid/26a8690a-70f9-4701-b224-b212f76a7035"; }
|
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/mnt/secondary" = {
|
||||||
|
device = "/dev/disk/by-uuid/036f1fcb-0674-4ae5-a2fe-cb4f7ada001d";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ { device = "/dev/disk/by-uuid/26a8690a-70f9-4701-b224-b212f76a7035"; } ];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
68
system/home/alacritty/default.nix
Normal file
|
@ -0,0 +1,68 @@
|
||||||
|
{ config, fonts, ... }:
|
||||||
|
{
|
||||||
|
programs.alacritty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
shell = "${config.programs.fish.package}/bin/fish";
|
||||||
|
font = {
|
||||||
|
size = fonts.sizes.applications;
|
||||||
|
normal = {
|
||||||
|
family = fonts.monospace.name;
|
||||||
|
style = "Regular";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
window = {
|
||||||
|
dynamic_title = true;
|
||||||
|
padding = {
|
||||||
|
x = 5;
|
||||||
|
y = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
live_config_reload = true;
|
||||||
|
selection.save_to_clipboard = true;
|
||||||
|
mouse.hide_when_typing = true;
|
||||||
|
colors =
|
||||||
|
let
|
||||||
|
mapColours =
|
||||||
|
isBright:
|
||||||
|
(builtins.listToAttrs (
|
||||||
|
builtins.map
|
||||||
|
(col: {
|
||||||
|
# Alacritty uses Yellow instead of Orange for BASE09
|
||||||
|
name = if col == "orange" then "yellow" else col;
|
||||||
|
value = "0x${config.scheme.${if isBright then "bright-${col}" else col}}";
|
||||||
|
})
|
||||||
|
[
|
||||||
|
"red"
|
||||||
|
"orange"
|
||||||
|
"green"
|
||||||
|
"cyan"
|
||||||
|
"blue"
|
||||||
|
"magenta"
|
||||||
|
]
|
||||||
|
));
|
||||||
|
mapNamedColours = mapColours false;
|
||||||
|
mapNamedBrightColours = mapColours true;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
draw_bold_text_with_bright_colors = false;
|
||||||
|
primary = {
|
||||||
|
background = "0x${config.scheme.base00}";
|
||||||
|
foreground = "0x${config.scheme.base05}";
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
cursor = "0x${config.scheme.base05}";
|
||||||
|
text = "0x${config.scheme.base00}";
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = "0x${config.scheme.base00-hex}";
|
||||||
|
white = "0x${config.scheme.base05-hex}";
|
||||||
|
} // mapNamedColours;
|
||||||
|
bright = {
|
||||||
|
black = "0x${config.scheme.base03-hex}";
|
||||||
|
white = "0x${config.scheme.base07-hex}";
|
||||||
|
} // mapNamedBrightColours;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
19
system/home/avizo/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
{ config, accentColourName, ... }:
|
||||||
|
{
|
||||||
|
services.avizo = {
|
||||||
|
enable = true;
|
||||||
|
settings.default =
|
||||||
|
let
|
||||||
|
sc = config.scheme;
|
||||||
|
rgba =
|
||||||
|
colourName: "${sc."${colourName}-rgb-r"}, ${sc."${colourName}-rgb-g"}, ${sc."${colourName}-rgb-b"}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
background = "rgba(${rgba "base00"}, 0.9)";
|
||||||
|
bar-bg-color = "rgba(${rgba "base00"}, 0.9)";
|
||||||
|
bar-fg-color = "rgba(${rgba "base05"}, 1.0)";
|
||||||
|
border-color = "rgba(${rgba accentColourName}, 1.0)";
|
||||||
|
image-opacity = "1.0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
92
system/home/base16/gtk.nix
Normal file
|
@ -0,0 +1,92 @@
|
||||||
|
{ scheme, accentColourName }:
|
||||||
|
with scheme.withHashtag;
|
||||||
|
''
|
||||||
|
@define-color accent_color ${scheme.withHashtag."${accentColourName}-hex"};
|
||||||
|
@define-color accent_bg_color ${scheme.withHashtag."${accentColourName}-hex"};
|
||||||
|
@define-color accent_fg_color ${base00-hex};
|
||||||
|
@define-color destructive_color ${base08-hex};
|
||||||
|
@define-color destructive_bg_color ${base08-hex};
|
||||||
|
@define-color destructive_fg_color ${base00-hex};
|
||||||
|
@define-color success_color ${base0B-hex};
|
||||||
|
@define-color success_bg_color ${base0B-hex};
|
||||||
|
@define-color success_fg_color ${base00-hex};
|
||||||
|
@define-color warning_color ${base0A-hex};
|
||||||
|
@define-color warning_bg_color ${base0A-hex};
|
||||||
|
@define-color warning_fg_color ${base00-hex};
|
||||||
|
@define-color error_color ${base08-hex};
|
||||||
|
@define-color error_bg_color ${base08-hex};
|
||||||
|
@define-color error_fg_color ${base00-hex};
|
||||||
|
@define-color window_bg_color ${base00-hex};
|
||||||
|
@define-color window_fg_color ${base05-hex};
|
||||||
|
@define-color view_bg_color ${base00-hex};
|
||||||
|
@define-color view_fg_color ${base05-hex};
|
||||||
|
@define-color headerbar_bg_color ${base01-hex};
|
||||||
|
@define-color headerbar_fg_color ${base05-hex};
|
||||||
|
@define-color headerbar_border_color rgba(${scheme.base01-dec-r}, ${scheme.base01-dec-g}, ${scheme.base01-dec-b}, 0.7);
|
||||||
|
@define-color headerbar_backdrop_color @window_bg_color;
|
||||||
|
@define-color headerbar_shade_color rgba(0, 0, 0, 0.07);
|
||||||
|
@define-color headerbar_darker_shade_color rgba(0, 0, 0, 0.07);
|
||||||
|
@define-color sidebar_bg_color ${base01-hex};
|
||||||
|
@define-color sidebar_fg_color ${base05-hex};
|
||||||
|
@define-color sidebar_backdrop_color @window_bg_color;
|
||||||
|
@define-color sidebar_shade_color rgba(0, 0, 0, 0.07);
|
||||||
|
@define-color secondary_sidebar_bg_color @sidebar_bg_color;
|
||||||
|
@define-color secondary_sidebar_fg_color @sidebar_fg_color;
|
||||||
|
@define-color secondary_sidebar_backdrop_color @sidebar_backdrop_color;
|
||||||
|
@define-color secondary_sidebar_shade_color @sidebar_shade_color;
|
||||||
|
@define-color card_bg_color ${base01-hex};
|
||||||
|
@define-color card_fg_color ${base05-hex};
|
||||||
|
@define-color card_shade_color rgba(0, 0, 0, 0.07);
|
||||||
|
@define-color dialog_bg_color ${base01-hex};
|
||||||
|
@define-color dialog_fg_color ${base05-hex};
|
||||||
|
@define-color popover_bg_color ${base01-hex};
|
||||||
|
@define-color popover_fg_color ${base05-hex};
|
||||||
|
@define-color popover_shade_color rgba(0, 0, 0, 0.07);
|
||||||
|
@define-color shade_color rgba(0, 0, 0, 0.07);
|
||||||
|
@define-color scrollbar_outline_color ${base02-hex};
|
||||||
|
@define-color blue_1 ${base0D-hex};
|
||||||
|
@define-color blue_2 ${base0D-hex};
|
||||||
|
@define-color blue_3 ${base0D-hex};
|
||||||
|
@define-color blue_4 ${base0D-hex};
|
||||||
|
@define-color blue_5 ${base0D-hex};
|
||||||
|
@define-color green_1 ${base0B-hex};
|
||||||
|
@define-color green_2 ${base0B-hex};
|
||||||
|
@define-color green_3 ${base0B-hex};
|
||||||
|
@define-color green_4 ${base0B-hex};
|
||||||
|
@define-color green_5 ${base0B-hex};
|
||||||
|
@define-color yellow_1 ${base0A-hex};
|
||||||
|
@define-color yellow_2 ${base0A-hex};
|
||||||
|
@define-color yellow_3 ${base0A-hex};
|
||||||
|
@define-color yellow_4 ${base0A-hex};
|
||||||
|
@define-color yellow_5 ${base0A-hex};
|
||||||
|
@define-color orange_1 ${base09-hex};
|
||||||
|
@define-color orange_2 ${base09-hex};
|
||||||
|
@define-color orange_3 ${base09-hex};
|
||||||
|
@define-color orange_4 ${base09-hex};
|
||||||
|
@define-color orange_5 ${base09-hex};
|
||||||
|
@define-color red_1 ${base08-hex};
|
||||||
|
@define-color red_2 ${base08-hex};
|
||||||
|
@define-color red_3 ${base08-hex};
|
||||||
|
@define-color red_4 ${base08-hex};
|
||||||
|
@define-color red_5 ${base08-hex};
|
||||||
|
@define-color purple_1 ${base0E-hex};
|
||||||
|
@define-color purple_2 ${base0E-hex};
|
||||||
|
@define-color purple_3 ${base0E-hex};
|
||||||
|
@define-color purple_4 ${base0E-hex};
|
||||||
|
@define-color purple_5 ${base0E-hex};
|
||||||
|
@define-color brown_1 ${base0F-hex};
|
||||||
|
@define-color brown_2 ${base0F-hex};
|
||||||
|
@define-color brown_3 ${base0F-hex};
|
||||||
|
@define-color brown_4 ${base0F-hex};
|
||||||
|
@define-color brown_5 ${base0F-hex};
|
||||||
|
@define-color light_1 ${base01-hex};
|
||||||
|
@define-color light_2 ${base01-hex};
|
||||||
|
@define-color light_3 ${base01-hex};
|
||||||
|
@define-color light_4 ${base01-hex};
|
||||||
|
@define-color light_5 ${base01-hex};
|
||||||
|
@define-color dark_1 ${base01-hex};
|
||||||
|
@define-color dark_2 ${base01-hex};
|
||||||
|
@define-color dark_3 ${base01-hex};
|
||||||
|
@define-color dark_4 ${base01-hex};
|
||||||
|
@define-color dark_5 ${base01-hex};
|
||||||
|
''
|
317
system/home/browser/bookmarks.json
Normal file
|
@ -0,0 +1,317 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "WhatsApp Web",
|
||||||
|
"url": "https://web.whatsapp.com/",
|
||||||
|
"tags": ["Social"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ABRP",
|
||||||
|
"url": "https://abetterrouteplanner.com/",
|
||||||
|
"tags": ["Travel"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Patreon",
|
||||||
|
"url": "https://www.patreon.com/home",
|
||||||
|
"tags": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NHS App",
|
||||||
|
"url": "https://www.nhsapp.service.nhs.uk/login",
|
||||||
|
"tags": ["Personal", "NHS"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Krystal Hosting",
|
||||||
|
"url": "https://krystal.io",
|
||||||
|
"tags": ["Server", "Hosting"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Home Assistant",
|
||||||
|
"url": "https://home.xenia.me.uk",
|
||||||
|
"tags": ["Home", "Automation", "Personal"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Forgejo",
|
||||||
|
"url": "https://git.xenia.me.uk",
|
||||||
|
"tags": ["Software", "Git", "Personal"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "GitHub",
|
||||||
|
"url": "https://github.com",
|
||||||
|
"tags": ["Software", "Git"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "CCFE GitLab",
|
||||||
|
"url": "https://git.ccfe.ac.uk",
|
||||||
|
"tags": ["Software", "Git", "Work"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NixOS Manual",
|
||||||
|
"url": "https://nixos.org/manual/nixpkgs/stable/",
|
||||||
|
"tags": ["Software", "Documentation", "Ni"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Home Manager",
|
||||||
|
"url": "https://nix-community.github.io/home-manager/options.xhtml",
|
||||||
|
"tags": ["Software", "Documentation", "Nix"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Plasma Manager",
|
||||||
|
"url": "https://nix-community.github.io/plasma-manager/",
|
||||||
|
"tags": ["Software", "Documentation", "Nix", "KDE", "Plasma"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NixOS and Flakes",
|
||||||
|
"url": "https://nixos-and-flakes.thiscute.world/",
|
||||||
|
"tags": ["Software", "Documentation", "Nix"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "KDE Plasma Desktop Scripting",
|
||||||
|
"url": "https://develop.kde.org/docs/plasma/scripting/",
|
||||||
|
"tags": ["Software", "Documentation", "KDE", "Plasma"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Awesome Emacs",
|
||||||
|
"url": "https://github.com/emacs-tw/awesome-emacs",
|
||||||
|
"tags": ["Software", "Repositories"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Awesome Wayland",
|
||||||
|
"url": "https://github.com/natpen/awesome-wayland",
|
||||||
|
"tags": ["Software", "Repositories"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Awesome Selfhosted",
|
||||||
|
"url": "https://github.com/awesome-selfhosted/awesome-selfhosted",
|
||||||
|
"tags": ["Software", "Repositories"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Awesome reMarkable",
|
||||||
|
"url": "https://github.com/reHackable/awesome-reMarkable",
|
||||||
|
"tags": ["Software", "Repositories"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "NixOS Wiki",
|
||||||
|
"url": "https://nixos.wiki",
|
||||||
|
"tags": ["Wiki"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Arch Wiki",
|
||||||
|
"url": "https://wiki.archlinux.org",
|
||||||
|
"tags": ["Wiki"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Filament Guide",
|
||||||
|
"url": "https://help.prusa3d.com/materials",
|
||||||
|
"tags": ["3D Printing", "Filament"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Thingiverse",
|
||||||
|
"url": "https://www.thingiverse.com/",
|
||||||
|
"tags": ["3D Printing"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Printables",
|
||||||
|
"url": "https://www.printables.com/",
|
||||||
|
"tags": ["3D Printing"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "MyMiniFactory",
|
||||||
|
"url": "https://www.myminifactory.com",
|
||||||
|
"tags": ["3D Printing"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pinshape",
|
||||||
|
"url": "https://www.pinshape.com",
|
||||||
|
"tags": ["3D Printing"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "YouMagine",
|
||||||
|
"url": "https://www.youmagine.com",
|
||||||
|
"tags": ["3D Printing"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "SHAPEWAYS",
|
||||||
|
"url": "https://www.shapeways.com",
|
||||||
|
"tags": ["3D Printing"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Gambody",
|
||||||
|
"url": "https://www.gambody.com",
|
||||||
|
"tags": ["3D Printing"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "TouchTerrain",
|
||||||
|
"url": "https://touchterrain.geol.iastate.edu/",
|
||||||
|
"tags": ["3D Printing", "Modelling"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Touch Mapper",
|
||||||
|
"url": "https://touch-mapper.org/en/",
|
||||||
|
"tags": ["3D Printing", "Modelling"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Homepage",
|
||||||
|
"url": "https://wiki.jetdata.eu/open/index.php?title=Main_Page",
|
||||||
|
"tags": ["Wiki", "OpenWiki"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Diagnostic Coordinator",
|
||||||
|
"url": "https://wiki.jetdata.eu/open/index.php?title=Diagnostic_Coordinator_Wiki",
|
||||||
|
"tags": ["Wiki", "OpenWiki"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Spectroscopy Group",
|
||||||
|
"url": "https://wiki.jetdata.eu/open/index.php?title=Spectroscopy_Group:index",
|
||||||
|
"tags": ["Wiki", "OpenWiki"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "KS5 Wiki",
|
||||||
|
"url": "https://wiki.jetdata.eu/open/index.php?title=CXS:Topic3",
|
||||||
|
"tags": ["Wiki", "OpenWiki"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "KT3 Journals",
|
||||||
|
"url": "https://wiki.jetdata.eu/open/index.php?title=KT3_Journals",
|
||||||
|
"tags": ["Wiki", "OpenWiki"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nucleus",
|
||||||
|
"url": "https://nucleus.ukaea.uk/",
|
||||||
|
"tags": ["Work"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Ivanti",
|
||||||
|
"url": "https://ukaea-ism.ivanticloud.com/Modules/SelfService/?NoDefaultProvider=True#home",
|
||||||
|
"tags": ["Work"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Marval",
|
||||||
|
"url": "https://marval.service.ukaea.uk/MSMSelfService/Index.aspx",
|
||||||
|
"tags": ["Work"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "U4BW",
|
||||||
|
"url": "https://ubw.unit4cloud.com/uk_aea_prod_web/Login/Login.aspx",
|
||||||
|
"tags": ["Work"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "APS",
|
||||||
|
"url": "https://appraisal.org.ukaea.uk/",
|
||||||
|
"tags": ["Work"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Robin",
|
||||||
|
"url": "https://dashboard.robinpowered.com/",
|
||||||
|
"tags": ["Work", "Room Booking"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "UKAEA Pinboard",
|
||||||
|
"url": "https://pinboard.ukaea.uk/",
|
||||||
|
"tags": ["Work"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "OPEN-ADAS",
|
||||||
|
"url": "https://open.adas.ac.uk/",
|
||||||
|
"tags": ["Work"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Homepage",
|
||||||
|
"url": "http://w3.jet.uk",
|
||||||
|
"tags": ["Work", "JET"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Physics Summary",
|
||||||
|
"url": "https://users.euro-fusion.org/pages/physics-summary/LatestSession.php",
|
||||||
|
"tags": ["Work", "JET"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "JSPO Reports",
|
||||||
|
"url": "https://www.jspo.jet.uk/pages/operations/jpecreports_2023.html",
|
||||||
|
"tags": ["Work", "JET"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "DVCM Homepage",
|
||||||
|
"url": "https://dvcm.jetdata.eu/",
|
||||||
|
"tags": ["Work", "JET"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "JET Data Services",
|
||||||
|
"url": "https://data.jet.uk",
|
||||||
|
"tags": ["Work", "JET", "Data"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "JET Dashboard",
|
||||||
|
"url": "https://data.jet.uk/dashboard/sessions/",
|
||||||
|
"tags": ["Work", "JET", "Data"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PPF Query",
|
||||||
|
"url": "https://data.jet.uk/ppf/browse/ppfquery",
|
||||||
|
"tags": ["Work", "JET", "Data"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "ReqCo",
|
||||||
|
"url": "https://data.jet.uk/reqco/myrequests",
|
||||||
|
"tags": ["Work", "JET", "Data"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Countdown Mimic",
|
||||||
|
"url": "http://webmimic.jet.uk/mc/codas/countdown",
|
||||||
|
"tags": ["Work", "JET", "Mimic"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "KS5 Mimic",
|
||||||
|
"url": "http://webmimic.jet.uk/DG/codas/ks5.mim.html",
|
||||||
|
"tags": ["Work", "JET", "Mimic"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "KT3 Mimic",
|
||||||
|
"url": "http://webmimic.jet.uk/DG/codas/kt3spec.mim.html",
|
||||||
|
"tags": ["Work", "JET", "Mimic"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Users Page",
|
||||||
|
"url": "https://users.mastu.ukaea.uk/home",
|
||||||
|
"tags": ["Work", "MAST-U"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Diagnostic Handbook",
|
||||||
|
"url": "https://intranet.ccfe.ac.uk/mastu-handbook",
|
||||||
|
"tags": ["Work", "MAST-U"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Data Access and Tools",
|
||||||
|
"url": "https://users.mastu.ukaea.uk/data-access-and-tools",
|
||||||
|
"tags": ["Work", "MAST-U"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Outlook Calendar",
|
||||||
|
"url": "https://outlook.office.com/calendar/view/workweek",
|
||||||
|
"tags": ["Work", "Office"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "LGBTQIA+ Network Email",
|
||||||
|
"url": "https://outlook.office.com/mail/ContactUs@lgbtqi.ukaea.uk/",
|
||||||
|
"tags": ["Work", "Office", "Network", "LGBTQIA+"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Teams",
|
||||||
|
"url": "https://teams.microsoft.com/v2",
|
||||||
|
"tags": ["Work", "Office"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "OneDrive",
|
||||||
|
"url": "https://ukaeauk-my.sharepoint.com/personal/evie_litherland-smith_ukaea_uk/",
|
||||||
|
"tags": ["Work", "Office"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "PSFO Sharepoint",
|
||||||
|
"url": "https://ukaeauk.sharepoint.com/sites/Plasma",
|
||||||
|
"tags": ["Work", "Office"]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Culham Canteen Menus",
|
||||||
|
"url": "https://nucleus.ukaea.uk/Interact/Pages/Section/Default.aspx?section=10112",
|
||||||
|
"tags": ["Work", "Canteen", "Menu"]
|
||||||
|
}
|
||||||
|
]
|
67
system/home/browser/config.lisp
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
(define-configuration buffer
|
||||||
|
((default-modes
|
||||||
|
(pushnew 'nyxt/mode/emacs:emacs-mode %slot-value%))
|
||||||
|
(default-modes
|
||||||
|
(pushnew 'nyxt/mode/blocker:blocker-mode %slot-value%))))
|
||||||
|
|
||||||
|
(define-configuration status-buffer
|
||||||
|
((glyph-mode-presentation-p t)
|
||||||
|
(display-tabs-by-last-access-p nil)))
|
||||||
|
|
||||||
|
(define-configuration :emacs-mode ((glyph "ε")))
|
||||||
|
(define-configuration :force-https-mode ((glyph "ϕ")))
|
||||||
|
(define-configuration :no-script-mode ((glyph "j")))
|
||||||
|
(define-configuration :user-script-mode ((glyph "u")))
|
||||||
|
(define-configuration :blocker-mode ((glyph "β")))
|
||||||
|
(define-configuration :proxy-mode ((glyph "π")))
|
||||||
|
(define-configuration :reduce-tracking-mode ((glyph "τ")))
|
||||||
|
(define-configuration :reduce-bandwidth-mode ((glyph "r")))
|
||||||
|
(define-configuration :certificate-exception-mode ((glyph "χ")))
|
||||||
|
(define-configuration :style-mode ((glyph "ϕ")))
|
||||||
|
(define-configuration :cruise-control-mode ((glyph "σ")))
|
||||||
|
|
||||||
|
(define-configuration :document-mode
|
||||||
|
"Extend with custom keybinds"
|
||||||
|
((keyscheme-map
|
||||||
|
(keymaps:define-keyscheme-map "custom" (list :import %slot-value%)
|
||||||
|
nyxt/keyscheme:emacs (list
|
||||||
|
"C-c u" 'copy-username
|
||||||
|
"C-c p" 'copy-password)))))
|
||||||
|
|
||||||
|
(define-configuration :autofill-mode
|
||||||
|
"Add autofill functions for passwords"
|
||||||
|
((autofills
|
||||||
|
(list
|
||||||
|
(nyxt/mode/autofill:make-autofill
|
||||||
|
:name "name"
|
||||||
|
:fill "Evie Litherland-Smith")
|
||||||
|
(nyxt/mode/autofill:make-autofill
|
||||||
|
:name "email"
|
||||||
|
:fill "evie@xenia.me.uk")))))
|
||||||
|
|
||||||
|
(defvar *my-search-engines*
|
||||||
|
(list
|
||||||
|
'("osm" "https://www.openstreetmap.org/search?query=~a" "https://www.openstreetmap.org/")
|
||||||
|
'("rust" "https://doc.rust-lang.org/std/index.html?search=~a" "https://doc.rust-lang.org/std/index.html")
|
||||||
|
'("crates" "https://crates.io/search?q=~a" "https://crates.io/")
|
||||||
|
'("py" "https://docs.python.org/3/search.html?q=~a" "https://docs.python.org/3")
|
||||||
|
'("pypi" "https://pypi.org/search/?q=~a" "https://pypi.org/")
|
||||||
|
'("nixwiki" "https://nixos.wiki/index.php?search=~a&go=Go" "https://nixos.wiki/")
|
||||||
|
'("archwiki" "https://wiki.archlinux.org/index.php?search=~a" "https://wiki.archlinux.org/")
|
||||||
|
'("github" "https://github.com/search?utf8=✓&q=~a&type=repositories" "https://github.com/")
|
||||||
|
'("flathub" "https://flathub.org/apps/search?q=~a" "https://flathub.org/")
|
||||||
|
'("doi" "https://dx.doi.org/~a" "https://dx.doi.org/")
|
||||||
|
'("wiki" "https://en.wikipedia.org/w/index.php?search=~a" "https://en.wikipedia.org/")
|
||||||
|
'("ddg" "https://html.duckduckgo.com/html/?q=~a" "https://html.duckduckgo.com/"))
|
||||||
|
"List of search engines.")
|
||||||
|
|
||||||
|
(define-configuration context-buffer
|
||||||
|
"Go through the search engines above and make-search-engine out of them."
|
||||||
|
((search-engines
|
||||||
|
(mapcar (lambda (engine) (apply 'make-search-engine engine))
|
||||||
|
*my-search-engines*))))
|
||||||
|
|
||||||
|
(define-configuration browser
|
||||||
|
((restore-session-on-startup-p nil)))
|
||||||
|
|
||||||
|
(setf (uiop/os:getenv "GTK_THEME") "Adwaita:light")
|
7
system/home/browser/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./firefox.nix
|
||||||
|
./nyxt.nix
|
||||||
|
];
|
||||||
|
}
|
215
system/home/browser/firefox.nix
Normal file
|
@ -0,0 +1,215 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
browserpass = {
|
||||||
|
enable = true;
|
||||||
|
browsers = [ "firefox" ];
|
||||||
|
};
|
||||||
|
firefox = {
|
||||||
|
enable = true;
|
||||||
|
policies = {
|
||||||
|
BlockAboutProfiles = true;
|
||||||
|
Cookies = {
|
||||||
|
Behavior = "reject-tracker-and-partition-foreign";
|
||||||
|
BehaviorPrivateBrowsing = "reject";
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
DefaultDownloadDirectory = "\${home}/Downloads";
|
||||||
|
DisableAppUpdate = true;
|
||||||
|
DisableFirefoxAccounts = true;
|
||||||
|
DisableFirefoxScreenshots = true;
|
||||||
|
DisableFirefoxStudies = true;
|
||||||
|
DisableFormHistory = true;
|
||||||
|
DisablePocket = true;
|
||||||
|
DisableProfileImport = true;
|
||||||
|
DisableSetDesktopBackground = true;
|
||||||
|
DisableSystemAddonUpdate = true;
|
||||||
|
DisableTelemetry = true;
|
||||||
|
DisplayMenuBar = "default-off";
|
||||||
|
DontCheckDefaultBrowser = true;
|
||||||
|
EnableTrackingProtection = {
|
||||||
|
Value = true;
|
||||||
|
Locked = true;
|
||||||
|
Cryptomining = true;
|
||||||
|
Fingerprinting = true;
|
||||||
|
};
|
||||||
|
ExtensionSettings = {
|
||||||
|
"queryamoid@kaply.com" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://github.com/mkaply/queryamoid/releases/download/v0.1/query_amo_addon_id-0.1-fx.xpi";
|
||||||
|
};
|
||||||
|
# uBlock Origin
|
||||||
|
"uBlock0@raymondhill.net" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/ublock-origin/latest.xpi";
|
||||||
|
};
|
||||||
|
# Browserpass
|
||||||
|
"browserpass@maximbaz.com" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/browserpass-ce/latest.xpi";
|
||||||
|
};
|
||||||
|
# SimpleLogin
|
||||||
|
"addon@simplelogin" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/simplelogin/latest.xpi";
|
||||||
|
};
|
||||||
|
# Consent-O-Matic
|
||||||
|
"gdpr@cavi.au.dk" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/consent-o-matic/latest.xpi";
|
||||||
|
};
|
||||||
|
# ClearURLs
|
||||||
|
"{74145f27-f039-47ce-a470-a662b129930a}" = {
|
||||||
|
installation_mode = "force_installed";
|
||||||
|
install_url = "https://addons.mozilla.org/firefox/downloads/latest/clearurls/latest.xpi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
FirefoxHome = {
|
||||||
|
Search = true;
|
||||||
|
TopSites = false;
|
||||||
|
SponsoredTopSites = false;
|
||||||
|
Highlights = false;
|
||||||
|
Pocket = false;
|
||||||
|
SponsoredPocket = false;
|
||||||
|
Snippets = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
FirefoxSuggest = {
|
||||||
|
WebSuggestions = false;
|
||||||
|
SponsoredSuggestions = false;
|
||||||
|
ImproveSuggest = false;
|
||||||
|
Locked = true;
|
||||||
|
};
|
||||||
|
HardwareAcceleration = true;
|
||||||
|
Homepage = {
|
||||||
|
Locked = true;
|
||||||
|
StartPage = "homepage-locked";
|
||||||
|
};
|
||||||
|
NewTabPage = true;
|
||||||
|
NoDefaultBookmarks = false;
|
||||||
|
OfferToSaveLogins = false;
|
||||||
|
PasswordManagerEnabled = false;
|
||||||
|
PDFjs = {
|
||||||
|
Enabled = false;
|
||||||
|
};
|
||||||
|
Permissions = {
|
||||||
|
Autoplay = {
|
||||||
|
Default = "block-audio-video";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
PictureInPicture = {
|
||||||
|
Enabled = true;
|
||||||
|
};
|
||||||
|
PopupBlocking = {
|
||||||
|
Default = true;
|
||||||
|
};
|
||||||
|
RequestedLocales = [ "en-GB" ];
|
||||||
|
SearchBar = "unified";
|
||||||
|
ShowHomeButton = true;
|
||||||
|
StartDownloadsInTempDirectory = true;
|
||||||
|
};
|
||||||
|
profiles.default = {
|
||||||
|
bookmarks = builtins.fromJSON (builtins.readFile ./bookmarks.json);
|
||||||
|
settings = {
|
||||||
|
"app.shield.optoutstudies.enabled" = false;
|
||||||
|
"browser.tabs.inTitlebar" = 0;
|
||||||
|
"browser.bookmarks.addedImportButton" = false;
|
||||||
|
"browser.bookmarks.showMobileBookmarks" = false;
|
||||||
|
"browser.toolbars.bookmarks.visibility" = "never";
|
||||||
|
"browser.contentblocking.category" = "strict";
|
||||||
|
"browser.search.region" = "GB";
|
||||||
|
"browser.search.isUS" = false;
|
||||||
|
"browser.warnOnQuitShortcut" = false;
|
||||||
|
"browser.zoom.siteSpecific" = false;
|
||||||
|
"distribution.searchplugins.defaultLocale" = "en-GB";
|
||||||
|
"doh-rollout.home-region" = "GB";
|
||||||
|
"dom.private-attribution.submission.enabled" = false;
|
||||||
|
"extensions.activeThemeID" = "default-theme@mozilla.org";
|
||||||
|
"extensions.formautofill.creditCards.enabled" = false;
|
||||||
|
"general.useragent.locale" = "en-GB";
|
||||||
|
"intl.accept_languages" = "en-gb,en";
|
||||||
|
"intl.locale.requested" = "en-gb,en";
|
||||||
|
"intl.regional_prefs.use_os_locales" = true;
|
||||||
|
"media.eme.enabled" = true;
|
||||||
|
"privacy.webrtc.legacyGlobalIndicator" = false;
|
||||||
|
"signon.management.page.breach-alerts.enabled" = false;
|
||||||
|
"signon.rememberSignons" = false;
|
||||||
|
"widget.use-xdg-desktop-portal.file-picker" = 1;
|
||||||
|
"widget.use-xdg-desktop-portal.mime-handler" = 1;
|
||||||
|
"widget.use-xdg-desktop-portal.open-uri" = 1;
|
||||||
|
"browser.newtabpage.pinned" = [
|
||||||
|
{
|
||||||
|
title = "NixOS Wiki";
|
||||||
|
url = "https://wiki.nixos.org";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
title = "Arch Wiki";
|
||||||
|
url = "https://wiki.archlinux.org";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
search = rec {
|
||||||
|
default = "DuckDuckGo";
|
||||||
|
privateDefault = default;
|
||||||
|
force = true;
|
||||||
|
order = [
|
||||||
|
"DuckDuckGo"
|
||||||
|
"Atlas SearXNG"
|
||||||
|
];
|
||||||
|
engines = {
|
||||||
|
"Atlas SearXNG" = {
|
||||||
|
urls = [ { template = "https://search.atlas.engineer/searxng/search?q={searchTerms}"; } ];
|
||||||
|
definedAliases = [ "@atlas" ];
|
||||||
|
};
|
||||||
|
"NixOS Wiki" = {
|
||||||
|
urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ];
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [
|
||||||
|
"@nix"
|
||||||
|
"@nixos"
|
||||||
|
"@nixoswiki"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"Arch Wiki" = {
|
||||||
|
urls = [ { template = "https://wiki.archlinux.org/index.php?search={searchTerms}"; } ];
|
||||||
|
definedAliases = [
|
||||||
|
"@aw"
|
||||||
|
"@arch"
|
||||||
|
"@archwiki"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"GitHub" = {
|
||||||
|
urls = [ { template = "https://github.com/search?q={searchTerms}"; } ];
|
||||||
|
definedAliases = [
|
||||||
|
"@gh"
|
||||||
|
"@git"
|
||||||
|
"@github"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"FlatHub" = {
|
||||||
|
url = [ { template = "https://flathub.org/apps/search?q={searchTerms}"; } ];
|
||||||
|
definedAliases = [
|
||||||
|
"@flat"
|
||||||
|
"@fthub"
|
||||||
|
"@flathub"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"NixOS Packages" = {
|
||||||
|
urls = [
|
||||||
|
{
|
||||||
|
template = "http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
|
||||||
|
definedAliases = [ "@nixpkgs" ];
|
||||||
|
};
|
||||||
|
"PyPI packages" = {
|
||||||
|
urls = [ { template = "https://pypi.org/search/?q={searchTerms}"; } ];
|
||||||
|
definedAliases = [ "@pypi" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
10
system/home/browser/librewolf.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
browserpass.browsers = [ "librewolf" ];
|
||||||
|
librewolf = {
|
||||||
|
enable = true;
|
||||||
|
settings = { };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
72
system/home/browser/nyxt.nix
Normal file
|
@ -0,0 +1,72 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
fonts,
|
||||||
|
accentColourName,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.nyxt ];
|
||||||
|
xdg = {
|
||||||
|
configFile = {
|
||||||
|
"nyxt/config.lisp".text =
|
||||||
|
let
|
||||||
|
sc = config.scheme.withHashtag;
|
||||||
|
in
|
||||||
|
''
|
||||||
|
;; Import custom configuration
|
||||||
|
(nyxt::load-lisp "${./config.lisp}")
|
||||||
|
;; Define custom theme
|
||||||
|
(define-configuration browser
|
||||||
|
((theme (make-instance 'theme:theme
|
||||||
|
:dark-p t
|
||||||
|
:font-family "${fonts.sansSerif.name}"
|
||||||
|
:monospace-font-family "${fonts.monospace.name}"
|
||||||
|
:background-color "${sc.base00}"
|
||||||
|
:on-background-color "${sc.base05}"
|
||||||
|
:primary-color "${sc.base02}"
|
||||||
|
:on-primary-color "${sc.base05}"
|
||||||
|
:secondary-color "${sc.base03}"
|
||||||
|
:on-secondary-color "${sc.base05}"
|
||||||
|
:accent-color "${sc.${accentColourName}}"
|
||||||
|
:on-accent-color "${sc.base01}"
|
||||||
|
:action-color "${sc.cyan}"
|
||||||
|
:on-action-color "${sc.base01}"
|
||||||
|
:success-color "${sc.green}"
|
||||||
|
:on-success-color "${sc.base01}"
|
||||||
|
:highlight-color "${sc.magenta}"
|
||||||
|
:on-highlight-color "${sc.base01}"
|
||||||
|
:warning-color "${sc.yellow}"
|
||||||
|
:on-warning-color "${sc.base01}"
|
||||||
|
:codeblock-color "${sc.base02}"
|
||||||
|
:on-codeblock-color "${sc.base05}"))))
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
dataFile."nyxt/bookmarks.lisp".text =
|
||||||
|
let
|
||||||
|
# Make a string of lisp-style list of strings, from nix-style
|
||||||
|
# list
|
||||||
|
convertTags = tags: "(" + (builtins.foldl' (x: y: x + " \"" + y + "\"") "" tags) + " )";
|
||||||
|
# Take bookmarks as returned from JSON file and convert to NYXT
|
||||||
|
# expected format
|
||||||
|
convertBookmark =
|
||||||
|
{
|
||||||
|
name,
|
||||||
|
tags,
|
||||||
|
url,
|
||||||
|
}:
|
||||||
|
"(:url \"${url}\" :title \"${name}\" :tags ${convertTags tags})\n";
|
||||||
|
in
|
||||||
|
(
|
||||||
|
# Fold all entries in bookmarks.json into single string of NYXT
|
||||||
|
# format bookmarks, each entry on a new line and with 2 space
|
||||||
|
# indentation, just for visual clarity if reading the outputted
|
||||||
|
# file
|
||||||
|
"(\n"
|
||||||
|
+ (builtins.foldl' (x: y: x + " " + convertBookmark y) "" (
|
||||||
|
builtins.fromJSON (builtins.readFile ./bookmarks.json)
|
||||||
|
))
|
||||||
|
+ ")"
|
||||||
|
);
|
||||||
|
};
|
||||||
|
}
|
17
system/home/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{ inputs, osConfig, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
inputs.base16.homeManagerModule
|
||||||
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
|
inputs.plasma-manager.homeManagerModules.plasma-manager
|
||||||
|
./shell/default.nix
|
||||||
|
./services/password-store/default.nix
|
||||||
|
./scripts/default.nix
|
||||||
|
];
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
scheme = "${inputs.tt-schemes}/base16/one-light.yaml";
|
||||||
|
fonts.fontconfig = {
|
||||||
|
enable = true;
|
||||||
|
inherit (osConfig.fonts.fontconfig) defaultFonts;
|
||||||
|
};
|
||||||
|
}
|
90
system/home/desktop.nix
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./sway/default.nix
|
||||||
|
./alacritty/default.nix
|
||||||
|
./emacs/default.nix
|
||||||
|
./browser/default.nix
|
||||||
|
./zathura/default.nix
|
||||||
|
./services/email/default.nix
|
||||||
|
];
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
libreoffice-fresh
|
||||||
|
webcord
|
||||||
|
signal-desktop
|
||||||
|
teams-for-linux
|
||||||
|
];
|
||||||
|
pointerCursor =
|
||||||
|
let
|
||||||
|
name = if config.scheme.variant == "light" then "volantes_cursors" else "volantes_light_cursors";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit name;
|
||||||
|
package = pkgs.volantes-cursors;
|
||||||
|
size = 32;
|
||||||
|
gtk.enable = config.gtk.enable;
|
||||||
|
x11 = {
|
||||||
|
enable = true;
|
||||||
|
defaultCursor = name;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.syncthing.enable = true;
|
||||||
|
programs.mpv.enable = true;
|
||||||
|
xdg = {
|
||||||
|
mime.enable = true;
|
||||||
|
mimeApps =
|
||||||
|
let
|
||||||
|
defaultApplications = import ./mimeapps/default.nix;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
inherit defaultApplications;
|
||||||
|
associations = {
|
||||||
|
added = defaultApplications;
|
||||||
|
removed = {
|
||||||
|
"x-scheme-handler/zoomus" = config.xdg.mimeApps.defaultApplications."x-scheme-handler/http";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
userDirs = {
|
||||||
|
enable = true;
|
||||||
|
createDirectories = true;
|
||||||
|
extraConfig = {
|
||||||
|
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
configFile = {
|
||||||
|
"autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop";
|
||||||
|
"teams-for-linux/config.json".text = builtins.toJSON {
|
||||||
|
awayOnSystemIdle = true;
|
||||||
|
closeAppOnCross = true;
|
||||||
|
followSystemTheme = true;
|
||||||
|
notificationMethod = "electron";
|
||||||
|
optInTeamsV2 = true;
|
||||||
|
spellCheckerLanguages = [ "en_GB" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xresources.properties = with config.scheme.withHashtag; {
|
||||||
|
"*background" = base00;
|
||||||
|
"*foreground" = base05;
|
||||||
|
"*color0" = base00;
|
||||||
|
"*color1" = red;
|
||||||
|
"*color2" = green;
|
||||||
|
"*color3" = yellow;
|
||||||
|
"*color4" = blue;
|
||||||
|
"*color5" = magenta;
|
||||||
|
"*color6" = cyan;
|
||||||
|
"*color7" = base04;
|
||||||
|
"*color8" = base01;
|
||||||
|
"*color9" = red;
|
||||||
|
"*color10" = green;
|
||||||
|
"*color11" = yellow;
|
||||||
|
"*color12" = blue;
|
||||||
|
"*color13" = magenta;
|
||||||
|
"*color14" = cyan;
|
||||||
|
"*color15" = base05;
|
||||||
|
};
|
||||||
|
}
|
136
system/home/emacs/default.nix
Normal file
|
@ -0,0 +1,136 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
fonts,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ ../shell/default.nix ];
|
||||||
|
services.emacs = {
|
||||||
|
enable = true;
|
||||||
|
package = config.programs.emacs.finalPackage;
|
||||||
|
defaultEditor = true;
|
||||||
|
client.enable = true;
|
||||||
|
socketActivation.enable = true;
|
||||||
|
startWithUserSession = false;
|
||||||
|
};
|
||||||
|
programs.emacs = {
|
||||||
|
# Clone emacs config from https://git.xenia.me.uk/pixelifytica/emacs.git
|
||||||
|
# git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.emacs.d
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.emacs29-pgtk;
|
||||||
|
extraConfig =
|
||||||
|
let
|
||||||
|
fixed-font-family = "${fonts.monospace.name}";
|
||||||
|
variable-font-family = "${fonts.sansSerif.name}";
|
||||||
|
font-height = builtins.toString (builtins.floor (builtins.mul fonts.sizes.applications 10));
|
||||||
|
custom-theme-name = "nix";
|
||||||
|
custom-theme = pkgs.writeTextFile {
|
||||||
|
name = "custom-emacs-theme";
|
||||||
|
destination = "/${custom-theme-name}-theme.el";
|
||||||
|
text = ''
|
||||||
|
(deftheme ${custom-theme-name}
|
||||||
|
"Use Nix customised fonts for main faces")
|
||||||
|
|
||||||
|
(custom-theme-set-variables
|
||||||
|
'${custom-theme-name}
|
||||||
|
'(menu-bar-mode nil))
|
||||||
|
|
||||||
|
(custom-theme-set-faces
|
||||||
|
'${custom-theme-name}
|
||||||
|
'(default ((t (:family "${fixed-font-family}" :height ${font-height}))))
|
||||||
|
'(fixed-pitch ((t (:family "${fixed-font-family}"))))
|
||||||
|
'(fixed-pitch-serif ((t (:family "${fixed-font-family}"))))
|
||||||
|
'(variable-pitch ((t (:family "${variable-font-family}")))))
|
||||||
|
|
||||||
|
(provide-theme '${custom-theme-name})
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
custom-theme-hash = builtins.hashFile "sha256" "${custom-theme}/${custom-theme-name}-theme.el";
|
||||||
|
in
|
||||||
|
''
|
||||||
|
(add-to-list 'custom-theme-load-path "${custom-theme}")
|
||||||
|
(add-to-list 'custom-safe-themes "${custom-theme-hash}")
|
||||||
|
(load-theme '${custom-theme-name})
|
||||||
|
'';
|
||||||
|
extraPackages =
|
||||||
|
epkgs: with epkgs; [
|
||||||
|
treesit-grammars.with-all-grammars
|
||||||
|
mu4e
|
||||||
|
emacsql-sqlite
|
||||||
|
];
|
||||||
|
};
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
# Emacs requirements
|
||||||
|
imagemagick
|
||||||
|
languagetool
|
||||||
|
wordnet
|
||||||
|
|
||||||
|
# Plugin requirements
|
||||||
|
gcc
|
||||||
|
sqlite
|
||||||
|
pandoc
|
||||||
|
ghostscript
|
||||||
|
poppler_utils
|
||||||
|
graphviz
|
||||||
|
mp3info
|
||||||
|
|
||||||
|
# Customised LaTeX install
|
||||||
|
(texlive.combine {
|
||||||
|
inherit (texlive)
|
||||||
|
scheme-medium
|
||||||
|
dvisvgm
|
||||||
|
dvipng
|
||||||
|
wrapfig
|
||||||
|
amsmath
|
||||||
|
ulem
|
||||||
|
hyperref
|
||||||
|
capt-of
|
||||||
|
listings
|
||||||
|
;
|
||||||
|
})
|
||||||
|
|
||||||
|
# Development tools
|
||||||
|
## Code screenshots
|
||||||
|
silicon
|
||||||
|
|
||||||
|
## Python Environments
|
||||||
|
uv
|
||||||
|
poetry
|
||||||
|
|
||||||
|
## Linters
|
||||||
|
shellcheck
|
||||||
|
yamllint
|
||||||
|
ruff
|
||||||
|
nodePackages.eslint
|
||||||
|
|
||||||
|
## Formatters
|
||||||
|
nixfmt-rfc-style
|
||||||
|
shfmt
|
||||||
|
stylua
|
||||||
|
nodePackages.prettier
|
||||||
|
|
||||||
|
## Language servers
|
||||||
|
nixd
|
||||||
|
lua-language-server
|
||||||
|
nodePackages.typescript-language-server
|
||||||
|
|
||||||
|
## Interpreters
|
||||||
|
(python3.withPackages (
|
||||||
|
ps: with ps; [
|
||||||
|
tkinter
|
||||||
|
python-lsp-server
|
||||||
|
mypy
|
||||||
|
numpy
|
||||||
|
scipy
|
||||||
|
xarray
|
||||||
|
matplotlib
|
||||||
|
]
|
||||||
|
))
|
||||||
|
(luajit.withPackages (ps: [ (ps.callPackage ./luarocks/scilua.nix { }) ]))
|
||||||
|
];
|
||||||
|
xdg.configFile = {
|
||||||
|
"ruff/pyproject.toml".source = ./ruff.toml;
|
||||||
|
"pypoetry/config.toml".source = ./pypoetry.toml;
|
||||||
|
};
|
||||||
|
}
|
60
system/home/emacs/emacs-packages.nix
Normal file
|
@ -0,0 +1,60 @@
|
||||||
|
epkgs: with epkgs; [
|
||||||
|
# UI
|
||||||
|
base16-theme
|
||||||
|
all-the-icons
|
||||||
|
nerd-icons
|
||||||
|
nerd-icons-completion
|
||||||
|
nerd-icons-corfu
|
||||||
|
nerd-icons-dired
|
||||||
|
nerd-icons-ibuffer
|
||||||
|
minions
|
||||||
|
ligature
|
||||||
|
which-key
|
||||||
|
diff-hl
|
||||||
|
|
||||||
|
# Completion
|
||||||
|
vertico
|
||||||
|
orderless
|
||||||
|
marginalia
|
||||||
|
cape
|
||||||
|
corfu
|
||||||
|
corfu-terminal
|
||||||
|
consult
|
||||||
|
consult-eglot
|
||||||
|
flyspell-correct
|
||||||
|
tempel
|
||||||
|
|
||||||
|
# IDE
|
||||||
|
treesit-auto
|
||||||
|
magit
|
||||||
|
forge
|
||||||
|
apheleia
|
||||||
|
envrc
|
||||||
|
rainbow-delimiters
|
||||||
|
flymake-shellcheck
|
||||||
|
flymake-yamllint
|
||||||
|
flymake-clippy
|
||||||
|
flymake-eslint
|
||||||
|
markdown-mode
|
||||||
|
pandoc-mode
|
||||||
|
python-docstring
|
||||||
|
nix-mode
|
||||||
|
lua-mode
|
||||||
|
|
||||||
|
# Org + LaTeX
|
||||||
|
org-roam
|
||||||
|
org-noter
|
||||||
|
citar
|
||||||
|
auctex
|
||||||
|
htmlize
|
||||||
|
|
||||||
|
# Other
|
||||||
|
password-store
|
||||||
|
emms
|
||||||
|
bbdb
|
||||||
|
ement
|
||||||
|
elfeed
|
||||||
|
elfeed-org
|
||||||
|
elfeed-tube
|
||||||
|
scad-mode
|
||||||
|
]
|
53
system/home/emacs/luarocks/graph-toolkit.nix
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
agg,
|
||||||
|
freetype,
|
||||||
|
buildLuarocksPackage,
|
||||||
|
fetchgit,
|
||||||
|
fetchurl,
|
||||||
|
lua,
|
||||||
|
luaOlder,
|
||||||
|
}:
|
||||||
|
buildLuarocksPackage {
|
||||||
|
pname = "graph-toolkit";
|
||||||
|
version = "scm-1";
|
||||||
|
knownRockspec =
|
||||||
|
(fetchurl {
|
||||||
|
url = "mirror://luarocks/graph-toolkit-scm-1.rockspec";
|
||||||
|
sha256 = "0hsrf7k45w8ri18mdrx44mv1kr4zfr5mg76cxi8nnr30ssrblvgb";
|
||||||
|
}).outPath;
|
||||||
|
src = fetchgit (
|
||||||
|
removeAttrs
|
||||||
|
(builtins.fromJSON ''
|
||||||
|
{
|
||||||
|
"url": "https://github.com/franko/graph-toolkit",
|
||||||
|
"rev": "126a11bdbb98faf785c373516a288b7fa609f824",
|
||||||
|
"date": "2015-01-02T08:44:01-08:00",
|
||||||
|
"path": "/nix/store/gbwbjrl4j42kaqk3pjzvmckmr6dimkd0-graph-toolkit",
|
||||||
|
"sha256": "1pqjpqfandi7brk2213vlq891bl8drb0q32m5wmf0l21li0l4zrp",
|
||||||
|
"hash": "sha256-N39CQaRBUOAqL1UMDFZuiK6QEKZ7BCFmXic2qxy+Et8=",
|
||||||
|
"fetchLFS": false,
|
||||||
|
"fetchSubmodules": true,
|
||||||
|
"deepClone": false,
|
||||||
|
"leaveDotGit": false
|
||||||
|
}
|
||||||
|
'')
|
||||||
|
[
|
||||||
|
"date"
|
||||||
|
"path"
|
||||||
|
"sha256"
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
disabled = luaOlder "5.1";
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
lua
|
||||||
|
agg
|
||||||
|
freetype
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "http://franko.github.io/graph-toolkit/";
|
||||||
|
description = "Lua Graphics Toolkit";
|
||||||
|
license.fullName = "GPL-3";
|
||||||
|
};
|
||||||
|
}
|
38
system/home/emacs/luarocks/scilua.nix
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
buildLuarocksPackage,
|
||||||
|
fetchurl,
|
||||||
|
luaAtLeast,
|
||||||
|
luaOlder,
|
||||||
|
callPackage,
|
||||||
|
luajit,
|
||||||
|
openblas,
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
xsys = callPackage ./xsys.nix { };
|
||||||
|
in
|
||||||
|
buildLuarocksPackage {
|
||||||
|
pname = "sci";
|
||||||
|
version = "1.0.0.beta12-1";
|
||||||
|
knownRockspec =
|
||||||
|
(fetchurl {
|
||||||
|
url = "mirror://luarocks/sci-1.0.0.beta12-1.rockspec";
|
||||||
|
sha256 = "0lprn9x4zw767hdz8lyxmwrrfyn5xj3x50pm9b4qiwy8992mg00r";
|
||||||
|
}).outPath;
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/stepelu/lua-sci/archive/v1.0.0-beta12.tar.gz";
|
||||||
|
sha256 = "0a45r7n13gfqckpdp1bmizqvjadn8nc5d6ff9gjw860g3i75sy2h";
|
||||||
|
};
|
||||||
|
|
||||||
|
disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
luajit
|
||||||
|
xsys
|
||||||
|
openblas
|
||||||
|
];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "https://github.com/stepelu/lua-sci";
|
||||||
|
description = "Scientific Computing with LuaJIT";
|
||||||
|
license.fullName = "MIT";
|
||||||
|
};
|
||||||
|
}
|
29
system/home/emacs/luarocks/xsys.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
buildLuarocksPackage,
|
||||||
|
fetchurl,
|
||||||
|
luaAtLeast,
|
||||||
|
luaOlder,
|
||||||
|
luajit,
|
||||||
|
}:
|
||||||
|
buildLuarocksPackage {
|
||||||
|
pname = "xsys";
|
||||||
|
version = "1.0.2-1";
|
||||||
|
knownRockspec =
|
||||||
|
(fetchurl {
|
||||||
|
url = "mirror://luarocks/xsys-1.0.2-1.rockspec";
|
||||||
|
sha256 = "0jlyrwbzh6fi68msdynp4bbihyww4i3yk0qh859xlwqhfy5cza7p";
|
||||||
|
}).outPath;
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://github.com/stepelu/lua-xsys/archive/v1.0.2.tar.gz";
|
||||||
|
sha256 = "1zwrlp6bghq8c12kyqc1ic7mrn8lf3d42755h8q2wxwhy1i3xqyh";
|
||||||
|
};
|
||||||
|
|
||||||
|
disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
|
||||||
|
propagatedBuildInputs = [ luajit ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
homepage = "http://scilua.org/xsys.html";
|
||||||
|
description = "LuaJIT General Purpose Routines";
|
||||||
|
license.fullName = "MIT";
|
||||||
|
};
|
||||||
|
}
|
9
system/home/emacs/pypoetry.toml
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
[virtualenvs]
|
||||||
|
create = true
|
||||||
|
in-project = true
|
||||||
|
|
||||||
|
[virtualenvs.options]
|
||||||
|
always-copy = true
|
||||||
|
no-pip = true
|
||||||
|
no-setuptools = true
|
||||||
|
system-site-packages = true
|
38
system/home/emacs/ruff.toml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
[lint]
|
||||||
|
select = [
|
||||||
|
"F", "E4", "E7", "E9", # Defaults
|
||||||
|
"W", # pycodestyle warnings
|
||||||
|
"B", # Flake8 bugbear rules
|
||||||
|
"PD", # Pandas vet rules
|
||||||
|
"NPY", # NumPy specific rules
|
||||||
|
"NPY201", # NumPy 2.0 deprecation warnings
|
||||||
|
"RUF", # Ruff specific rules
|
||||||
|
"PERF1", "PERF2", # Performance lints from Perflint
|
||||||
|
"E101", # Mixed spaces and tabs
|
||||||
|
"E501", # Line too long
|
||||||
|
"C901", # Complex structure
|
||||||
|
"I001", # Import block un-sorted / un-formatted
|
||||||
|
"I002", # Missing required import
|
||||||
|
"N804", # First argument of class method should be cls
|
||||||
|
"N805" # First argument of method should be self
|
||||||
|
]
|
||||||
|
ignore = [
|
||||||
|
"W191", # Ignore due to conflict with ruff formatter
|
||||||
|
"E111", # Ignore due to conflict with ruff formatter
|
||||||
|
"E114", # Ignore due to conflict with ruff formatter
|
||||||
|
"E117", # Ignore due to conflict with ruff formatter
|
||||||
|
"D206", # Ignore due to conflict with ruff formatter
|
||||||
|
"D300", # Ignore due to conflict with ruff formatter
|
||||||
|
"Q000", # Ignore due to conflict with ruff formatter
|
||||||
|
"Q001", # Ignore due to conflict with ruff formatter
|
||||||
|
"Q002", # Ignore due to conflict with ruff formatter
|
||||||
|
"Q003", # Ignore due to conflict with ruff formatter
|
||||||
|
"COM812", # Ignore due to conflict with ruff formatter
|
||||||
|
"COM819", # Ignore due to conflict with ruff formatter
|
||||||
|
"ISC001", # Ignore due to conflict with ruff formatter
|
||||||
|
"ISC002" # Ignore due to conflict with ruff formatter
|
||||||
|
]
|
||||||
|
unfixable = ["W", "B", "PD", "NPY", "RUF", "E101", "E501", "C901", "I001", "I002"]
|
||||||
|
|
||||||
|
[format]
|
||||||
|
docstring-code-format = false
|
48
system/home/foot/default.nix
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
{ config, fonts, ... }:
|
||||||
|
{
|
||||||
|
programs.foot = {
|
||||||
|
enable = true;
|
||||||
|
server.enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
term = "xterm-256color";
|
||||||
|
locked-title = false;
|
||||||
|
font = "${fonts.monospace.name}:size=${toString fonts.sizes.applications}";
|
||||||
|
dpi-aware = false;
|
||||||
|
pad = "10x10";
|
||||||
|
};
|
||||||
|
bell = {
|
||||||
|
urgent = false;
|
||||||
|
notify = false;
|
||||||
|
visual = false;
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
blink = true;
|
||||||
|
};
|
||||||
|
mouse = {
|
||||||
|
hide-when-typing = true;
|
||||||
|
};
|
||||||
|
colors = with config.scheme; rec {
|
||||||
|
alpha = 0.85;
|
||||||
|
background = base00;
|
||||||
|
foreground = base05;
|
||||||
|
regular0 = base02;
|
||||||
|
regular1 = red;
|
||||||
|
regular2 = green;
|
||||||
|
regular3 = yellow;
|
||||||
|
regular4 = blue;
|
||||||
|
regular5 = magenta;
|
||||||
|
regular6 = cyan;
|
||||||
|
regular7 = base05;
|
||||||
|
bright0 = base04;
|
||||||
|
bright1 = regular1;
|
||||||
|
bright2 = regular2;
|
||||||
|
bright3 = regular3;
|
||||||
|
bright4 = regular4;
|
||||||
|
bright5 = regular5;
|
||||||
|
bright6 = regular6;
|
||||||
|
bright7 = base05;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
44
system/home/fuzzel/default.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
fonts,
|
||||||
|
accentColourName,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
programs.fuzzel = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
dpi-aware = false;
|
||||||
|
font = "${fonts.monospace.name}:size=${toString fonts.sizes.popups}";
|
||||||
|
icon-theme = config.gtk.iconTheme.name;
|
||||||
|
icons-enabled = true;
|
||||||
|
fields = "filename,name,generic,categories";
|
||||||
|
fuzzy = true;
|
||||||
|
filter-desktop = true;
|
||||||
|
terminal = "${config.programs.alacritty.package}/bin/alacritty -e";
|
||||||
|
lines = 24;
|
||||||
|
width = 80;
|
||||||
|
tabs = 4;
|
||||||
|
layer = "overlay";
|
||||||
|
};
|
||||||
|
colors =
|
||||||
|
let
|
||||||
|
sc = config.scheme;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
background = "${sc.base00}cc"; # 80% Opacity
|
||||||
|
text = "${sc.base05}ff";
|
||||||
|
match = "${sc.red}ff";
|
||||||
|
selection = "${sc.base01}ff";
|
||||||
|
selection-text = "${sc.base05}ff";
|
||||||
|
selection-match = "${sc.red}ff";
|
||||||
|
border = "${sc.${accentColourName}}ff";
|
||||||
|
};
|
||||||
|
border = {
|
||||||
|
width = 1;
|
||||||
|
radius = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
BIN
system/home/icons/nix/nix-owo-transparent.png
Normal file
After Width: | Height: | Size: 112 KiB |
BIN
system/home/icons/nix/nix-owo-white.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
system/home/icons/nix/nix-shooting.png
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
system/home/icons/nix/nix-snowflake-cute.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
system/home/icons/nix/nixos-confetti.png
Normal file
After Width: | Height: | Size: 89 KiB |
9
system/home/laptop.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [ ./desktop.nix ];
|
||||||
|
programs.plasma = {
|
||||||
|
configFile = {
|
||||||
|
bluedevilglobalrc.Global.launchState.value = "disable";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
13
system/home/lib/to_capital.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
lib: string:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
chars =
|
||||||
|
let
|
||||||
|
lc = strings.splitString "" string;
|
||||||
|
in
|
||||||
|
(lists.sublist 1 (lists.length lc - 2) lc);
|
||||||
|
in
|
||||||
|
(strings.concatStringsSep "" (
|
||||||
|
(lists.singleton (strings.toUpper (lists.elemAt chars 0)))
|
||||||
|
++ (lists.sublist 1 (lists.length chars) chars)
|
||||||
|
))
|
31
system/home/mako/default.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
fonts,
|
||||||
|
accentColourName,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.mako =
|
||||||
|
let
|
||||||
|
sc = config.scheme.withHashtag;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
anchor = "top-right";
|
||||||
|
font = "${fonts.monospace.name} ${toString fonts.sizes.popups}";
|
||||||
|
width = 600;
|
||||||
|
height = 600;
|
||||||
|
layer = "top";
|
||||||
|
markup = true;
|
||||||
|
maxVisible = 10;
|
||||||
|
icons = true;
|
||||||
|
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
|
||||||
|
textColor = "${sc.base05}ff";
|
||||||
|
progressColor = "over ${sc.red}ff";
|
||||||
|
backgroundColor = "${sc.base00}cc";
|
||||||
|
borderColor = "${sc.${accentColourName}}ff";
|
||||||
|
borderRadius = 5;
|
||||||
|
borderSize = 1;
|
||||||
|
defaultTimeout = 0;
|
||||||
|
};
|
||||||
|
}
|
78
system/home/mimeapps/default.nix
Normal file
|
@ -0,0 +1,78 @@
|
||||||
|
let
|
||||||
|
emacs = [ "emacsclient.desktop" ];
|
||||||
|
browser = [ "firefox.desktop" ];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"inode/directory" = [ "thunar.desktop" ];
|
||||||
|
"inode/symlink" = [ "thunar.desktop" ];
|
||||||
|
|
||||||
|
"image/jpeg" = [ "swayimg.desktop" ];
|
||||||
|
"image/png" = [ "swayimg.desktop" ];
|
||||||
|
"video/mp4" = [ "mpv.desktop" ];
|
||||||
|
|
||||||
|
"text/plain" = emacs;
|
||||||
|
"text/richtext" = emacs;
|
||||||
|
"text/org" = emacs;
|
||||||
|
"text/markdown" = emacs;
|
||||||
|
"text/rust" = emacs;
|
||||||
|
"text/csv" = emacs;
|
||||||
|
"text/html" = emacs;
|
||||||
|
"text/css" = emacs;
|
||||||
|
"text/tab-separated-values" = emacs;
|
||||||
|
|
||||||
|
"text/x-emacs-lisp" = emacs;
|
||||||
|
"text/x-fortran" = emacs;
|
||||||
|
"text/x-idl" = emacs;
|
||||||
|
"text/x-log" = emacs;
|
||||||
|
"text/x-lua" = emacs;
|
||||||
|
"text/x-makefile" = emacs;
|
||||||
|
"text/x-cmake" = emacs;
|
||||||
|
"text/x-python" = emacs;
|
||||||
|
"text/x-python3" = emacs;
|
||||||
|
"text/x-readme" = emacs;
|
||||||
|
"text/x-scheme" = emacs;
|
||||||
|
"text/x-tex" = emacs;
|
||||||
|
"text/x-texinfo" = emacs;
|
||||||
|
|
||||||
|
"application/json" = emacs;
|
||||||
|
"application/toml" = emacs;
|
||||||
|
"application/yaml" = emacs;
|
||||||
|
"application/xml" = emacs;
|
||||||
|
"application/rss+xml" = emacs;
|
||||||
|
"application/xhtml+xml" = emacs;
|
||||||
|
"application/oxps" = emacs;
|
||||||
|
"application/x-shellscript" = emacs;
|
||||||
|
"application/x-docbook+xml" = emacs;
|
||||||
|
"application/x-yaml" = emacs;
|
||||||
|
|
||||||
|
"application/pdf" = [ "org.pwmt.zathura.desktop" ];
|
||||||
|
"application/epub+zip" = [ "org.pwmt.zathura.desktop" ];
|
||||||
|
"application/msword" = [ "writer.desktop" ];
|
||||||
|
"application/zip" = [ "xarchiver.desktop" ];
|
||||||
|
|
||||||
|
"application/x-extension-htm" = browser;
|
||||||
|
"application/x-extension-html" = browser;
|
||||||
|
"application/x-extension-shtml" = browser;
|
||||||
|
"application/x-extension-xhtml" = browser;
|
||||||
|
"application/x-extension-xht" = browser;
|
||||||
|
"application/x-mozilla-bookmarks" = browser;
|
||||||
|
"application/x-zoom" = [ "Zoom.desktop" ] ++ browser;
|
||||||
|
|
||||||
|
"x-scheme-handler/http" = browser;
|
||||||
|
"x-scheme-handler/https" = browser;
|
||||||
|
"x-scheme-handler/about" = browser;
|
||||||
|
"x-scheme-handler/chrome" = browser;
|
||||||
|
"x-scheme-handler/webcal" = browser;
|
||||||
|
"x-scheme-handler/geo" = [ "openstreetmap-geo-handler.desktop" ];
|
||||||
|
"x-scheme-handler/mailto" = [ "emacsclient-mail.desktop" ];
|
||||||
|
"x-scheme-handler/unknown" = emacs;
|
||||||
|
|
||||||
|
"x-scheme-handler/prusaslicer" = [ "PrusaSlicerURLProtocol.desktop" ];
|
||||||
|
|
||||||
|
"x-scheme-handler/ms-word" = [ "writer.desktop" ];
|
||||||
|
"x-scheme-handler/ms-powerpoint" = [ "impress.desktop" ];
|
||||||
|
"x-scheme-handler/ms-excel" = [ "calc.desktop" ];
|
||||||
|
"x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ] ++ browser;
|
||||||
|
"x-scheme-handler/zoomus" = browser;
|
||||||
|
"x-scheme-handler/zoommtg" = browser;
|
||||||
|
}
|
5
system/home/openfortivpn/jetdata-vpn.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
host = vpn.jetdata.eu
|
||||||
|
port = 943
|
||||||
|
username = elitherl
|
||||||
|
set-dns = 0
|
||||||
|
set-routes = 0
|
5
system/home/openfortivpn/ukaea-vpn.conf
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
host = vpn.ukaea.uk
|
||||||
|
port = 943
|
||||||
|
username = elitherl
|
||||||
|
set-dns = 1
|
||||||
|
set-routes = 1
|
11
system/home/openfortivpn/ukaea.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
(pkgs.writeShellScriptBin "ukaea-vpn-connect" ''
|
||||||
|
sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf} -p $(${pkgs.pass}/bin/pass show work/microsoftonline.com | head -n1)
|
||||||
|
'')
|
||||||
|
(pkgs.writeShellScriptBin "jetdata-vpn-connect" ''
|
||||||
|
sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./jetdata-vpn.conf} -p $(${pkgs.pass}/bin/pass show work/microsoftonline.com | head -n1)
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
}
|
374
system/home/plasma/default.nix
Normal file
|
@ -0,0 +1,374 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
fonts,
|
||||||
|
accentColourName,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ ./konsole.nix ];
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
rc2nix
|
||||||
|
wl-clipboard
|
||||||
|
(papirus-icon-theme.override { color = "violet"; })
|
||||||
|
];
|
||||||
|
services.gpg-agent.pinentryPackage = pkgs.pinentry-qt;
|
||||||
|
programs.plasma = {
|
||||||
|
enable = true;
|
||||||
|
overrideConfig = true;
|
||||||
|
|
||||||
|
workspace =
|
||||||
|
let
|
||||||
|
toCapital = import ../lib/to_capital.nix lib;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
clickItemTo = "open";
|
||||||
|
theme = "default";
|
||||||
|
colorScheme = "Breeze${toCapital config.scheme.variant}";
|
||||||
|
iconTheme = "Papirus-${toCapital config.scheme.variant}";
|
||||||
|
windowDecorations = {
|
||||||
|
library = "org.kde.breeze";
|
||||||
|
theme = "Breeze";
|
||||||
|
};
|
||||||
|
cursor = {
|
||||||
|
inherit (config.home.pointerCursor) size;
|
||||||
|
theme = config.home.pointerCursor.name;
|
||||||
|
};
|
||||||
|
wallpaper = "${../wallpapers/landscapes/tropic_island_day.jpg}";
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts =
|
||||||
|
let
|
||||||
|
general = {
|
||||||
|
family = fonts.sansSerif.name;
|
||||||
|
pointSize = 12;
|
||||||
|
};
|
||||||
|
small = {
|
||||||
|
inherit (general) family;
|
||||||
|
pointSize = general.pointSize - 2;
|
||||||
|
};
|
||||||
|
fixedWidth = {
|
||||||
|
family = fonts.monospace.name;
|
||||||
|
pointSize = 12;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit general small fixedWidth;
|
||||||
|
menu = general;
|
||||||
|
toolbar = general;
|
||||||
|
windowTitle = small;
|
||||||
|
};
|
||||||
|
|
||||||
|
hotkeys.commands = {
|
||||||
|
"launch-emacs" = {
|
||||||
|
name = "Launch Emacs Client Window";
|
||||||
|
key = "Meta+Alt+X";
|
||||||
|
command = "emacsclient -c";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
panels = [
|
||||||
|
{
|
||||||
|
height = 32;
|
||||||
|
lengthMode = "fill";
|
||||||
|
location = "bottom";
|
||||||
|
alignment = "center";
|
||||||
|
hiding = "normalpanel";
|
||||||
|
floating = true;
|
||||||
|
widgets = [
|
||||||
|
{
|
||||||
|
name = "org.kde.plasma.kicker";
|
||||||
|
config.General = {
|
||||||
|
icon = "nix-snowflake";
|
||||||
|
appNameFormat = 0;
|
||||||
|
limitDepth = true;
|
||||||
|
alphaSort = true;
|
||||||
|
recentOrdering = 0;
|
||||||
|
showRecentApps = true;
|
||||||
|
showRecentDocs = true;
|
||||||
|
showIconsRootLevel = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
"org.kde.plasma.marginsseparator"
|
||||||
|
{
|
||||||
|
name = "org.kde.plasma.icontasks";
|
||||||
|
config.General = {
|
||||||
|
maxStripes = "1";
|
||||||
|
showToolTips = "true";
|
||||||
|
launchers = [
|
||||||
|
"preferred://filemanager"
|
||||||
|
"applications:emacs.desktop"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
"org.kde.plasma.panelspacer"
|
||||||
|
{
|
||||||
|
name = "org.kde.plasma.pager";
|
||||||
|
config.General = {
|
||||||
|
showWindowIcons = "true";
|
||||||
|
showOnlyCurrentScreen = "false";
|
||||||
|
wrapPage = "true";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
"org.kde.plasma.panelspacer"
|
||||||
|
"org.kde.plasma.marginsseparator"
|
||||||
|
"org.kde.plasma.keyboardindicator"
|
||||||
|
"org.kde.plasma.cameraindicator"
|
||||||
|
{
|
||||||
|
systemTray = {
|
||||||
|
icons = {
|
||||||
|
spacing = "small";
|
||||||
|
scaleToFit = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
digitalClock = {
|
||||||
|
date = {
|
||||||
|
enable = true;
|
||||||
|
format = "isoDate";
|
||||||
|
position = "besideTime";
|
||||||
|
};
|
||||||
|
time = {
|
||||||
|
format = "24h";
|
||||||
|
showSeconds = "onlyInTooltip";
|
||||||
|
};
|
||||||
|
calendar.showWeekNumbers = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "org.kde.plasma.userswitcher";
|
||||||
|
config.General = {
|
||||||
|
showFace = "true";
|
||||||
|
showName = "false";
|
||||||
|
showFullName = "true";
|
||||||
|
showTechnicalInfo = "true";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
shortcuts = {
|
||||||
|
ksmserver = {
|
||||||
|
"Lock Session" = [
|
||||||
|
"Screensaver"
|
||||||
|
"Meta+Alt+L"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
kwin = {
|
||||||
|
"Walk Through Windows of Current Application" = "Alt+`";
|
||||||
|
"Walk Through Windows of Current Application (Reverse)" = "Alt+¬";
|
||||||
|
"ToggleMouseClick" = "Meta+*";
|
||||||
|
"Expose" = "Meta+,";
|
||||||
|
"Switch Window Down" = "Meta+J";
|
||||||
|
"Switch Window Left" = "Meta+H";
|
||||||
|
"Switch Window Right" = "Meta+L";
|
||||||
|
"Switch Window Up" = "Meta+K";
|
||||||
|
"Invert" = "Meta+Ctrl+I";
|
||||||
|
"InvertWindow" = "Meta+Ctrl+U";
|
||||||
|
"Invert Screen Colors" = [ ];
|
||||||
|
};
|
||||||
|
"services/org.kde.krunner.desktop"."_launch" = [
|
||||||
|
"Meta+Space"
|
||||||
|
"Search"
|
||||||
|
"Alt+F2"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
kwin = {
|
||||||
|
virtualDesktops = {
|
||||||
|
rows = 1;
|
||||||
|
number = 4;
|
||||||
|
};
|
||||||
|
effects = {
|
||||||
|
translucency.enable = true;
|
||||||
|
blur.enable = true;
|
||||||
|
cube.enable = true;
|
||||||
|
dimAdminMode.enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
powerdevil =
|
||||||
|
let
|
||||||
|
powerButtonAction = "turnOffScreen";
|
||||||
|
whenSleepingEnter = "standbyThenHibernate";
|
||||||
|
whenLaptopLidClosed = "sleep";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
AC = {
|
||||||
|
inherit powerButtonAction whenSleepingEnter whenLaptopLidClosed;
|
||||||
|
autoSuspend = {
|
||||||
|
action = "sleep";
|
||||||
|
idleTimeout = 7200;
|
||||||
|
};
|
||||||
|
dimDisplay = {
|
||||||
|
enable = true;
|
||||||
|
idleTimeOut = 300;
|
||||||
|
};
|
||||||
|
turnOffDisplay = {
|
||||||
|
idleTimeout = 1800;
|
||||||
|
idleTimeoutWhenLocked = 120;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
battery = {
|
||||||
|
inherit powerButtonAction whenSleepingEnter whenLaptopLidClosed;
|
||||||
|
autoSuspend = {
|
||||||
|
action = "sleep";
|
||||||
|
idleTimeout = 900;
|
||||||
|
};
|
||||||
|
dimDisplay = {
|
||||||
|
enable = true;
|
||||||
|
idleTimeOut = 120;
|
||||||
|
};
|
||||||
|
turnOffDisplay = {
|
||||||
|
idleTimeout = 300;
|
||||||
|
idleTimeoutWhenLocked = 60;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
lowBattery = {
|
||||||
|
inherit powerButtonAction whenSleepingEnter whenLaptopLidClosed;
|
||||||
|
autoSuspend = {
|
||||||
|
action = "hibernate";
|
||||||
|
idleTimeout = 300;
|
||||||
|
};
|
||||||
|
dimDisplay = {
|
||||||
|
enable = true;
|
||||||
|
idleTimeOut = 60;
|
||||||
|
};
|
||||||
|
turnOffDisplay = {
|
||||||
|
idleTimeout = 120;
|
||||||
|
idleTimeoutWhenLocked = "immediately";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
configFile = {
|
||||||
|
baloofilerc."Basic Settings"."Indexing-Enabled" = false;
|
||||||
|
kcminputrc.Keyboard.NumLock = 1;
|
||||||
|
yakuakerc = {
|
||||||
|
Dialogs.FirstRun = false;
|
||||||
|
Window = {
|
||||||
|
DynamicTabTitles = true;
|
||||||
|
Height = 80;
|
||||||
|
Width = 80;
|
||||||
|
KeepOpen = true;
|
||||||
|
ShowSystrayIcon = false;
|
||||||
|
ShowTitleBar = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
plasmanotifyrc = {
|
||||||
|
Notifications = {
|
||||||
|
NormalAlwaysOnTop = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
krunnerrc = {
|
||||||
|
General = {
|
||||||
|
ActivateWhenTypingOnDesktop = false;
|
||||||
|
FreeFloating = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kscreenlockerrc = {
|
||||||
|
Daemon.Timeout = 15;
|
||||||
|
Greeter.WallpaperPlugin = "org.kde.potd";
|
||||||
|
};
|
||||||
|
klipperrc = {
|
||||||
|
General = {
|
||||||
|
SyncClipboards = true;
|
||||||
|
MaxClipItems = 5;
|
||||||
|
IgnoreImages = false;
|
||||||
|
KeepClipboardContents = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kdeglobals = {
|
||||||
|
General =
|
||||||
|
let
|
||||||
|
AccentColor =
|
||||||
|
let
|
||||||
|
r = config.scheme."${accentColourName}-rgb-r";
|
||||||
|
g = config.scheme."${accentColourName}-rgb-g";
|
||||||
|
b = config.scheme."${accentColourName}-rgb-b";
|
||||||
|
in
|
||||||
|
"${r}, ${g}, ${b}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit AccentColor;
|
||||||
|
LastUsedCustomAccentColor = AccentColor;
|
||||||
|
TerminalApplication = "konsole";
|
||||||
|
TerminalService = "org.kde.konsole.desktop";
|
||||||
|
};
|
||||||
|
WM = {
|
||||||
|
# TODO convert to base16 colours at some point
|
||||||
|
activeBackground = "227,229,231";
|
||||||
|
activeBlend = "227,229,231";
|
||||||
|
activeForeground = "35,38,41";
|
||||||
|
inactiveBackground = "239,240,241";
|
||||||
|
inactiveBlend = "239,240,241";
|
||||||
|
inactiveForeground = "112,125,138";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
breezerc = {
|
||||||
|
Common = {
|
||||||
|
OutlineClassButton = true;
|
||||||
|
OutlineCloseButtone = true;
|
||||||
|
ShadowSize = "ShadowVeryLarge";
|
||||||
|
ShadowStrength = "128";
|
||||||
|
};
|
||||||
|
Style = {
|
||||||
|
MenuOpacity = "100";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
dolphinrc = {
|
||||||
|
ContentDisplay = {
|
||||||
|
UsePermissionsFormat = "CombinedFormat";
|
||||||
|
};
|
||||||
|
General = {
|
||||||
|
BrowseThroughArchives = true;
|
||||||
|
OpenNewTabAfterLastTab = true;
|
||||||
|
RememberOpenedTabs = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kwinrc = {
|
||||||
|
Plugins = {
|
||||||
|
frozenappEnabled = false;
|
||||||
|
mouseclickEnabled = true;
|
||||||
|
shakecursorEnabled = false;
|
||||||
|
invertEnabled = true;
|
||||||
|
};
|
||||||
|
Windows = {
|
||||||
|
FocusPolicy = "FocusFollowsMouse";
|
||||||
|
RollOverDesktops = true;
|
||||||
|
};
|
||||||
|
NightColor = {
|
||||||
|
Active = true;
|
||||||
|
Mode = "Location";
|
||||||
|
LatitudeFixed = "51.7";
|
||||||
|
LongitudeFixed = "-1.2";
|
||||||
|
};
|
||||||
|
"Effect-translucency" = {
|
||||||
|
# Re-enable translucency when I can work out how to apply
|
||||||
|
# blur to all windows
|
||||||
|
Inactive = 100;
|
||||||
|
MoveResize = 100;
|
||||||
|
Dialogs = 100;
|
||||||
|
ComboboxPopups = 100;
|
||||||
|
Menus = 100;
|
||||||
|
};
|
||||||
|
"org.kde.kdecoration2" = {
|
||||||
|
BorderSize = "None";
|
||||||
|
BorderSizeAuto = "false";
|
||||||
|
};
|
||||||
|
"Script-krohnkite" = {
|
||||||
|
limitTileWidth = true;
|
||||||
|
screenGapBottom = 5;
|
||||||
|
screenGapLeft = 5;
|
||||||
|
screenGapRight = 5;
|
||||||
|
screenGapTop = 5;
|
||||||
|
tileLayoutGap = 5;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
xdg.configFile."autostart/org.kde.yakuake.desktop".source = "${pkgs.yakuake}/share/applications/org.kde.yakuake.desktop";
|
||||||
|
}
|
15
system/home/plasma/klassy.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# sudo pacman -S git frameworkintegration gcc-libs glibc kcmutils kcolorscheme kconfig kcoreaddons kdecoration kguiaddons ki18n kiconthemes kirigami kwidgetsaddons kwindowsystem qt6-base qt6-declarative qt6-svg xdg-utils extra-cmake-modules kcmutils5 frameworkintegration5 kconfigwidgets5 kiconthemes5 kirigami2 kwindowsystem5
|
||||||
|
{ mkDerivation, fetchFromGithub }:
|
||||||
|
let
|
||||||
|
pname = "klassy";
|
||||||
|
version = "6.1.breeze6.0.3";
|
||||||
|
in
|
||||||
|
mkDerivation {
|
||||||
|
inherit pname version;
|
||||||
|
src = fetchFromGithub {
|
||||||
|
owner = "paulmcauley";
|
||||||
|
repo = pname;
|
||||||
|
rev = version;
|
||||||
|
hash = "";
|
||||||
|
};
|
||||||
|
}
|
47
system/home/plasma/konsole.nix
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
fonts,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.packages = [ pkgs.yakuake ];
|
||||||
|
programs.konsole = {
|
||||||
|
enable = true;
|
||||||
|
defaultProfile = "One-Light";
|
||||||
|
customColorSchemes.onelight = ./onelight.colorscheme;
|
||||||
|
profiles.onelight = {
|
||||||
|
name = "One-Light";
|
||||||
|
colorScheme = "onelight";
|
||||||
|
command = "${config.programs.fish.package}/bin/fish";
|
||||||
|
font = {
|
||||||
|
name = fonts.monospace.name;
|
||||||
|
size = fonts.sizes.terminal;
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
"Interaction Options" = {
|
||||||
|
TextEditorCmd = 6;
|
||||||
|
TextEditorCmdCustom = "emacsclient -c +LINE:COLUMN PATH";
|
||||||
|
UnderlineFilesEnabled = true;
|
||||||
|
OpenLinksByDirectClickEnabled = true;
|
||||||
|
};
|
||||||
|
"Terminal Features" = {
|
||||||
|
BlinkingCursorEnabled = true;
|
||||||
|
VerticalLine = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfig = {
|
||||||
|
MainWindow = {
|
||||||
|
MenuBar = "Disabled";
|
||||||
|
};
|
||||||
|
TabBar = {
|
||||||
|
ExpandTabWidth = true;
|
||||||
|
NewTabButton = true;
|
||||||
|
};
|
||||||
|
ThumbnailsSettings = {
|
||||||
|
ThumbnailAlt = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
20
system/home/plasma/krohnkite.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
(pkgs.libsForQt5.krohnkite.overrideAttrs (
|
||||||
|
final: prev:
|
||||||
|
let
|
||||||
|
version = "0.9.7";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit version;
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "anametologin";
|
||||||
|
repo = "krohnkite";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-8A3zW5tK8jK9fSxYx28b8uXGsvxEoUYybU0GaMD2LNw=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
))
|
||||||
|
];
|
||||||
|
}
|
100
system/home/plasma/onelight.colorscheme
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
[Background]
|
||||||
|
Color=250,250,250
|
||||||
|
|
||||||
|
[BackgroundFaint]
|
||||||
|
Color=250,250,250
|
||||||
|
|
||||||
|
[BackgroundIntense]
|
||||||
|
Color=250,250,250
|
||||||
|
|
||||||
|
[Color0]
|
||||||
|
Color=250,250,250
|
||||||
|
|
||||||
|
[Color0Faint]
|
||||||
|
Color=160,161,167
|
||||||
|
|
||||||
|
[Color0Intense]
|
||||||
|
Color=160,161,167
|
||||||
|
|
||||||
|
[Color1]
|
||||||
|
Color=202,18,67
|
||||||
|
|
||||||
|
[Color1Faint]
|
||||||
|
Color=202,18,67
|
||||||
|
|
||||||
|
[Color1Intense]
|
||||||
|
Color=202,18,67
|
||||||
|
|
||||||
|
[Color2]
|
||||||
|
Color=80,161,79
|
||||||
|
|
||||||
|
[Color2Faint]
|
||||||
|
Color=80,161,79
|
||||||
|
|
||||||
|
[Color2Intense]
|
||||||
|
Color=80,161,79
|
||||||
|
|
||||||
|
[Color3]
|
||||||
|
Color=215,95,0
|
||||||
|
|
||||||
|
[Color3Faint]
|
||||||
|
Color=215,95,0
|
||||||
|
|
||||||
|
[Color3Intense]
|
||||||
|
Color=215,95,0
|
||||||
|
|
||||||
|
[Color4]
|
||||||
|
Color=64,120,242
|
||||||
|
|
||||||
|
[Color4Faint]
|
||||||
|
Color=64,120,242
|
||||||
|
|
||||||
|
[Color4Intense]
|
||||||
|
Color=64,120,242
|
||||||
|
|
||||||
|
[Color5]
|
||||||
|
Color=166,38,164
|
||||||
|
|
||||||
|
[Color5Faint]
|
||||||
|
Color=166,38,164
|
||||||
|
|
||||||
|
[Color5Intense]
|
||||||
|
Color=166,38,164
|
||||||
|
|
||||||
|
[Color6]
|
||||||
|
Color=1,132,188
|
||||||
|
|
||||||
|
[Color6Faint]
|
||||||
|
Color=1,132,188
|
||||||
|
|
||||||
|
[Color6Intense]
|
||||||
|
Color=1,132,188
|
||||||
|
|
||||||
|
[Color7]
|
||||||
|
Color=56,58,66
|
||||||
|
|
||||||
|
[Color7Faint]
|
||||||
|
Color=9,10,11
|
||||||
|
|
||||||
|
[Color7Intense]
|
||||||
|
Color=9,10,11
|
||||||
|
|
||||||
|
[Foreground]
|
||||||
|
Color=56,58,66
|
||||||
|
|
||||||
|
[ForegroundFaint]
|
||||||
|
Color=56,58,66
|
||||||
|
|
||||||
|
[ForegroundIntense]
|
||||||
|
Color=56,58,66
|
||||||
|
|
||||||
|
[General]
|
||||||
|
Anchor=0.5,0.5
|
||||||
|
Blur=true
|
||||||
|
ColorRandomization=false
|
||||||
|
Description=One Light
|
||||||
|
FillStyle=Tile
|
||||||
|
Opacity=1.0
|
||||||
|
Wallpaper=
|
||||||
|
WallpaperFlipType=NoFlip
|
||||||
|
WallpaperOpacity=1
|
144
system/home/rofi/default.nix
Normal file
|
@ -0,0 +1,144 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
fonts,
|
||||||
|
accentColourName,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
programs.rofi = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.rofi-wayland;
|
||||||
|
terminal =
|
||||||
|
with config.programs;
|
||||||
|
"${if alacritty.enable then alacritty.package else pkgs.alacritty}/bin/alacritty";
|
||||||
|
font = fonts.monospace.name;
|
||||||
|
location = "center";
|
||||||
|
plugins = with pkgs; [ rofi-emoji ];
|
||||||
|
extraConfig = {
|
||||||
|
modi = "run,drun,ssh,window,emoji,combi";
|
||||||
|
combi-modi = "drun,ssh,window,emoji";
|
||||||
|
sidebar-mode = true;
|
||||||
|
sort = true;
|
||||||
|
sorting-method = "fzf";
|
||||||
|
matching = "fuzzy";
|
||||||
|
icon-theme = config.gtk.iconTheme.name;
|
||||||
|
show-icons = true;
|
||||||
|
application-fallback-icon = "application-x-addon";
|
||||||
|
drun-display-format = "{icon} {name} ({categories})";
|
||||||
|
disable-history = false;
|
||||||
|
hide-scrollbar = true;
|
||||||
|
display-run = " Run ";
|
||||||
|
display-drun = " Apps ";
|
||||||
|
display-ssh = " SSH ";
|
||||||
|
display-window = " Move ";
|
||||||
|
display-emoji = " Emoji ";
|
||||||
|
display-combi = " Combi ";
|
||||||
|
};
|
||||||
|
theme =
|
||||||
|
with builtins;
|
||||||
|
let
|
||||||
|
inherit (config.lib.formats.rasi) mkLiteral;
|
||||||
|
sc = config.scheme;
|
||||||
|
bg = mkLiteral "rgba (${sc.base00-rgb-r}, ${sc.base00-rgb-g}, ${sc.base00-rgb-b}, 80%)";
|
||||||
|
bg2 = mkLiteral "rgba (${sc.base01-rgb-r}, ${sc.base01-rgb-g}, ${sc.base01-rgb-b}, 100%)";
|
||||||
|
fg = mkLiteral sc.withHashtag.base05;
|
||||||
|
fg2 = mkLiteral sc.withHashtag.base04;
|
||||||
|
border = mkLiteral sc.withHashtag.${accentColour};
|
||||||
|
blue = mkLiteral sc.withHashtag.blue;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"*" = {
|
||||||
|
background-color = mkLiteral "transparent";
|
||||||
|
text-color = fg;
|
||||||
|
font = with fonts; "${monospace.name} ${toString sizes.popups}";
|
||||||
|
};
|
||||||
|
|
||||||
|
window = {
|
||||||
|
height = mkLiteral "75%";
|
||||||
|
width = mkLiteral "75%";
|
||||||
|
border = mkLiteral "1px";
|
||||||
|
border-color = border;
|
||||||
|
border-radius = mkLiteral "5px";
|
||||||
|
background-color = bg;
|
||||||
|
};
|
||||||
|
|
||||||
|
inputbar = {
|
||||||
|
children = map mkLiteral [
|
||||||
|
"prompt"
|
||||||
|
"entry"
|
||||||
|
];
|
||||||
|
padding = mkLiteral "2px";
|
||||||
|
};
|
||||||
|
|
||||||
|
prompt = {
|
||||||
|
background-color = bg2;
|
||||||
|
padding = mkLiteral "6px";
|
||||||
|
text-color = blue;
|
||||||
|
border-radius = mkLiteral "5px";
|
||||||
|
margin = mkLiteral "20px 0px 0px 20px";
|
||||||
|
};
|
||||||
|
|
||||||
|
textbox-prompt-colon = {
|
||||||
|
expand = false;
|
||||||
|
str = "=";
|
||||||
|
};
|
||||||
|
|
||||||
|
entry = {
|
||||||
|
padding = mkLiteral "6px";
|
||||||
|
margin = mkLiteral "20px 0px 0px 10px";
|
||||||
|
};
|
||||||
|
|
||||||
|
listview = {
|
||||||
|
border = mkLiteral "0px 0px 0px";
|
||||||
|
padding = mkLiteral "6px 0px 0px";
|
||||||
|
margin = mkLiteral "10px 0px 0px 20px";
|
||||||
|
columns = 2;
|
||||||
|
lines = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
element = {
|
||||||
|
padding = mkLiteral "5px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element-icon" = {
|
||||||
|
size = mkLiteral "25px";
|
||||||
|
};
|
||||||
|
|
||||||
|
"element selected" = {
|
||||||
|
background-color = bg2;
|
||||||
|
text-color = blue;
|
||||||
|
border-radius = mkLiteral "5px";
|
||||||
|
};
|
||||||
|
|
||||||
|
mode-switcher = {
|
||||||
|
spacing = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
button = {
|
||||||
|
padding = mkLiteral "10px";
|
||||||
|
text-color = fg2;
|
||||||
|
border-radius = mkLiteral "5px";
|
||||||
|
vertical-align = mkLiteral "0.5";
|
||||||
|
horizontal-align = mkLiteral "0.5";
|
||||||
|
};
|
||||||
|
|
||||||
|
"button selected" = {
|
||||||
|
background-color = bg2;
|
||||||
|
text-color = blue;
|
||||||
|
};
|
||||||
|
|
||||||
|
message = {
|
||||||
|
margin = mkLiteral "2px";
|
||||||
|
padding = mkLiteral "2px";
|
||||||
|
border-radius = mkLiteral "5px";
|
||||||
|
};
|
||||||
|
|
||||||
|
textbox = {
|
||||||
|
padding = mkLiteral "6px";
|
||||||
|
margin = mkLiteral "20px 0px 0px 20px";
|
||||||
|
text-color = blue;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
15
system/home/scripts/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = [
|
||||||
|
(pkgs.writeShellScriptBin "esync" (builtins.readFile ./shell/esync.sh))
|
||||||
|
(pkgs.writeShellScriptBin "git-sync-all" (builtins.readFile ./shell/git-sync-all.sh))
|
||||||
|
(pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh))
|
||||||
|
(pkgs.writeShellScriptBin "xdg-query-program" (builtins.readFile ./shell/xdg-query-program.sh))
|
||||||
|
];
|
||||||
|
shellAliases = {
|
||||||
|
gsa = "git-sync-all";
|
||||||
|
gsad = "git-sync-all && shutdown now";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
38
system/home/scripts/lua/sync-all.lua
Executable file
|
@ -0,0 +1,38 @@
|
||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
--[[
|
||||||
|
#!nix-shell -i lua -p git git-sync
|
||||||
|
]]
|
||||||
|
local config_home
|
||||||
|
if os.getenv("XDG_CONFIG_HOME") then
|
||||||
|
config_home = os.getenv("XDG_CONFIG_HOME")
|
||||||
|
else
|
||||||
|
config_home = "~/.config/"
|
||||||
|
end
|
||||||
|
|
||||||
|
local sync_mapping = {
|
||||||
|
["~/.password-store"] = "https://git.xenia.me.uk/pixelifytica/pass.git",
|
||||||
|
["~/.elfeed"] = "https://git.xenia.me.uk/pixelifytica/elfeed.git",
|
||||||
|
["~/Documents/Org"] = "https://git.xenia.me.uk/pixelifytica/org.git",
|
||||||
|
["~/Documents/References"] = "https://git.xenia.me.uk/pixelifytica/references.git",
|
||||||
|
}
|
||||||
|
|
||||||
|
local pull_mapping = {
|
||||||
|
["/etc/nixos"] = "https://git.xenia.me.uk/pixelifytica/nixos.git",
|
||||||
|
[config_home .. "/emacs"] = "https://git.xenia.me.uk/pixelifytica/emacs.git",
|
||||||
|
}
|
||||||
|
|
||||||
|
local function git_sync(directory, url)
|
||||||
|
print("--- sync: " .. directory .. " ---")
|
||||||
|
end
|
||||||
|
|
||||||
|
local function git_pull(directory, url, ff_only)
|
||||||
|
print("--- pull: " .. directory .. " ---")
|
||||||
|
end
|
||||||
|
|
||||||
|
for directory, url in pairs(sync_mapping) do
|
||||||
|
git_sync(directory, url)
|
||||||
|
end
|
||||||
|
|
||||||
|
for directory, url in pairs(pull_mapping) do
|
||||||
|
git_pull(directory, url, true)
|
||||||
|
end
|
68
system/home/scripts/python/sync-all.py
Executable file
|
@ -0,0 +1,68 @@
|
||||||
|
#!/usr/bin/env nix-shell
|
||||||
|
#!nix-shell -i python3 -p git git-sync
|
||||||
|
|
||||||
|
import os
|
||||||
|
import queue
|
||||||
|
import subprocess
|
||||||
|
from pathlib import Path
|
||||||
|
from typing import Dict
|
||||||
|
|
||||||
|
HOME = Path("~").expanduser().resolve()
|
||||||
|
|
||||||
|
SYNC_MAPPING: Dict[Path, str] = {
|
||||||
|
Path(
|
||||||
|
"~/.password-store"
|
||||||
|
).expanduser(): "https://git.xenia.me.uk/pixelifytica/pass.git",
|
||||||
|
Path("~/.elfeed").expanduser(): "https://git.xenia.me.uk/pixelifytica/elfeed.git",
|
||||||
|
Path(
|
||||||
|
"~/Documents/Org"
|
||||||
|
).expanduser(): "https://git.xenia.me.uk/pixelifytica/org.git",
|
||||||
|
Path(
|
||||||
|
"~/Documents/References"
|
||||||
|
).expanduser(): "https://git.xenia.me.uk/pixelifytica/references.git",
|
||||||
|
}
|
||||||
|
|
||||||
|
PULL_MAPPINGS: Dict[Path, str] = {
|
||||||
|
Path("/etc/nixos"): "https://git.xenia.me.uk/pixelifytica/nixos.git",
|
||||||
|
Path(os.getenv("XDG_CONFIG_HOME", "~/.config")).expanduser()
|
||||||
|
/ "emacs": "https://git.xenia.me.uk/pixelifytica/emacs.git",
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
def git_set_url(directory: Path, url: str) -> None:
|
||||||
|
"""Set url for directory"""
|
||||||
|
comp = subprocess.run(f"git remote set-url origin {url}".split(), cwd=directory)
|
||||||
|
if comp.returncode != 0:
|
||||||
|
raise UserWarning(f"{comp.returncode} from {' '.join(comp.args)}")
|
||||||
|
subprocess.run("git remote -v".split(), cwd=directory)
|
||||||
|
|
||||||
|
|
||||||
|
def git_sync(directory: Path, url: str) -> subprocess.CompletedProcess:
|
||||||
|
"""Sync status of repository"""
|
||||||
|
print(f"--- sync: ${directory} ---")
|
||||||
|
if not directory.exists():
|
||||||
|
return subprocess.run("exit 1".split()) # TODO
|
||||||
|
git_set_url(directory, url)
|
||||||
|
return subprocess.run("git-sync -ns".split(), cwd=directory)
|
||||||
|
|
||||||
|
|
||||||
|
def git_pull(
|
||||||
|
directory: Path, url: str, ff_only: bool = True
|
||||||
|
) -> subprocess.CompletedProcess:
|
||||||
|
"""Pull updates for directory from url"""
|
||||||
|
print(f"--- pull: {directory} ---")
|
||||||
|
if not directory.exists():
|
||||||
|
return subprocess.run("exit 1".split()) # TODO
|
||||||
|
git_set_url(directory, url)
|
||||||
|
return subprocess.run("git pull --ff-only".split(), cwd=directory)
|
||||||
|
|
||||||
|
|
||||||
|
def main(*args, **kwargs) -> None:
|
||||||
|
for directory, url in SYNC_MAPPING.items():
|
||||||
|
print(git_sync(directory, url))
|
||||||
|
for directory, url in PULL_MAPPINGS.items():
|
||||||
|
print(git_pull(directory, url))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
14
system/home/scripts/shell/esync.sh
Executable file
|
@ -0,0 +1,14 @@
|
||||||
|
# Clone ~/.config/emacs/ if it doesn't exist
|
||||||
|
EMACS_DIR="${XDG_CONFIG_DIR:=$HOME/.config}/emacs/"
|
||||||
|
if [ ! -d "$EMACS_DIR" ]; then
|
||||||
|
git clone "https://git.xenia.me.uk/pixelifytica/emacs.git" "$EMACS_DIR"
|
||||||
|
fi
|
||||||
|
(
|
||||||
|
cd "$EMACS_DIR" || exit 1
|
||||||
|
# Pull changes by fast-forwarding only
|
||||||
|
git pull --ff --ff-only
|
||||||
|
# Update submodules for local packages
|
||||||
|
git submodule update --init --recursive
|
||||||
|
# Install and update extensions
|
||||||
|
make install
|
||||||
|
)
|
31
system/home/scripts/shell/git-sync-all.sh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
# Sync common directories, setting url to ensure it's up-to-date first
|
||||||
|
SYNC_DIRS=(
|
||||||
|
"$HOME/.password-store/"
|
||||||
|
"$HOME/Documents/org/"
|
||||||
|
"$HOME/Documents/library/"
|
||||||
|
)
|
||||||
|
SYNC_URLS=(
|
||||||
|
"https://git.xenia.me.uk/pixelifytica/pass.git"
|
||||||
|
"https://git.xenia.me.uk/pixelifytica/org.git"
|
||||||
|
"https://git.xenia.me.uk/pixelifytica/library.git"
|
||||||
|
)
|
||||||
|
|
||||||
|
for i in "${!SYNC_DIRS[@]}"; do
|
||||||
|
DIRECTORY="${SYNC_DIRS[$i]}"
|
||||||
|
URL="${SYNC_URLS[$i]}"
|
||||||
|
echo "--- sync: $DIRECTORY ---"
|
||||||
|
if [ ! -d "$DIRECTORY" ]; then
|
||||||
|
git clone "$URL" "$DIRECTORY"
|
||||||
|
fi
|
||||||
|
(
|
||||||
|
cd "$DIRECTORY" || exit
|
||||||
|
git remote set-url origin "$URL"
|
||||||
|
if [ "$(git branch --show-current)" = "main" ]; then
|
||||||
|
git branch --set-upstream-to=origin/main main
|
||||||
|
fi
|
||||||
|
git pull --ff --ff-only
|
||||||
|
git submodule update --remote --recursive
|
||||||
|
git-sync -ns
|
||||||
|
git status --porcelain
|
||||||
|
)
|
||||||
|
done
|
4
system/home/scripts/shell/low-battery.sh
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
battery_level=$(acpi -b | grep -P -o '[0-9]+(?=%)')
|
||||||
|
if [ "$battery_level" -le 20 ]; then
|
||||||
|
notify-send -u critical "Battery low" "Battery level is ${battery_level}%!"
|
||||||
|
fi
|
33
system/home/scripts/shell/rsync-local-config.sh
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
HOSTS=("$@")
|
||||||
|
# Config files
|
||||||
|
for TARGET in ".inputrc" ".config/bat/" ".config/zellij" ".config/starship.toml"; do
|
||||||
|
SOURCE="$HOME/$TARGET"
|
||||||
|
echo "--- $SOURCE ---"
|
||||||
|
TMP_TARGET=/tmp/rsync-local-config
|
||||||
|
TMP_SOURCE=$TMP_TARGET
|
||||||
|
NIX_SED="sed -i 's|/nix/.*/bin/||g'"
|
||||||
|
NIX_REPLACE="$NIX_SED $TMP_TARGET"
|
||||||
|
if [[ -e $SOURCE ]]; then
|
||||||
|
if [[ -d $SOURCE ]]; then
|
||||||
|
SOURCE=$SOURCE/
|
||||||
|
TMP_SOURCE=$TMP_SOURCE/
|
||||||
|
NIX_REPLACE="fd -g '**' $TMP_TARGET -tfile -x $NIX_SED {};"
|
||||||
|
fi
|
||||||
|
rsync -avzL --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$SOURCE" $TMP_TARGET
|
||||||
|
sh -c "$NIX_REPLACE"
|
||||||
|
for HOST in "${HOSTS[@]}"; do
|
||||||
|
rsync -avzL --delete --exclude=".git*" $TMP_SOURCE "$HOST:$TARGET"
|
||||||
|
done
|
||||||
|
rm -rf $TMP_SOURCE
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Fonts
|
||||||
|
IOSEVKA_FLAKE_URL="git+https://git.xenia.me.uk/pixelifytica/iosevka.git?ref=main"
|
||||||
|
IOSEVKA_CUSTOM_NERDFONT=$(nix path-info "$IOSEVKA_FLAKE_URL#packages.x86_64-linux.iosevka-custom-nerdfont")
|
||||||
|
IOSEVKA_CUSTOM_AILE=$(nix path-info "$IOSEVKA_FLAKE_URL#packages.x86_64-linux.iosevka-custom-aile")
|
||||||
|
echo "--- Fonts ---"
|
||||||
|
for HOST in "${HOSTS[@]}"; do
|
||||||
|
rsync -avzL --delete --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$IOSEVKA_CUSTOM_NERDFONT/share/fonts/truetype/" "$HOST:.fonts/IosevkaCustomNerdFont"
|
||||||
|
rsync -avzL --delete --exclude=".git*" --chmod=Du=rwx,Dg=rx,Do=rx,Fu=rw,Fg=r,Fo=r "$IOSEVKA_CUSTOM_AILE/share/fonts/truetype/" "$HOST:.fonts/IosevkaCustomAile"
|
||||||
|
done
|
3
system/home/scripts/shell/xdg-query-program.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
FILETYPE=$(xdg-mime query filetype $@)
|
||||||
|
DEFAULT=$(xdg-mime query default $FILETYPE)
|
||||||
|
echo "$FILETYPE -> $DEFAULT"
|
39
system/home/services/email/davmail.properties
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
davmail.server=true
|
||||||
|
davmail.mode=O365Manual
|
||||||
|
davmail.url=https://outlook.office365.com/EWS/Exchange.asmx
|
||||||
|
davmail.imapPort=1144
|
||||||
|
davmail.smtpPort=1026
|
||||||
|
davmail.caldavPort=1080
|
||||||
|
davmail.enableKeepAlive=true
|
||||||
|
davmail.logFilePath=/tmp/davmail.log
|
||||||
|
davmail.enableKerberos=false
|
||||||
|
davmail.forceActiveSyncUpdate=false
|
||||||
|
davmail.imapAutoExpunge=true
|
||||||
|
davmail.useSystemProxies=false
|
||||||
|
davmail.caldavEditNotifications=false
|
||||||
|
davmail.ssl.nosecuresmtp=false
|
||||||
|
davmail.caldavPastDelay=0
|
||||||
|
log4j.logger.httpclient.wire=WARN
|
||||||
|
davmail.popMarkReadOnRetr=false
|
||||||
|
davmail.ssl.nosecureimap=false
|
||||||
|
davmail.disableTrayActivitySwitch=true
|
||||||
|
davmail.caldavAutoSchedule=true
|
||||||
|
davmail.enableProxy=false
|
||||||
|
davmail.smtpSaveInSent=false
|
||||||
|
davmail.ssl.nosecurepop=false
|
||||||
|
log4j.rootLogger=WARN
|
||||||
|
log4j.logger.davmail=DEBUG
|
||||||
|
davmail.ssl.clientKeystorePass=
|
||||||
|
log4j.logger.org.apache.http.conn.ssl=WARN
|
||||||
|
davmail.sentKeepDelay=0
|
||||||
|
davmail.ssl.nosecureldap=false
|
||||||
|
davmail.imapAlwaysApproxMsgSize=true
|
||||||
|
davmail.ssl.nosecurecaldav=false
|
||||||
|
davmail.showStartupBanner=false
|
||||||
|
log4j.logger.httpclient=WARN
|
||||||
|
log4j.logger.org.apache.http.wire=WARN
|
||||||
|
davmail.disableGuiNotifications=true
|
||||||
|
davmail.disableUpdateCheck=true
|
||||||
|
log4j.logger.org.apache.http=WARN
|
||||||
|
davmail.carddavReadPhoto=true
|
||||||
|
davmail.keepDelay=30
|
176
system/home/services/email/default.nix
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
(pkgs.writeShellScriptBin "mbsync-ensure-pass" (builtins.readFile ./mbsync-ensure-pass.sh))
|
||||||
|
(pkgs.writeShellScriptBin "davmail-setup" ''
|
||||||
|
systemctl --user restart davmail # Ensure config file is present
|
||||||
|
systemctl --user stop davmail
|
||||||
|
${pkgs.davmail}/bin/davmail -n ~/.davmail.properties
|
||||||
|
systemctl --user restart davmail
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
accounts.email = {
|
||||||
|
maildirBasePath = "Mail";
|
||||||
|
accounts =
|
||||||
|
let
|
||||||
|
realName = "Evie Litherland-Smith";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
proton =
|
||||||
|
let
|
||||||
|
address = "e.litherlandsmith@proton.me";
|
||||||
|
host = "127.0.0.1";
|
||||||
|
tls.enable = false;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit realName address;
|
||||||
|
primary = true;
|
||||||
|
maildir.path = "Proton";
|
||||||
|
imap = {
|
||||||
|
inherit host tls;
|
||||||
|
port = 1143;
|
||||||
|
};
|
||||||
|
smtp = {
|
||||||
|
inherit host tls;
|
||||||
|
port = 1025;
|
||||||
|
};
|
||||||
|
aliases = [
|
||||||
|
"evie@xenia.me.uk"
|
||||||
|
"evie@litherlandsmith.slmail.me"
|
||||||
|
];
|
||||||
|
userName = address;
|
||||||
|
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
|
||||||
|
mu.enable = true;
|
||||||
|
msmtp = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
tls = "off";
|
||||||
|
auth = "login";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
expunge = "both";
|
||||||
|
remove = "both";
|
||||||
|
patterns = [
|
||||||
|
"*"
|
||||||
|
"!All Mail"
|
||||||
|
"!Labels*"
|
||||||
|
"!Starred"
|
||||||
|
"!Recovered Messages"
|
||||||
|
];
|
||||||
|
subFolders = "Verbatim";
|
||||||
|
extraConfig.account.AuthMechs = "LOGIN";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
icloud =
|
||||||
|
let
|
||||||
|
address = "e.litherlandsmith@icloud.com";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit realName address;
|
||||||
|
primary = false;
|
||||||
|
maildir.path = "iCloud";
|
||||||
|
imap.host = "imap.mail.me.com";
|
||||||
|
smtp.host = "smtp.mail.me.com";
|
||||||
|
userName = address;
|
||||||
|
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
|
||||||
|
mu.enable = true;
|
||||||
|
msmtp.enable = true;
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
expunge = "both";
|
||||||
|
remove = "both";
|
||||||
|
patterns = [
|
||||||
|
"*"
|
||||||
|
"!Notes"
|
||||||
|
];
|
||||||
|
subFolders = "Verbatim";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
outlook =
|
||||||
|
let
|
||||||
|
address = "evie.litherland-smith@ukaea.uk";
|
||||||
|
host = "127.0.0.1";
|
||||||
|
tls.enable = false;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit realName address;
|
||||||
|
primary = false;
|
||||||
|
maildir.path = "Outlook";
|
||||||
|
imap = {
|
||||||
|
inherit host tls;
|
||||||
|
port = 1144;
|
||||||
|
};
|
||||||
|
smtp = {
|
||||||
|
inherit host tls;
|
||||||
|
port = 1026;
|
||||||
|
};
|
||||||
|
aliases = [ "elitherl@jet.uk" ];
|
||||||
|
userName = address;
|
||||||
|
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
|
||||||
|
mu.enable = true;
|
||||||
|
msmtp = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = {
|
||||||
|
tls = "off";
|
||||||
|
auth = "login";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
expunge = "both";
|
||||||
|
remove = "both";
|
||||||
|
patterns = [
|
||||||
|
"*"
|
||||||
|
"!Conversation History"
|
||||||
|
"!Snoozed"
|
||||||
|
"!Social Activity Notifications"
|
||||||
|
"!Sync Issues*"
|
||||||
|
"!Unsent Messages"
|
||||||
|
];
|
||||||
|
subFolders = "Verbatim";
|
||||||
|
extraConfig.account.AuthMechs = "LOGIN";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
programs = {
|
||||||
|
mu.enable = true;
|
||||||
|
msmtp.enable = true;
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
groups.inboxes = {
|
||||||
|
proton = [ "INBOX" ];
|
||||||
|
icloud = [ "INBOX" ];
|
||||||
|
outlook = [ "INBOX" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.mbsync = {
|
||||||
|
inherit (config.programs.mbsync) enable package;
|
||||||
|
frequency = "*:0/5"; # Every 5 minutes
|
||||||
|
verbose = true;
|
||||||
|
preExec = null;
|
||||||
|
postExec = null;
|
||||||
|
};
|
||||||
|
systemd.user.services.davmail = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Davmail server";
|
||||||
|
Wants = [ "network-online.target" ];
|
||||||
|
After = [ "network-online.target" ];
|
||||||
|
};
|
||||||
|
Service = {
|
||||||
|
Environment = [ "PATH=/run/current-system/sw/bin/:$PATH" ];
|
||||||
|
Restart = "always";
|
||||||
|
ExecStartPre = with config.home; ''
|
||||||
|
/bin/sh -c "if [ ! -f ${homeDirectory}/.davmail.properties ]; then cp ${./davmail.properties} ${homeDirectory}/.davmail.properties; fi; chmod 644 ${homeDirectory}/.davmail.properties"
|
||||||
|
'';
|
||||||
|
ExecStart = "${pkgs.davmail}/bin/davmail -notray ${config.home.homeDirectory}/.davmail.properties";
|
||||||
|
};
|
||||||
|
Install.WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
}
|
15
system/home/services/email/mbsync-ensure-pass.sh
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
EMAIL_ADDRESSES=(
|
||||||
|
e.litherlandsmith@proton.me
|
||||||
|
e.litherlandsmith@icloud.com
|
||||||
|
evie.litherland-smith@ukaea.uk
|
||||||
|
)
|
||||||
|
LABELS=("Proton" "iCloud" "Outlook")
|
||||||
|
|
||||||
|
for i in "${!EMAIL_ADDRESSES[@]}"; do
|
||||||
|
ADDRESS="${EMAIL_ADDRESSES[$i]}"
|
||||||
|
LABEL="${LABELS[$i]}"
|
||||||
|
secret-tool lookup email "$ADDRESS" >/dev/null || (
|
||||||
|
echo "Setup $LABEL"
|
||||||
|
secret-tool store --label="$LABEL mail mbsync" email "$ADDRESS"
|
||||||
|
)
|
||||||
|
done
|
3
system/home/services/email/signatures/personal
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
--
|
||||||
|
Evelyn Litherland-Smith (she/they)
|
||||||
|
email: evie@xenia.me.uk
|
5
system/home/services/email/signatures/work
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
--
|
||||||
|
Evelyn Litherland-Smith (she/they)
|
||||||
|
Spectroscopy Diagnostic Physicist
|
||||||
|
Plasma Science and Fusion Operations
|
||||||
|
UK Atomic Energy Authority
|
41
system/home/services/password-store/default.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
xdg.configFile."pass-git-helper/git-pass-mapping.ini".source = ./git-pass-mapping.ini;
|
||||||
|
programs = {
|
||||||
|
gpg.enable = true;
|
||||||
|
password-store = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.pass-nodmenu.withExtensions (
|
||||||
|
exts: with exts; [
|
||||||
|
pass-update
|
||||||
|
pass-import
|
||||||
|
]
|
||||||
|
); # pass-audit
|
||||||
|
settings = {
|
||||||
|
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store";
|
||||||
|
PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services = {
|
||||||
|
gpg-agent = rec {
|
||||||
|
enable = true;
|
||||||
|
maxCacheTtl = 86400;
|
||||||
|
defaultCacheTtl = maxCacheTtl;
|
||||||
|
defaultCacheTtlSsh = maxCacheTtl;
|
||||||
|
pinentryPackage = lib.mkDefault pkgs.pinentry-all;
|
||||||
|
extraConfig = ''
|
||||||
|
no-allow-external-cache
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
git-sync.repositories.password-store = {
|
||||||
|
path = "${config.home.homeDirectory}/.password-store";
|
||||||
|
uri = "git+https://git.xenia.me.uk/xenia/pass.git";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
6
system/home/services/password-store/git-pass-mapping.ini
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[DEFAULT]
|
||||||
|
username_extractor=regex_search
|
||||||
|
regex_username=^login: (.*)$
|
||||||
|
|
||||||
|
[*]
|
||||||
|
target=git/${host}
|
10
system/home/shell/bat.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.bat = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
theme = "OneHalfLight";
|
||||||
|
style = "plain,numbers,changes";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
51
system/home/shell/bottom.nix
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
{ config, accentColourName, ... }:
|
||||||
|
{
|
||||||
|
programs.bottom = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
flags = {
|
||||||
|
group_processes = true;
|
||||||
|
temperature_type = "celsius";
|
||||||
|
battery = true;
|
||||||
|
enable_gpu = true;
|
||||||
|
enable_cache_memory = true;
|
||||||
|
};
|
||||||
|
colors =
|
||||||
|
let
|
||||||
|
sc = config.scheme.withHashtag;
|
||||||
|
rainbow = with sc; [
|
||||||
|
red
|
||||||
|
yellow
|
||||||
|
green
|
||||||
|
cyan
|
||||||
|
blue
|
||||||
|
magenta
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
table_header_color = sc.base05;
|
||||||
|
all_cpu_color = sc.base05;
|
||||||
|
avg_cpu_color = sc.base05;
|
||||||
|
cpu_core_colors = rainbow;
|
||||||
|
ram_color = sc.red;
|
||||||
|
cache_color = sc.green;
|
||||||
|
swap_color = sc.blue;
|
||||||
|
rx_color = sc.green;
|
||||||
|
tx_color = sc.blue;
|
||||||
|
widget_title_color = sc.${accentColourName};
|
||||||
|
border_color = sc.base02;
|
||||||
|
highlighted_border_color = sc.${accentColourName};
|
||||||
|
text_color = sc.base05;
|
||||||
|
graph_color = sc.base04;
|
||||||
|
cursor_color = sc.base02;
|
||||||
|
selected_text_color = sc.base05;
|
||||||
|
selected_bg_color = sc.base01;
|
||||||
|
high_battery_color = sc.green;
|
||||||
|
medium_battery_color = sc.yellow;
|
||||||
|
low_battery_color = sc.red;
|
||||||
|
gpu_core_colors = rainbow;
|
||||||
|
arc_color = sc.cyan;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
29
system/home/shell/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./bat.nix
|
||||||
|
./bottom.nix
|
||||||
|
./direnv.nix
|
||||||
|
./eza.nix
|
||||||
|
./fastfetch.nix
|
||||||
|
./fzf.nix
|
||||||
|
./git.nix
|
||||||
|
./readline.nix
|
||||||
|
./ssh.nix
|
||||||
|
./starship.nix
|
||||||
|
./zellij.nix
|
||||||
|
];
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
rclone
|
||||||
|
git-sync
|
||||||
|
du-dust
|
||||||
|
];
|
||||||
|
programs = {
|
||||||
|
bash.enable = true;
|
||||||
|
fish.enable = true;
|
||||||
|
fd.enable = true;
|
||||||
|
jq.enable = true;
|
||||||
|
nix-index.enable = true;
|
||||||
|
ripgrep.enable = true;
|
||||||
|
};
|
||||||
|
}
|
7
system/home/shell/direnv.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
}
|
9
system/home/shell/eza.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.eza = {
|
||||||
|
enable = true;
|
||||||
|
git = true;
|
||||||
|
icons = true;
|
||||||
|
extraOptions = [ "--octal-permissions" ];
|
||||||
|
};
|
||||||
|
}
|
7
system/home/shell/fastfetch.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.fastfetch = {
|
||||||
|
enable = true;
|
||||||
|
settings = { };
|
||||||
|
};
|
||||||
|
}
|
9
system/home/shell/fzf.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.fzf = {
|
||||||
|
enable = true;
|
||||||
|
defaultCommand = "${pkgs.fd}/bin/fd --type f";
|
||||||
|
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
|
||||||
|
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
|
||||||
|
};
|
||||||
|
}
|
56
system/home/shell/git.nix
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.git-sync.enable = false; # Can't find pass for some reason...
|
||||||
|
programs.git =
|
||||||
|
let
|
||||||
|
package = pkgs.git.override {
|
||||||
|
withLibsecret = true;
|
||||||
|
withSsh = true;
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit package;
|
||||||
|
enable = true;
|
||||||
|
userName = "Evie Litherland-Smith";
|
||||||
|
userEmail = lib.mkDefault "evie@xenia.me.uk";
|
||||||
|
delta = {
|
||||||
|
enable = true;
|
||||||
|
options = {
|
||||||
|
line-numbers = true;
|
||||||
|
hyprlinks = true;
|
||||||
|
navigate = true;
|
||||||
|
side-by-side = true;
|
||||||
|
syntax-theme = lib.mkIf config.programs.bat.enable config.programs.bat.config.theme;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
attributes = [
|
||||||
|
"*.gpg filter=gpg diff=gpg"
|
||||||
|
"*.asc filter=gpg diff=gpg"
|
||||||
|
];
|
||||||
|
extraConfig =
|
||||||
|
let
|
||||||
|
user = "pixelifytica";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
github = {
|
||||||
|
inherit user;
|
||||||
|
};
|
||||||
|
gitea = {
|
||||||
|
inherit user;
|
||||||
|
};
|
||||||
|
pull.rebase = false;
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
merge.conflictstyle = "diff3";
|
||||||
|
credential.helper = "${package}/bin/git-credential-libsecret";
|
||||||
|
diff = {
|
||||||
|
colorMoved = "default";
|
||||||
|
gpg.textconv = "gpg --no-tty --decrypt";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
20
system/home/shell/readline.nix
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.readline = {
|
||||||
|
enable = true;
|
||||||
|
variables = {
|
||||||
|
bell-style = "visible";
|
||||||
|
blink-matching-paren = "On";
|
||||||
|
colored-completion-prefix = "On";
|
||||||
|
colored-stats = "On";
|
||||||
|
completion-ignore-case = "On";
|
||||||
|
completion-map-case = "On";
|
||||||
|
editing-mode = "emacs";
|
||||||
|
expand-tilde = "On";
|
||||||
|
horizontal-scroll-mode = "On";
|
||||||
|
mark-directories = "On";
|
||||||
|
mark-symlinked-directories = "On";
|
||||||
|
visible-stats = "On";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
44
system/home/shell/ssh.nix
Normal file
|
@ -0,0 +1,44 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
(writeShellScriptBin "ssh-keygen-defaults" ''ssh-keygen -t ed25519 -C "$(whoami)@$(hostname)"'')
|
||||||
|
];
|
||||||
|
programs.ssh = {
|
||||||
|
enable = true;
|
||||||
|
addKeysToAgent = "yes";
|
||||||
|
forwardAgent = true;
|
||||||
|
compression = true;
|
||||||
|
serverAliveInterval = 15;
|
||||||
|
serverAliveCountMax = 3;
|
||||||
|
controlMaster = "auto";
|
||||||
|
controlPersist = "10s";
|
||||||
|
extraConfig = ''
|
||||||
|
SetEnv TERM=xterm-256color
|
||||||
|
'';
|
||||||
|
matchBlocks = {
|
||||||
|
"git*".user = "git";
|
||||||
|
"legion" = {
|
||||||
|
user = "pixelifytica";
|
||||||
|
hostname = "192.168.0.31";
|
||||||
|
};
|
||||||
|
"vanguard" = {
|
||||||
|
user = "pixelifytica";
|
||||||
|
hostname = "192.168.0.90";
|
||||||
|
};
|
||||||
|
"ionos" = {
|
||||||
|
user = "root";
|
||||||
|
hostname = "77.68.67.133";
|
||||||
|
};
|
||||||
|
"freia" = {
|
||||||
|
user = "elitherl";
|
||||||
|
hostname = "freia027.hpc.l";
|
||||||
|
compression = true;
|
||||||
|
};
|
||||||
|
"heimdall" = {
|
||||||
|
user = "elitherl";
|
||||||
|
hostname = "10.40.4.115"; # heimdall115.jetdata.eu
|
||||||
|
compression = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
170
system/home/shell/starship.nix
Normal file
|
@ -0,0 +1,170 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
enableTransience = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = false;
|
||||||
|
aws.symbol = " ";
|
||||||
|
buf.symbol = " ";
|
||||||
|
c.symbol = " ";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[>](bold green)";
|
||||||
|
error_symbol = "[>](bold red)";
|
||||||
|
};
|
||||||
|
command_timeout = 2000;
|
||||||
|
conda.symbol = " ";
|
||||||
|
container.symbol = " ";
|
||||||
|
crystal.symbol = " ";
|
||||||
|
dart.symbol = " ";
|
||||||
|
directory = {
|
||||||
|
read_only = " ";
|
||||||
|
truncation_length = 2;
|
||||||
|
fish_style_pwd_dir_length = 1;
|
||||||
|
truncate_to_repo = false;
|
||||||
|
};
|
||||||
|
direnv.disabled = false;
|
||||||
|
docker_context.symbol = " ";
|
||||||
|
elixir.symbol = " ";
|
||||||
|
elm.symbol = " ";
|
||||||
|
fennel.symbol = " ";
|
||||||
|
fossil_branch.symbol = " ";
|
||||||
|
git_branch = {
|
||||||
|
symbol = " ";
|
||||||
|
only_attached = true;
|
||||||
|
ignore_branches = [
|
||||||
|
"master"
|
||||||
|
"main"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
git_commit = {
|
||||||
|
format = "[ $hash | $tag]($style) ";
|
||||||
|
tag_symbol = " ";
|
||||||
|
tag_disabled = false;
|
||||||
|
};
|
||||||
|
git_metrics.disabled = false;
|
||||||
|
git_status = {
|
||||||
|
stashed = " ";
|
||||||
|
ahead = " ";
|
||||||
|
behind = " ";
|
||||||
|
up_to_date = "";
|
||||||
|
diverged = " ";
|
||||||
|
conflicted = " ";
|
||||||
|
deleted = " ";
|
||||||
|
renamed = " ";
|
||||||
|
modified = " ";
|
||||||
|
staged = " ";
|
||||||
|
untracked = " ";
|
||||||
|
typechanged = " ";
|
||||||
|
};
|
||||||
|
golang.symbol = " ";
|
||||||
|
guix_shell.symbol = " ";
|
||||||
|
haskell.symbol = " ";
|
||||||
|
haxe.symbol = " ";
|
||||||
|
hg_branch.symbol = " ";
|
||||||
|
hostname = {
|
||||||
|
ssh_only = false;
|
||||||
|
ssh_symbol = " ";
|
||||||
|
};
|
||||||
|
java.symbol = " ";
|
||||||
|
jobs.symbol = " ";
|
||||||
|
julia.symbol = " ";
|
||||||
|
kotlin.symbol = " ";
|
||||||
|
line_break.disabled = false;
|
||||||
|
localip.disabled = false;
|
||||||
|
lua.symbol = " ";
|
||||||
|
memory_usage = {
|
||||||
|
disabled = false;
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
meson.symbol = " ";
|
||||||
|
nim.symbol = " ";
|
||||||
|
nix_shell.symbol = " ";
|
||||||
|
nodejs.symbol = " ";
|
||||||
|
ocaml.symbol = " ";
|
||||||
|
os = {
|
||||||
|
disabled = false;
|
||||||
|
format = "on [$symbol]($style) ";
|
||||||
|
symbols = {
|
||||||
|
Alpaquita = " ";
|
||||||
|
Alpine = " ";
|
||||||
|
Amazon = " ";
|
||||||
|
Android = " ";
|
||||||
|
Arch = " ";
|
||||||
|
Artix = " ";
|
||||||
|
CentOS = " ";
|
||||||
|
Debian = " ";
|
||||||
|
DragonFly = " ";
|
||||||
|
Emscripten = " ";
|
||||||
|
EndeavourOS = " ";
|
||||||
|
Fedora = " ";
|
||||||
|
FreeBSD = " ";
|
||||||
|
Garuda = " ";
|
||||||
|
Gentoo = " ";
|
||||||
|
HardenedBSD = " ";
|
||||||
|
Illumos = " ";
|
||||||
|
Linux = " ";
|
||||||
|
Mabox = " ";
|
||||||
|
Macos = " ";
|
||||||
|
Manjaro = " ";
|
||||||
|
Mariner = " ";
|
||||||
|
MidnightBSD = " ";
|
||||||
|
Mint = " ";
|
||||||
|
NetBSD = " ";
|
||||||
|
NixOS = " ";
|
||||||
|
OpenBSD = " ";
|
||||||
|
openSUSE = " ";
|
||||||
|
OracleLinux = " ";
|
||||||
|
Pop = " ";
|
||||||
|
Raspbian = " ";
|
||||||
|
Redhat = " ";
|
||||||
|
RedHatEnterprise = " ";
|
||||||
|
Redox = " ";
|
||||||
|
Solus = " ";
|
||||||
|
SUSE = " ";
|
||||||
|
Ubuntu = " ";
|
||||||
|
Unknown = " ";
|
||||||
|
Windows = " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
package.symbol = " ";
|
||||||
|
perl.symbol = " ";
|
||||||
|
php.symbol = " ";
|
||||||
|
pijul_channel.symbol = " ";
|
||||||
|
python = {
|
||||||
|
python_binary = "python3";
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
rlang.symbol = " ";
|
||||||
|
ruby.symbol = " ";
|
||||||
|
rust.symbol = " ";
|
||||||
|
scala.symbol = " ";
|
||||||
|
shell = {
|
||||||
|
disabled = false;
|
||||||
|
format = "using [$indicator]($style)";
|
||||||
|
bash_indicator = " ";
|
||||||
|
fish_indicator = " ";
|
||||||
|
powershell_indicator = " ";
|
||||||
|
cmd_indicator = " ";
|
||||||
|
unknown_indicator = " ";
|
||||||
|
};
|
||||||
|
status = {
|
||||||
|
disabled = false;
|
||||||
|
map_symbol = true;
|
||||||
|
pipestatus = true;
|
||||||
|
symbol = " ";
|
||||||
|
success_symbol = "";
|
||||||
|
not_executable_symbol = " ";
|
||||||
|
not_found_symbol = " ";
|
||||||
|
sigint_symbol = " ";
|
||||||
|
signal_symbol = " ";
|
||||||
|
};
|
||||||
|
sudo = {
|
||||||
|
disabled = false;
|
||||||
|
symbol = " ";
|
||||||
|
};
|
||||||
|
swift.symbol = " ";
|
||||||
|
zig.symbol = " ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
31
system/home/shell/transient.zsh
Executable file
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env zsh
|
||||||
|
|
||||||
|
zle-line-init() {
|
||||||
|
emulate -L zsh
|
||||||
|
|
||||||
|
[[ $CONTEXT == start ]] || return 0
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
zle .recursive-edit
|
||||||
|
local -i ret=$?
|
||||||
|
[[ $ret == 0 && $KEYS == $'\4' ]] || break
|
||||||
|
[[ -o ignore_eof ]] || exit 0
|
||||||
|
done
|
||||||
|
|
||||||
|
local saved_prompt=$PROMPT
|
||||||
|
local saved_rprompt=$RPROMPT
|
||||||
|
PROMPT=' '
|
||||||
|
RPROMPT=''
|
||||||
|
zle .reset-prompt
|
||||||
|
PROMPT=$saved_prompt
|
||||||
|
RPROMPT=$saved_rprompt
|
||||||
|
|
||||||
|
if ((ret)); then
|
||||||
|
zle .send-break
|
||||||
|
else
|
||||||
|
zle .accept-line
|
||||||
|
fi
|
||||||
|
return ret
|
||||||
|
}
|
||||||
|
|
||||||
|
zle -N zle-line-init
|
28
system/home/shell/zellij.nix
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
{ config, lib, ... }:
|
||||||
|
{
|
||||||
|
programs.zellij = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
themes.base16 = with config.scheme.withHashtag; rec {
|
||||||
|
inherit
|
||||||
|
red
|
||||||
|
green
|
||||||
|
yellow
|
||||||
|
blue
|
||||||
|
magenta
|
||||||
|
cyan
|
||||||
|
orange
|
||||||
|
;
|
||||||
|
black = base00;
|
||||||
|
bg = black;
|
||||||
|
white = base05;
|
||||||
|
fg = white;
|
||||||
|
};
|
||||||
|
theme = "base16";
|
||||||
|
default_mode = "locked";
|
||||||
|
mouse_mode = true;
|
||||||
|
copy_command = lib.mkIf config.wayland.windowManager.sway.enable "wl-copy";
|
||||||
|
copy_on_select = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
34
system/home/shell/zsh.nix
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autocd = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
defaultKeymap = "emacs";
|
||||||
|
syntaxHighlighting = {
|
||||||
|
enable = true;
|
||||||
|
highlighters = [
|
||||||
|
"brackets"
|
||||||
|
"cursor"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
historySubstringSearch.enable = true;
|
||||||
|
history = {
|
||||||
|
extended = true;
|
||||||
|
share = true;
|
||||||
|
ignoreDups = true;
|
||||||
|
ignoreAllDups = true;
|
||||||
|
ignoreSpace = true;
|
||||||
|
expireDuplicatesFirst = true;
|
||||||
|
};
|
||||||
|
initExtra = ''
|
||||||
|
## completion config and styling
|
||||||
|
zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}'
|
||||||
|
zstyle ':completion:*' menu 'select=long-list'
|
||||||
|
|
||||||
|
## transient prompt
|
||||||
|
source ${./transient.zsh}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
266
system/home/sway/default.nix
Normal file
|
@ -0,0 +1,266 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
fonts,
|
||||||
|
accentColourName,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../avizo/default.nix
|
||||||
|
../fuzzel/default.nix
|
||||||
|
../mako/default.nix
|
||||||
|
../swaylock/default.nix
|
||||||
|
../swayidle/default.nix
|
||||||
|
../waybar/default.nix
|
||||||
|
../wlogout/default.nix
|
||||||
|
];
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
ffmpeg
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
swayimg
|
||||||
|
swaybg
|
||||||
|
(writeShellScriptBin "protonmail-setup-bridge" ''
|
||||||
|
pkill -9 -f protonmail-bridge
|
||||||
|
${protonmail-bridge}/bin/protonmail-bridge -c
|
||||||
|
swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n"
|
||||||
|
'')
|
||||||
|
];
|
||||||
|
programs.waybar.systemd.target = "sway-session.target";
|
||||||
|
services = {
|
||||||
|
kanshi.systemdTarget = "sway-session.target";
|
||||||
|
gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
|
||||||
|
avizo.enable = true;
|
||||||
|
kdeconnect = {
|
||||||
|
enable = true;
|
||||||
|
indicator = true;
|
||||||
|
};
|
||||||
|
udiskie = {
|
||||||
|
enable = true;
|
||||||
|
notify = true;
|
||||||
|
automount = true;
|
||||||
|
tray = "never";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
gtk =
|
||||||
|
let
|
||||||
|
toCapital = import ../lib/to_capital.nix lib;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
package = pkgs.materia-theme;
|
||||||
|
name = "Materia-${config.scheme.variant}";
|
||||||
|
};
|
||||||
|
iconTheme = {
|
||||||
|
package = pkgs.papirus-icon-theme.override { color = "violet"; };
|
||||||
|
name = "Papirus-${toCapital config.scheme.variant}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
wayland.windowManager.sway = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.swayfx.overrideAttrs (old: {
|
||||||
|
passthru.providedSessions = [ "sway" ];
|
||||||
|
});
|
||||||
|
swaynag.enable = true;
|
||||||
|
systemd.enable = true;
|
||||||
|
xwayland = true;
|
||||||
|
checkConfig = false;
|
||||||
|
config = {
|
||||||
|
input = {
|
||||||
|
"*" = {
|
||||||
|
xkb_layout = "gb";
|
||||||
|
xkb_options = "ctrl:nocaps";
|
||||||
|
};
|
||||||
|
"type:touchpad" = {
|
||||||
|
tap = "enabled";
|
||||||
|
natural_scroll = "enabled";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
seat = {
|
||||||
|
"seat0" = {
|
||||||
|
xcursor_theme = "${config.gtk.cursorTheme.name} ${toString config.gtk.cursorTheme.size}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
modifier = "Mod4";
|
||||||
|
terminal = "${config.programs.alacritty.package}/bin/alacritty";
|
||||||
|
menu = "${config.programs.fuzzel.package}/bin/fuzzel";
|
||||||
|
workspaceAutoBackAndForth = true;
|
||||||
|
bars = [ ];
|
||||||
|
gaps = {
|
||||||
|
inner = 5;
|
||||||
|
outer = 0;
|
||||||
|
};
|
||||||
|
fonts = {
|
||||||
|
names = [ fonts.monospace.name ];
|
||||||
|
style = "regular";
|
||||||
|
size = fonts.sizes.desktop * 1.0;
|
||||||
|
};
|
||||||
|
colors =
|
||||||
|
let
|
||||||
|
sc = config.scheme.withHashtag;
|
||||||
|
text = toString sc.base05;
|
||||||
|
indicator = toString sc.${accentColourName};
|
||||||
|
background = toString sc.base00;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit background;
|
||||||
|
focused =
|
||||||
|
let
|
||||||
|
border = toString sc.${accentColourName};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit
|
||||||
|
background
|
||||||
|
text
|
||||||
|
indicator
|
||||||
|
border
|
||||||
|
;
|
||||||
|
childBorder = border;
|
||||||
|
};
|
||||||
|
focusedInactive =
|
||||||
|
let
|
||||||
|
border = toString sc.base04;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit
|
||||||
|
background
|
||||||
|
text
|
||||||
|
indicator
|
||||||
|
border
|
||||||
|
;
|
||||||
|
childBorder = border;
|
||||||
|
};
|
||||||
|
unfocused =
|
||||||
|
let
|
||||||
|
border = toString sc.base03;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit
|
||||||
|
background
|
||||||
|
text
|
||||||
|
indicator
|
||||||
|
border
|
||||||
|
;
|
||||||
|
childBorder = border;
|
||||||
|
};
|
||||||
|
urgent =
|
||||||
|
let
|
||||||
|
border = toString sc.red;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit
|
||||||
|
background
|
||||||
|
text
|
||||||
|
indicator
|
||||||
|
border
|
||||||
|
;
|
||||||
|
childBorder = border;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
startup = [
|
||||||
|
{ command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; }
|
||||||
|
{ command = "${pkgs.protonmail-bridge}/bin/protonmail-bridge -n"; }
|
||||||
|
{ command = "${pkgs.dex}/bin/dex -a"; }
|
||||||
|
{
|
||||||
|
command = "${pkgs.swaybg}/bin/swaybg -m fill -i ${../wallpapers/landscapes/tropic_island_day.jpg}";
|
||||||
|
}
|
||||||
|
{ command = "${config.services.mako.package}/bin/mako"; }
|
||||||
|
];
|
||||||
|
window = {
|
||||||
|
border = 1;
|
||||||
|
titlebar = false;
|
||||||
|
commands = [
|
||||||
|
{
|
||||||
|
criteria.window_role = "(?:pop-up|bubble|dialog)";
|
||||||
|
command = "floating enable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria.app_id = "(?:org\.kde\.polkit-kde-authentication-agent-1|Pinentry|pavucontrol|\.blueman-manager-wrapped|nm-connection-editor)";
|
||||||
|
command = "floating enable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria.class = "(?:[Mm]atplotlib|.*\.py|Idl)";
|
||||||
|
command = "floating enable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Catch-all for file dialog windows
|
||||||
|
criteria.title = "(?:Open|Save) (?:File|Folder|As)";
|
||||||
|
command = "floating enable, resize set width 1030 height 710";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Inhibit idle when watching vidoes
|
||||||
|
criteria.app_id = "(?:firefox|mpv)";
|
||||||
|
command = "inhibit_idle fullscreen";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
# Window rules for game sessions.
|
||||||
|
# Note: controllers don't reset idle timer
|
||||||
|
criteria.class = "(?:steam_app|Minecraft).*";
|
||||||
|
command = "floating enable, fullscreen enable, inhibit_idle focus";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
floating.border = 1;
|
||||||
|
keybindings =
|
||||||
|
let
|
||||||
|
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||||
|
in
|
||||||
|
lib.mkOptionDefault {
|
||||||
|
# Movement
|
||||||
|
"${modifier}+comma" = "workspace prev";
|
||||||
|
"${modifier}+period" = "workspace next";
|
||||||
|
"${modifier}+shift+comma" = "move workspace prev";
|
||||||
|
"${modifier}+shift+period" = "move workspace next";
|
||||||
|
"${modifier}+bracketleft" = "move workspace to output left";
|
||||||
|
"${modifier}+bracketright" = "move workspace to output right";
|
||||||
|
|
||||||
|
# Function keys
|
||||||
|
## Sound
|
||||||
|
"XF86AudioMute" = "exec ${config.services.avizo.package}/bin/volumectl %";
|
||||||
|
"XF86AudioMicMute" = "exec ${config.services.avizo.package}/bin/volumectl -m %";
|
||||||
|
"XF86AudioRaiseVolume" = "exec ${config.services.avizo.package}/bin/volumectl -u + 5";
|
||||||
|
"XF86AudioLowerVolume" = "exec ${config.services.avizo.package}/bin/volumectl -u - 5";
|
||||||
|
|
||||||
|
## Playback
|
||||||
|
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||||
|
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
|
||||||
|
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
|
||||||
|
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
|
||||||
|
|
||||||
|
## Brightness
|
||||||
|
"XF86MonBrightnessUp" = "exec ${config.services.avizo.package}/bin/lightctl + 5";
|
||||||
|
"XF86MonBrightnessDown" = "exec ${config.services.avizo.package}/bin/lightctl - 5";
|
||||||
|
|
||||||
|
# System utilities
|
||||||
|
"Mod4+Mod1+l" = "exec swaylockfx";
|
||||||
|
"${modifier}+z" = "exec ${config.services.mako.package}/bin/makoctl restore";
|
||||||
|
"${modifier}+Shift+z" = "exec ${config.services.mako.package}/bin/makoctl dismiss -a";
|
||||||
|
"${modifier}+Shift+p" = "exec ${config.programs.wlogout.package}/bin/wlogout";
|
||||||
|
"${modifier}+Shift+Return" = "exec ${config.programs.emacs.finalPackage}/bin/emacsclient -c";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
bindgesture swipe:right workspace prev
|
||||||
|
bindgesture swipe:left workspace next
|
||||||
|
corner_radius 5
|
||||||
|
blur enable
|
||||||
|
blur_xray disable
|
||||||
|
blur_passes 3
|
||||||
|
blur_radius 5
|
||||||
|
shadows enable
|
||||||
|
shadow_blur_radius 5
|
||||||
|
layer_effects "system-menu" blur enable; blur_ignore_transparent enable; shadows enable
|
||||||
|
layer_effects "gtk-layer-shell" blur enable; blur_ignore_transparent enable; shadows enable
|
||||||
|
layer_effects "notifications" blur enable; blur_ignore_transparent enable; shadows enable
|
||||||
|
layer_effects "launcher" blur enable; blur_ignore_transparent enable; shadows enable
|
||||||
|
layer_effects "logout_dialog" blur enable; blur_ignore_transparent enable; shadows enable
|
||||||
|
layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows enable
|
||||||
|
layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows enable
|
||||||
|
titlebar_separator enable
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
13
system/home/swayidle/default.nix
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [ ../swaylock/default.nix ];
|
||||||
|
services.swayidle = {
|
||||||
|
enable = true;
|
||||||
|
timeouts = [
|
||||||
|
{
|
||||||
|
timeout = 60 * 15; # 15 minutes
|
||||||
|
command = "swaylockfx";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|