Compare commits

..

No commits in common. "6a6d53cff5946d3213e0ae49e5a75c989f7a7886" and "4f98a8cd932f8cd69f60a0eff1f8e9126613d97f" have entirely different histories.

84 changed files with 1770 additions and 2178 deletions

View file

@ -27,8 +27,7 @@
}; };
}; };
outputs = outputs = {
{
nixpkgs, nixpkgs,
home-manager, home-manager,
plasma-manager, plasma-manager,
@ -36,29 +35,20 @@
base16, base16,
tt-schemes, tt-schemes,
... ...
}@inputs: } @ inputs: let
let defaultSpecialArgs = {system ? "x86_64-linux", ...}: {
defaultSpecialArgs =
{
system ? "x86_64-linux",
...
}:
{
inherit inputs; inherit inputs;
iosevkaCustom = { iosevkaCustom = {
packages = iosevka-custom.outputs.packages.${system}; packages = iosevka-custom.outputs.packages.${system};
names = iosevka-custom.outputs.names; names = iosevka-custom.outputs.names;
}; };
}; };
defaultExtraSpecialArgs = defaultExtraSpecialArgs = {system}: let
{ system }:
let
iosevkaCustom = { iosevkaCustom = {
packages = iosevka-custom.outputs.packages.${system}; packages = iosevka-custom.outputs.packages.${system};
names = iosevka-custom.outputs.names; names = iosevka-custom.outputs.names;
}; };
in in {
{
inherit inputs iosevkaCustom; inherit inputs iosevkaCustom;
inherit (plasma-manager.packages.${system}) rc2nix; inherit (plasma-manager.packages.${system}) rc2nix;
accentColourName = "base0E"; accentColourName = "base0E";
@ -80,30 +70,24 @@
}; };
}; };
}; };
defaultModules = defaultModules = {
{
system ? "x86_64-linux", system ? "x86_64-linux",
username ? "pixelifytica", username ? "pixelifytica",
hostName ? "Atlas", hostName ? "Atlas",
loginShell ? "bash", loginShell ? "bash",
... ...
}: }: [
[
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
./system/default.nix ./system/default.nix
./system/${hostName}.nix ./system/${hostName}.nix
./system/hardware-configuration/${hostName}.nix ./system/hardware-configuration/${hostName}.nix
( ({
{
config, config,
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{ networking = {inherit hostName;};
networking = {
inherit hostName;
};
nix.settings.trusted-users = [username]; nix.settings.trusted-users = [username];
services.greetd.settings.initial_session.user = username; services.greetd.settings.initial_session.user = username;
programs.${loginShell} = lib.mkIf (loginShell != "bash") {enable = true;}; programs.${loginShell} = lib.mkIf (loginShell != "bash") {enable = true;};
@ -112,18 +96,9 @@
group = "users"; group = "users";
isNormalUser = true; isNormalUser = true;
description = "Evie Litherland-Smith"; description = "Evie Litherland-Smith";
extraGroups = [ extraGroups = ["networkmanager" "wheel" "video" "input" "uinput" "dialout"];
"networkmanager"
"wheel"
"video"
"input"
"uinput"
"dialout"
];
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3"; initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
openssh = { openssh = {inherit (config.users.users.root.openssh) authorizedKeys;};
inherit (config.users.users.root.openssh) authorizedKeys;
};
}; };
home-manager = { home-manager = {
extraSpecialArgs = defaultExtraSpecialArgs {inherit system;}; extraSpecialArgs = defaultExtraSpecialArgs {inherit system;};
@ -145,26 +120,19 @@
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
}; };
}; };
} })
)
]; ];
in in {
{ devShells.x86_64-linux.default = let
devShells.x86_64-linux.default =
let
pkgs = import nixpkgs {system = "x86_64-linux";}; pkgs = import nixpkgs {system = "x86_64-linux";};
in in
pkgs.mkShellNoCC { pkgs.mkShellNoCC {
packages = with pkgs; [ packages = with pkgs; [nil pre-commit];
nil
pre-commit
];
shellHook = "pre-commit install --install-hooks"; shellHook = "pre-commit install --install-hooks";
}; };
nixosConfigurations = { nixosConfigurations = {
## Server ## Server
Legion = Legion = let
let
system = "x86_64-linux"; system = "x86_64-linux";
username = "pixelifytica"; username = "pixelifytica";
hostName = "Legion"; hostName = "Legion";
@ -174,8 +142,7 @@
modules = defaultModules {inherit system username hostName;}; modules = defaultModules {inherit system username hostName;};
}; };
## Personal ## Personal
Northstar = Northstar = let
let
system = "x86_64-linux"; system = "x86_64-linux";
username = "pixelifytica"; username = "pixelifytica";
hostName = "Northstar"; hostName = "Northstar";
@ -184,8 +151,7 @@
specialArgs = defaultSpecialArgs {inherit system;}; specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {inherit system username hostName;}; modules = defaultModules {inherit system username hostName;};
}; };
Vanguard = Vanguard = let
let
system = "x86_64-linux"; system = "x86_64-linux";
username = "pixelifytica"; username = "pixelifytica";
hostName = "Vanguard"; hostName = "Vanguard";
@ -195,8 +161,7 @@
modules = defaultModules {inherit system username hostName;}; modules = defaultModules {inherit system username hostName;};
}; };
## Work ## Work
Tone = Tone = let
let
system = "x86_64-linux"; system = "x86_64-linux";
username = "elitherl"; username = "elitherl";
hostName = "Tone"; hostName = "Tone";
@ -205,8 +170,7 @@
specialArgs = defaultSpecialArgs {inherit system;}; specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {inherit system username hostName;}; modules = defaultModules {inherit system username hostName;};
}; };
Scorch = Scorch = let
let
system = "x86_64-linux"; system = "x86_64-linux";
username = "elitherl"; username = "elitherl";
hostName = "Scorch"; hostName = "Scorch";

View file

@ -1,4 +1 @@
{ ... }: {...}: {imports = [./shell/default.nix];}
{
imports = [ ./shell/default.nix ];
}

View file

@ -3,8 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
./personal.nix ./personal.nix
./desktop/plasma/default.nix ./desktop/plasma/default.nix

View file

@ -1,5 +1,8 @@
{ config, lib, ... }:
{ {
config,
lib,
...
}: {
imports = [ imports = [
./work.nix ./work.nix
./desktop/plasma/default.nix ./desktop/plasma/default.nix

View file

@ -1,5 +1,8 @@
{ config, lib, ... }:
{ {
config,
lib,
...
}: {
imports = [ imports = [
./work.nix ./work.nix
./desktop/plasma/default.nix ./desktop/plasma/default.nix
@ -22,8 +25,7 @@
}; };
services.kanshi = lib.mkIf config.wayland.windowManager.sway.enable { services.kanshi = lib.mkIf config.wayland.windowManager.sway.enable {
enable = true; enable = true;
settings = settings = let
let
laptopScreen = { laptopScreen = {
criteria = "eDP-1"; criteria = "eDP-1";
scale = 1.25; scale = 1.25;
@ -34,8 +36,7 @@
scale = 1.5; scale = 1.5;
position = "0,0"; position = "0,0";
}; };
in in [
[
{ {
profile = { profile = {
name = "undocked"; name = "undocked";
@ -45,10 +46,7 @@
{ {
profile = { profile = {
name = "docked"; name = "docked";
outputs = [ outputs = [laptopScreen monitor];
laptopScreen
monitor
];
}; };
} }
]; ];

View file

@ -3,8 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [ imports = [
./personal.nix ./personal.nix
./games/default.nix ./games/default.nix
@ -35,7 +34,9 @@
workspace = "1"; workspace = "1";
} }
]; ];
startup = [ { command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-1 --primary"; } ]; startup = [
{command = "${pkgs.xorg.xrandr}/bin/xrandr --output DP-1 --primary";}
];
}; };
}; };
} }

View file

@ -1,5 +1,8 @@
{ config, fonts, ... }:
{ {
config,
fonts,
...
}: {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
@ -20,30 +23,25 @@
live_config_reload = true; live_config_reload = true;
selection.save_to_clipboard = true; selection.save_to_clipboard = true;
mouse.hide_when_typing = true; mouse.hide_when_typing = true;
colors = colors = let
let mapColours = isBright: (builtins.listToAttrs (builtins.map (col: {
mapColours =
isBright:
(builtins.listToAttrs (
builtins.map
(col: {
# Alacritty uses Yellow instead of Orange for BASE09 # Alacritty uses Yellow instead of Orange for BASE09
name = if col == "orange" then "yellow" else col; name =
value = "0x${config.scheme.${if isBright then "bright-${col}" else col}}"; if col == "orange"
then "yellow"
else col;
value = "0x${config
.scheme
.${
if isBright
then "bright-${col}"
else col
}}";
}) })
[ ["red" "orange" "green" "cyan" "blue" "magenta"]));
"red"
"orange"
"green"
"cyan"
"blue"
"magenta"
]
));
mapNamedColours = mapColours false; mapNamedColours = mapColours false;
mapNamedBrightColours = mapColours true; mapNamedBrightColours = mapColours true;
in in {
{
draw_bold_text_with_bright_colors = false; draw_bold_text_with_bright_colors = false;
primary = with config.scheme; { primary = with config.scheme; {
background = "0x${base00}"; background = "0x${base00}";
@ -53,15 +51,13 @@
cursor = "0x${base05}"; cursor = "0x${base05}";
text = "0x${base00}"; text = "0x${base00}";
}; };
normal = normal = with config.scheme;
with config.scheme;
{ {
black = "0x${base00-hex}"; black = "0x${base00-hex}";
white = "0x${base05-hex}"; white = "0x${base05-hex}";
} }
// mapNamedColours; // mapNamedColours;
bright = bright = with config.scheme;
with config.scheme;
{ {
black = "0x${base03-hex}"; black = "0x${base03-hex}";
white = "0x${base07-hex}"; white = "0x${base07-hex}";

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./nyxt.nix ./nyxt.nix
./firefox.nix ./firefox.nix

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
programs = { programs = {
browserpass = { browserpass = {
enable = true; enable = true;
@ -76,20 +75,14 @@
NoDefaultBookmarks = false; NoDefaultBookmarks = false;
OfferToSaveLogins = false; OfferToSaveLogins = false;
PasswordManagerEnabled = false; PasswordManagerEnabled = false;
PDFjs = { PDFjs = {Enabled = false;};
Enabled = false;
};
Permissions = { Permissions = {
Autoplay = { Autoplay = {
Default = "block-audio-video"; Default = "block-audio-video";
}; };
}; };
PictureInPicture = { PictureInPicture = {Enabled = true;};
Enabled = true; PopupBlocking = {Default = true;};
};
PopupBlocking = {
Default = true;
};
RequestedLocales = ["en-GB"]; RequestedLocales = ["en-GB"];
SearchBar = "unified"; SearchBar = "unified";
ShowHomeButton = true; ShowHomeButton = true;
@ -138,10 +131,7 @@
default = "DuckDuckGo"; default = "DuckDuckGo";
privateDefault = default; privateDefault = default;
force = true; force = true;
order = [ order = ["DuckDuckGo" "Atlas SearXNG"];
"DuckDuckGo"
"Atlas SearXNG"
];
engines = { engines = {
"Atlas SearXNG" = { "Atlas SearXNG" = {
urls = [{template = "https://search.atlas.engineer/searxng/search?q={searchTerms}";}]; urls = [{template = "https://search.atlas.engineer/searxng/search?q={searchTerms}";}];
@ -150,42 +140,22 @@
"NixOS Wiki" = { "NixOS Wiki" = {
urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}]; urls = [{template = "https://wiki.nixos.org/w/index.php?search={searchTerms}";}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ definedAliases = ["@nix" "@nixos" "@nixoswiki"];
"@nix"
"@nixos"
"@nixoswiki"
];
}; };
"Arch Wiki" = { "Arch Wiki" = {
urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}]; urls = [{template = "https://wiki.archlinux.org/index.php?search={searchTerms}";}];
definedAliases = [ definedAliases = ["@aw" "@arch" "@archwiki"];
"@aw"
"@arch"
"@archwiki"
];
}; };
"GitHub" = { "GitHub" = {
urls = [{template = "https://github.com/search?q={searchTerms}";}]; urls = [{template = "https://github.com/search?q={searchTerms}";}];
definedAliases = [ definedAliases = ["@gh" "@git" "@github"];
"@gh"
"@git"
"@github"
];
}; };
"FlatHub" = { "FlatHub" = {
url = [{template = "https://flathub.org/apps/search?q={searchTerms}";}]; url = [{template = "https://flathub.org/apps/search?q={searchTerms}";}];
definedAliases = [ definedAliases = ["@flat" "@fthub" "@flathub"];
"@flat"
"@fthub"
"@flathub"
];
}; };
"NixOS Packages" = { "NixOS Packages" = {
urls = [ urls = [{template = "http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";}];
{
template = "http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@nixpkgs"]; definedAliases = ["@nixpkgs"];
}; };

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
programs = { programs = {
browserpass.browsers = ["librewolf"]; browserpass.browsers = ["librewolf"];
librewolf = { librewolf = {

View file

@ -4,16 +4,13 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: }: {
{
home.packages = [pkgs.nyxt]; home.packages = [pkgs.nyxt];
xdg = { xdg = {
configFile = { configFile = {
"nyxt/config.lisp".text = "nyxt/config.lisp".text = let
let
sc = config.scheme.withHashtag; sc = config.scheme.withHashtag;
in in ''
''
;; Import custom configuration ;; Import custom configuration
(nyxt::load-lisp "${./config.lisp}") (nyxt::load-lisp "${./config.lisp}")
;; Define custom theme ;; Define custom theme
@ -42,30 +39,26 @@
:on-codeblock-color "${sc.base05}")))) :on-codeblock-color "${sc.base05}"))))
''; '';
}; };
dataFile."nyxt/bookmarks.lisp".text = dataFile."nyxt/bookmarks.lisp".text = let
let
# Make a string of lisp-style list of strings, from nix-style # Make a string of lisp-style list of strings, from nix-style
# list # list
convertTags = tags: "(" + (builtins.foldl' (x: y: x + " \"" + y + "\"") "" tags) + " )"; convertTags = tags: "(" + (builtins.foldl' (x: y: x + " \"" + y + "\"") "" tags) + " )";
# Take bookmarks as returned from JSON file and convert to NYXT # Take bookmarks as returned from JSON file and convert to NYXT
# expected format # expected format
convertBookmark = convertBookmark = {
{
name, name,
tags, tags,
url, url,
}: }: "(:url \"${url}\" :title \"${name}\" :tags ${convertTags tags})\n";
"(:url \"${url}\" :title \"${name}\" :tags ${convertTags tags})\n"; in (
in
(
# Fold all entries in bookmarks.json into single string of NYXT # Fold all entries in bookmarks.json into single string of NYXT
# format bookmarks, each entry on a new line and with 2 space # format bookmarks, each entry on a new line and with 2 space
# indentation, just for visual clarity if reading the outputted # indentation, just for visual clarity if reading the outputted
# file # file
"(\n" "(\n"
+ (builtins.foldl' (x: y: x + " " + convertBookmark y) "" ( + (builtins.foldl'
builtins.fromJSON (builtins.readFile ./bookmarks.json) (x: y: x + " " + convertBookmark y) ""
)) (builtins.fromJSON (builtins.readFile ./bookmarks.json)))
+ ")" + ")"
); );
}; };

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
# Programs # Programs
./desktop/default.nix ./desktop/default.nix

View file

@ -1,6 +1,8 @@
{ scheme, accentColourName }: {
with scheme.withHashtag; scheme,
'' accentColourName,
}:
with scheme.withHashtag; ''
@define-color accent_color ${scheme.withHashtag."${accentColourName}-hex"}; @define-color accent_color ${scheme.withHashtag."${accentColourName}-hex"};
@define-color accent_bg_color ${scheme.withHashtag."${accentColourName}-hex"}; @define-color accent_bg_color ${scheme.withHashtag."${accentColourName}-hex"};
@define-color accent_fg_color ${base00-hex}; @define-color accent_fg_color ${base00-hex};

View file

@ -1,11 +1,15 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
home = { home = {
pointerCursor = pointerCursor = let
let name =
name = if config.scheme.variant == "light" then "volantes_cursors" else "volantes_light_cursors"; if config.scheme.variant == "light"
in then "volantes_cursors"
{ else "volantes_light_cursors";
in {
inherit name; inherit name;
package = pkgs.volantes-cursors; package = pkgs.volantes-cursors;
size = 32; size = 32;
@ -20,11 +24,9 @@
programs.mpv.enable = true; programs.mpv.enable = true;
xdg = { xdg = {
mime.enable = true; mime.enable = true;
mimeApps = mimeApps = let
let
defaultApplications = import ./mimeapps.nix; defaultApplications = import ./mimeapps.nix;
in in {
{
enable = true; enable = true;
inherit defaultApplications; inherit defaultApplications;
associations = { associations = {

View file

@ -1,13 +1,11 @@
lib: string: lib: string:
with lib; with lib; let
let chars = let
chars =
let
lc = strings.splitString "" string; lc = strings.splitString "" string;
in in (lists.sublist 1 (lists.length lc - 2) lc);
(lists.sublist 1 (lists.length lc - 2) lc); in (
in strings.concatStringsSep "" (
(strings.concatStringsSep "" (
(lists.singleton (strings.toUpper (lists.elemAt chars 0))) (lists.singleton (strings.toUpper (lists.elemAt chars 0)))
++ (lists.sublist 1 (lists.length chars) chars) ++ (lists.sublist 1 (lists.length chars) chars)
)) )
)

View file

@ -1,15 +1,7 @@
let let
emacs = [ emacs = ["emacsclient.desktop" "emacs.desktop"];
"emacsclient.desktop" browser = ["firefox.desktop" "librewolf.desktop" "nyxt.desktop"];
"emacs.desktop" in {
];
browser = [
"firefox.desktop"
"librewolf.desktop"
"nyxt.desktop"
];
in
{
"inode/directory" = ["thunar.desktop"]; "inode/directory" = ["thunar.desktop"];
"inode/symlink" = ["thunar.desktop"]; "inode/symlink" = ["thunar.desktop"];

View file

@ -7,28 +7,25 @@
rc2nix, rc2nix,
accentColourName, accentColourName,
... ...
}: }: {
{
imports = [ imports = [
inputs.plasma-manager.homeManagerModules.plasma-manager inputs.plasma-manager.homeManagerModules.plasma-manager
../default.nix ../default.nix
./konsole.nix ./konsole.nix
]; ];
home.packages = [ home.packages = with pkgs; [
rc2nix rc2nix
pkgs.wl-clipboard wl-clipboard
(pkgs.papirus-icon-theme.override { color = "violet"; }) (papirus-icon-theme.override {color = "violet";})
]; ];
services.gpg-agent.pinentryPackage = pkgs.pinentry-qt; services.gpg-agent.pinentryPackage = pkgs.pinentry-qt;
programs.plasma = { programs.plasma = {
enable = true; enable = true;
overrideConfig = true; overrideConfig = true;
workspace = workspace = let
let
toCapital = import ../lib/to_capital.nix lib; toCapital = import ../lib/to_capital.nix lib;
in in {
{
clickItemTo = "open"; clickItemTo = "open";
theme = "default"; theme = "default";
colorScheme = "Breeze${toCapital config.scheme.variant}"; colorScheme = "Breeze${toCapital config.scheme.variant}";
@ -44,8 +41,7 @@
wallpaper = "${../wallpapers/landscapes/tropic_island_day.jpg}"; wallpaper = "${../wallpapers/landscapes/tropic_island_day.jpg}";
}; };
fonts = fonts = let
let
general = { general = {
family = fonts.sansSerif.name; family = fonts.sansSerif.name;
pointSize = 12; pointSize = 12;
@ -58,8 +54,7 @@
family = fonts.monospace.name; family = fonts.monospace.name;
pointSize = 12; pointSize = 12;
}; };
in in {
{
inherit general small fixedWidth; inherit general small fixedWidth;
menu = general; menu = general;
toolbar = general; toolbar = general;
@ -108,6 +103,14 @@
]; ];
}; };
} }
{
name = "org.kde.plasma.pager";
config.General = {
showWindowIcons = "true";
showOnlyCurrentScreen = "false";
wrapPage = "true";
};
}
"org.kde.plasma.cameraindicator" "org.kde.plasma.cameraindicator"
{ {
systemTray = { systemTray = {
@ -146,10 +149,7 @@
shortcuts = { shortcuts = {
ksmserver = { ksmserver = {
"Lock Session" = [ "Lock Session" = ["Screensaver" "Meta+Alt+L"];
"Screensaver"
"Meta+Alt+L"
];
}; };
kwin = { kwin = {
"Walk Through Windows of Current Application" = "Alt+`"; "Walk Through Windows of Current Application" = "Alt+`";
@ -164,11 +164,7 @@
"InvertWindow" = "Meta+Ctrl+U"; "InvertWindow" = "Meta+Ctrl+U";
"Invert Screen Colors" = []; "Invert Screen Colors" = [];
}; };
"services/org.kde.krunner.desktop"."_launch" = [ "services/org.kde.krunner.desktop"."_launch" = ["Meta+Space" "Search" "Alt+F2"];
"Meta+Space"
"Search"
"Alt+F2"
];
}; };
kwin = { kwin = {
@ -188,6 +184,17 @@
baloofilerc."Basic Settings"."Indexing-Enabled" = false; baloofilerc."Basic Settings"."Indexing-Enabled" = false;
bluedevilglobalrc.Global.launchState.value = "disable"; bluedevilglobalrc.Global.launchState.value = "disable";
kcminputrc.Keyboard.NumLock = 1; kcminputrc.Keyboard.NumLock = 1;
# powerdevilrc = {
# AC = {
# Display = {
# TurnOffDisplayIdleTimeoutSec = "1800";
# TurnOffDisplayIdleTimeoutWhenLockedSec = "120";
# };
# SuspendAndShutdown = {
# AutoSuspendIdleTimeoutSec = "3600";
# };
# };
# };
plasmanotifyrc = { plasmanotifyrc = {
Notifications = { Notifications = {
NormalAlwaysOnTop = true; NormalAlwaysOnTop = true;
@ -212,17 +219,13 @@
}; };
}; };
kdeglobals = { kdeglobals = {
General = General = let
let AccentColor = let
AccentColor =
let
r = config.scheme."${accentColourName}-rgb-r"; r = config.scheme."${accentColourName}-rgb-r";
g = config.scheme."${accentColourName}-rgb-g"; g = config.scheme."${accentColourName}-rgb-g";
b = config.scheme."${accentColourName}-rgb-b"; b = config.scheme."${accentColourName}-rgb-b";
in in "${r}, ${g}, ${b}";
"${r}, ${g}, ${b}"; in {
in
{
inherit AccentColor; inherit AccentColor;
LastUsedCustomAccentColor = AccentColor; LastUsedCustomAccentColor = AccentColor;
TerminalApplication = "konsole"; TerminalApplication = "konsole";

View file

@ -1,5 +1,4 @@
{ fonts, ... }: {fonts, ...}: {
{
programs.konsole = { programs.konsole = {
enable = true; enable = true;
defaultProfile = "One-Light"; defaultProfile = "One-Light";

View file

@ -1,14 +1,14 @@
{ config, accentColourName, ... }:
{ {
config,
accentColourName,
...
}: {
services.avizo = { services.avizo = {
enable = true; enable = true;
settings.default = settings.default = let
let
sc = config.scheme; sc = config.scheme;
rgba = rgba = colourName: "${sc."${colourName}-rgb-r"}, ${sc."${colourName}-rgb-g"}, ${sc."${colourName}-rgb-b"}";
colourName: "${sc."${colourName}-rgb-r"}, ${sc."${colourName}-rgb-g"}, ${sc."${colourName}-rgb-b"}"; in {
in
{
background = "rgba(${rgba "base00"}, 0.9)"; background = "rgba(${rgba "base00"}, 0.9)";
bar-bg-color = "rgba(${rgba "base00"}, 0.9)"; bar-bg-color = "rgba(${rgba "base00"}, 0.9)";
bar-fg-color = "rgba(${rgba "base05"}, 1.0)"; bar-fg-color = "rgba(${rgba "base05"}, 1.0)";

View file

@ -5,13 +5,11 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: }: let
let
set-background = pkgs.writeShellScriptBin "set-background" '' set-background = pkgs.writeShellScriptBin "set-background" ''
${pkgs.swaybg}/bin/swaybg -m fill -i ${../wallpapers/landscapes/tropic_island_day.jpg} ${pkgs.swaybg}/bin/swaybg -m fill -i ${../wallpapers/landscapes/tropic_island_day.jpg}
''; '';
in in {
{
imports = [ imports = [
../default.nix ../default.nix
./avizo/default.nix ./avizo/default.nix
@ -66,11 +64,9 @@ in
tray = "never"; tray = "never";
}; };
}; };
gtk = gtk = let
let
toCapital = import ../lib/to_capital.nix lib; toCapital = import ../lib/to_capital.nix lib;
in in {
{
enable = true; enable = true;
theme = { theme = {
package = pkgs.materia-theme; package = pkgs.materia-theme;
@ -83,9 +79,9 @@ in
}; };
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
package = pkgs.swayfx.overrideAttrs (old: { package =
passthru.providedSessions = [ "sway" ]; pkgs.swayfx.overrideAttrs
}); (old: {passthru.providedSessions = ["sway"];});
swaynag.enable = true; swaynag.enable = true;
systemd.enable = true; systemd.enable = true;
xwayland = true; xwayland = true;
@ -120,65 +116,35 @@ in
style = "regular"; style = "regular";
size = fonts.sizes.desktop * 1.0; size = fonts.sizes.desktop * 1.0;
}; };
colors = colors = let
let
sc = config.scheme.withHashtag; sc = config.scheme.withHashtag;
text = toString sc.base05; text = toString sc.base05;
indicator = toString sc.${accentColourName}; indicator = toString sc.${accentColourName};
background = toString sc.base00; background = toString sc.base00;
in in {
{
inherit background; inherit background;
focused = focused = let
let
border = toString sc.${accentColourName}; border = toString sc.${accentColourName};
in in {
{ inherit background text indicator border;
inherit
background
text
indicator
border
;
childBorder = border; childBorder = border;
}; };
focusedInactive = focusedInactive = let
let
border = toString sc.base04; border = toString sc.base04;
in in {
{ inherit background text indicator border;
inherit
background
text
indicator
border
;
childBorder = border; childBorder = border;
}; };
unfocused = unfocused = let
let
border = toString sc.base03; border = toString sc.base03;
in in {
{ inherit background text indicator border;
inherit
background
text
indicator
border
;
childBorder = border; childBorder = border;
}; };
urgent = urgent = let
let
border = toString sc.red; border = toString sc.red;
in in {
{ inherit background text indicator border;
inherit
background
text
indicator
border
;
childBorder = border; childBorder = border;
}; };
}; };
@ -221,9 +187,7 @@ in
]; ];
}; };
floating.border = 1; floating.border = 1;
keybindings = keybindings = with config; let
with config;
let
modifier = wayland.windowManager.sway.config.modifier; modifier = wayland.windowManager.sway.config.modifier;
in in
lib.mkOptionDefault { lib.mkOptionDefault {

View file

@ -1,5 +1,8 @@
{ config, fonts, ... }:
{ {
config,
fonts,
...
}: {
programs.foot = { programs.foot = {
enable = true; enable = true;
server.enable = true; server.enable = true;
@ -16,12 +19,8 @@
notify = false; notify = false;
visual = false; visual = false;
}; };
cursor = { cursor = {blink = true;};
blink = true; mouse = {hide-when-typing = true;};
};
mouse = {
hide-when-typing = true;
};
colors = with config.scheme; rec { colors = with config.scheme; rec {
alpha = 0.85; alpha = 0.85;
background = base00; background = base00;

View file

@ -4,8 +4,7 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: }: {
{
programs.fuzzel = { programs.fuzzel = {
enable = true; enable = true;
settings = { settings = {
@ -17,19 +16,19 @@
fields = "filename,name,generic,categories"; fields = "filename,name,generic,categories";
fuzzy = true; fuzzy = true;
filter-desktop = true; filter-desktop = true;
terminal = terminal = with config.programs; "${
with config.programs; if alacritty.enable
"${if alacritty.enable then alacritty.package else pkgs.alacritty}/bin/alacritty -e"; then alacritty.package
else pkgs.alacritty
}/bin/alacritty -e";
lines = 24; lines = 24;
width = 80; width = 80;
tabs = 4; tabs = 4;
layer = "overlay"; layer = "overlay";
}; };
colors = colors = let
let
sc = config.scheme; sc = config.scheme;
in in {
{
background = "${sc.base00}cc"; # 80% Opacity background = "${sc.base00}cc"; # 80% Opacity
text = "${sc.base05}ff"; text = "${sc.base05}ff";
match = "${sc.red}ff"; match = "${sc.red}ff";

View file

@ -3,13 +3,10 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: }: {
{ services.mako = let
services.mako =
let
sc = config.scheme.withHashtag; sc = config.scheme.withHashtag;
in in {
{
enable = true; enable = true;
anchor = "top-right"; anchor = "top-right";
font = "${fonts.monospace.name} ${toString fonts.sizes.popups}"; font = "${fonts.monospace.name} ${toString fonts.sizes.popups}";

View file

@ -4,14 +4,15 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: }: {
{
programs.rofi = { programs.rofi = {
enable = true; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
terminal = terminal = with config.programs; "${
with config.programs; if alacritty.enable
"${if alacritty.enable then alacritty.package else pkgs.alacritty}/bin/alacritty"; then alacritty.package
else pkgs.alacritty
}/bin/alacritty";
font = fonts.monospace.name; font = fonts.monospace.name;
location = "center"; location = "center";
plugins = with pkgs; [rofi-emoji]; plugins = with pkgs; [rofi-emoji];
@ -35,9 +36,7 @@
display-emoji = " 󰞅 Emoji "; display-emoji = " 󰞅 Emoji ";
display-combi = " 󰛡 Combi "; display-combi = " 󰛡 Combi ";
}; };
theme = theme = with builtins; let
with builtins;
let
inherit (config.lib.formats.rasi) mkLiteral; inherit (config.lib.formats.rasi) mkLiteral;
sc = config.scheme; sc = config.scheme;
bg = mkLiteral "rgba (${sc.base00-rgb-r}, ${sc.base00-rgb-g}, ${sc.base00-rgb-b}, 80%)"; bg = mkLiteral "rgba (${sc.base00-rgb-r}, ${sc.base00-rgb-g}, ${sc.base00-rgb-b}, 80%)";
@ -46,8 +45,7 @@
fg2 = mkLiteral sc.withHashtag.base04; fg2 = mkLiteral sc.withHashtag.base04;
border = mkLiteral sc.withHashtag.${accentColour}; border = mkLiteral sc.withHashtag.${accentColour};
blue = mkLiteral sc.withHashtag.blue; blue = mkLiteral sc.withHashtag.blue;
in in {
{
"*" = { "*" = {
background-color = mkLiteral "transparent"; background-color = mkLiteral "transparent";
text-color = fg; text-color = fg;
@ -64,10 +62,7 @@
}; };
inputbar = { inputbar = {
children = map mkLiteral [ children = map mkLiteral ["prompt" "entry"];
"prompt"
"entry"
];
padding = mkLiteral "2px"; padding = mkLiteral "2px";
}; };

View file

@ -1,13 +1,14 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
imports = [../swaylock/default.nix]; imports = [../swaylock/default.nix];
services.swayidle = services.swayidle = let
let swaylockfx =
swaylockfx = pkgs.callPackage ../swaylock/swaylockfx.nix { pkgs.callPackage ../swaylock/swaylockfx.nix
swaylock-effects = config.programs.swaylock.package; {swaylock-effects = config.programs.swaylock.package;};
}; in {
in
{
enable = true; enable = true;
timeouts = [ timeouts = [
{ {

View file

@ -3,20 +3,18 @@
pkgs, pkgs,
accentColourName, accentColourName,
... ...
}: }: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
(callPackage ./swaylockfx.nix { swaylock-effects = config.programs.swaylock.package; }) (callPackage ./swaylockfx.nix
{swaylock-effects = config.programs.swaylock.package;})
]; ];
programs.swaylock = { programs.swaylock = {
enable = true; enable = true;
package = pkgs.swaylock-effects; package = pkgs.swaylock-effects;
# Settings are specifically for swaylock-effects # Settings are specifically for swaylock-effects
settings = settings = let
let
sc = config.scheme; sc = config.scheme;
in in {
{
indicator-radius = 100; indicator-radius = 100;
indicator-thickness = 10; indicator-thickness = 10;
indicator-caps-lock = true; indicator-caps-lock = true;

View file

@ -1,2 +1,6 @@
{ writeShellScriptBin, swaylock-effects, ... }: {
writeShellScriptBin,
swaylock-effects,
...
}:
writeShellScriptBin "swaylockfx" "${swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse" writeShellScriptBin "swaylockfx" "${swaylock-effects}/bin/swaylock --screenshots --clock --indicator --grace-no-mouse"

View file

@ -4,16 +4,13 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: }: {
{
home.packages = [pkgs.swaynotificationcenter]; home.packages = [pkgs.swaynotificationcenter];
xdg.configFile."swaync/style.css".text = xdg.configFile."swaync/style.css".text = let
let
sc = config.scheme.withHashtag; sc = config.scheme.withHashtag;
alpha = "0.85"; alpha = "0.85";
alpha-background = "rgba(${config.scheme.base00-rgb-r}, ${config.scheme.base00-rgb-g}, ${config.scheme.base00-rgb-b}, ${alpha})"; alpha-background = "rgba(${config.scheme.base00-rgb-r}, ${config.scheme.base00-rgb-g}, ${config.scheme.base00-rgb-b}, ${alpha})";
in in ''
''
* { * {
all: unset; all: unset;
font-size: 1.2rem; font-size: 1.2rem;

View file

@ -4,8 +4,7 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: }: {
{
systemd.user.targets.tray.Unit = { systemd.user.targets.tray.Unit = {
Description = "Home Manager System Tray"; Description = "Home Manager System Tray";
Requires = ["graphical-session.target"]; Requires = ["graphical-session.target"];
@ -116,11 +115,7 @@
format-source-muted = "󰍭 "; format-source-muted = "󰍭 ";
format-icons = { format-icons = {
car = "󰄍 "; car = "󰄍 ";
default = [ default = ["󰕿 " "󰖀 " "󰕾 "];
"󰕿 "
"󰖀 "
"󰕾 "
];
hands-free = "󰥰 "; hands-free = "󰥰 ";
headset = "󰋎 "; headset = "󰋎 ";
phone = "󰏲 "; phone = "󰏲 ";
@ -140,25 +135,14 @@
format = "󰻠 {usage}%"; format = "󰻠 {usage}%";
tooltip = false; tooltip = false;
}; };
memory = { memory = {format = "󰍛 {}%";};
format = "󰍛 {}%";
};
temperature = { temperature = {
critical-threshold = 80; critical-threshold = 80;
format = "{icon} {temperatureC}°C"; format = "{icon} {temperatureC}°C";
format-icons = [ format-icons = ["󱃃" "󰔏" "󱃂"];
"󱃃"
"󰔏"
"󱃂"
];
}; };
network = { network = {
format-icons = [ format-icons = ["󰤟 " "󰤢 " "󰤥 " "󰤨 "];
"󰤟 "
"󰤢 "
"󰤥 "
"󰤨 "
];
format-wifi = "{icon}"; format-wifi = "{icon}";
format-ethernet = "󰈁 "; format-ethernet = "󰈁 ";
format-linked = "󰈂 "; format-linked = "󰈂 ";
@ -183,11 +167,9 @@
mode-mon-col = 3; mode-mon-col = 3;
weeks-pos = "left"; weeks-pos = "left";
on-scroll = 1; on-scroll = 1;
format = format = let
let
sc = config.scheme.withHashtag; sc = config.scheme.withHashtag;
in in {
{
months = "<span color='${sc.red}'><b>{}</b></span>"; months = "<span color='${sc.red}'><b>{}</b></span>";
weeks = "<span color='${sc.cyan}'><b>W{}</b></span>"; weeks = "<span color='${sc.cyan}'><b>W{}</b></span>";
weekdays = "<span color='${sc.orange}'><b>{}</b></span>"; weekdays = "<span color='${sc.orange}'><b>{}</b></span>";
@ -204,17 +186,7 @@
backlight = { backlight = {
format = "{icon}"; format = "{icon}";
tooltip-format = "{percent}%"; tooltip-format = "{percent}%";
format-icons = [ format-icons = [" " " " " " " " " " " " " " " " " "];
" "
" "
" "
" "
" "
" "
" "
" "
" "
];
}; };
battery = { battery = {
states = { states = {
@ -225,25 +197,11 @@
format-charging = "󰂄 "; format-charging = "󰂄 ";
format-plugged = "󰚥 "; format-plugged = "󰚥 ";
tooltip-format = "{capacity}% {time}"; tooltip-format = "{capacity}% {time}";
format-icons = [ format-icons = ["󱃍 " "󰁺 " "󰁻 " "󰁼 " "󰁽 " "󰁾 " "󰁿 " "󰂀 " "󰂁 " "󰂂 " "󰁹 "];
"󱃍 "
"󰁺 "
"󰁻 "
"󰁼 "
"󰁽 "
"󰁾 "
"󰁿 "
"󰂀 "
"󰂁 "
"󰂂 "
"󰁹 "
];
}; };
"custom/notification" = "custom/notification" = let
let
swaync = pkgs.swaynotificationcenter; swaync = pkgs.swaynotificationcenter;
in in {
{
tooltip = false; tooltip = false;
format = "{icon}{}"; format = "{icon}{}";
format-icons = { format-icons = {
@ -263,12 +221,10 @@
on-click-right = "${swaync}/bin/swaync-client -d -sw"; on-click-right = "${swaync}/bin/swaync-client -d -sw";
escape = true; escape = true;
}; };
"custom/weather" = "custom/weather" = let
let
date-format = "%Y-%m-%d"; date-format = "%Y-%m-%d";
custom-indicator = "{ICON}{temp_C}({FeelsLikeC})"; custom-indicator = "{ICON}{temp_C}({FeelsLikeC})";
in in {
{
format = "{}°"; format = "{}°";
tooltip = true; tooltip = true;
interval = 900; # Every 15 minutes interval = 900; # Every 15 minutes
@ -281,12 +237,10 @@
spacing = 5; spacing = 5;
}; };
}; };
style = style = let
let
sc = config.scheme.withHashtag; sc = config.scheme.withHashtag;
alpha = "0.85"; alpha = "0.85";
in in ''
''
* { * {
all: unset; all: unset;
font-size: ${toString fonts.sizes.popups}px; font-size: ${toString fonts.sizes.popups}px;

View file

@ -1,5 +1,8 @@
{ config, fonts, ... }:
{ {
config,
fonts,
...
}: {
programs.wlogout = { programs.wlogout = {
enable = true; enable = true;
layout = [ layout = [
@ -22,14 +25,12 @@
keybind = "l"; keybind = "l";
} }
]; ];
style = style = let
let
sc = config.scheme.withHashtag; sc = config.scheme.withHashtag;
shutdownIcon = ./icons/shutdown.png; shutdownIcon = ./icons/shutdown.png;
rebootIcon = ./icons/reboot.png; rebootIcon = ./icons/reboot.png;
logoutIcon = ./icons/logout.png; logoutIcon = ./icons/logout.png;
in in ''
''
* { * {
font-size: ${toString fonts.sizes.popups}px; font-size: ${toString fonts.sizes.popups}px;
font-family: "${fonts.sansSerif.name}"; font-family: "${fonts.sansSerif.name}";

View file

@ -3,8 +3,7 @@
pkgs, pkgs,
fonts, fonts,
... ...
}: }: {
{
imports = [../shell/default.nix]; imports = [../shell/default.nix];
services.emacs = { services.emacs = {
enable = true; enable = true;
@ -19,8 +18,7 @@
# git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.emacs.d # git clone https://git.xenia.me.uk/pixelifytica/emacs.git ~/.emacs.d
enable = true; enable = true;
package = pkgs.emacs29-pgtk; package = pkgs.emacs29-pgtk;
extraConfig = extraConfig = let
let
fixed-font-family = "${fonts.monospace.name}"; fixed-font-family = "${fonts.monospace.name}";
variable-font-family = "${fonts.sansSerif.name}"; variable-font-family = "${fonts.sansSerif.name}";
font-height = builtins.toString (builtins.floor (builtins.mul fonts.sizes.applications 10)); font-height = builtins.toString (builtins.floor (builtins.mul fonts.sizes.applications 10));
@ -47,17 +45,12 @@
''; '';
}; };
custom-theme-hash = builtins.hashFile "sha256" "${custom-theme}/${custom-theme-name}-theme.el"; custom-theme-hash = builtins.hashFile "sha256" "${custom-theme}/${custom-theme-name}-theme.el";
in in ''
''
(add-to-list 'custom-theme-load-path "${custom-theme}") (add-to-list 'custom-theme-load-path "${custom-theme}")
(add-to-list 'custom-safe-themes "${custom-theme-hash}") (add-to-list 'custom-safe-themes "${custom-theme-hash}")
(load-theme '${custom-theme-name}) (load-theme '${custom-theme-name})
''; '';
extraPackages = extraPackages = epkgs: with epkgs; [treesit-grammars.with-all-grammars mu4e];
epkgs: with epkgs; [
treesit-grammars.with-all-grammars
mu4e
];
}; };
home.packages = with pkgs; [ home.packages = with pkgs; [
# Emacs requirements # Emacs requirements
@ -75,18 +68,8 @@
mp3info mp3info
# Customised LaTeX install # Customised LaTeX install
(texlive.combine { (texlive.combine
inherit (texlive) {inherit (pkgs.texlive) scheme-medium dvisvgm dvipng wrapfig amsmath ulem hyperref capt-of;})
scheme-medium
dvisvgm
dvipng
wrapfig
amsmath
ulem
hyperref
capt-of
;
})
# Development tools # Development tools
## Code screenshots ## Code screenshots
@ -103,19 +86,20 @@
nodePackages.eslint nodePackages.eslint
## Formatters ## Formatters
nixfmt-rfc-style alejandra
shfmt shfmt
stylua stylua
nodePackages.prettier nodePackages.prettier
## Language servers ## Language servers
nixd nil # Nix lsp
lua-language-server lua-language-server
nodePackages.typescript-language-server nodePackages.typescript-language-server
## Interpreters ## Interpreters
(python3.withPackages ( (python3.withPackages
ps: with ps; [ (ps:
with ps; [
tkinter tkinter
python-lsp-server python-lsp-server
mypy mypy
@ -123,9 +107,9 @@
scipy scipy
xarray xarray
matplotlib matplotlib
] ]))
)) (luajit.withPackages
(luajit.withPackages (ps: [ (ps.callPackage ./luarocks/scilua.nix { }) ])) (ps: [(ps.callPackage ./luarocks/scilua.nix {})]))
]; ];
xdg.configFile = { xdg.configFile = {
"ruff/pyproject.toml".source = ./ruff.toml; "ruff/pyproject.toml".source = ./ruff.toml;

View file

@ -1,4 +1,5 @@
epkgs: with epkgs; [ epkgs:
with epkgs; [
# UI # UI
base16-theme base16-theme
all-the-icons all-the-icons

View file

@ -14,11 +14,9 @@ buildLuarocksPackage {
(fetchurl { (fetchurl {
url = "mirror://luarocks/graph-toolkit-scm-1.rockspec"; url = "mirror://luarocks/graph-toolkit-scm-1.rockspec";
sha256 = "0hsrf7k45w8ri18mdrx44mv1kr4zfr5mg76cxi8nnr30ssrblvgb"; sha256 = "0hsrf7k45w8ri18mdrx44mv1kr4zfr5mg76cxi8nnr30ssrblvgb";
}).outPath; })
src = fetchgit ( .outPath;
removeAttrs src = fetchgit (removeAttrs (builtins.fromJSON '' {
(builtins.fromJSON ''
{
"url": "https://github.com/franko/graph-toolkit", "url": "https://github.com/franko/graph-toolkit",
"rev": "126a11bdbb98faf785c373516a288b7fa609f824", "rev": "126a11bdbb98faf785c373516a288b7fa609f824",
"date": "2015-01-02T08:44:01-08:00", "date": "2015-01-02T08:44:01-08:00",
@ -30,20 +28,10 @@ buildLuarocksPackage {
"deepClone": false, "deepClone": false,
"leaveDotGit": false "leaveDotGit": false
} }
'') '') ["date" "path" "sha256"]);
[
"date"
"path"
"sha256"
]
);
disabled = luaOlder "5.1"; disabled = luaOlder "5.1";
propagatedBuildInputs = [ propagatedBuildInputs = [lua agg freetype];
lua
agg
freetype
];
meta = { meta = {
homepage = "http://franko.github.io/graph-toolkit/"; homepage = "http://franko.github.io/graph-toolkit/";

View file

@ -6,8 +6,7 @@
callPackage, callPackage,
luajit, luajit,
openblas, openblas,
}: }: let
let
xsys = callPackage ./xsys.nix {}; xsys = callPackage ./xsys.nix {};
in in
buildLuarocksPackage { buildLuarocksPackage {
@ -17,18 +16,15 @@ buildLuarocksPackage {
(fetchurl { (fetchurl {
url = "mirror://luarocks/sci-1.0.0.beta12-1.rockspec"; url = "mirror://luarocks/sci-1.0.0.beta12-1.rockspec";
sha256 = "0lprn9x4zw767hdz8lyxmwrrfyn5xj3x50pm9b4qiwy8992mg00r"; sha256 = "0lprn9x4zw767hdz8lyxmwrrfyn5xj3x50pm9b4qiwy8992mg00r";
}).outPath; })
.outPath;
src = fetchurl { src = fetchurl {
url = "https://github.com/stepelu/lua-sci/archive/v1.0.0-beta12.tar.gz"; url = "https://github.com/stepelu/lua-sci/archive/v1.0.0-beta12.tar.gz";
sha256 = "0a45r7n13gfqckpdp1bmizqvjadn8nc5d6ff9gjw860g3i75sy2h"; sha256 = "0a45r7n13gfqckpdp1bmizqvjadn8nc5d6ff9gjw860g3i75sy2h";
}; };
disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
propagatedBuildInputs = [ propagatedBuildInputs = [luajit xsys openblas];
luajit
xsys
openblas
];
meta = { meta = {
homepage = "https://github.com/stepelu/lua-sci"; homepage = "https://github.com/stepelu/lua-sci";

View file

@ -12,7 +12,8 @@ buildLuarocksPackage {
(fetchurl { (fetchurl {
url = "mirror://luarocks/xsys-1.0.2-1.rockspec"; url = "mirror://luarocks/xsys-1.0.2-1.rockspec";
sha256 = "0jlyrwbzh6fi68msdynp4bbihyww4i3yk0qh859xlwqhfy5cza7p"; sha256 = "0jlyrwbzh6fi68msdynp4bbihyww4i3yk0qh859xlwqhfy5cza7p";
}).outPath; })
.outPath;
src = fetchurl { src = fetchurl {
url = "https://github.com/stepelu/lua-xsys/archive/v1.0.2.tar.gz"; url = "https://github.com/stepelu/lua-xsys/archive/v1.0.2.tar.gz";
sha256 = "1zwrlp6bghq8c12kyqc1ic7mrn8lf3d42755h8q2wxwhy1i3xqyh"; sha256 = "1zwrlp6bghq8c12kyqc1ic7mrn8lf3d42755h8q2wxwhy1i3xqyh";

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
prismlauncher prismlauncher
cartridges cartridges

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [./default.nix]; imports = [./default.nix];
home.packages = with pkgs; [ home.packages = with pkgs; [
kdePackages.ktorrent kdePackages.ktorrent

View file

@ -1,10 +1,12 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home = { home = {
packages = [ packages = [
(pkgs.writeShellScriptBin "git-sync-all" (builtins.readFile ./shell/git-sync-all.sh)) (pkgs.writeShellScriptBin "git-sync-all"
(pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh)) (builtins.readFile ./shell/git-sync-all.sh))
(pkgs.writeShellScriptBin "xdg-query-program" (builtins.readFile ./shell/xdg-query-program.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 = { shellAliases = {
gsa = "git-sync-all"; gsa = "git-sync-all";

View file

@ -1,2 +1,2 @@
pkgs: pkgs: (pkgs.writeShellScriptBin "ukaea-vpn-connect"
(pkgs.writeShellScriptBin "ukaea-vpn-connect" "sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf}") "sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf}")

View file

@ -1,8 +1,12 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
protonmail-bridge-gui protonmail-bridge-gui
(writeShellScriptBin "mbsync-ensure-pass" (builtins.readFile ./mbsync-ensure-pass.sh)) (writeShellScriptBin "mbsync-ensure-pass"
(builtins.readFile ./mbsync-ensure-pass.sh))
(writeShellScriptBin "davmail-setup" '' (writeShellScriptBin "davmail-setup" ''
systemctl --user restart davmail # Ensure config file is present systemctl --user restart davmail # Ensure config file is present
systemctl --user stop davmail systemctl --user stop davmail
@ -15,18 +19,14 @@
}; };
accounts.email = { accounts.email = {
maildirBasePath = "Mail"; maildirBasePath = "Mail";
accounts = accounts = let
let
realName = "Evie Litherland-Smith"; realName = "Evie Litherland-Smith";
in in {
{ proton = let
proton =
let
address = "e.litherlandsmith@proton.me"; address = "e.litherlandsmith@proton.me";
host = "127.0.0.1"; host = "127.0.0.1";
tls.enable = false; tls.enable = false;
in in {
{
inherit realName address; inherit realName address;
primary = true; primary = true;
maildir.path = "Proton"; maildir.path = "Proton";
@ -38,10 +38,7 @@
inherit host tls; inherit host tls;
port = 1025; port = 1025;
}; };
aliases = [ aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"];
"evie@xenia.me.uk"
"evie@litherlandsmith.slmail.me"
];
userName = address; userName = address;
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}"; passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
mu.enable = true; mu.enable = true;
@ -57,22 +54,14 @@
create = "both"; create = "both";
expunge = "both"; expunge = "both";
remove = "both"; remove = "both";
patterns = [ patterns = ["*" "!All Mail" "!Labels*" "!Starred" "!Recovered Messages"];
"*"
"!All Mail"
"!Labels*"
"!Starred"
"!Recovered Messages"
];
subFolders = "Verbatim"; subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN"; extraConfig.account.AuthMechs = "LOGIN";
}; };
}; };
icloud = icloud = let
let
address = "e.litherlandsmith@icloud.com"; address = "e.litherlandsmith@icloud.com";
in in {
{
inherit realName address; inherit realName address;
primary = false; primary = false;
maildir.path = "iCloud"; maildir.path = "iCloud";
@ -87,20 +76,15 @@
create = "both"; create = "both";
expunge = "both"; expunge = "both";
remove = "both"; remove = "both";
patterns = [ patterns = ["*" "!Notes"];
"*"
"!Notes"
];
subFolders = "Verbatim"; subFolders = "Verbatim";
}; };
}; };
outlook = outlook = let
let
address = "evie.litherland-smith@ukaea.uk"; address = "evie.litherland-smith@ukaea.uk";
host = "127.0.0.1"; host = "127.0.0.1";
tls.enable = false; tls.enable = false;
in in {
{
inherit realName address; inherit realName address;
primary = false; primary = false;
maildir.path = "Outlook"; maildir.path = "Outlook";

View file

@ -3,19 +3,16 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{ xdg.configFile."pass-git-helper/git-pass-mapping.ini".source =
xdg.configFile."pass-git-helper/git-pass-mapping.ini".source = ./git-pass-mapping.ini; ./git-pass-mapping.ini;
programs = { programs = {
gpg.enable = true; gpg.enable = true;
password-store = { password-store = {
enable = true; enable = true;
package = pkgs.pass-nodmenu.withExtensions ( package =
exts: with exts; [ pkgs.pass-nodmenu.withExtensions
pass-update (exts: with exts; [pass-update pass-import]); # pass-audit
pass-import
]
); # pass-audit
settings = { settings = {
PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store"; PASSWORD_STORE_DIR = "${config.home.homeDirectory}/.password-store";
PASSWORD_STORE_ENABLE_EXTENSIONS = "true"; PASSWORD_STORE_ENABLE_EXTENSIONS = "true";

View file

@ -1,5 +1,8 @@
{ config, accentColourName, ... }:
{ {
config,
accentColourName,
...
}: {
programs.bottom = { programs.bottom = {
enable = true; enable = true;
settings = { settings = {
@ -10,19 +13,10 @@
enable_gpu = true; enable_gpu = true;
enable_cache_memory = true; enable_cache_memory = true;
}; };
colors = colors = let
let
sc = config.scheme.withHashtag; sc = config.scheme.withHashtag;
rainbow = with sc; [ rainbow = with sc; [red yellow green cyan blue magenta];
red in {
yellow
green
cyan
blue
magenta
];
in
{
table_header_color = sc.base05; table_header_color = sc.base05;
all_cpu_color = sc.base05; all_cpu_color = sc.base05;
avg_cpu_color = sc.base05; avg_cpu_color = sc.base05;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./bottom.nix ./bottom.nix
./fastfetch.nix ./fastfetch.nix

View file

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

View file

@ -3,17 +3,14 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
services.git-sync.enable = false; # Can't find pass for some reason... services.git-sync.enable = false; # Can't find pass for some reason...
programs.git = programs.git = let
let
package = pkgs.git.override { package = pkgs.git.override {
withLibsecret = true; withLibsecret = true;
withSsh = true; withSsh = true;
}; };
in in {
{
inherit package; inherit package;
enable = true; enable = true;
userName = "Evie Litherland-Smith"; userName = "Evie Litherland-Smith";
@ -32,17 +29,11 @@
"*.gpg filter=gpg diff=gpg" "*.gpg filter=gpg diff=gpg"
"*.asc filter=gpg diff=gpg" "*.asc filter=gpg diff=gpg"
]; ];
extraConfig = extraConfig = let
let
user = "pixelifytica"; user = "pixelifytica";
in in {
{ github = {inherit user;};
github = { gitea = {inherit user;};
inherit user;
};
gitea = {
inherit user;
};
pull.rebase = false; pull.rebase = false;
init.defaultBranch = "main"; init.defaultBranch = "main";
merge.conflictstyle = "diff3"; merge.conflictstyle = "diff3";

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: {pkgs, ...}: {
{
home.packages = with pkgs; [ home.packages = with pkgs; [
(writeShellScriptBin "ssh-keygen-defaults" ''ssh-keygen -t ed25519 -C "$(whoami)@$(hostname)"'') (writeShellScriptBin "ssh-keygen-defaults"
''ssh-keygen -t ed25519 -C "$(whoami)@$(hostname)"'')
]; ];
programs.ssh = { programs.ssh = {
enable = true; enable = true;

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
programs.starship = { programs.starship = {
enable = true; enable = true;
enableTransience = false; enableTransience = false;
@ -16,24 +15,17 @@
fish_style_pwd_dir_length = 1; fish_style_pwd_dir_length = 1;
truncate_to_repo = false; truncate_to_repo = false;
}; };
direnv = { direnv = {disabled = false;};
disabled = false;
};
git_branch = { git_branch = {
only_attached = true; only_attached = true;
ignore_branches = [ ignore_branches = ["master" "main"];
"master"
"main"
];
}; };
git_commit = { git_commit = {
format = "[ $hash | $tag]($style) "; format = "[ $hash | $tag]($style) ";
tag_symbol = " "; tag_symbol = " ";
tag_disabled = false; tag_disabled = false;
}; };
git_metrics = { git_metrics = {disabled = false;};
disabled = false;
};
git_status = { git_status = {
stashed = " "; stashed = " ";
ahead = " "; ahead = " ";
@ -52,18 +44,10 @@
ssh_only = false; ssh_only = false;
ssh_symbol = "󰢹 "; ssh_symbol = "󰢹 ";
}; };
jobs = { jobs = {symbol = "󰈏 ";};
symbol = "󰈏 "; line_break = {disabled = false;};
}; localip = {disabled = false;};
line_break = { memory_usage = {disabled = false;};
disabled = false;
};
localip = {
disabled = false;
};
memory_usage = {
disabled = false;
};
os = { os = {
disabled = false; disabled = false;
format = "on [$symbol]($style) "; format = "on [$symbol]($style) ";
@ -85,9 +69,7 @@
map_symbol = true; map_symbol = true;
pipestatus = true; pipestatus = true;
}; };
sudo = { sudo = {disabled = false;};
disabled = false;
};
}; };
}; };
} }

View file

@ -1,18 +1,13 @@
{ config, lib, ... }:
{ {
config,
lib,
...
}: {
programs.zellij = { programs.zellij = {
enable = true; enable = true;
settings = { settings = {
themes.base16 = with config.scheme.withHashtag; rec { themes.base16 = with config.scheme.withHashtag; rec {
inherit inherit red green yellow blue magenta cyan orange;
red
green
yellow
blue
magenta
cyan
orange
;
black = base00; black = base00;
bg = black; bg = black;
white = base05; white = base05;

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
programs.zsh = { programs.zsh = {
enable = true; enable = true;
enableCompletion = true; enableCompletion = true;
@ -8,10 +7,7 @@
defaultKeymap = "emacs"; defaultKeymap = "emacs";
syntaxHighlighting = { syntaxHighlighting = {
enable = true; enable = true;
highlighters = [ highlighters = ["brackets" "cursor"];
"brackets"
"cursor"
];
}; };
historySubstringSearch.enable = true; historySubstringSearch.enable = true;
history = { history = {

View file

@ -1,9 +1,6 @@
{ pkgs, ... }: {pkgs, ...}: {
{ home.packages = with pkgs;
home.packages = with kdePackages; [
with pkgs;
with kdePackages;
[
helvum helvum
kdenlive kdenlive
krita krita

View file

@ -3,8 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
imports = [./default.nix]; imports = [./default.nix];
home.packages = with pkgs; [ home.packages = with pkgs; [
twinkle twinkle

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./services/caddy.nix ./services/caddy.nix
./services/forgejo.nix ./services/forgejo.nix

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [ imports = [
./laptop.nix ./laptop.nix
./desktop/plasma.nix ./desktop/plasma.nix

View file

@ -1,12 +1,9 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [./desktop/plasma.nix]; imports = [./desktop/plasma.nix];
boot = { boot = {
loader.efi.efiSysMountPoint = "/boot/efi"; loader.efi.efiSysMountPoint = "/boot/efi";
initrd = { initrd = {
secrets = { secrets = {"/crypto_keyfile.bin" = null;};
"/crypto_keyfile.bin" = null;
};
luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb" = { luks.devices."luks-47d34268-5100-4eba-b34d-220f4239c1cb" = {
device = "/dev/disk/by-uuid/47d34268-5100-4eba-b34d-220f4239c1cb"; device = "/dev/disk/by-uuid/47d34268-5100-4eba-b34d-220f4239c1cb";
keyFile = "/crypto_keyfile.bin"; keyFile = "/crypto_keyfile.bin";
@ -17,9 +14,6 @@
etc."ppp/options".text = '' etc."ppp/options".text = ''
ipcp-accept-remote ipcp-accept-remote
''; '';
systemPackages = with pkgs; [ systemPackages = with pkgs; [openfortivpn samba];
openfortivpn
samba
];
}; };
} }

View file

@ -1,13 +1,10 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [ imports = [
./laptop.nix ./laptop.nix
./desktop/plasma.nix ./desktop/plasma.nix
]; ];
boot.initrd = { boot.initrd = {
secrets = { secrets = {"/crypto_keyfile.bin" = null;};
"/crypto_keyfile.bin" = null;
};
luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd" = { luks.devices."luks-761eeb11-3091-4142-9232-4fb33165eccd" = {
device = "/dev/disk/by-uuid/761eeb11-3091-4142-9232-4fb33165eccd"; device = "/dev/disk/by-uuid/761eeb11-3091-4142-9232-4fb33165eccd";
keyFile = "/crypto_keyfile.bin"; keyFile = "/crypto_keyfile.bin";

View file

@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: {
{
imports = [./desktop/plasma.nix]; imports = [./desktop/plasma.nix];
boot = { boot = {
initrd.kernelModules = ["amdgpu"]; initrd.kernelModules = ["amdgpu"];

View file

@ -3,18 +3,14 @@
pkgs, pkgs,
iosevkaCustom, iosevkaCustom,
... ...
}: }: {
{
nix = { nix = {
enable = true; enable = true;
settings = { settings = {
cores = 0; cores = 0;
max-jobs = "auto"; max-jobs = "auto";
trusted-users = ["root"]; trusted-users = ["root"];
experimental-features = [ experimental-features = ["nix-command" "flakes"];
"nix-command"
"flakes"
];
auto-optimise-store = true; auto-optimise-store = true;
}; };
channel.enable = true; channel.enable = true;
@ -125,10 +121,8 @@
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
console.useXkbConfig = true; console.useXkbConfig = true;
fonts = { fonts = {
packages = packages = with pkgs;
with pkgs; with iosevkaCustom.packages; [
with iosevkaCustom.packages;
[
iosevka-custom-nerdfont iosevka-custom-nerdfont
iosevka-custom-aile iosevka-custom-aile
emacs-all-the-icons-fonts # Emacs emacs-all-the-icons-fonts # Emacs

View file

@ -3,8 +3,7 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland"; nixpkgs.config.chromium.commandLineArgs = "--enable-features=UseOzonePlatform --ozone-platform=wayland";
system.autoUpgrade.operation = "boot"; system.autoUpgrade.operation = "boot";
hardware.bluetooth.enable = true; hardware.bluetooth.enable = true;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [./default.nix]; imports = [./default.nix];
environment.plasma6.excludePackages = with pkgs.kdePackages; [plasma-browser-integration]; environment.plasma6.excludePackages = with pkgs.kdePackages; [plasma-browser-integration];
services = { services = {

View file

@ -1,5 +1,8 @@
{ lib, pkgs, ... }:
{ {
lib,
pkgs,
...
}: {
imports = [./default.nix]; imports = [./default.nix];
environment = { environment = {
sessionVariables.GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim"; sessionVariables.GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim";
@ -30,9 +33,9 @@
}; };
sway = { sway = {
enable = true; enable = true;
package = pkgs.swayfx.overrideAttrs (old: { package =
passthru.providedSessions = [ "sway" ]; pkgs.swayfx.overrideAttrs
}); (old: {passthru.providedSessions = ["sway"];});
extraPackages = []; extraPackages = [];
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
xwayland.enable = true; xwayland.enable = true;
@ -51,17 +54,11 @@
}; };
greetd = { greetd = {
enable = true; enable = true;
settings = settings = let
let
command = "sway"; command = "sway";
in in {
{ initial_session = {inherit command;};
initial_session = { default_session = {inherit command;};
inherit command;
};
default_session = {
inherit command;
};
}; };
}; };
}; };

View file

@ -1,44 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/b9d4ba04-a867-4ca6-88f9-79dc6a982e94"; { device = "/dev/disk/by-uuid/b9d4ba04-a867-4ca6-88f9-79dc6a982e94";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/8F05-4C3A"; { device = "/dev/disk/by-uuid/8F05-4C3A";
fsType = "vfat"; fsType = "vfat";
options = [ options = [ "fmask=0022" "dmask=0022" ];
"fmask=0022"
"dmask=0022"
];
}; };
swapDevices = [ { device = "/dev/disk/by-uuid/a10ee1da-3b0d-4f6b-b20a-d6a32ae1f668"; } ]; swapDevices =
[ { device = "/dev/disk/by-uuid/a10ee1da-3b0d-4f6b-b20a-d6a32ae1f668"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,43 +1,34 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"rtsx_pci_sdmmc"
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/84b28760-3643-4ad8-9ff6-ff78b57067f8"; { device = "/dev/disk/by-uuid/84b28760-3643-4ad8-9ff6-ff78b57067f8";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-d1062931-ee58-4848-adf9-09452daeb6eb".device = "/dev/disk/by-uuid/d1062931-ee58-4848-adf9-09452daeb6eb"; boot.initrd.luks.devices."luks-d1062931-ee58-4848-adf9-09452daeb6eb".device = "/dev/disk/by-uuid/d1062931-ee58-4848-adf9-09452daeb6eb";
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/ABE3-88E7"; { device = "/dev/disk/by-uuid/ABE3-88E7";
fsType = "vfat"; fsType = "vfat";
options = [ options = [ "fmask=0022" "dmask=0022" ];
"fmask=0022"
"dmask=0022"
];
}; };
swapDevices = [ { device = "/dev/disk/by-uuid/ba43345c-a652-497f-84d0-86064805446b"; } ]; swapDevices =
[ { device = "/dev/disk/by-uuid/ba43345c-a652-497f-84d0-86064805446b"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,24 +1,13 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules =
"xhci_pci" [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
@ -28,14 +17,16 @@
fsType = "ext4"; 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" = { fileSystems."/boot/efi" = {
device = "/dev/disk/by-uuid/6009-89FC"; device = "/dev/disk/by-uuid/6009-89FC";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ { device = "/dev/disk/by-uuid/ff9627a7-820c-4628-a040-2b665688b893"; } ]; swapDevices =
[{ device = "/dev/disk/by-uuid/ff9627a7-820c-4628-a040-2b665688b893"; }];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
@ -46,5 +37,6 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,44 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
boot.initrd.availableKernelModules = [
"xhci_pci"
"thunderbolt"
"vmd"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
"rtsx_pci_sdmmc"
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "vmd" "nvme" "usbhid" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/44c11386-0af8-4954-93bc-963a8e071672"; { device = "/dev/disk/by-uuid/44c11386-0af8-4954-93bc-963a8e071672";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-bf1eab3a-6d92-430d-a282-8dd4c9efe2c7".device = "/dev/disk/by-uuid/bf1eab3a-6d92-430d-a282-8dd4c9efe2c7"; boot.initrd.luks.devices."luks-bf1eab3a-6d92-430d-a282-8dd4c9efe2c7".device = "/dev/disk/by-uuid/bf1eab3a-6d92-430d-a282-8dd4c9efe2c7";
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/85D5-B6EC"; { device = "/dev/disk/by-uuid/85D5-B6EC";
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [ { device = "/dev/disk/by-uuid/e65e5e4d-2084-4e6b-9255-3b36cba1529f"; } ]; swapDevices =
[ { device = "/dev/disk/by-uuid/e65e5e4d-2084-4e6b-9255-3b36cba1529f"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,51 +1,39 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"sd_mod"
"sr_mod"
]; ];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ]; boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/379a999a-0753-4cbf-b868-e275902f0f73"; { device = "/dev/disk/by-uuid/379a999a-0753-4cbf-b868-e275902f0f73";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-0d50df5f-9456-4296-9156-f5b818e11552".device = "/dev/disk/by-uuid/0d50df5f-9456-4296-9156-f5b818e11552"; boot.initrd.luks.devices."luks-0d50df5f-9456-4296-9156-f5b818e11552".device = "/dev/disk/by-uuid/0d50df5f-9456-4296-9156-f5b818e11552";
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/3297-A70D"; { device = "/dev/disk/by-uuid/3297-A70D";
fsType = "vfat"; fsType = "vfat";
options = [ options = [ "fmask=0022" "dmask=0022" ];
"fmask=0022"
"dmask=0022"
];
}; };
fileSystems."/mnt/secondary" = { fileSystems."/mnt/secondary" =
device = "/dev/disk/by-uuid/036f1fcb-0674-4ae5-a2fe-cb4f7ada001d"; { device = "/dev/disk/by-uuid/036f1fcb-0674-4ae5-a2fe-cb4f7ada001d";
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = [ { device = "/dev/disk/by-uuid/26a8690a-70f9-4701-b224-b212f76a7035"; } ]; swapDevices =
[ { device = "/dev/disk/by-uuid/26a8690a-70f9-4701-b224-b212f76a7035"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [./desktop/default.nix]; imports = [./desktop/default.nix];
powerManagement.enable = true; powerManagement.enable = true;
services.auto-cpufreq = { services.auto-cpufreq = {

View file

@ -3,22 +3,15 @@
lib, lib,
pkgs, pkgs,
... ...
}: }: {
{
services.adguardhome = { services.adguardhome = {
enable = true; enable = true;
mutableSettings = false; mutableSettings = false;
settings = rec { settings = rec {
http.address = "0.0.0.0:3200"; http.address = "0.0.0.0:3200";
dns = { dns = {
bind_hosts = [ bind_hosts = ["127.0.0.1" "192.168.1.230"];
"127.0.0.1" bootstrap_dns = ["9.9.9.9" "149.112.112.10"];
"192.168.1.230"
];
bootstrap_dns = [
"9.9.9.9"
"149.112.112.10"
];
ratelimit = 0; ratelimit = 0;
safe_search.enabled = true; safe_search.enabled = true;
rewrites = [ rewrites = [
@ -33,17 +26,13 @@
]; ];
blocked_services.ids = []; blocked_services.ids = [];
}; };
filtering = { filtering = {inherit (dns) safe_search rewrites blocked_services;};
inherit (dns) safe_search rewrites blocked_services;
};
querylog.ignored = [ querylog.ignored = [
"discovery.syncthing.net" "discovery.syncthing.net"
"discovery-v6.syncthing.net" "discovery-v6.syncthing.net"
"matrix.tchncs.de" "matrix.tchncs.de"
]; ];
statistics = { statistics = {inherit (querylog) ignored;};
inherit (querylog) ignored;
};
}; };
openFirewall = true; openFirewall = true;
}; };

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment.systemPackages = with pkgs; [steamcmd]; environment.systemPackages = with pkgs; [steamcmd];
networking.firewall.allowedTCPPorts = [8777]; networking.firewall.allowedTCPPorts = [8777];
services.caddy.virtualHosts."astro.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8777"; services.caddy.virtualHosts."astro.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8777";

View file

@ -1,9 +1,5 @@
{ ... }: {...}: {
{ networking.firewall.allowedTCPPorts = [80 443];
networking.firewall.allowedTCPPorts = [
80
443
];
services.caddy = { services.caddy = {
enable = true; enable = true;
email = "evie@xenia.me.uk"; email = "evie@xenia.me.uk";
@ -18,13 +14,7 @@
}; };
services.fail2ban = { services.fail2ban = {
enable = true; enable = true;
ignoreIP = [ ignoreIP = ["127.0.0.1/8" "::1" "192.168.1.0/16"];
"127.0.0.1/8" bantime-increment = {enable = true;};
"::1"
"192.168.1.0/16"
];
bantime-increment = {
enable = true;
};
}; };
} }

View file

@ -1,5 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
imports = [./caddy.nix]; imports = [./caddy.nix];
services = { services = {
forgejo = { forgejo = {
@ -12,15 +15,9 @@
HTTP_PORT = 3100; HTTP_PORT = 3100;
DISABLE_SSH = true; DISABLE_SSH = true;
}; };
ui = { ui = {DEFAULT_THEME = "forgejo-auto";};
DEFAULT_THEME = "forgejo-auto"; admin = {DISABLE_REGULAR_ORG_CREATION = true;};
}; service = {DISABLE_REGISTRATION = true;};
admin = {
DISABLE_REGULAR_ORG_CREATION = true;
};
service = {
DISABLE_REGISTRATION = true;
};
}; };
}; };
# gitea-actions-runner = { # gitea-actions-runner = {

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [./caddy.nix]; imports = [./caddy.nix];
services.gitea = { services.gitea = {
enable = true; enable = true;

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [./caddy.nix]; imports = [./caddy.nix];
services.grafana = { services.grafana = {
enable = true; enable = true;

View file

@ -1,12 +1,8 @@
{ config, ... }: {config, ...}: {
{
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";
containers.homeassistant = { containers.homeassistant = {
volumes = [ volumes = ["home-assistant:/config" "/run/dbus:/run/dbus:ro"];
"home-assistant:/config"
"/run/dbus:/run/dbus:ro"
];
environment.TZ = config.time.timeZone; environment.TZ = config.time.timeZone;
image = "ghcr.io/home-assistant/home-assistant:2024.8.0.dev202407210221"; image = "ghcr.io/home-assistant/home-assistant:2024.8.0.dev202407210221";
extraOptions = ["--network=host"]; extraOptions = ["--network=host"];

View file

@ -1,9 +1,7 @@
{ ... }: {...}: let
let
baseUrl = "xenia.me.uk"; baseUrl = "xenia.me.uk";
port = 8008; port = 8008;
in in {
{
imports = [./caddy.nix]; imports = [./caddy.nix];
services = { services = {
matrix-synapse = { matrix-synapse = {
@ -14,19 +12,13 @@ in
listeners = [ listeners = [
{ {
inherit port; inherit port;
bind_addresses = [ bind_addresses = ["127.0.0.1" "::1"];
"127.0.0.1"
"::1"
];
type = "http"; type = "http";
tls = false; tls = false;
x_forwarded = true; x_forwarded = true;
resources = [ resources = [
{ {
names = [ names = ["client" "federation"];
"client"
"federation"
];
compress = true; compress = true;
} }
]; ];

View file

@ -1,19 +1,18 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
nixpkgs.overlays = [ nixpkgs.overlays = [
# Fetch papermc v1.21 from unstable branch of nixpkgs # Fetch papermc v1.21 from unstable branch of nixpkgs
( (final: prev: let
final: prev:
let
pinnedPkgs = import (builtins.fetchTarball { pinnedPkgs = import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/03a94c776f261b78b95de0971a94dea0199b4cd8.tar.gz"; url = "https://github.com/NixOS/nixpkgs/archive/03a94c776f261b78b95de0971a94dea0199b4cd8.tar.gz";
sha256 = "0vngf4g468qd5fqch85nzyvn7bpa6p2i6rdmzc6ws2653x868w3g"; sha256 = "0vngf4g468qd5fqch85nzyvn7bpa6p2i6rdmzc6ws2653x868w3g";
}) {inherit (pkgs) system;}; }) {inherit (pkgs) system;};
in in {
{
inherit (pinnedPkgs) papermc papermcServers; inherit (pinnedPkgs) papermc papermcServers;
} })
)
]; ];
services.minecraft-server = { services.minecraft-server = {
enable = true; enable = true;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
imports = [./caddy.nix]; imports = [./caddy.nix];
environment.systemPackages = with pkgs; [ffmpeg]; environment.systemPackages = with pkgs; [ffmpeg];
services = { services = {

View file

@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: {
{
imports = [./caddy.nix]; imports = [./caddy.nix];
services.nix-serve = { services.nix-serve = {
enable = true; enable = true;

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
imports = [./caddy.nix]; imports = [./caddy.nix];
services.ntfy-sh = { services.ntfy-sh = {
enable = true; enable = true;

View file

@ -1,5 +1,4 @@
{ config, ... }: {config, ...}: {
{
imports = [./caddy.nix]; imports = [./caddy.nix];
services.owncast = { services.owncast = {
enable = true; enable = true;

View file

@ -1,8 +1,6 @@
{ ... }: {...}: let
let
port = "5232"; port = "5232";
in in {
{
services.radicale = { services.radicale = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
services.openssh = { services.openssh = {
enable = true; enable = true;
ports = [22]; ports = [22];

View file

@ -1,13 +1,6 @@
{ ... }: {...}: let
let devices = ["Ion" "Legion" "Northstar" "Vanguard"];
devices = [ in {
"Ion"
"Legion"
"Northstar"
"Vanguard"
];
in
{
imports = [./caddy.nix]; imports = [./caddy.nix];
services.syncthing = { services.syncthing = {
enable = true; enable = true;

View file

@ -1,5 +1,4 @@
{ pkgs, ... }: {pkgs, ...}: {
{
environment.systemPackages = with pkgs; [tmux]; environment.systemPackages = with pkgs; [tmux];
services.terraria = { services.terraria = {
enable = true; enable = true;

View file

@ -1,5 +1,4 @@
{ ... }: {...}: {
{
services.znc = { services.znc = {
enable = true; enable = true;
mutable = false; mutable = false;
@ -7,9 +6,7 @@
openFirewall = true; openFirewall = true;
config = { config = {
LoadModule = ["adminlog"]; LoadModule = ["adminlog"];
Listener.l = { Listener.l = {Port = 6697;};
Port = 6697;
};
User.pixelifytica = { User.pixelifytica = {
Admin = true; Admin = true;
Pass.password = { Pass.password = {