Compare commits

..

No commits in common. "main" and "backup_pre_stylix" have entirely different histories.

432 changed files with 3781 additions and 2674 deletions

View file

@ -5,7 +5,7 @@ HOST := $(shell hostname)
default: build
build:
nix build --no-link --keep-going .#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

View file

@ -5,11 +5,11 @@
"fromYaml": "fromYaml"
},
"locked": {
"lastModified": 1732200724,
"narHash": "sha256-+R1BH5wHhfnycySb7Sy5KbYEaTJZWm1h+LW1OtyhiTs=",
"lastModified": 1721224776,
"narHash": "sha256-iakVQHg2DSmdOc5dNBwrDt9JLRxX5MT+IIbxfZEpGdo=",
"owner": "SenchoPens",
"repo": "base16.nix",
"rev": "153d52373b0fb2d343592871009a286ec8837aec",
"rev": "c89c8123310257f3ddc04cc59aa4b5573c6d515f",
"type": "github"
},
"original": {
@ -18,99 +18,14 @@
"type": "github"
}
},
"base16-fish": {
"flake": false,
"locked": {
"lastModified": 1622559957,
"narHash": "sha256-PebymhVYbL8trDVVXxCvZgc0S5VxI7I1Hv4RMSquTpA=",
"owner": "tomyun",
"repo": "base16-fish",
"rev": "2f6dd973a9075dabccd26f1cded09508180bf5fe",
"type": "github"
},
"original": {
"owner": "tomyun",
"repo": "base16-fish",
"type": "github"
}
},
"base16-helix": {
"flake": false,
"locked": {
"lastModified": 1725860795,
"narHash": "sha256-Z2o8VBPW3I+KKTSfe25kskz0EUj7MpUh8u355Z1nVsU=",
"owner": "tinted-theming",
"repo": "base16-helix",
"rev": "7f795bf75d38e0eea9fed287264067ca187b88a9",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-helix",
"type": "github"
}
},
"base16-vim": {
"flake": false,
"locked": {
"lastModified": 1731949548,
"narHash": "sha256-XIDexXM66sSh5j/x70e054BnUsviibUShW7XhbDGhYo=",
"owner": "tinted-theming",
"repo": "base16-vim",
"rev": "61165b1632409bd55e530f3dbdd4477f011cadc6",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "base16-vim",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": [
"stylix",
"systems"
]
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"fromYaml": {
"flake": false,
"locked": {
"lastModified": 1731966426,
"narHash": "sha256-lq95WydhbUTWig/JpqiB7oViTcHFP8Lv41IGtayokA8=",
"lastModified": 1721222302,
"narHash": "sha256-5vL4w9+tS9yd8WpIiDUtxN1IuxCVK2nebZMs/hCXXis=",
"owner": "SenchoPens",
"repo": "fromYaml",
"rev": "106af9e2f715e2d828df706c386a685698f3223b",
"rev": "93bad85d1633b8b27287b438c0bd394094c24d06",
"type": "github"
},
"original": {
@ -119,23 +34,6 @@
"type": "github"
}
},
"gnome-shell": {
"flake": false,
"locked": {
"lastModified": 1732369855,
"narHash": "sha256-JhUWbcYPjHO3Xs3x9/Z9RuqXbcp5yhPluGjwsdE2GMg=",
"owner": "GNOME",
"repo": "gnome-shell",
"rev": "dadd58f630eeea41d645ee225a63f719390829dc",
"type": "github"
},
"original": {
"owner": "GNOME",
"ref": "47.2",
"repo": "gnome-shell",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@ -143,175 +41,137 @@
]
},
"locked": {
"lastModified": 1734366194,
"narHash": "sha256-vykpJ1xsdkv0j8WOVXrRFHUAdp9NXHpxdnn1F4pYgSw=",
"lastModified": 1720042825,
"narHash": "sha256-A0vrUB6x82/jvf17qPCpxaM+ulJnD8YZwH9Ci0BsAzE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "80b0fdf483c5d1cb75aaad909bd390d48673857f",
"rev": "e1391fb22e18a36f57e6999c7a9f966dc80ac073",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-24.11",
"ref": "release-24.05",
"repo": "home-manager",
"type": "github"
}
},
"iosevka-custom": {
"inputs": {
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1719045863,
"narHash": "sha256-J0RQ2aiAchRxNzl2jlvqFNpFnDW2GZ7QXp53y7fs4GU=",
"ref": "refs/heads/main",
"rev": "db915e9a55cecdedac53a3cdba354dbc281938d9",
"revCount": 13,
"type": "git",
"url": "https://git.xenia.me.uk/pixelifytica/iosevka.git"
},
"original": {
"type": "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": {
"locked": {
"lastModified": 1734600368,
"narHash": "sha256-nbG9TijTMcfr+au7ZVbKpAhMJzzE2nQBYmRvSdXUD8g=",
"lastModified": 1717602782,
"narHash": "sha256-pL9jeus5QpX5R+9rsp3hhZ+uplVHscNJh8n8VpqscM0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b47fd6fa00c6afca88b8ee46cfdb00e104f50bca",
"rev": "e8057b67ebf307f01bdcc8fba94d94f75039d1f6",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-24.11",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1733097829,
"narHash": "sha256-9hbb1rqGelllb4kVUCZ307G2k3/UhmA8PPGBoyuWaSw=",
"lastModified": 1725407940,
"narHash": "sha256-tiN5Rlg/jiY0tyky+soJZoRzLKbPyIdlQ77xVgREDNM=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "2c15aa59df0017ca140d9ba302412298ab4bf22a",
"rev": "6f6c45b5134a8ee2e465164811e451dcb5ad86e3",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"ref": "nixos-24.05",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"plasma-manager": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"stylix": "stylix",
"treefmt-nix": "treefmt-nix"
}
},
"stylix": {
"inputs": {
"base16": "base16",
"base16-fish": "base16-fish",
"base16-helix": "base16-helix",
"base16-vim": "base16-vim",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"gnome-shell": "gnome-shell",
"home-manager": [
"home-manager"
],
"nixpkgs": [
"nixpkgs"
],
"systems": "systems",
"tinted-foot": "tinted-foot",
"tinted-kitty": "tinted-kitty",
"tinted-tmux": "tinted-tmux"
]
},
"locked": {
"lastModified": 1734110444,
"narHash": "sha256-fp1iV2JldCSvz+7ODzXYUkQ+H7zyiWw5E0MQ4ILC4vw=",
"owner": "danth",
"repo": "stylix",
"rev": "9015d5d0d5d100f849129c43d257b827d300b089",
"lastModified": 1725575977,
"narHash": "sha256-1e9zB0dMRwdAbhxVATlL25rExMDh4gZ/3AXdkpU8408=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "b82b9ba85c156a5e7f865cc94ed2a4df20cbbf39",
"type": "github"
},
"original": {
"owner": "danth",
"ref": "release-24.11",
"repo": "stylix",
"owner": "nix-community",
"repo": "plasma-manager",
"type": "github"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"tinted-foot": {
"flake": false,
"locked": {
"lastModified": 1726913040,
"narHash": "sha256-+eDZPkw7efMNUf3/Pv0EmsidqdwNJ1TaOum6k7lngDQ=",
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-foot",
"rev": "fd1b924b6c45c3e4465e8a849e67ea82933fcbe4",
"type": "github"
}
},
"tinted-kitty": {
"flake": false,
"locked": {
"lastModified": 1716423189,
"narHash": "sha256-2xF3sH7UIwegn+2gKzMpFi3pk5DlIlM18+vj17Uf82U=",
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "eb39e141db14baef052893285df9f266df041ff8",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-kitty",
"rev": "eb39e141db14baef052893285df9f266df041ff8",
"type": "github"
}
},
"tinted-tmux": {
"flake": false,
"locked": {
"lastModified": 1729501581,
"narHash": "sha256-1ohEFMC23elnl39kxWnjzH1l2DFWWx4DhFNNYDTYt54=",
"owner": "tinted-theming",
"repo": "tinted-tmux",
"rev": "f0e7f7974a6441033eb0a172a0342e96722b4f14",
"type": "github"
},
"original": {
"owner": "tinted-theming",
"repo": "tinted-tmux",
"type": "github"
}
},
"treefmt-nix": {
"root": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"base16": "base16",
"home-manager": "home-manager",
"iosevka-custom": "iosevka-custom",
"nix-index-database": "nix-index-database",
"nixpkgs": "nixpkgs_2",
"plasma-manager": "plasma-manager",
"tt-schemes": "tt-schemes"
}
},
"tt-schemes": {
"flake": false,
"locked": {
"lastModified": 1734704479,
"narHash": "sha256-MMi74+WckoyEWBRcg/oaGRvXC9BVVxDZNRMpL+72wBI=",
"owner": "numtide",
"repo": "treefmt-nix",
"rev": "65712f5af67234dad91a5a4baee986a8b62dbf8f",
"lastModified": 1725273692,
"narHash": "sha256-XOxESrzdIpcYMLS+s4D16M4c8gAk3sLyAQUvsb+lQLk=",
"owner": "tinted-theming",
"repo": "schemes",
"rev": "992b6c372a00e284a7dc26b19a0d11b7afcba1f1",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "treefmt-nix",
"owner": "tinted-theming",
"repo": "schemes",
"type": "github"
}
}

View file

@ -7,34 +7,33 @@
};
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
treefmt-nix.url = "github:numtide/treefmt-nix";
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs";
};
stylix = {
url = "github:danth/stylix/release-24.11";
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";
base16.url = "github:SenchoPens/base16.nix";
tt-schemes = {
url = "github:tinted-theming/schemes";
flake = false;
};
};
outputs =
inputs@{
self,
nixpkgs,
treefmt-nix,
...
}:
let
treefmt = treefmt-nix.lib.evalModule nixpkgs.legacyPackages.x86_64-linux ./treefmt.nix;
in
inputs@{ nixpkgs, ... }:
{
formatter.x86_64-linux = treefmt.config.build.wrapper;
checks.x86_64-linux.formatting = treefmt.config.build.check self;
nixosConfigurations = {
## Server
Legion = nixpkgs.lib.nixosSystem {
@ -71,11 +70,11 @@
};
modules = [ ./system/default.nix ];
};
Monarch = nixpkgs.lib.nixosSystem {
Ronin = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
username = "elitherl";
hostName = "Monarch";
hostName = "Ronin";
};
modules = [ ./system/default.nix ];
};

View file

Before

Width:  |  Height:  |  Size: 178 KiB

After

Width:  |  Height:  |  Size: 178 KiB

View file

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View file

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -1,29 +1,20 @@
{ lib, username, ... }:
{ ... }:
{
imports = [
./services/adguardhome.nix
./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
./services/xandikos.nix
# ./services/minecraft.nix
./services/satisfactory/default.nix
];
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
home-manager.users.${username} = {
imports = [ ./home/emacs/default.nix ];
services.emacs.enable = false;
home.stateVersion = "23.05";
};
system.stateVersion = "23.05";
users.mutableUsers = false;
hardware.bluetooth.enable = true;
networking.nameservers = lib.mkForce [ "0.0.0.0" ];
}

View file

@ -1,33 +0,0 @@
{ pkgs, username, ... }:
{
# nixpkgs.config.kodi.enableAdvancedLauncher = true;
services.xserver = {
enable = true;
desktopManager.kodi = {
enable = true;
package = pkgs.kodi.withPackages (
kp: with kp; [
jellyfin
youtube
netflix
]
);
};
displayManager = {
lightdm.greeter.enable = false;
autoLogin = {
enable = true;
user = username;
};
};
};
networking.firewall = {
allowedTCPPorts = [ 8080 ];
allowedUDPPorts = [ 8080 ];
};
home-manager.users.${username} = {
home.stateVersion = null;
};
system.stateVersion = null;
users.mutableUsers = false;
}

View file

@ -1,31 +0,0 @@
{ pkgs, username, ... }:
{
imports = [
./laptop.nix
./work.nix
];
home-manager.users.${username} = {
home.stateVersion = "23.05";
wayland.windowManager.hyprland.settings.monitor = [
"eDP-1,preferred,auto,1.25"
"desc:Dell Inc. DELL P3223QE CCG8YN3,preferred,auto-left,1.5"
];
};
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";
};
};
system.stateVersion = "23.05";
environment = {
etc."ppp/options".text = ''
ipcp-accept-remote
'';
systemPackages = with pkgs; [ openfortivpn ];
};
services.hardware.bolt.enable = true;
}

View file

@ -2,8 +2,30 @@
{
imports = [ ./laptop.nix ];
home-manager.users.${username} = {
home.stateVersion = "23.05";
wayland.windowManager.hyprland.settings.monitor = [ "eDP-1,preferred,auto,1.25" ];
wayland.windowManager.sway.config = {
output."eDP-1".scale = "1.25";
workspaceOutputAssign = [
{
output = "eDP-1";
workspace = "1";
}
];
};
services.kanshi = {
enable = true;
settings = [
{
profile = {
name = "default";
outputs = [
{
criteria = "eDP-1";
position = "0,0";
}
];
};
}
];
};
};
system.stateVersion = "23.05";
}

107
system/Ronin.nix Normal file
View file

@ -0,0 +1,107 @@
{ pkgs, username, ... }:
{
imports = [ ./laptop.nix ];
home-manager.users.${username} = {
imports = [ ./home/work.nix ];
wayland.windowManager.sway.config = {
output = {
# Built-in
"eDP-1".scale = "1.25";
# 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;
};
}

View file

@ -1,41 +1,12 @@
{ pkgs, username, ... }:
{
pkgs,
username,
...
}:
{
imports = [
./desktop.nix
./work.nix
];
home-manager.users.${username} =
{ config, ... }:
{
home.stateVersion = "23.05";
wayland.windowManager.hyprland.settings.monitor = [
"desc:Dell Inc. DELL P3223QE CCG8YN3,preferred,auto,1.5"
];
systemd.user.services.mount-onedrive =
let
target = "${config.home.homeDirectory}/OneDrive";
in
{
Unit = {
Description = "Mount OneDrive to local directory";
After = [
"network-online.target"
"hyprland-session.target"
];
};
Service = {
Type = "notify";
ExecStartPre = "/usr/bin/env mkdir -p ${target}";
ExecStart = "${pkgs.rclone}/bin/rclone --config=${config.xdg.configHome}/rclone/rclone.conf --vfs-cache-mode writes --ignore-checksum mount \"OneDrive:\" ${target}";
ExecStop = "/bin/fusermount -u ${target}";
};
Install.WantedBy = [ "default.target" ];
};
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 = {
@ -48,7 +19,6 @@
};
};
};
system.stateVersion = "23.05";
environment = {
etc."ppp/options".text = ''
ipcp-accept-remote

View file

@ -5,27 +5,27 @@
...
}:
{
imports = [
./desktop.nix
./steam.nix
];
imports = [ ./desktop.nix ];
home-manager.users.${username} = {
home = {
stateVersion = "23.05";
packages = with pkgs; [
helvum
prusa-slicer
blender
freecad
openscad
kicad-small
wineWowPackages.waylandFull
winetricks
lutris
cartridges
prismlauncher
];
};
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; [
@ -35,10 +35,32 @@
input-overlay
];
};
wayland.windowManager.hyprland.settings.monitor = [
"desc:Acer Technologies ED270R TJMEE0043W01,1920x1080@144,0x140,1.0,vrr,2"
"desc:Microstep MSI G27CQ4 E2,2560x1440@144,1920x0,1.25,vrr,2"
];
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 ];
@ -47,14 +69,24 @@
'';
};
hardware = {
amdgpu = {
initrd.enable = true;
opencl.enable = true;
};
graphics = {
amdgpu.initrd.enable = true;
opengl = {
enable = true;
enable32Bit = 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;
};
};
system.stateVersion = "23.05";
}

View file

@ -10,7 +10,6 @@
{
imports = [
inputs.home-manager.nixosModules.home-manager
inputs.stylix.nixosModules.stylix
./${hostName}.nix
./hardware-configuration/${hostName}.nix
];
@ -29,14 +28,11 @@
"flakes"
];
auto-optimise-store = true;
substituters = [ "https://nix.xenia.me.uk" ];
trusted-public-keys = [ "nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI=" ];
};
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
channel.enable = true;
gc = {
automatic = true;
options = "--delete-older-than 3d";
options = "--delete-older-than 7d";
};
optimise.automatic = true;
registry.my-nixos = {
@ -56,27 +52,33 @@
max-free = ${toString (1024 * 1024 * 1024)}
'';
};
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-unwrapped"
"steam-original"
"steam-run"
"steamcmd"
"nomachine-client"
];
system.autoUpgrade = {
enable = true;
persistent = true;
allowReboot = false;
flake = "git+${config.nix.registry.my-nixos.to.url}";
dates = "02:00";
flags = [
"--option"
"extra-binary-caches"
"https://nix.xenia.me.uk"
];
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 = {
@ -91,6 +93,7 @@
};
networking = {
inherit hostName;
networkmanager.enable = true;
firewall.enable = true;
nameservers = [ "9.9.9.9" ];
};
@ -117,7 +120,6 @@
"input"
"uinput"
"dialout"
"gamemode"
];
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
openssh = {
@ -130,18 +132,32 @@
useUserPackages = true;
backupFileExtension = "backup";
users.${username} = {
imports = [
./home/shell/default.nix
./home/scripts/default.nix
];
imports = [ ./home/default.nix ];
home = {
inherit username;
stateVersion = "23.05";
homeDirectory = "/home/${username}";
};
programs.home-manager.enable = true;
};
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 = {
@ -158,20 +174,18 @@
file
zip
unzip
p7zip
curl
wget
dig
wireguard-tools
librespeed-cli
quickemu
distrobox
];
localBinInPath = true;
};
programs = {
command-not-found.enable = false;
ssh.startAgent = true;
fish.enable = true;
nano = {
enable = true;
syntaxHighlight = true;
@ -183,6 +197,7 @@
};
};
services = {
passSecretService.enable = true;
upower.enable = true;
power-profiles-daemon.enable = true;
system76-scheduler = {
@ -192,45 +207,28 @@
};
security.rtkit.enable = true;
virtualisation.podman.enable = true;
location = {
latitude = 51.7;
longitude = -1.2;
provider = "manual";
};
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
console.useXkbConfig = true;
stylix = {
enable = true;
image = ./wallpapers/default.jpg;
base16Scheme = "${pkgs.base16-schemes}/share/themes/one-light.yaml";
opacity = {
applications = 0.9;
desktop = 0.7;
popups = 0.5;
terminal = 0.9;
};
cursor = {
package = pkgs.volantes-cursors;
name = "volantes_cursors";
size = 32;
};
fonts = {
monospace = {
package = pkgs.nerdfonts.override { fonts = [ "DejaVuSansMono" ]; };
name = "DejaVuSansM Nerd Font";
};
sizes = {
applications = 10;
desktop = 12;
popups = 14;
terminal = 10;
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" ];
};
};
};
fonts.packages = with pkgs; [
liberation_ttf # Documents
lmodern # LaTeX
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
];
}

View file

@ -1,24 +1,13 @@
{ pkgs, username, ... }:
{
config,
pkgs,
username,
...
}:
{
nixpkgs.config.chromium.commandLineArgs = "--password-store='gnome-libsecret' --enable-features=UseOzonePlatform --ozone-platform=wayland";
home-manager.users.${username}.imports = [ ./home/desktop.nix ];
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
hardware.bluetooth.enable = true;
networking.networkmanager.enable = true;
environment = {
sessionVariables = {
NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
WEBKIT_DISABLE_COMPOSITING_MODE = "1";
MPLBACKEND = "TkAgg";
GDK_BACKEND = "wayland,x11";
XDG_SESSION_TYPE = "wayland";
QT_QPA_PLATFORM = "wayland";
QT_AUTO_SCREEN_SCALE_FACTOR = "1";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
GRIM_DEFAULT_DIR = "$HOME/Pictures/Screenshots";
};
systemPackages = with pkgs; [
libsecret
@ -26,31 +15,6 @@
xdg-utils
hunspell
hunspellDicts.en_GB-large
wl-clipboard
speedtest
overskride
hyprpicker
grim
slurp
swappy
nautilus
libreoffice
evince
image-roll
imagemagick
clapper
g4music
ffmpeg
picard
whipper
remmina
fractal
webcord
signal-desktop
whatsapp-for-linux
teams-for-linux
twinkle
nomachine-client
];
};
security = {
@ -67,33 +31,28 @@
programs = {
dconf.enable = true;
noisetorch.enable = true;
seahorse.enable = true;
kdeconnect.enable = true;
file-roller.enable = true;
hyprland.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
sway.enable = true;
xwayland.enable = true;
};
gtk.iconCache.enable = true;
qt = {
enable = true;
style = if config.lib.stylix.scheme.variant == "light" then "adwaita" else "adwaita-dark";
};
services = {
gnome.gnome-keyring.enable = true;
dbus.packages = [ pkgs.gcr ];
flatpak.enable = true;
printing.enable = true;
tumbler.enable = true;
udisks2.enable = true;
gnome.sushi.enable = true;
gvfs = {
enable = true;
package = pkgs.gnome.gvfs;
};
kanata = {
enable = true;
keyboards.main = {
config = builtins.readFile ./kanata.kbd;
extraDefCfg = "process-unmapped-keys yes";
};
package = pkgs.gnome3.gvfs;
};
pipewire = {
enable = true;
@ -107,7 +66,7 @@
enable = true;
settings =
let
default_session.command = "Hyprland";
default_session.command = "sway";
in
{
inherit default_session;
@ -119,130 +78,21 @@
};
xserver = {
enable = true;
xkb.layout = "gb";
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 ];
};
home-manager.users.${username} =
{
config,
pkgs,
osConfig,
...
}:
{
imports = [
./home/hyprland.nix
./home/terminal/default.nix
./home/browser/firefox.nix
./home/emacs/default.nix
./home/email/default.nix
./home/calendar/default.nix
./home/password-store/default.nix
];
home.file.${config.gtk.gtk2.configLocation}.force = true;
services = {
syncthing.enable = true;
gammastep = {
inherit (osConfig.location) latitude longitude provider;
enable = true;
tray = true;
};
};
gtk = {
enable = true;
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
iconTheme = {
package = (pkgs.papirus-icon-theme.override { color = "indigo"; });
name = if config.lib.stylix.scheme.variant == "light" then "Papirus-Light" else "Papirus-Dark";
};
};
stylix.targets.gtk.extraCss = with config.lib.stylix.scheme.withHashtag; ''
@define-color accent_color ${base0E-hex};
@define-color accent_bg_color ${base0E-hex};
'';
xdg = {
mime.enable = true;
mimeApps =
let
defaultApplications = import ./mimeapps.nix;
in
{
enable = true;
inherit defaultApplications;
associations.added = defaultApplications;
};
userDirs = {
enable = true;
createDirectories = true;
extraConfig = {
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
};
};
configFile = {
# Stop programs from overriding mimeapps
"mimeapps.list".force = true;
# Ensure GTK config is set
"gtk-3.0/gtk.css".force = true;
"gtk-3.0/settings.ini".force = true;
"gtk-4.0/gtk.css".force = true;
"gtk-4.0/settings.ini".force = true;
# Set Swappy config so that it saves to Screenshots directory
"swappy/config".text = ''
[Default]
save_dir=${config.xdg.userDirs.pictures}/Screenshots/
save_filename_format=swappy-%Y%m%d-%H%M%S.png
show_panel=false
line_size=5
text_size=${toString config.stylix.fonts.sizes.desktop}
text_font=${config.stylix.fonts.sansSerif.name}
paint_mode=brush
early_exit=false
fill_shape=false
'';
# WhatsApp config
"whatsapp-for-linux/settings.conf" =
let
inherit (config.lib.stylix.scheme) variant;
in
{
force = true;
text = ''
[web]
allow-permissions=true
hw-accel=2
[general]
notification-sounds=true
close-to-tray=true
start-in-tray=true
[appearance]
prefer-dark-theme=${if variant == "dark" then "true" else "false"}
'';
};
# Teams config
"teams-for-linux/config.json" = {
force = true;
text = builtins.toJSON {
awayOnSystemIdle = true;
closeAppOnCross = false;
followSystemTheme = true;
notificationMethod = "electron";
optInTeamsV2 = true;
spellCheckerLanguages = [ "en_GB" ];
};
};
# Autostart some programs
"autostart/signal-desktop.desktop".source =
"${pkgs.signal-desktop}/share/applications/signal-desktop.desktop";
"autostart/com.github.eneshecan.WhatsAppForLinux.desktop".source =
"${pkgs.whatsapp-for-linux}/share/applications/com.github.eneshecan.WhatsAppForLinux.desktop";
};
};
};
}

View file

@ -26,8 +26,7 @@
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" = {
device = "/dev/disk/by-uuid/ABE3-88E7";

View file

@ -31,8 +31,7 @@
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" = {
device = "/dev/disk/by-uuid/85D5-B6EC";

View file

@ -28,8 +28,7 @@
fsType = "ext4";
};
boot.initrd.luks.devices."luks-08822b9c-e9d6-424c-bc75-373f8667526d".device =
"/dev/disk/by-uuid/08822b9c-e9d6-424c-bc75-373f8667526d";
boot.initrd.luks.devices."luks-08822b9c-e9d6-424c-bc75-373f8667526d".device = "/dev/disk/by-uuid/08822b9c-e9d6-424c-bc75-373f8667526d";
fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/6009-89FC";

View file

@ -29,8 +29,7 @@
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" = {
device = "/dev/disk/by-uuid/3297-A70D";

View 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;
};
};
};
}

View file

@ -1,14 +0,0 @@
{ config, lib, ... }:
{
services.avizo = {
enable = true;
settings.default = {
image-opacity = lib.mkForce "1.0";
border-color =
let
scheme = config.lib.stylix.scheme;
in
lib.mkForce "rgba(${scheme.base0E-rgb-r}, ${scheme.base0E-rgb-g}, ${scheme.base0E-rgb-b}, 1.0)";
};
};
}

View 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";
};
};
}

View 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};
''

View file

@ -1,8 +1,8 @@
[
{
"name": "Spotify",
"url": "https://open.spotify.com",
"tags": ["Music", "Streaming"]
"name": "WhatsApp Web",
"url": "https://web.whatsapp.com/",
"tags": ["Social"]
},
{
"name": "ABRP",
@ -12,7 +12,7 @@
{
"name": "Patreon",
"url": "https://www.patreon.com/home",
"tags": ["Personal"]
"tags": []
},
{
"name": "NHS App",
@ -184,6 +184,11 @@
"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",
@ -196,7 +201,7 @@
},
{
"name": "Robin",
"url": "https://dashboard.robinpowered.com/UKAEA/",
"url": "https://dashboard.robinpowered.com/",
"tags": ["Work", "Room Booking"]
},
{
@ -204,21 +209,26 @@
"url": "https://pinboard.ukaea.uk/",
"tags": ["Work"]
},
{
"name": "EUROFusion Pinboard",
"url": "https://users.euro-fusion.org/webapps/pinboard/EFDA-JET/",
"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/",
@ -260,17 +270,17 @@
"tags": ["Work", "JET", "Mimic"]
},
{
"name": "MAST-U Users Page",
"name": "Users Page",
"url": "https://users.mastu.ukaea.uk/home",
"tags": ["Work", "MAST-U"]
},
{
"name": "MAST-U Diagnostic Handbook",
"name": "Diagnostic Handbook",
"url": "https://intranet.ccfe.ac.uk/mastu-handbook",
"tags": ["Work", "MAST-U"]
},
{
"name": "MAST-U Data Access and Tools",
"name": "Data Access and Tools",
"url": "https://users.mastu.ukaea.uk/data-access-and-tools",
"tags": ["Work", "MAST-U"]
},
@ -284,9 +294,14 @@
"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/",
"url": "https://ukaeauk-my.sharepoint.com/personal/evie_litherland-smith_ukaea_uk/",
"tags": ["Work", "Office"]
},
{
@ -294,11 +309,6 @@
"url": "https://ukaeauk.sharepoint.com/sites/Plasma",
"tags": ["Work", "Office"]
},
{
"name": "Spectroscopy and Imaging Sharepoint",
"url": "https://ukaeauk.sharepoint.com/sites/Plasma/Team_Areas/SitePages/Spectroscopy-and-Imaging---Team-Area.aspx",
"tags": ["Work", "Office"]
},
{
"name": "Culham Canteen Menus",
"url": "https://nucleus.ukaea.uk/Interact/Pages/Section/Default.aspx?section=10112",

View file

@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./firefox.nix
./nyxt.nix
];
}

View file

@ -1,11 +1,5 @@
{ pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
{
stylix.targets.firefox.enable = false;
programs = {
browserpass = {
enable = true;
@ -20,7 +14,7 @@
BehaviorPrivateBrowsing = "reject";
Locked = true;
};
DefaultDownloadDirectory = config.xdg.userDirs.download;
DefaultDownloadDirectory = "\${home}/Downloads";
DisableAppUpdate = true;
DisableFirefoxAccounts = true;
DisableFirefoxScreenshots = true;
@ -34,6 +28,7 @@
DisplayMenuBar = "default-off";
DontCheckDefaultBrowser = true;
EnableTrackingProtection = {
Value = true;
Locked = true;
Cryptomining = true;
Fingerprinting = true;
@ -113,12 +108,10 @@
ShowHomeButton = true;
StartDownloadsInTempDirectory = true;
};
profiles.user = {
isDefault = true;
profiles.default = {
bookmarks = builtins.fromJSON (builtins.readFile ./bookmarks.json);
settings = {
"app.shield.optoutstudies.enabled" = false;
"browser.startup.homepage" = lib.mkDefault "about:home";
"browser.tabs.inTitlebar" = 0;
"browser.bookmarks.addedImportButton" = false;
"browser.bookmarks.showMobileBookmarks" = false;
@ -138,8 +131,6 @@
"intl.locale.requested" = "en-gb,en";
"intl.regional_prefs.use_os_locales" = true;
"media.eme.enabled" = true;
"privacy.globalprivacycontrol.enabled" = true;
"privacy.donottrackheader.enabled" = true;
"privacy.webrtc.legacyGlobalIndicator" = false;
"signon.management.page.breach-alerts.enabled" = false;
"signon.rememberSignons" = false;
@ -155,10 +146,6 @@
title = "Arch Wiki";
url = "https://wiki.archlinux.org";
}
{
title = "Hyprland Wiki";
url = "https://wiki.hyprland.org";
}
];
};
search = rec {

View file

@ -1,12 +1,17 @@
{ config, pkgs, ... }:
{
config,
pkgs,
fonts,
accentColourName,
...
}:
{
home.packages = [ pkgs.nyxt ];
xdg = {
configFile = {
"nyxt/config.lisp".text =
let
fonts = config.stylix.fonts;
scheme = config.lib.stylix.scheme.withHashtag;
sc = config.scheme.withHashtag;
in
''
;; Import custom configuration
@ -14,27 +19,27 @@
;; Define custom theme
(define-configuration browser
((theme (make-instance 'theme:theme
:dark-p nil
:dark-p t
:font-family "${fonts.sansSerif.name}"
:monospace-font-family "${fonts.monospace.name}"
:background-color "${scheme.base00}"
:on-background-color "${scheme.base05}"
:primary-color "${scheme.base02}"
:on-primary-color "${scheme.base05}"
:secondary-color "${scheme.base03}"
:on-secondary-color "${scheme.base05}"
:accent-color "${scheme.magenta}"
:on-accent-color "${scheme.base01}"
:action-color "${scheme.cyan}"
:on-action-color "${scheme.base01}"
:success-color "${scheme.green}"
:on-success-color "${scheme.base01}"
:highlight-color "${scheme.magenta}"
:on-highlight-color "${scheme.base01}"
:warning-color "${scheme.yellow}"
:on-warning-color "${scheme.base01}"
:codeblock-color "${scheme.base02}"
:on-codeblock-color "${scheme.base05}"))))
: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 =

View file

@ -1,44 +0,0 @@
{
config,
lib,
pkgs,
...
}:
{
programs.qutebrowser = {
enable = true;
settings = {
changelog_after_upgrade = "major";
# confirm_quit = "downloads";
content = {
autoplay = false;
blocking.enabled = true;
cookies.accept = "no-unknown-3rdparty";
headers.do_not_track = true;
};
downloads.location.directory = config.xdg.userDirs.download;
new_instance_open_target = "tab";
qt.highdpi = true;
scrolling.smooth = true;
# spellcheck.languages = [ "en-GB" ];
tabs = {
last_close = "blank";
show = "multiple";
};
url.default_page = lib.mkDefault "about:blank";
window.hide_decoration = true;
};
searchEngines = {
w = "https://en.wikipedia.org/wiki/Special:Search?search={}&go=Go&ns0=1";
aw = "https://wiki.archlinux.org/?search={}";
nw = "https://wiki.nixos.org/index.php?search={}";
gh = "https://github.com/search?q={}";
fh = "https://flathub.org/apps/search?q={}";
py = "https://pypi.org/search/?q={}";
};
# quickmarks =
# let
# in
# { };
};
}

View file

@ -1,73 +0,0 @@
{ config, pkgs, ... }:
{
programs = {
vdirsyncer.enable = true;
khal = {
enable = true;
locale = {
timeformat = "%H:%M";
dateformat = "%Y-%m-%d";
longdateformat = "%Y-%m-%d %a";
datetimeformat = "%Y-%m-%d %H:%M";
longdatetimeformat = "%Y-%m-%d %H:%M";
};
};
};
services.vdirsyncer = {
inherit (config.programs.vdirsyncer) enable package;
frequency = "*:0/30"; # Every 30 minutes
};
accounts.calendar = {
basePath = "Calendar";
accounts = {
main =
let
url = "dav.xenia.me.uk";
in
{
primary = true;
primaryCollection = "personal";
local = {
type = "filesystem";
fileExt = ".ics";
};
remote =
let
userName = "pixelifytica";
in
{
inherit userName;
url = "https://${url}";
type = "caldav";
passwordCommand = [
"${pkgs.libsecret}/bin/secret-tool"
"lookup"
"url"
"${url}"
"user"
"${userName}"
];
};
vdirsyncer = {
inherit (config.programs.vdirsyncer) enable;
auth = "basic";
collections = [
"personal"
"work"
"other"
];
metadata = [ "displayname" ];
timeRange = {
start = "datetime.now() - timedelta(days=365)";
end = "datetime.now() + timedelta(days=365)";
};
};
khal = {
inherit (config.programs.khal) enable;
type = "discover";
addresses = with config.accounts.email.accounts.proton; [ address ] ++ aliases;
};
};
};
};
}

17
system/home/default.nix Normal file
View 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
View 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;
};
}

View file

@ -1,41 +1,136 @@
{
config,
lib,
pkgs,
fonts,
...
}:
{
imports = [
../shell/default.nix
../shell/git.nix
../gpg/default.nix
../texlive/default.nix
../programming/default.nix
];
imports = [ ../shell/default.nix ];
services.emacs = {
enable = lib.mkDefault true;
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.emacs30.override {
withImageMagick = true;
withPgtk = true;
};
extraPackages = epkgs: import ./packages.nix { inherit epkgs; };
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; [
# External requirements
gcc
# Emacs requirements
imagemagick
languagetool
wordnet
# Plugin requirements
gcc
sqlite
pandoc
ghostscript
mupdf-headless
poppler_utils
graphviz-nox
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;
};
}

View file

@ -1,50 +1,60 @@
{ epkgs }:
with epkgs;
[
# EViL Mode
evil
# UI and Appearance
delight
epkgs: with epkgs; [
# UI
base16-theme
all-the-icons
nerd-icons
nerd-icons-completion
nerd-icons-corfu
nerd-icons-dired
nerd-icons-ibuffer
nerd-icons-corfu
# Email and Calendar
khalel
mu4e
# Other (TODO sort)
minions
ligature
which-key
diff-hl
org-roam
org-journal
org-noter
citar
# Completion
vertico
marginalia
orderless
marginalia
cape
corfu
corfu-terminal
cape
consult
consult-eglot
flyspell-correct
tempel
tempel-collection
rainbow-delimiters
envrc
treesit-grammars.with-all-grammars
# IDE
treesit-auto
magit
forge
apheleia
envrc
rainbow-delimiters
flymake-shellcheck
flymake-yamllint
flymake-clippy
flymake-eslint
magit
forge
nix-mode
lua-mode
python-docstring
python-pytest
auctex
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
]

View file

@ -1,84 +0,0 @@
#+TITLE: Font Showcase
#+AUTHOR: Evie Litherland-Smith
This is a showcase of various font and UI features to act as a
standard candle.
* Font emphasis
Examples of:
- *Bold text*
- /Italic text/
- _Underscored text_
- =Literal text=
- ~Code~
- +Strike-through+
* Character showcase
#+begin_example
ABC.DEF.GHI.JKL.MNO.PQRS.TUV.WXYZ abc.def.ghi.jkl.mno.pqrs.tuv.wxyz
!iIlL17|¦ ¢coO08BbDQ $5SZ2zs 96µm float il1[]={1-2/3.4,5+6=7/8%90};
1234567890 ,._-+= >< «¯-¬_» ~–÷+× {*}[]()<>`+-=$/#_%^@\&|~?'" !,.;:
E3CGQ g9q¶ uvw ſßðþ ΓΔΛαδιλμξπτχ∂ ЖЗКУЯжзклмнруфчьыя <= != == => ->
#+end_example
** Legibility test
Can I tell the difference between: 1,i,I,l,L,|
How about: 0,O,o
* Tables
| Heading 1 | Heading 2 | Plot |
|-----------+-----------+--------------|
| 1 | 1 | |
| 2 | 4 | c |
| 3 | 9 | W |
| 4 | 16 | WV |
| 5 | 25 | WWH |
| 6 | 36 | WWWW: |
| 7 | 49 | WWWWWV |
| 8 | 64 | WWWWWWWl |
| 9 | 81 | WWWWWWWWWh |
| 10 | 100 | WWWWWWWWWWWW |
#+TBLFM: $2=$1**2::$3='(orgtbl-ascii-draw $2 1 100 12)
* Source blocks
#+begin_src python
def main(*args, **kwargs) -> None:
"""
Example docstring for function
"""
return
if __name__ == "__main__":
main()
#+end_src
* Example prose
#+begin_quote
AMONG the many valuable contributions of William Dwight Whitney to
linguistic science is one especially important and fundamental
principle. It may be stated in these words. In explaining the
prehistoric phenomena of language we must assume no other factors than
those which we are able to observe and estimate in the historical
period of language development. The factors that produced changes in
human speech five thousand or ten thousand years ago cannot have been
essentially different from those which are now operating to transform
living languages. On the basis of this principle we look to-day at a
much-discussed problem of Indo-European philology with views very
different from the views held by the founders of Comparative Philology
and their immediate successors. I refer to the problem, how the
Indo-European people came to assign gender to nouns, to distinguish
between masculine, feminine, and neuter. This question is of interest
to others besides philologists. What man of culture who has learned
languages such as the Greek, Latin, or French has not at times
wondered that objects which have no possible connection with the
natural gender of animals appear constantly in the language as male or
female? In German, for example, it is der fuss, but die hand; der
geist, but die seele; in Latin, hīc hortus, hīc animus, hīc amor, but
haec planta, haec anima, haec felicitas; in Greek, ὁ πλοῦτος, ὁ οἶκος,
but ἡ πενία, ἡ οἰκία.
This gender distinction pervades all the older Indo-European
languages, and must therefore be regarded as having its origin in the
time of the pro-ethnic Indo-European community. Not only is the
subject itself full of interest, but also the treatment it has
received from the philological research of our century. The various
efforts made to solve the problem may very aptly illustrate an
essential difference which exists between the theories of language
development held in the beginning and middle of this century and those
which prevail to-day, — a difference of method existing not in
comparative linguistics alone, but also in other fields of
philological and historical research that border on it.
#+end_quote

View 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

View 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;
};
};
};
}

View file

@ -1,24 +0,0 @@
{ config, lib, ... }:
{
programs.fuzzel = {
enable = true;
settings = {
main = {
use-bold = true;
icon-theme = config.gtk.iconTheme.name;
icons-enabled = true;
fields = "filename,name,generic,exec";
fuzzy = true;
filter-desktop = true;
terminal = "${config.programs.alacritty.package}/bin/alacritty -e";
anchor = "center";
layer = "overlay";
};
border = {
width = 2;
radius = 10;
};
colors.border = lib.mkForce "${config.lib.stylix.scheme.base0E}ff";
};
};
}

View 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;
};
};
};
}

View file

@ -1,8 +0,0 @@
{ lib, pkgs, ... }:
{
programs.gpg.enable = true;
services.gpg-agent = {
enable = true;
pinentryPackage = lib.mkDefault pkgs.pinentry-all;
};
}

View file

@ -1,398 +0,0 @@
{
config,
lib,
pkgs,
osConfig,
...
}:
{
imports = [
./udiskie.nix
./waybar.nix
./fuzzel.nix
./mako.nix
./avizo.nix
./wlogout.nix
# ./swww.nix
];
home.packages = [
(pkgs.writeShellScriptBin "protonmail-setup-bridge" ''
pkill -9 -f protonmail-bridge
PASSWORD_STORE_DIR=/dev/null ${pkgs.protonmail-bridge}/bin/protonmail-bridge -c
${config.wayland.windowManager.hyprland.finalPackage}/bin/hyprctl dispatch exec "PASSWORD_STORE_DIR=/dev/null ${pkgs.protonmail-bridge}/bin/protonmail-bridge -n"
'')
];
stylix.targets.hyprlock.enable = false; # TODO maybe re-enable once I've checked what it does
services = {
kanshi.systemdTarget = "hyprland-session.target";
gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
# hyprpaper.enable = lib.mkForce false;
hypridle = {
enable = true;
settings =
let
hyprctl = "${config.wayland.windowManager.hyprland.finalPackage}/bin/hyprctl";
hyprlock = "${config.programs.hyprlock.package}/bin/hyprlock";
in
{
general = {
after_sleep_cmd = "${hyprctl} dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "${hyprlock}";
};
listener = [
{
timeout = 900;
on-timeout = "${hyprlock}";
}
{
timeout = 1200;
on-timeout = "${hyprctl} dispatch dpms off";
on-resume = "${hyprctl} dispatch dpms on";
}
];
};
};
};
programs = {
waybar.systemd.target = "hyprland-session.target";
hyprlock =
let
font = config.stylix.fonts.sansSerif.name;
scheme = config.lib.stylix.scheme;
accent = scheme.base0E;
in
{
enable = true;
settings = {
general = {
hide_cursor = true;
grace = 5;
ignore_emptry_input = true;
};
background = [
{
monitor = "";
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
label = [
{
monitor = "";
text = "cmd[update:30000] echo \"$(date +\"%R\")\"";
color = "0xff${scheme.base05}";
font_size = 90;
font_family = font;
position = "-30, 0";
halign = "right";
valign = "top";
}
{
monitor = "";
text = "cmd[update:43200000] echo \"$(date +\"%A,%e %B %Y\")\"";
color = "0xff${scheme.base05}";
font_size = 25;
font_family = font;
position = "-30, -150";
halign = "right";
valign = "top";
}
];
image = [
{
monitor = "";
path = "${./pfp/personal.png}";
size = 100;
border_color = "0xff${accent}";
position = "0, 75";
halign = "center";
valign = "center";
}
];
input-field = [
{
monitor = "";
size = "300, 60";
outline_thickness = 2;
dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
dots_spacing = 0.2; # Scale of dots' absolute size, 0.0 - 1.0
dots_center = true;
outer_color = "0xff${accent}";
inner_color = "0xff${scheme.base00}";
font_color = "0xff${scheme.base05}";
fade_on_empty = false;
placeholder_text = "󰌾 Logged in as <span foreground=\"##${accent}\">$USER</span>";
check_color = "0xff${scheme.blue}";
fail_color = "0xff${scheme.red}";
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
hide_input = false;
position = "0, -50";
halign = "center";
valign = "center";
}
];
};
};
};
wayland.windowManager.hyprland = {
enable = true;
package = osConfig.programs.hyprland.package;
xwayland.enable = true;
systemd.enable = true;
settings = {
monitor = [ ",preferred,auto,auto" ];
exec-once = [
"systemctl --user import-environment WAYLAND_DISPLAY QT_QPA_PLATFORMTHEME"
"${config.wayland.windowManager.hyprland.finalPackage}/bin/hyprctl setcursor ${config.gtk.cursorTheme.name} ${toString config.gtk.cursorTheme.size}"
"${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"
"PASSWORD_STORE_DIR=/dev/null ${pkgs.protonmail-bridge}/bin/protonmail-bridge -n"
# "${pkgs.swww}/bin/swww-daemon"
# "sleep 5; systemctl --user start dynamic-wallpaper.service"
"sleep 5; ${pkgs.dex}/bin/dex -a"
];
gestures.workspace_swipe = true;
general = {
layout = "master";
gaps_in = 3;
gaps_out = 5;
"col.active_border" = lib.mkForce "rgb(${config.lib.stylix.scheme.base0E})";
};
master = {
allow_small_split = true;
special_scale_factor = 0.95;
mfact = 0.5;
new_on_top = false;
orientation = "left";
inherit_fullscreen = false;
smart_resizing = false;
drop_at_cursor = true;
};
input = {
kb_layout = osConfig.services.xserver.xkb.layout;
follow_mouse = 1;
touchpad.natural_scroll = "yes";
};
decoration = {
rounding = 10;
blur = {
enabled = true;
size = 5;
passes = 3;
new_optimizations = true;
brightness = 1.0;
noise = 2.0e-2;
};
shadow = {
enabled = true;
range = 4;
render_power = 3;
ignore_window = true;
color = lib.mkForce "rgba(${config.lib.stylix.scheme.base00}0d)";
};
};
animations = {
enabled = true;
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
animation = [
"windows, 1, 7, myBezier"
"windowsOut, 1, 7, default, popin 80%"
"border, 1, 10, default"
"borderangle, 1, 8, default"
"fade, 1, 7, default"
"workspaces, 1, 6, default"
];
};
misc = {
disable_splash_rendering = true;
disable_autoreload = true;
mouse_move_enables_dpms = true;
key_press_enables_dpms = true;
};
xwayland.force_zero_scaling = true;
layerrule =
let
blur = x: "blur, ^(${x})$";
ignorealpha = x: "ignorealpha 0.3, ^(${x})$";
layers = [
"system-menu"
"gtk-layer-shell"
"notifications"
"launcher"
"logout_dialog"
"waybar"
"avizo"
];
in
(lib.lists.forEach layers blur) ++ (lib.lists.forEach layers ignorealpha);
windowrule = [
# Float + move system windows
# Password prompts
"float, org.kde.polkit-kde-authentication-agent-1|Pinentry|pinentry-qt|gcr-prompter"
"center, org.kde.polkit-kde-authentication-agent-1|Pinentry|pinentry-qt|gcr-prompter"
"pin, org.kde.polkit-kde-authentication-agent-1|Pinentry|pinentry-qt|gcr-prompter"
"dimaround, org.kde.polkit-kde-authentication-agent-1|Pinentry|pinentry-qt|gcr-prompter"
"stayfocused, org.kde.polkit-kde-authentication-agent-1|Pinentry|pinentry-qt|gcr-prompter"
# Network and Bluetooth control panels
"float, pavucontrol|nm-connection-editor|overskride|io.github.kaii_lb.Overskride"
"size 800 600, pavucontrol|nm-connection-editor|overskride|io.github.kaii_lb.Overskride"
"move onscreen 100%-820 50,pavucontrol|nm-connection-editor|overskride|io.github.kaii_lb.Overskride"
# File browser and picker dialog
"float, org.gnome.Nautilus|xdg-desktop-portal-gtk"
"size 800 600, org.gnome.Nautilus|xdg-desktop-portal-gtk"
"center, org.gnome.Nautilus|xdg-desktop-portal-gtk"
# Matplotlib plots
"float, Matplotlib"
# Workspace rules
"workspace 2, (firefox|nyxt|org.qutebrowser.qutebrowser)" # Browser
"workspace 3, (signal|whatsapp-for-linux|WebCord|teams-for-linux|twinkle)" # Messaging
"workspace 4, (libreoffice|soffice)(.*)" # Documents
"workspace 5, (org.remmina.Remmina|Nxplayer.bin)" # Remote Desktop
"workspace 6, (PrusaSlicer)" # 3D Printing
"workspace 7, (lutris|page.kramo.Cartridges|org.prismlauncher.PrismLauncher)" # Gaming
"workspace 7 silent, (steam|steam_app)" # Gaming (Silent)
# PrismLauncher / Minecraft
"float, org.prismlauncher.PrismLauncher"
"center, org.prismlauncher.PrismLauncher"
"size 800 600, org.prismlauncher.PrismLauncher"
];
windowrulev2 = [
# Firefox PIP
"float, title:Picture-in-Picture|Library,class:firefox"
"size 750 400, title:Picture-in-Picture,class:firefox"
"size 800 800, title:Library,class:firefox"
"move onscreen 100%-775 100%-425, title:Picture-in-Picture,class:firefox"
"center, title:Library,class:firefox"
"pin, title:Picture-in-Picture,class:firefox"
# NautilusPreviewer (Sushi)
"float, class:org.gnome.NautilusPreviewer"
"center, class:org.gnome.NautilusPreviewer"
# Electron file picker dialog
"float, title:Open Files,class:electron"
"size 800 600, title:Open Files,class:electron"
"center, title:Open Files,class:electron"
# Inhibit idle when watching videos
"idleinhibit fullscreen, class:firefox|com.github.rafostar.Clapper"
# Inhibit idle when playing games
"idleinhibit always, class:(steam_app|Minecraft).*"
# LibreOffice
"suppressevent fullscreen maximize, class:(libreoffice|soffice)(.*)"
"float, title:Open,class:(libreoffice|soffice)(.*)"
# Steam
"float, title:Friends List,class:steam"
"size 400 600, title:Friends List,class:steam"
"float, title:(.*)(Chat),class:steam"
"size 800 600, title:(.*)(Chat),class:steam"
"float, title:Steam Settings,class:steam"
"size 800 600, title:Steam Settings,class:steam"
"float, title:(.*)(Controller Layout),class:steam"
"size 1200 800, title:(.*)(Controller Layout),class:steam"
# Remmina / NoMachine
"suppressevent fullscreen maximize, class:org.remmina.Remmina|Nxplayer.bin"
"float, title:Remmina Remote Desktop Client, class:org.remmina.Remmina"
"center, title:Remmina Remote Desktop Client, class:org.remmina.Remmina"
];
bind =
let
workspace = w: [
"SUPER, ${toString w}, moveworkspacetomonitor, ${toString w} current"
"SUPER, ${toString w}, workspace, ${toString w}"
"SUPER SHIFT, ${toString w}, movetoworkspace, ${toString w}"
];
in
lib.lists.flatten (lib.lists.forEach (lib.lists.range 1 9) workspace)
++ [
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Open Hyprland wiki at correct version number
"CTRL_SHIFT, H, exec, xdg-open \"https://wiki.hyprland.org/$(${config.wayland.windowManager.hyprland.finalPackage}/bin/hyprctl version -j | ${pkgs.jq}/bin/jq $args.tag | ${pkgs.gnused}/bin/sed s/v// | ${pkgs.gnused}/bin/sed s/\\\"//g)\""
"SUPER, F1, exec, ${config.programs.hyprlock.package}/bin/hyprlock"
"SUPER, P, exec, ${config.programs.wlogout.package}/bin/wlogout"
"SUPER, Q, killactive,"
"SUPER, V, togglefloating"
# "SUPER SHIFT, V, setfloating" ## TODO setfloating exists
# in newer version of Hyprland than mine
"SUPER SHIFT, V, moveactive, exact 1% 4%"
"SUPER SHIFT, V, resizeactive, exact 800 600"
"SUPER SHIFT, V, pin"
"SUPER, M, fullscreen, 1" # Maximise window
"SUPER SHIFT, M, fullscreen, 0" # Actual fullscreen
"SUPER, Z, exec, ${config.services.mako.package}/bin/makoctl restore"
"SUPER SHIFT, Z, exec, exec ${config.services.mako.package}/bin/makoctl dismiss -a"
# Common program shortcuts
"SUPER, Space, exec, ${config.programs.fuzzel.package}/bin/fuzzel"
"SUPER, Return, exec, ${config.programs.alacritty.package}/bin/alacritty"
"SUPER SHIFT, Return, exec, ${config.programs.emacs.finalPackage}/bin/emacsclient -c"
"SUPER, W, exec, ${config.programs.firefox.finalPackage}/bin/firefox"
"SUPER, F, exec, ${pkgs.nautilus}/bin/nautilus"
# Misc useful binds
",Print,exec,${pkgs.grim}/bin/grim -g \"$(${pkgs.slurp}/bin/slurp)\" - | ${pkgs.swappy}/bin/swappy -f -"
# ",XF86Calculator,exec,pkill rofi || ${config.programs.rofi.finalPackage}/bin/rofi -show calc"
# Movement binds
"SUPER, H, movefocus, l"
"SUPER, L, movefocus, r"
"SUPER, K, movefocus, u"
"SUPER, J, movefocus, d"
"SUPER SHIFT, H, movewindow, l"
"SUPER SHIFT, L, movewindow, r"
"SUPER SHIFT, K, movewindow, u"
"SUPER SHIFT, J, movewindow, d"
# Special workspaces
"SUPER, comma, workspace, m-1"
"SUPER SHIFT, comma, movetoworkspace, r-1"
"SUPER, period, workspace, m+1"
"SUPER SHIFT, period, movetoworkspace, r+1"
"SUPER, N, workspace, empty"
"SUPER SHIFT, N, movetoworkspace, empty"
"SUPER, minus, togglespecialworkspace"
"SUPER SHIFT, minus, movetoworkspace, special"
"SUPER, bracketright, focusmonitor, +1"
"SUPER SHIFT, bracketright, movecurrentworkspacetomonitor, +1"
"SUPER, bracketleft, focusmonitor, -1"
"SUPER SHIFT, bracketleft, movecurrentworkspacetomonitor, -1"
"SUPER, O, focusurgentorlast"
];
bindl = [
# Sound
",XF86AudioMute,exec,${config.services.avizo.package}/bin/volumectl %"
",XF86AudioMicMute,exec,${config.services.avizo.package}/bin/volumectl -m %"
# 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"
];
bindle = [
# Sound
",XF86AudioRaiseVolume,exec,${config.services.avizo.package}/bin/volumectl -u + 5"
",XF86AudioLowerVolume,exec,${config.services.avizo.package}/bin/volumectl -u - 5"
# Brightness
",XF86MonBrightnessUp,exec,${config.services.avizo.package}/bin/lightctl + 5"
",XF86MonBrightnessDown,exec,${config.services.avizo.package}/bin/lightctl - 5"
];
bindm = [
# Move/resize windows with mainMod + LMB/RMB and dragging
"SUPER, mouse:272, movewindow"
"SUPER, mouse:273, resizewindow"
];
};
};
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

9
system/home/laptop.nix Normal file
View file

@ -0,0 +1,9 @@
{ ... }:
{
imports = [ ./desktop.nix ];
programs.plasma = {
configFile = {
bluedevilglobalrc.Global.launchState.value = "disable";
};
};
}

View 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)
))

View file

@ -1,18 +0,0 @@
{ config, lib, ... }:
{
services.mako = {
enable = true;
anchor = "top-right";
width = 600;
height = 600;
layer = "top";
markup = true;
maxVisible = 10;
icons = true;
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
borderRadius = 10;
borderSize = 2;
borderColor = lib.mkForce config.lib.stylix.scheme.withHashtag.base0E;
defaultTimeout = (builtins.mul 5 1000); # 5s timeout
};
}

View 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;
};
}

View file

@ -3,13 +3,12 @@ let
browser = [ "firefox.desktop" ];
in
{
"inode/directory" = [ "org.gnome.Nautilus.desktop" ];
"inode/symlink" = [ "org.gnome.Nautilus.desktop" ];
"inode/directory" = [ "thunar.desktop" ];
"inode/symlink" = [ "thunar.desktop" ];
"image/jpeg" = [ "com.github.weclaw1.ImageRoll.desktop" ];
"image/png" = [ "com.github.weclaw1.ImageRoll.desktop" ];
"audio/mpeg" = [ "com.github.neithern.g4music.desktop" ];
"video/mp4" = [ "com.github.rafostar.Clapper.desktop" ];
"image/jpeg" = [ "swayimg.desktop" ];
"image/png" = [ "swayimg.desktop" ];
"video/mp4" = [ "mpv.desktop" ];
"text/plain" = emacs;
"text/richtext" = emacs;
@ -17,9 +16,9 @@ in
"text/markdown" = emacs;
"text/rust" = emacs;
"text/csv" = emacs;
"text/html" = emacs;
"text/css" = emacs;
"text/tab-separated-values" = emacs;
"text/html" = browser;
"text/x-emacs-lisp" = emacs;
"text/x-fortran" = emacs;
@ -42,21 +41,22 @@ in
"application/rss+xml" = emacs;
"application/xhtml+xml" = emacs;
"application/oxps" = emacs;
"application/zip" = [ "org.gnome.FileRoller.desktop" ];
"application/pdf" = [ "org.gnome.Evince.desktop" ];
"application/epub+zip" = [ "org.gnome.Evince.desktop" ];
"application/msword" = [ "writer.desktop" ];
"application/x-shellscript" = emacs;
"application/x-docbook+xml" = emacs;
"application/x-yaml" = emacs;
"application/x-archive" = [ "org.gnome.FileRoller.desktop" ];
"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" = browser;
"application/x-zoom" = [ "Zoom.desktop" ] ++ browser;
"x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser;

View file

@ -2,10 +2,10 @@
{
home.packages = [
(pkgs.writeShellScriptBin "ukaea-vpn-connect" ''
sudo ${pkgs.openfortivpn}/bin/openfortivpn --config=${./ukaea-vpn.conf}
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 --config=${./jetdata-vpn.conf}
sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./jetdata-vpn.conf} -p $(${pkgs.pass}/bin/pass show work/microsoftonline.com | head -n1)
'')
];
}

View file

@ -1,18 +0,0 @@
{ config, pkgs, ... }:
{
imports = [
../gpg/default.nix
../shell/git.nix
];
programs = {
gpg.enable = true;
password-store = {
enable = true;
package = pkgs.pass-nodmenu.withExtensions (exts: with exts; [ pass-update ]);
settings = {
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store";
PASSWORD_STORE_ENABLE_EXTENSIONS = "true";
};
};
};
}

View 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";
}

View 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 = "";
};
}

View 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;
};
};
};
}

View 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=";
};
}
))
];
}

View 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

View file

@ -1,23 +0,0 @@
{ pkgs, ... }:
{
imports = [
./python/default.nix
./lua/default.nix
];
home.packages = with pkgs; [
## Linters
shellcheck
yamllint
## Formatters
nixfmt-rfc-style
shfmt
nodePackages.prettier
nodePackages.prettier-plugin-toml
## Language servers
nixd
rust-analyzer
nodePackages.typescript-language-server
];
}

View file

@ -1,8 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
(luajit.withPackages (ps: [ (ps.callPackage ./luarocks/scilua.nix { }) ]))
lua-language-server
stylua
];
}

View file

@ -1,24 +0,0 @@
{ pkgs, ... }:
let
pythonEnv = (
pkgs.python312.withPackages (
ps: with ps; [
python-lsp-server
isort
flake8
mypy
numpy
xarray
netcdf4
matplotlib
]
)
);
in
{
home.packages = [
pkgs.ruff
pythonEnv
];
xdg.configFile."ruff/pyproject.toml".source = ./ruff.toml;
}

View file

@ -1,31 +0,0 @@
{
pkgs ? import <nixpkgs> { },
python3 ? pkgs.python3,
extraPackages ? with pkgs; [ uv ],
}:
let
inherit (pkgs) lib;
ldlibs = lib.makeLibraryPath (
with pkgs;
[
stdenv.cc.cc
glibc
zlib
zstd
]
);
pythonWrapped = pkgs.symlinkJoin {
name = "python";
paths = [ python3 ];
buildInputs = [ pkgs.makeWrapper ];
postBuild = ''
for file in $out/bin/*; do wrapProgram "$file" --prefix LD_LIBRARY_PATH : "${ldlibs}"; done
'';
};
in
pkgs.mkShellNoCC {
packages = [ pythonWrapped ] ++ extraPackages;
shellHook = ''
[ -f .venv/bin/activate ] && source .venv/bin/activate
'';
}

View 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;
};
};
};
}

View file

@ -1,11 +1,15 @@
{ pkgs, ... }:
{
home.packages = [
(pkgs.writeShellScriptBin "sync-git" (builtins.readFile ./shell/sync-git.sh))
(pkgs.writeShellScriptBin "ensure-pass" (builtins.readFile ./shell/ensure-pass.sh))
(pkgs.writeShellScriptBin "clean-config" (builtins.readFile ./shell/clean-config.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))
(pkgs.writeShellScriptBin "mount-onedrive" (builtins.readFile ./shell/mount-onedrive.sh))
];
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";
};
};
}

View 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

View 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()

View file

@ -1,2 +0,0 @@
shopt -s extglob
rm -rf ~/.config/!(dconf|protonmail|Signal|whatsapp-for-linux)

View file

@ -1,26 +0,0 @@
# Email
EMAIL="e.litherlandsmith@proton.me"
secret-tool lookup email "$EMAIL" >/dev/null || (
echo "Insert pass from protonmail-bridge"
secret-tool store --label="Proton Mail mbsync" email "$EMAIL"
)
EMAIL="e.litherlandsmith@icloud.com"
secret-tool lookup clear "$EMAIL"
pass show identity/apple.com/mbsync | head -n1 | secret-tool store --label="iCloud mbsync" email "$EMAIL"
EMAIL="evie.litherland-smith@ukaea.uk"
secret-tool clear email "$EMAIL"
pass show work/microsoftonline.com | head -n1 | secret-tool store --label="Outlook mbsync" email "$EMAIL"
# Calendar
URL="dav.xenia.me.uk"
USER="pixelifytica"
secret-tool clear url "$URL" user "$USER"
pass show "server/xenia.me.uk/$URL" | head -n1 | secret-tool store --label="Personal calendar vdirsyncer" url "$URL" user "$USER"
# GitHub API token
HOST="api.github.com"
USER="pixelifytica^forge"
secret-tool clear host "$HOST" user "$USER"
pass show "api/$HOST" | head -n1 | secret-tool store --label="Forge GitHub Token" host "$HOST" user "$USER"

View 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
)

View file

@ -29,17 +29,3 @@ for i in "${!SYNC_DIRS[@]}"; do
git status --porcelain
)
done
# Clone ~/.config/emacs/ if it doesn't exist, pull otherwise
EMACS_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/emacs"
EMACS_URL="https://git.xenia.me.uk/pixelifytica/emacs.git"
if [ -d "$EMACS_DIR" ]; then
git -C "$EMACS_DIR" remote set-url origin "$EMACS_URL"
git -C "$EMACS_DIR" pull --ff --ff-only
else
git clone "$EMACS_URL" "$EMACS_DIR"
fi
# Cleanup legacy Emacs config file/directory
[ -f "$HOME/.emacs" ] && rm "$HOME/.emacs"
[ -d "$HOME/.emacs.d" ] && rm -r "$HOME/.emacs.d"

View 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

View file

@ -1,3 +0,0 @@
ONEDRIVE="$HOME/OneDrive"
[ -d "$ONEDRIVE" ] || mkdir -p "$ONEDRIVE"
[ -z "$(ls -A "$ONEDRIVE")" ] && rclone --vfs-cache-mode writes mount --daemon OneDrive: "$ONEDRIVE"

12
system/home/scripts/shell/rsync-local-config.sh Normal file → Executable file
View file

@ -1,6 +1,6 @@
HOSTS=("$@")
# Config files
for TARGET in ".inputrc" ".config/starship.toml"; do
for TARGET in ".inputrc" ".config/bat/" ".config/zellij" ".config/starship.toml"; do
SOURCE="$HOME/$TARGET"
echo "--- $SOURCE ---"
TMP_TARGET=/tmp/rsync-local-config
@ -21,3 +21,13 @@ for TARGET in ".inputrc" ".config/starship.toml"; do
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

4
system/home/scripts/shell/xdg-query-program.sh Normal file → Executable file
View file

@ -1,3 +1,3 @@
FILETYPE=$(xdg-mime query filetype "$@")
DEFAULT=$(xdg-mime query default "$FILETYPE")
FILETYPE=$(xdg-mime query filetype $@)
DEFAULT=$(xdg-mime query default $FILETYPE)
echo "$FILETYPE -> $DEFAULT"

View file

@ -1,6 +1,7 @@
{ 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
@ -151,7 +152,7 @@
};
services.mbsync = {
inherit (config.programs.mbsync) enable package;
frequency = "*:0/30"; # Every 30 minutes
frequency = "*:0/5"; # Every 5 minutes
verbose = true;
preExec = null;
postExec = null;

View 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

View 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";
};
};
}

View file

@ -0,0 +1,6 @@
[DEFAULT]
username_extractor=regex_search
regex_username=^login: (.*)$
[*]
target=git/${host}

10
system/home/shell/bat.nix Normal file
View file

@ -0,0 +1,10 @@
{ ... }:
{
programs.bat = {
enable = true;
config = {
theme = "OneHalfLight";
style = "plain,numbers,changes";
};
};
}

View 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;
};
};
};
}

View file

@ -1,100 +1,29 @@
{
config,
lib,
pkgs,
...
}:
{ 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
];
home.shellAliases = {
sync-all = "sync-git; vdirsyncer sync; mbsync -a";
sync-and-shutdown = "sync-all && shutdown now";
protonup = "sudo wg-quick up protonvpn && sudo wg";
protondown = "sudo wg-quick down protonvpn";
};
programs = {
# Shells
bash.enable = true;
nushell.enable = true;
# CLI programs and utilities
btop.enable = true;
carapace.enable = true;
fish.enable = true;
fd.enable = true;
jq.enable = true;
nix-index.enable = true;
ripgrep.enable = true;
bat = {
enable = true;
config.style = "plain,numbers,changes";
};
cava = {
enable = true;
settings = {
color = with config.lib.stylix.colors.withHashtag; {
gradient = 1;
gradient_count = 6;
gradient_color_1 = "'${red}'";
gradient_color_2 = "'${yellow}'";
gradient_color_3 = "'${green}'";
gradient_color_4 = "'${cyan}'";
gradient_color_5 = "'${blue}'";
gradient_color_6 = "'${magenta}'";
};
};
};
direnv = {
enable = true;
nix-direnv.enable = true;
};
eza = {
enable = true;
git = true;
icons = "auto";
extraOptions = [
"--header"
"--time-style=iso"
];
};
fzf = {
enable = true;
defaultCommand = "${pkgs.fd}/bin/fd --type f";
changeDirWidgetCommand = "${pkgs.fd}/bin/fd --type d";
fileWidgetCommand = "${pkgs.fd}/bin/fd --type f";
colors = {
bg = lib.mkForce "-1";
"bg+" = lib.mkForce "-1";
};
};
hyfetch = {
enable = true;
settings = {
preset = "transgender";
mode = "rgb";
light_dark = config.lib.stylix.scheme.variant;
lightness = 0.4;
color_align = {
mode = "horizontal";
};
};
};
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";
mark-directories = "On";
mark-symlinked-directories = "On";
visible-stats = "On";
};
};
};
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
programs.direnv = {
enable = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,9 @@
{ ... }:
{
programs.eza = {
enable = true;
git = true;
icons = true;
extraOptions = [ "--octal-permissions" ];
};
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
programs.fastfetch = {
enable = true;
settings = { };
};
}

View 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";
};
}

View file

@ -5,7 +5,7 @@
...
}:
{
home.packages = [ pkgs.git-sync ];
services.git-sync.enable = false; # Can't find pass for some reason...
programs.git =
let
package = pkgs.git.override {
@ -32,16 +32,25 @@
"*.gpg filter=gpg diff=gpg"
"*.asc filter=gpg diff=gpg"
];
extraConfig = {
github.user = "pixelifytica";
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";
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";
};
};
};
};
}

View 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";
};
};
}

View file

@ -1,8 +1,6 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
rclone
sshfs
(writeShellScriptBin "ssh-keygen-defaults" ''ssh-keygen -t ed25519 -C "$(whoami)@$(hostname)"'')
];
programs.ssh = {
@ -11,7 +9,7 @@
forwardAgent = true;
compression = true;
serverAliveInterval = 15;
serverAliveCountMax = 5;
serverAliveCountMax = 3;
controlMaster = "auto";
controlPersist = "10s";
extraConfig = ''
@ -38,7 +36,7 @@
};
"heimdall" = {
user = "elitherl";
hostname = "heimdall003.jet.uk";
hostname = "10.40.4.115"; # heimdall115.jetdata.eu
compression = true;
};
};

View file

@ -141,12 +141,12 @@
scala.symbol = " ";
shell = {
disabled = false;
format = "using [$indicator]($style) ";
nu_indicator = "ν";
bash_indicator = "";
powershell_indicator = "";
cmd_indicator = "";
unknown_indicator = "";
format = "using [$indicator]($style)";
bash_indicator = " ";
fish_indicator = "󰈺 ";
powershell_indicator = " ";
cmd_indicator = " ";
unknown_indicator = " ";
};
status = {
disabled = false;

31
system/home/shell/transient.zsh Executable file
View 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

View 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
View 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}
'';
};
}

View 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
'';
};
}

Some files were not shown because too many files have changed in this diff Show more