Reformat all files using nixfmt

This commit is contained in:
Evie Litherland-Smith 2024-07-30 15:06:34 +01:00
parent 3e357cbe95
commit 6a6d53cff5
83 changed files with 2092 additions and 1700 deletions

336
flake.nix
View file

@ -2,8 +2,8 @@
description = "Evie's machine configurations"; description = "Evie's machine configurations";
nixConfig = { nixConfig = {
extra-substituters = ["https://nix.xenia.me.uk"]; extra-substituters = [ "https://nix.xenia.me.uk" ];
extra-trusted-public-keys = ["nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI="]; extra-trusted-public-keys = [ "nix.xenia.me.uk:tlgwOaG5KMLjQUk2YaErS8mAG69ZCr3PaHXZYi+Y5eI=" ];
}; };
inputs = { inputs = {
@ -27,158 +27,194 @@
}; };
}; };
outputs = { outputs =
nixpkgs, {
home-manager, nixpkgs,
plasma-manager, home-manager,
iosevka-custom, plasma-manager,
base16, iosevka-custom,
tt-schemes, base16,
... tt-schemes,
} @ inputs: let
defaultSpecialArgs = {system ? "x86_64-linux", ...}: {
inherit inputs;
iosevkaCustom = {
packages = iosevka-custom.outputs.packages.${system};
names = iosevka-custom.outputs.names;
};
};
defaultExtraSpecialArgs = {system}: let
iosevkaCustom = {
packages = iosevka-custom.outputs.packages.${system};
names = iosevka-custom.outputs.names;
};
in {
inherit inputs iosevkaCustom;
inherit (plasma-manager.packages.${system}) rc2nix;
accentColourName = "base0E";
fonts = with iosevkaCustom; rec {
sizes = {
applications = 12;
desktop = 10;
popups = 14;
terminal = 12;
};
serif = sansSerif;
sansSerif = {
name = names.iosevka-custom-aile;
package = packages.iosevka-custom-aile;
};
monospace = {
name = names.iosevka-custom-nerdfont;
package = packages.iosevka-custom-nerdfont;
};
};
};
defaultModules = {
system ? "x86_64-linux",
username ? "pixelifytica",
hostName ? "Atlas",
loginShell ? "bash",
... ...
}: [ }@inputs:
home-manager.nixosModules.home-manager let
./system/default.nix defaultSpecialArgs =
./system/${hostName}.nix {
./system/hardware-configuration/${hostName}.nix system ? "x86_64-linux",
({ ...
config, }:
lib, {
pkgs, inherit inputs;
... iosevkaCustom = {
}: { packages = iosevka-custom.outputs.packages.${system};
networking = {inherit hostName;}; names = iosevka-custom.outputs.names;
nix.settings.trusted-users = [username];
services.greetd.settings.initial_session.user = username;
programs.${loginShell} = lib.mkIf (loginShell != "bash") {enable = true;};
users.users.${username} = {
shell = pkgs.${loginShell};
group = "users";
isNormalUser = true;
description = "Evie Litherland-Smith";
extraGroups = ["networkmanager" "wheel" "video" "input" "uinput" "dialout"];
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
openssh = {inherit (config.users.users.root.openssh) authorizedKeys;};
};
home-manager = {
extraSpecialArgs = defaultExtraSpecialArgs {inherit system;};
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.${username} = {
imports = [
base16.homeManagerModule
{scheme = "${tt-schemes}/base16/one-light.yaml";}
./home/${hostName}.nix
];
home = {
inherit username;
homeDirectory = "/home/${username}";
stateVersion = "23.05";
};
programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true;
}; };
}; };
}) defaultExtraSpecialArgs =
]; { system }:
in { let
devShells.x86_64-linux.default = let iosevkaCustom = {
pkgs = import nixpkgs {system = "x86_64-linux";}; packages = iosevka-custom.outputs.packages.${system};
names = iosevka-custom.outputs.names;
};
in
{
inherit inputs iosevkaCustom;
inherit (plasma-manager.packages.${system}) rc2nix;
accentColourName = "base0E";
fonts = with iosevkaCustom; rec {
sizes = {
applications = 12;
desktop = 10;
popups = 14;
terminal = 12;
};
serif = sansSerif;
sansSerif = {
name = names.iosevka-custom-aile;
package = packages.iosevka-custom-aile;
};
monospace = {
name = names.iosevka-custom-nerdfont;
package = packages.iosevka-custom-nerdfont;
};
};
};
defaultModules =
{
system ? "x86_64-linux",
username ? "pixelifytica",
hostName ? "Atlas",
loginShell ? "bash",
...
}:
[
home-manager.nixosModules.home-manager
./system/default.nix
./system/${hostName}.nix
./system/hardware-configuration/${hostName}.nix
(
{
config,
lib,
pkgs,
...
}:
{
networking = {
inherit hostName;
};
nix.settings.trusted-users = [ username ];
services.greetd.settings.initial_session.user = username;
programs.${loginShell} = lib.mkIf (loginShell != "bash") { enable = true; };
users.users.${username} = {
shell = pkgs.${loginShell};
group = "users";
isNormalUser = true;
description = "Evie Litherland-Smith";
extraGroups = [
"networkmanager"
"wheel"
"video"
"input"
"uinput"
"dialout"
];
initialHashedPassword = "$y$j9T$tHIPQt09Kf3KH2eIRze3g/$2mwSlcq27DTGvHNPJ5EP9/1CfL3bXP0F6oS/Vuffmn3";
openssh = {
inherit (config.users.users.root.openssh) authorizedKeys;
};
};
home-manager = {
extraSpecialArgs = defaultExtraSpecialArgs { inherit system; };
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.${username} = {
imports = [
base16.homeManagerModule
{ scheme = "${tt-schemes}/base16/one-light.yaml"; }
./home/${hostName}.nix
];
home = {
inherit username;
homeDirectory = "/home/${username}";
stateVersion = "23.05";
};
programs.home-manager.enable = true;
nixpkgs.config.allowUnfree = true;
};
};
}
)
];
in in
pkgs.mkShellNoCC { {
packages = with pkgs; [nil pre-commit]; devShells.x86_64-linux.default =
shellHook = "pre-commit install --install-hooks"; let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
pkgs.mkShellNoCC {
packages = with pkgs; [
nil
pre-commit
];
shellHook = "pre-commit install --install-hooks";
};
nixosConfigurations = {
## Server
Legion =
let
system = "x86_64-linux";
username = "pixelifytica";
hostName = "Legion";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs { inherit system; };
modules = defaultModules { inherit system username hostName; };
};
## Personal
Northstar =
let
system = "x86_64-linux";
username = "pixelifytica";
hostName = "Northstar";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs { inherit system; };
modules = defaultModules { inherit system username hostName; };
};
Vanguard =
let
system = "x86_64-linux";
username = "pixelifytica";
hostName = "Vanguard";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs { inherit system; };
modules = defaultModules { inherit system username hostName; };
};
## Work
Tone =
let
system = "x86_64-linux";
username = "elitherl";
hostName = "Tone";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs { inherit system; };
modules = defaultModules { inherit system username hostName; };
};
Scorch =
let
system = "x86_64-linux";
username = "elitherl";
hostName = "Scorch";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs { inherit system; };
modules = defaultModules { inherit system username hostName; };
};
}; };
nixosConfigurations = {
## Server
Legion = let
system = "x86_64-linux";
username = "pixelifytica";
hostName = "Legion";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {inherit system username hostName;};
};
## Personal
Northstar = let
system = "x86_64-linux";
username = "pixelifytica";
hostName = "Northstar";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {inherit system username hostName;};
};
Vanguard = let
system = "x86_64-linux";
username = "pixelifytica";
hostName = "Vanguard";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {inherit system username hostName;};
};
## Work
Tone = let
system = "x86_64-linux";
username = "elitherl";
hostName = "Tone";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {inherit system username hostName;};
};
Scorch = let
system = "x86_64-linux";
username = "elitherl";
hostName = "Scorch";
in
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs {inherit system;};
modules = defaultModules {inherit system username hostName;};
};
}; };
};
} }

View file

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

View file

@ -3,12 +3,13 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
{
imports = [ imports = [
./personal.nix ./personal.nix
./desktop/plasma/default.nix ./desktop/plasma/default.nix
]; ];
home.packages = with pkgs; [prusa-slicer]; home.packages = with pkgs; [ prusa-slicer ];
programs.plasma = lib.mkIf config.programs.plasma.enable { programs.plasma = lib.mkIf config.programs.plasma.enable {
configFile.kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true; configFile.kcminputrc."Libinput/1739/52759/SYNA32AA:00 06CB:CE17 Touchpad".NaturalScroll = true;
}; };

View file

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

View file

@ -1,8 +1,5 @@
{ config, lib, ... }:
{ {
config,
lib,
...
}: {
imports = [ imports = [
./work.nix ./work.nix
./desktop/plasma/default.nix ./desktop/plasma/default.nix
@ -25,30 +22,35 @@
}; };
services.kanshi = lib.mkIf config.wayland.windowManager.sway.enable { services.kanshi = lib.mkIf config.wayland.windowManager.sway.enable {
enable = true; enable = true;
settings = let settings =
laptopScreen = { let
criteria = "eDP-1"; laptopScreen = {
scale = 1.25; criteria = "eDP-1";
position = "2560,576"; scale = 1.25;
}; position = "2560,576";
monitor = {
criteria = "Dell Inc. DELL P3223QE CCG8YN3";
scale = 1.5;
position = "0,0";
};
in [
{
profile = {
name = "undocked";
outputs = [laptopScreen];
}; };
} monitor = {
{ criteria = "Dell Inc. DELL P3223QE CCG8YN3";
profile = { scale = 1.5;
name = "docked"; position = "0,0";
outputs = [laptopScreen monitor];
}; };
} in
]; [
{
profile = {
name = "undocked";
outputs = [ laptopScreen ];
};
}
{
profile = {
name = "docked";
outputs = [
laptopScreen
monitor
];
};
}
];
}; };
} }

View file

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

View file

@ -1,8 +1,5 @@
{ config, fonts, ... }:
{ {
config,
fonts,
...
}: {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = { settings = {
@ -23,47 +20,54 @@
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 = let colors =
mapColours = isBright: (builtins.listToAttrs (builtins.map (col: { let
# Alacritty uses Yellow instead of Orange for BASE09 mapColours =
name = isBright:
if col == "orange" (builtins.listToAttrs (
then "yellow" builtins.map
else col; (col: {
value = "0x${config # Alacritty uses Yellow instead of Orange for BASE09
.scheme name = if col == "orange" then "yellow" else col;
.${ value = "0x${config.scheme.${if isBright then "bright-${col}" else col}}";
if isBright })
then "bright-${col}" [
else col "red"
}}"; "orange"
}) "green"
["red" "orange" "green" "cyan" "blue" "magenta"])); "cyan"
mapNamedColours = mapColours false; "blue"
mapNamedBrightColours = mapColours true; "magenta"
in { ]
draw_bold_text_with_bright_colors = false; ));
primary = with config.scheme; { mapNamedColours = mapColours false;
background = "0x${base00}"; mapNamedBrightColours = mapColours true;
foreground = "0x${base05}"; in
{
draw_bold_text_with_bright_colors = false;
primary = with config.scheme; {
background = "0x${base00}";
foreground = "0x${base05}";
};
cursor = with config.scheme; {
cursor = "0x${base05}";
text = "0x${base00}";
};
normal =
with config.scheme;
{
black = "0x${base00-hex}";
white = "0x${base05-hex}";
}
// mapNamedColours;
bright =
with config.scheme;
{
black = "0x${base03-hex}";
white = "0x${base07-hex}";
}
// mapNamedBrightColours;
}; };
cursor = with config.scheme; {
cursor = "0x${base05}";
text = "0x${base00}";
};
normal = with config.scheme;
{
black = "0x${base00-hex}";
white = "0x${base05-hex}";
}
// mapNamedColours;
bright = with config.scheme;
{
black = "0x${base03-hex}";
white = "0x${base07-hex}";
}
// mapNamedBrightColours;
};
}; };
}; };
} }

View file

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

View file

@ -1,8 +1,9 @@
{pkgs, ...}: { { pkgs, ... }:
{
programs = { programs = {
browserpass = { browserpass = {
enable = true; enable = true;
browsers = ["firefox"]; browsers = [ "firefox" ];
}; };
firefox = { firefox = {
enable = true; enable = true;
@ -75,15 +76,21 @@
NoDefaultBookmarks = false; NoDefaultBookmarks = false;
OfferToSaveLogins = false; OfferToSaveLogins = false;
PasswordManagerEnabled = false; PasswordManagerEnabled = false;
PDFjs = {Enabled = false;}; PDFjs = {
Enabled = false;
};
Permissions = { Permissions = {
Autoplay = { Autoplay = {
Default = "block-audio-video"; Default = "block-audio-video";
}; };
}; };
PictureInPicture = {Enabled = true;}; PictureInPicture = {
PopupBlocking = {Default = true;}; Enabled = true;
RequestedLocales = ["en-GB"]; };
PopupBlocking = {
Default = true;
};
RequestedLocales = [ "en-GB" ];
SearchBar = "unified"; SearchBar = "unified";
ShowHomeButton = true; ShowHomeButton = true;
StartDownloadsInTempDirectory = true; StartDownloadsInTempDirectory = true;
@ -131,37 +138,60 @@
default = "DuckDuckGo"; default = "DuckDuckGo";
privateDefault = default; privateDefault = default;
force = true; force = true;
order = ["DuckDuckGo" "Atlas SearXNG"]; order = [
"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}"; } ];
definedAliases = ["@atlas"]; definedAliases = [ "@atlas" ];
}; };
"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 = ["@nix" "@nixos" "@nixoswiki"]; definedAliases = [
"@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 = ["@aw" "@arch" "@archwiki"]; definedAliases = [
"@aw"
"@arch"
"@archwiki"
];
}; };
"GitHub" = { "GitHub" = {
urls = [{template = "https://github.com/search?q={searchTerms}";}]; urls = [ { template = "https://github.com/search?q={searchTerms}"; } ];
definedAliases = ["@gh" "@git" "@github"]; definedAliases = [
"@gh"
"@git"
"@github"
];
}; };
"FlatHub" = { "FlatHub" = {
url = [{template = "https://flathub.org/apps/search?q={searchTerms}";}]; url = [ { template = "https://flathub.org/apps/search?q={searchTerms}"; } ];
definedAliases = ["@flat" "@fthub" "@flathub"]; definedAliases = [
"@flat"
"@fthub"
"@flathub"
];
}; };
"NixOS Packages" = { "NixOS Packages" = {
urls = [{template = "http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";}]; urls = [
{
template = "http://search.nixos.org/packages?channel=unstable&size=50&sort=relevance&type=packages&query={searchTerms}";
}
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = ["@nixpkgs"]; definedAliases = [ "@nixpkgs" ];
}; };
"PyPI packages" = { "PyPI packages" = {
urls = [{template = "https://pypi.org/search/?q={searchTerms}";}]; urls = [ { template = "https://pypi.org/search/?q={searchTerms}"; } ];
definedAliases = ["@pypi"]; definedAliases = [ "@pypi" ];
}; };
}; };
}; };

View file

@ -1,9 +1,10 @@
{...}: { { ... }:
{
programs = { programs = {
browserpass.browsers = ["librewolf"]; browserpass.browsers = [ "librewolf" ];
librewolf = { librewolf = {
enable = true; enable = true;
settings = {}; settings = { };
}; };
}; };
} }

View file

@ -4,62 +4,69 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: { }:
home.packages = [pkgs.nyxt]; {
home.packages = [ pkgs.nyxt ];
xdg = { xdg = {
configFile = { configFile = {
"nyxt/config.lisp".text = let "nyxt/config.lisp".text =
sc = config.scheme.withHashtag; let
in '' sc = config.scheme.withHashtag;
;; Import custom configuration in
(nyxt::load-lisp "${./config.lisp}") ''
;; Define custom theme ;; Import custom configuration
(define-configuration browser (nyxt::load-lisp "${./config.lisp}")
((theme (make-instance 'theme:theme ;; Define custom theme
:dark-p t (define-configuration browser
:font-family "${fonts.sansSerif.name}" ((theme (make-instance 'theme:theme
:monospace-font-family "${fonts.monospace.name}" :dark-p t
:background-color "${sc.base00}" :font-family "${fonts.sansSerif.name}"
:on-background-color "${sc.base05}" :monospace-font-family "${fonts.monospace.name}"
:primary-color "${sc.base02}" :background-color "${sc.base00}"
:on-primary-color "${sc.base05}" :on-background-color "${sc.base05}"
:secondary-color "${sc.base03}" :primary-color "${sc.base02}"
:on-secondary-color "${sc.base05}" :on-primary-color "${sc.base05}"
:accent-color "${sc.${accentColourName}}" :secondary-color "${sc.base03}"
:on-accent-color "${sc.base01}" :on-secondary-color "${sc.base05}"
:action-color "${sc.cyan}" :accent-color "${sc.${accentColourName}}"
:on-action-color "${sc.base01}" :on-accent-color "${sc.base01}"
:success-color "${sc.green}" :action-color "${sc.cyan}"
:on-success-color "${sc.base01}" :on-action-color "${sc.base01}"
:highlight-color "${sc.magenta}" :success-color "${sc.green}"
:on-highlight-color "${sc.base01}" :on-success-color "${sc.base01}"
:warning-color "${sc.yellow}" :highlight-color "${sc.magenta}"
:on-warning-color "${sc.base01}" :on-highlight-color "${sc.base01}"
:codeblock-color "${sc.base02}" :warning-color "${sc.yellow}"
:on-codeblock-color "${sc.base05}")))) :on-warning-color "${sc.base01}"
''; :codeblock-color "${sc.base02}"
:on-codeblock-color "${sc.base05}"))))
'';
}; };
dataFile."nyxt/bookmarks.lisp".text = let dataFile."nyxt/bookmarks.lisp".text =
# Make a string of lisp-style list of strings, from nix-style let
# list # Make a string of lisp-style list of strings, from nix-style
convertTags = tags: "(" + (builtins.foldl' (x: y: x + " \"" + y + "\"") "" tags) + " )"; # list
# Take bookmarks as returned from JSON file and convert to NYXT convertTags = tags: "(" + (builtins.foldl' (x: y: x + " \"" + y + "\"") "" tags) + " )";
# expected format # Take bookmarks as returned from JSON file and convert to NYXT
convertBookmark = { # expected format
name, convertBookmark =
tags, {
url, name,
}: "(:url \"${url}\" :title \"${name}\" :tags ${convertTags tags})\n"; tags,
in ( url,
# Fold all entries in bookmarks.json into single string of NYXT }:
# format bookmarks, each entry on a new line and with 2 space "(:url \"${url}\" :title \"${name}\" :tags ${convertTags tags})\n";
# indentation, just for visual clarity if reading the outputted in
# file (
"(\n" # Fold all entries in bookmarks.json into single string of NYXT
+ (builtins.foldl' # format bookmarks, each entry on a new line and with 2 space
(x: y: x + " " + convertBookmark y) "" # indentation, just for visual clarity if reading the outputted
(builtins.fromJSON (builtins.readFile ./bookmarks.json))) # file
+ ")" "(\n"
); + (builtins.foldl' (x: y: x + " " + convertBookmark y) "" (
builtins.fromJSON (builtins.readFile ./bookmarks.json)
))
+ ")"
);
}; };
} }

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
imports = [ imports = [
# Programs # Programs
./desktop/default.nix ./desktop/default.nix
@ -28,7 +29,7 @@
followSystemTheme = true; followSystemTheme = true;
notificationMethod = "electron"; notificationMethod = "electron";
optInTeamsV2 = true; optInTeamsV2 = true;
spellCheckerLanguages = ["en_GB"]; spellCheckerLanguages = [ "en_GB" ];
}; };
}; };
} }

View file

@ -1,8 +1,6 @@
{ { scheme, accentColourName }:
scheme, with scheme.withHashtag;
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,41 +1,39 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
home = { home = {
pointerCursor = let pointerCursor =
name = let
if config.scheme.variant == "light" name = if config.scheme.variant == "light" then "volantes_cursors" else "volantes_light_cursors";
then "volantes_cursors" in
else "volantes_light_cursors"; {
in { inherit name;
inherit name; package = pkgs.volantes-cursors;
package = pkgs.volantes-cursors; size = 32;
size = 32; gtk.enable = config.gtk.enable;
gtk.enable = config.gtk.enable; x11 = {
x11 = { enable = true;
enable = true; defaultCursor = name;
defaultCursor = name; };
}; };
};
}; };
services.syncthing.enable = true; services.syncthing.enable = true;
programs.mpv.enable = true; programs.mpv.enable = true;
xdg = { xdg = {
mime.enable = true; mime.enable = true;
mimeApps = let mimeApps =
defaultApplications = import ./mimeapps.nix; let
in { defaultApplications = import ./mimeapps.nix;
enable = true; in
inherit defaultApplications; {
associations = { enable = true;
added = defaultApplications; inherit defaultApplications;
removed = { associations = {
"x-scheme-handler/zoomus" = config.xdg.mimeApps.defaultApplications."x-scheme-handler/http"; added = defaultApplications;
removed = {
"x-scheme-handler/zoomus" = config.xdg.mimeApps.defaultApplications."x-scheme-handler/http";
};
}; };
}; };
};
userDirs = { userDirs = {
enable = true; enable = true;
createDirectories = true; createDirectories = true;

View file

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

View file

@ -1,13 +1,21 @@
let let
emacs = ["emacsclient.desktop" "emacs.desktop"]; emacs = [
browser = ["firefox.desktop" "librewolf.desktop" "nyxt.desktop"]; "emacsclient.desktop"
in { "emacs.desktop"
"inode/directory" = ["thunar.desktop"]; ];
"inode/symlink" = ["thunar.desktop"]; browser = [
"firefox.desktop"
"librewolf.desktop"
"nyxt.desktop"
];
in
{
"inode/directory" = [ "thunar.desktop" ];
"inode/symlink" = [ "thunar.desktop" ];
"image/jpeg" = ["swayimg.desktop"]; "image/jpeg" = [ "swayimg.desktop" ];
"image/png" = ["swayimg.desktop"]; "image/png" = [ "swayimg.desktop" ];
"video/mp4" = ["mpv.desktop"]; "video/mp4" = [ "mpv.desktop" ];
"text/plain" = emacs; "text/plain" = emacs;
"text/richtext" = emacs; "text/richtext" = emacs;
@ -44,10 +52,10 @@ in {
"application/x-docbook+xml" = emacs; "application/x-docbook+xml" = emacs;
"application/x-yaml" = emacs; "application/x-yaml" = emacs;
"application/pdf" = ["evince.desktop"]; "application/pdf" = [ "evince.desktop" ];
"application/epub+zip" = ["evince.desktop"]; "application/epub+zip" = [ "evince.desktop" ];
"application/msword" = ["writer.desktop"]; "application/msword" = [ "writer.desktop" ];
"application/zip" = ["xarchiver.desktop"]; "application/zip" = [ "xarchiver.desktop" ];
"application/x-extension-htm" = browser; "application/x-extension-htm" = browser;
"application/x-extension-html" = browser; "application/x-extension-html" = browser;
@ -55,23 +63,23 @@ in {
"application/x-extension-xhtml" = browser; "application/x-extension-xhtml" = browser;
"application/x-extension-xht" = browser; "application/x-extension-xht" = browser;
"application/x-mozilla-bookmarks" = browser; "application/x-mozilla-bookmarks" = browser;
"application/x-zoom" = ["Zoom.desktop"] ++ browser; "application/x-zoom" = [ "Zoom.desktop" ] ++ browser;
"x-scheme-handler/http" = browser; "x-scheme-handler/http" = browser;
"x-scheme-handler/https" = browser; "x-scheme-handler/https" = browser;
"x-scheme-handler/about" = browser; "x-scheme-handler/about" = browser;
"x-scheme-handler/chrome" = browser; "x-scheme-handler/chrome" = browser;
"x-scheme-handler/webcal" = browser; "x-scheme-handler/webcal" = browser;
"x-scheme-handler/geo" = ["openstreetmap-geo-handler.desktop"]; "x-scheme-handler/geo" = [ "openstreetmap-geo-handler.desktop" ];
"x-scheme-handler/mailto" = ["emacsclient-mail.desktop"]; "x-scheme-handler/mailto" = [ "emacsclient-mail.desktop" ];
"x-scheme-handler/unknown" = emacs; "x-scheme-handler/unknown" = emacs;
"x-scheme-handler/prusaslicer" = ["PrusaSlicerURLProtocol.desktop"]; "x-scheme-handler/prusaslicer" = [ "PrusaSlicerURLProtocol.desktop" ];
"x-scheme-handler/ms-word" = ["writer.desktop"]; "x-scheme-handler/ms-word" = [ "writer.desktop" ];
"x-scheme-handler/ms-powerpoint" = ["impress.desktop"]; "x-scheme-handler/ms-powerpoint" = [ "impress.desktop" ];
"x-scheme-handler/ms-excel" = ["calc.desktop"]; "x-scheme-handler/ms-excel" = [ "calc.desktop" ];
"x-scheme-handler/msteams" = ["teams-for-linux.desktop"] ++ browser; "x-scheme-handler/msteams" = [ "teams-for-linux.desktop" ] ++ browser;
"x-scheme-handler/zoomus" = browser; "x-scheme-handler/zoomus" = browser;
"x-scheme-handler/zoommtg" = browser; "x-scheme-handler/zoommtg" = browser;
} }

View file

@ -7,59 +7,64 @@
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 = with pkgs; [ home.packages = [
rc2nix rc2nix
wl-clipboard pkgs.wl-clipboard
(papirus-icon-theme.override {color = "violet";}) (pkgs.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 = let workspace =
toCapital = import ../lib/to_capital.nix lib; let
in { toCapital = import ../lib/to_capital.nix lib;
clickItemTo = "open"; in
theme = "default"; {
colorScheme = "Breeze${toCapital config.scheme.variant}"; clickItemTo = "open";
iconTheme = "Papirus-${toCapital config.scheme.variant}"; theme = "default";
windowDecorations = { colorScheme = "Breeze${toCapital config.scheme.variant}";
library = "org.kde.breeze"; iconTheme = "Papirus-${toCapital config.scheme.variant}";
theme = "Breeze"; 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}";
}; };
cursor = {
inherit (config.home.pointerCursor) size;
theme = config.home.pointerCursor.name;
};
wallpaper = "${../wallpapers/landscapes/tropic_island_day.jpg}";
};
fonts = let fonts =
general = { let
family = fonts.sansSerif.name; general = {
pointSize = 12; 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;
}; };
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 = { hotkeys.commands = {
"launch-emacs" = { "launch-emacs" = {
@ -103,14 +108,6 @@
]; ];
}; };
} }
{
name = "org.kde.plasma.pager";
config.General = {
showWindowIcons = "true";
showOnlyCurrentScreen = "false";
wrapPage = "true";
};
}
"org.kde.plasma.cameraindicator" "org.kde.plasma.cameraindicator"
{ {
systemTray = { systemTray = {
@ -149,7 +146,10 @@
shortcuts = { shortcuts = {
ksmserver = { ksmserver = {
"Lock Session" = ["Screensaver" "Meta+Alt+L"]; "Lock Session" = [
"Screensaver"
"Meta+Alt+L"
];
}; };
kwin = { kwin = {
"Walk Through Windows of Current Application" = "Alt+`"; "Walk Through Windows of Current Application" = "Alt+`";
@ -162,9 +162,13 @@
"Switch Window Up" = "Meta+K"; "Switch Window Up" = "Meta+K";
"Invert" = "Meta+Ctrl+I"; "Invert" = "Meta+Ctrl+I";
"InvertWindow" = "Meta+Ctrl+U"; "InvertWindow" = "Meta+Ctrl+U";
"Invert Screen Colors" = []; "Invert Screen Colors" = [ ];
}; };
"services/org.kde.krunner.desktop"."_launch" = ["Meta+Space" "Search" "Alt+F2"]; "services/org.kde.krunner.desktop"."_launch" = [
"Meta+Space"
"Search"
"Alt+F2"
];
}; };
kwin = { kwin = {
@ -184,17 +188,6 @@
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;
@ -219,18 +212,22 @@
}; };
}; };
kdeglobals = { kdeglobals = {
General = let General =
AccentColor = let let
r = config.scheme."${accentColourName}-rgb-r"; AccentColor =
g = config.scheme."${accentColourName}-rgb-g"; let
b = config.scheme."${accentColourName}-rgb-b"; r = config.scheme."${accentColourName}-rgb-r";
in "${r}, ${g}, ${b}"; g = config.scheme."${accentColourName}-rgb-g";
in { b = config.scheme."${accentColourName}-rgb-b";
inherit AccentColor; in
LastUsedCustomAccentColor = AccentColor; "${r}, ${g}, ${b}";
TerminalApplication = "konsole"; in
TerminalService = "org.kde.konsole.desktop"; {
}; inherit AccentColor;
LastUsedCustomAccentColor = AccentColor;
TerminalApplication = "konsole";
TerminalService = "org.kde.konsole.desktop";
};
WM = { WM = {
# TODO convert to base16 colours at some point # TODO convert to base16 colours at some point
activeBackground = "227,229,231"; activeBackground = "227,229,231";

View file

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

View file

@ -1,19 +1,19 @@
{ config, accentColourName, ... }:
{ {
config,
accentColourName,
...
}: {
services.avizo = { services.avizo = {
enable = true; enable = true;
settings.default = let settings.default =
sc = config.scheme; let
rgba = colourName: "${sc."${colourName}-rgb-r"}, ${sc."${colourName}-rgb-g"}, ${sc."${colourName}-rgb-b"}"; sc = config.scheme;
in { rgba =
background = "rgba(${rgba "base00"}, 0.9)"; colourName: "${sc."${colourName}-rgb-r"}, ${sc."${colourName}-rgb-g"}, ${sc."${colourName}-rgb-b"}";
bar-bg-color = "rgba(${rgba "base00"}, 0.9)"; in
bar-fg-color = "rgba(${rgba "base05"}, 1.0)"; {
border-color = "rgba(${rgba accentColourName}, 1.0)"; background = "rgba(${rgba "base00"}, 0.9)";
image-opacity = "1.0"; 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

@ -5,11 +5,13 @@
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
@ -64,24 +66,26 @@ in {
tray = "never"; tray = "never";
}; };
}; };
gtk = let gtk =
toCapital = import ../lib/to_capital.nix lib; let
in { toCapital = import ../lib/to_capital.nix lib;
enable = true; in
theme = { {
package = pkgs.materia-theme; enable = true;
name = "Materia-${config.scheme.variant}"; 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}";
};
}; };
iconTheme = {
package = pkgs.papirus-icon-theme.override {color = "violet";};
name = "Papirus-${toCapital config.scheme.variant}";
};
};
wayland.windowManager.sway = { wayland.windowManager.sway = {
enable = true; enable = true;
package = package = pkgs.swayfx.overrideAttrs (old: {
pkgs.swayfx.overrideAttrs passthru.providedSessions = [ "sway" ];
(old: {passthru.providedSessions = ["sway"];}); });
swaynag.enable = true; swaynag.enable = true;
systemd.enable = true; systemd.enable = true;
xwayland = true; xwayland = true;
@ -106,51 +110,81 @@ in {
terminal = "${config.programs.alacritty.package}/bin/alacritty"; terminal = "${config.programs.alacritty.package}/bin/alacritty";
menu = "${config.programs.fuzzel.package}/bin/fuzzel"; menu = "${config.programs.fuzzel.package}/bin/fuzzel";
workspaceAutoBackAndForth = true; workspaceAutoBackAndForth = true;
bars = []; bars = [ ];
gaps = { gaps = {
inner = 5; inner = 5;
outer = 0; outer = 0;
}; };
fonts = { fonts = {
names = [fonts.monospace.name]; names = [ fonts.monospace.name ];
style = "regular"; style = "regular";
size = fonts.sizes.desktop * 1.0; size = fonts.sizes.desktop * 1.0;
}; };
colors = let colors =
sc = config.scheme.withHashtag; let
text = toString sc.base05; sc = config.scheme.withHashtag;
indicator = toString sc.${accentColourName}; text = toString sc.base05;
background = toString sc.base00; indicator = toString sc.${accentColourName};
in { background = toString sc.base00;
inherit background; in
focused = let {
border = toString sc.${accentColourName}; inherit background;
in { focused =
inherit background text indicator border; let
childBorder = border; 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;
};
}; };
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 = [ startup = [
{command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1";} { command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; }
{command = "${set-background}/bin/set-background";} { command = "${set-background}/bin/set-background"; }
]; ];
window = { window = {
border = 1; border = 1;
@ -187,9 +221,11 @@ in {
]; ];
}; };
floating.border = 1; floating.border = 1;
keybindings = with config; let keybindings =
modifier = wayland.windowManager.sway.config.modifier; with config;
in let
modifier = wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault { lib.mkOptionDefault {
# Movement # Movement
"${modifier}+comma" = "workspace prev"; "${modifier}+comma" = "workspace prev";

View file

@ -1,8 +1,5 @@
{ config, fonts, ... }:
{ {
config,
fonts,
...
}: {
programs.foot = { programs.foot = {
enable = true; enable = true;
server.enable = true; server.enable = true;
@ -19,8 +16,12 @@
notify = false; notify = false;
visual = false; visual = false;
}; };
cursor = {blink = true;}; cursor = {
mouse = {hide-when-typing = true;}; blink = 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,7 +4,8 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: { }:
{
programs.fuzzel = { programs.fuzzel = {
enable = true; enable = true;
settings = { settings = {
@ -16,27 +17,27 @@
fields = "filename,name,generic,categories"; fields = "filename,name,generic,categories";
fuzzy = true; fuzzy = true;
filter-desktop = true; filter-desktop = true;
terminal = with config.programs; "${ terminal =
if alacritty.enable with config.programs;
then alacritty.package "${if alacritty.enable then alacritty.package else pkgs.alacritty}/bin/alacritty -e";
else pkgs.alacritty
}/bin/alacritty -e";
lines = 24; lines = 24;
width = 80; width = 80;
tabs = 4; tabs = 4;
layer = "overlay"; layer = "overlay";
}; };
colors = let colors =
sc = config.scheme; let
in { sc = config.scheme;
background = "${sc.base00}cc"; # 80% Opacity in
text = "${sc.base05}ff"; {
match = "${sc.red}ff"; background = "${sc.base00}cc"; # 80% Opacity
selection = "${sc.base01}ff"; text = "${sc.base05}ff";
selection-text = "${sc.base05}ff"; match = "${sc.red}ff";
selection-match = "${sc.red}ff"; selection = "${sc.base01}ff";
border = "${sc.${accentColourName}}ff"; selection-text = "${sc.base05}ff";
}; selection-match = "${sc.red}ff";
border = "${sc.${accentColourName}}ff";
};
border = { border = {
width = 1; width = 1;
radius = 5; radius = 5;

View file

@ -3,24 +3,27 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: { }:
services.mako = let {
sc = config.scheme.withHashtag; services.mako =
in { let
enable = true; sc = config.scheme.withHashtag;
anchor = "top-right"; in
font = "${fonts.monospace.name} ${toString fonts.sizes.popups}"; {
layer = "top"; enable = true;
markup = true; anchor = "top-right";
maxVisible = 10; font = "${fonts.monospace.name} ${toString fonts.sizes.popups}";
icons = true; layer = "top";
iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}"; markup = true;
textColor = "${sc.base05}ff"; maxVisible = 10;
progressColor = "over ${sc.red}ff"; icons = true;
backgroundColor = "${sc.base00}cc"; iconPath = with config.gtk.iconTheme; "${package}/share/icons/${name}";
borderColor = "${sc.${accentColourName}}ff"; textColor = "${sc.base05}ff";
borderRadius = 5; progressColor = "over ${sc.red}ff";
borderSize = 1; backgroundColor = "${sc.base00}cc";
defaultTimeout = 0; borderColor = "${sc.${accentColourName}}ff";
}; borderRadius = 5;
borderSize = 1;
defaultTimeout = 0;
};
} }

View file

@ -4,18 +4,17 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: { }:
{
programs.rofi = { programs.rofi = {
enable = true; enable = true;
package = pkgs.rofi-wayland; package = pkgs.rofi-wayland;
terminal = with config.programs; "${ terminal =
if alacritty.enable with config.programs;
then alacritty.package "${if alacritty.enable then alacritty.package else pkgs.alacritty}/bin/alacritty";
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 ];
extraConfig = { extraConfig = {
modi = "run,drun,ssh,window,emoji,combi"; modi = "run,drun,ssh,window,emoji,combi";
combi-modi = "drun,ssh,window,emoji"; combi-modi = "drun,ssh,window,emoji";
@ -36,104 +35,110 @@
display-emoji = " 󰞅 Emoji "; display-emoji = " 󰞅 Emoji ";
display-combi = " 󰛡 Combi "; display-combi = " 󰛡 Combi ";
}; };
theme = with builtins; let theme =
inherit (config.lib.formats.rasi) mkLiteral; with builtins;
sc = config.scheme; let
bg = mkLiteral "rgba (${sc.base00-rgb-r}, ${sc.base00-rgb-g}, ${sc.base00-rgb-b}, 80%)"; inherit (config.lib.formats.rasi) mkLiteral;
bg2 = mkLiteral "rgba (${sc.base01-rgb-r}, ${sc.base01-rgb-g}, ${sc.base01-rgb-b}, 100%)"; sc = config.scheme;
fg = mkLiteral sc.withHashtag.base05; bg = mkLiteral "rgba (${sc.base00-rgb-r}, ${sc.base00-rgb-g}, ${sc.base00-rgb-b}, 80%)";
fg2 = mkLiteral sc.withHashtag.base04; bg2 = mkLiteral "rgba (${sc.base01-rgb-r}, ${sc.base01-rgb-g}, ${sc.base01-rgb-b}, 100%)";
border = mkLiteral sc.withHashtag.${accentColour}; fg = mkLiteral sc.withHashtag.base05;
blue = mkLiteral sc.withHashtag.blue; fg2 = mkLiteral sc.withHashtag.base04;
in { border = mkLiteral sc.withHashtag.${accentColour};
"*" = { blue = mkLiteral sc.withHashtag.blue;
background-color = mkLiteral "transparent"; in
text-color = fg; {
font = with fonts; "${monospace.name} ${toString sizes.popups}"; "*" = {
}; background-color = mkLiteral "transparent";
text-color = fg;
font = with fonts; "${monospace.name} ${toString sizes.popups}";
};
window = { window = {
height = mkLiteral "75%"; height = mkLiteral "75%";
width = mkLiteral "75%"; width = mkLiteral "75%";
border = mkLiteral "1px"; border = mkLiteral "1px";
border-color = border; border-color = border;
border-radius = mkLiteral "5px"; border-radius = mkLiteral "5px";
background-color = bg; background-color = bg;
}; };
inputbar = { inputbar = {
children = map mkLiteral ["prompt" "entry"]; children = map mkLiteral [
padding = mkLiteral "2px"; "prompt"
}; "entry"
];
padding = mkLiteral "2px";
};
prompt = { prompt = {
background-color = bg2; background-color = bg2;
padding = mkLiteral "6px"; padding = mkLiteral "6px";
text-color = blue; text-color = blue;
border-radius = mkLiteral "5px"; border-radius = mkLiteral "5px";
margin = mkLiteral "20px 0px 0px 20px"; margin = mkLiteral "20px 0px 0px 20px";
}; };
textbox-prompt-colon = { textbox-prompt-colon = {
expand = false; expand = false;
str = "="; str = "=";
}; };
entry = { entry = {
padding = mkLiteral "6px"; padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 10px"; margin = mkLiteral "20px 0px 0px 10px";
}; };
listview = { listview = {
border = mkLiteral "0px 0px 0px"; border = mkLiteral "0px 0px 0px";
padding = mkLiteral "6px 0px 0px"; padding = mkLiteral "6px 0px 0px";
margin = mkLiteral "10px 0px 0px 20px"; margin = mkLiteral "10px 0px 0px 20px";
columns = 2; columns = 2;
lines = 5; lines = 5;
}; };
element = { element = {
padding = mkLiteral "5px"; padding = mkLiteral "5px";
}; };
"element-icon" = { "element-icon" = {
size = mkLiteral "25px"; size = mkLiteral "25px";
}; };
"element selected" = { "element selected" = {
background-color = bg2; background-color = bg2;
text-color = blue; text-color = blue;
border-radius = mkLiteral "5px"; border-radius = mkLiteral "5px";
}; };
mode-switcher = { mode-switcher = {
spacing = 0; spacing = 0;
}; };
button = { button = {
padding = mkLiteral "10px"; padding = mkLiteral "10px";
text-color = fg2; text-color = fg2;
border-radius = mkLiteral "5px"; border-radius = mkLiteral "5px";
vertical-align = mkLiteral "0.5"; vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.5"; horizontal-align = mkLiteral "0.5";
}; };
"button selected" = { "button selected" = {
background-color = bg2; background-color = bg2;
text-color = blue; text-color = blue;
}; };
message = { message = {
margin = mkLiteral "2px"; margin = mkLiteral "2px";
padding = mkLiteral "2px"; padding = mkLiteral "2px";
border-radius = mkLiteral "5px"; border-radius = mkLiteral "5px";
}; };
textbox = { textbox = {
padding = mkLiteral "6px"; padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 20px"; margin = mkLiteral "20px 0px 0px 20px";
text-color = blue; text-color = blue;
};
}; };
};
}; };
} }

View file

@ -1,20 +1,19 @@
{ config, pkgs, ... }:
{ {
config, imports = [ ../swaylock/default.nix ];
pkgs, services.swayidle =
... let
}: { swaylockfx = pkgs.callPackage ../swaylock/swaylockfx.nix {
imports = [../swaylock/default.nix]; swaylock-effects = config.programs.swaylock.package;
services.swayidle = let };
swaylockfx = in
pkgs.callPackage ../swaylock/swaylockfx.nix {
{swaylock-effects = config.programs.swaylock.package;}; enable = true;
in { timeouts = [
enable = true; {
timeouts = [ timeout = 60 * 15; # 15 minutes
{ command = "${swaylockfx}/bin/swaylockfx";
timeout = 60 * 15; # 15 minutes }
command = "${swaylockfx}/bin/swaylockfx"; ];
} };
];
};
} }

View file

@ -3,46 +3,48 @@
pkgs, pkgs,
accentColourName, accentColourName,
... ...
}: { }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
(callPackage ./swaylockfx.nix (callPackage ./swaylockfx.nix { swaylock-effects = config.programs.swaylock.package; })
{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 = let settings =
sc = config.scheme; let
in { sc = config.scheme;
indicator-radius = 100; in
indicator-thickness = 10; {
indicator-caps-lock = true; indicator-radius = 100;
ignore-empty-password = true; indicator-thickness = 10;
show-failed-attempts = true; indicator-caps-lock = true;
effect-blur = "5x3"; ignore-empty-password = true;
effect-vignette = "0.5:0.5"; show-failed-attempts = true;
grace = 2; effect-blur = "5x3";
fade-in = 0.2; effect-vignette = "0.5:0.5";
bs-hl-color = sc.base06; grace = 2;
caps-lock-bs-hl-color = sc.base06; fade-in = 0.2;
caps-lock-key-hl-color = sc.green; bs-hl-color = sc.base06;
inside-color = "${sc.base00}cc"; caps-lock-bs-hl-color = sc.base06;
key-hl-color = sc.green; caps-lock-key-hl-color = sc.green;
layout-bg-color = "${sc.base00}cc"; inside-color = "${sc.base00}cc";
layout-border-color = sc.${accentColourName}; key-hl-color = sc.green;
layout-text-color = sc.base05; layout-bg-color = "${sc.base00}cc";
ring-color = sc.${accentColourName}; layout-border-color = sc.${accentColourName};
ring-clear-color = sc.base06; layout-text-color = sc.base05;
ring-caps-lock-color = sc.base09; ring-color = sc.${accentColourName};
ring-ver-color = sc.blue; ring-clear-color = sc.base06;
ring-wrong-color = sc.red; ring-caps-lock-color = sc.base09;
separator-color = sc.base01; ring-ver-color = sc.blue;
text-color = sc.base05; ring-wrong-color = sc.red;
text-clear-color = sc.base06; separator-color = sc.base01;
text-caps-lock-color = sc.base09; text-color = sc.base05;
text-ver-color = sc.blue; text-clear-color = sc.base06;
text-wrong-color = sc.red; text-caps-lock-color = sc.base09;
}; text-ver-color = sc.blue;
text-wrong-color = sc.red;
};
}; };
} }

View file

@ -1,6 +1,2 @@
{ { 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,357 +4,360 @@
fonts, fonts,
accentColourName, accentColourName,
... ...
}: { }:
home.packages = [pkgs.swaynotificationcenter]; {
xdg.configFile."swaync/style.css".text = let home.packages = [ pkgs.swaynotificationcenter ];
sc = config.scheme.withHashtag; xdg.configFile."swaync/style.css".text =
alpha = "0.85"; let
alpha-background = "rgba(${config.scheme.base00-rgb-r}, ${config.scheme.base00-rgb-g}, ${config.scheme.base00-rgb-b}, ${alpha})"; sc = config.scheme.withHashtag;
in '' alpha = "0.85";
* { alpha-background = "rgba(${config.scheme.base00-rgb-r}, ${config.scheme.base00-rgb-g}, ${config.scheme.base00-rgb-b}, ${alpha})";
all: unset; in
font-size: 1.2rem; ''
font-family: "${fonts.monospace.name}"; * {
transition: 200ms; all: unset;
box-shadow: none; font-size: 1.2rem;
} font-family: "${fonts.monospace.name}";
transition: 200ms;
box-shadow: none;
}
.floating-notifications.background .notification-row .notification-background { .floating-notifications.background .notification-row .notification-background {
border-radius: 5px; border-radius: 5px;
border: 1px solid ${sc.${accentColourName}}; border: 1px solid ${sc.${accentColourName}};
margin: 18px; margin: 18px;
background-color: ${alpha-background}; background-color: ${alpha-background};
color: ${sc.base05}; color: ${sc.base05};
padding: 0; padding: 0;
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification { .notification {
padding: 7px; padding: 7px;
border-radius: 5px; border-radius: 5px;
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
.notification-content { .notification-content {
margin: 7px; margin: 7px;
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
.notification-content .notification-content
.summary { .summary {
color: ${sc.base05}; color: ${sc.base05};
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
.notification-content .notification-content
.time { .time {
color: ${sc.base04}; color: ${sc.base04};
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
.notification-content .notification-content
.body { .body {
color: ${sc.base05}; color: ${sc.base05};
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
> *:last-child > *:last-child
> * { > * {
min-height: 3.4em; min-height: 3.4em;
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
> *:last-child > *:last-child
> * > *
.notification-action { .notification-action {
border-radius: 5px; border-radius: 5px;
background-color: ${sc.base01}; background-color: ${sc.base01};
color: ${sc.base05}; color: ${sc.base05};
margin: 7px; margin: 7px;
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
> *:last-child > *:last-child
> * > *
.notification-action:hover { .notification-action:hover {
background-color: ${sc.base01}; background-color: ${sc.base01};
color: ${sc.base05}; color: ${sc.base05};
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
> *:last-child > *:last-child
> * > *
.notification-action:active { .notification-action:active {
background-color: ${sc.blue}; background-color: ${sc.blue};
color: ${sc.base00}; color: ${sc.base00};
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.close-button { .close-button {
margin: 7px; margin: 7px;
padding: 2px; padding: 2px;
border-radius: 5px; border-radius: 5px;
background-color: ${sc.red}; background-color: ${sc.red};
color: ${sc.base00}; color: ${sc.base00};
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.close-button:hover { .close-button:hover {
background-color: ${sc.red}; background-color: ${sc.red};
color: ${sc.base00}; color: ${sc.base00};
} }
.floating-notifications.background .floating-notifications.background
.notification-row .notification-row
.notification-background .notification-background
.close-button:active { .close-button:active {
background-color: ${sc.red}; background-color: ${sc.red};
color: ${sc.base00}; color: ${sc.base00};
} }
.control-center { .control-center {
border-radius: 5px; border-radius: 5px;
border: 1px solid ${sc.${accentColourName}}; border: 1px solid ${sc.${accentColourName}};
margin: 18px; margin: 18px;
background-color: ${alpha-background}; background-color: ${alpha-background};
color: ${sc.base05}; color: ${sc.base05};
padding: 14px; padding: 14px;
} }
.control-center .widget-title { .control-center .widget-title {
color: ${sc.base05}; color: ${sc.base05};
font-size: 1.3em; font-size: 1.3em;
} }
.control-center .widget-title button { .control-center .widget-title button {
border-radius: 7px; border-radius: 7px;
background-color: ${sc.base01}; background-color: ${sc.base01};
color: ${sc.base05}; color: ${sc.base05};
padding: 8px; padding: 8px;
} }
.control-center .widget-title button:hover { .control-center .widget-title button:hover {
background-color: ${sc.base02}; background-color: ${sc.base02};
color: ${sc.base05}; color: ${sc.base05};
} }
.control-center .widget-title button:active { .control-center .widget-title button:active {
background-color: ${sc.base03}; background-color: ${sc.base03};
color: ${sc.base05}; color: ${sc.base05};
} }
.control-center .notification-row .notification-background { .control-center .notification-row .notification-background {
border-radius: 5px; border-radius: 5px;
background-color: ${sc.base01}; background-color: ${sc.base01};
color: ${sc.base05}; color: ${sc.base05};
margin-top: 14px; margin-top: 14px;
} }
.control-center .notification-row .notification-background .notification { .control-center .notification-row .notification-background .notification {
padding: 7px; padding: 7px;
border-radius: 7px; border-radius: 7px;
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
.notification-content { .notification-content {
margin: 7px; margin: 7px;
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
.notification-content .notification-content
.summary { .summary {
color: ${sc.base05}; color: ${sc.base05};
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
.notification-content .notification-content
.time { .time {
color: ${sc.base04}; color: ${sc.base04};
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
.notification-content .notification-content
.body { .body {
color: ${sc.base05}; color: ${sc.base05};
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
> *:last-child > *:last-child
> * { > * {
min-height: 3.4em; min-height: 3.4em;
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
> *:last-child > *:last-child
> * > *
.notification-action { .notification-action {
border-radius: 7px; border-radius: 7px;
background-color: ${sc.base00}; background-color: ${sc.base00};
color: ${sc.base05}; color: ${sc.base05};
margin: 7px; margin: 7px;
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
> *:last-child > *:last-child
> * > *
.notification-action:hover { .notification-action:hover {
background-color: ${sc.base01};; background-color: ${sc.base01};;
color: ${sc.base05}; color: ${sc.base05};
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.notification .notification
> *:last-child > *:last-child
> * > *
.notification-action:active { .notification-action:active {
background-color: ${sc.blue}; background-color: ${sc.blue};
color: ${sc.base05}; color: ${sc.base05};
} }
.control-center .notification-row .notification-background .close-button { .control-center .notification-row .notification-background .close-button {
margin: 7px; margin: 7px;
padding: 2px; padding: 2px;
border-radius: 6.3px; border-radius: 6.3px;
background-color: ${sc.red}; background-color: ${sc.red};
color: ${sc.base00}; color: ${sc.base00};
} }
.control-center .notification-row .notification-background .close-button:hover { .control-center .notification-row .notification-background .close-button:hover {
background-color: ${sc.red}; background-color: ${sc.red};
color: ${sc.base00}; color: ${sc.base00};
} }
.control-center .control-center
.notification-row .notification-row
.notification-background .notification-background
.close-button:active { .close-button:active {
background-color: ${sc.red}; background-color: ${sc.red};
color: ${sc.base00}; color: ${sc.base00};
} }
.control-center .notification-row .notification-background:hover { .control-center .notification-row .notification-background:hover {
background-color: ${sc.base00}; background-color: ${sc.base00};
color: ${sc.base05}; color: ${sc.base05};
} }
.control-center .notification-row .notification-background:active { .control-center .notification-row .notification-background:active {
background-color: ${sc.blue}; background-color: ${sc.blue};
color: ${sc.base05}; color: ${sc.base05};
} }
progressbar, progressbar,
progress, progress,
trough { trough {
border-radius: 12.6px; border-radius: 12.6px;
} }
.notification.critical progress { .notification.critical progress {
background-color: ${sc.red}; background-color: ${sc.red};
} }
.notification.low progress, .notification.low progress,
.notification.normal progress { .notification.normal progress {
background-color: ${sc.blue}; background-color: ${sc.blue};
} }
trough { trough {
background-color: ${sc.base00}; background-color: ${sc.base00};
} }
.control-center trough { .control-center trough {
background-color: ${sc.base03}; background-color: ${sc.base03};
} }
.control-center-dnd { .control-center-dnd {
margin-top: 5px; margin-top: 5px;
border-radius: 8px; border-radius: 8px;
background: ${sc.base00}; background: ${sc.base00};
border: 1px solid ${sc.base03}; border: 1px solid ${sc.base03};
} }
.control-center-dnd:checked { .control-center-dnd:checked {
background: ${sc.base00}; background: ${sc.base00};
} }
.control-center-dnd slider { .control-center-dnd slider {
background: ${sc.base03}; background: ${sc.base03};
border-radius: 8px; border-radius: 8px;
} }
.widget-dnd { .widget-dnd {
margin: 0px; margin: 0px;
font-size: 1.1rem; font-size: 1.1rem;
} }
.widget-dnd > switch { .widget-dnd > switch {
font-size: initial; font-size: initial;
border-radius: 8px; border-radius: 8px;
background: ${sc.base00}; background: ${sc.base00};
border: 1px solid ${sc.base03}; border: 1px solid ${sc.base03};
} }
.widget-dnd > switch:checked { .widget-dnd > switch:checked {
background: ${sc.base00}; background: ${sc.base00};
} }
.widget-dnd > switch slider { .widget-dnd > switch slider {
background: ${sc.base01}; background: ${sc.base01};
border-radius: 8px; border-radius: 8px;
border: 1px solid ${sc.${accentColourName}}; border: 1px solid ${sc.${accentColourName}};
} }
''; '';
} }

View file

@ -4,10 +4,11 @@
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" ];
}; };
programs.waybar = { programs.waybar = {
enable = true; enable = true;
@ -21,7 +22,7 @@
"sway/workspaces" "sway/workspaces"
"sway/window" "sway/window"
]; ];
"modules-center" = []; "modules-center" = [ ];
"modules-right" = [ "modules-right" = [
"mpris" "mpris"
"custom/notification" "custom/notification"
@ -50,12 +51,12 @@
}; };
all-outputs = false; all-outputs = false;
persistent-workspaces = { persistent-workspaces = {
"1" = []; "1" = [ ];
"2" = []; "2" = [ ];
"3" = []; "3" = [ ];
"4" = []; "4" = [ ];
"5" = []; "5" = [ ];
"6" = []; "6" = [ ];
}; };
}; };
"sway/window" = { "sway/window" = {
@ -105,7 +106,7 @@
"paused" = "󰏤"; "paused" = "󰏤";
"stopped" = "󰓛"; "stopped" = "󰓛";
}; };
"ignored-players" = []; "ignored-players" = [ ];
}; };
pulseaudio = { pulseaudio = {
scroll-step = 5; scroll-step = 5;
@ -115,7 +116,11 @@
format-source-muted = "󰍭 "; format-source-muted = "󰍭 ";
format-icons = { format-icons = {
car = "󰄍 "; car = "󰄍 ";
default = ["󰕿 " "󰖀 " "󰕾 "]; default = [
"󰕿 "
"󰖀 "
"󰕾 "
];
hands-free = "󰥰 "; hands-free = "󰥰 ";
headset = "󰋎 "; headset = "󰋎 ";
phone = "󰏲 "; phone = "󰏲 ";
@ -135,14 +140,25 @@
format = "󰻠 {usage}%"; format = "󰻠 {usage}%";
tooltip = false; tooltip = false;
}; };
memory = {format = "󰍛 {}%";}; memory = {
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 = "󰈂 ";
@ -167,15 +183,17 @@
mode-mon-col = 3; mode-mon-col = 3;
weeks-pos = "left"; weeks-pos = "left";
on-scroll = 1; on-scroll = 1;
format = let format =
sc = config.scheme.withHashtag; let
in { sc = config.scheme.withHashtag;
months = "<span color='${sc.red}'><b>{}</b></span>"; in
weeks = "<span color='${sc.cyan}'><b>W{}</b></span>"; {
weekdays = "<span color='${sc.orange}'><b>{}</b></span>"; months = "<span color='${sc.red}'><b>{}</b></span>";
days = "<span color='${sc.base05}'><b>{}</b></span>"; weeks = "<span color='${sc.cyan}'><b>W{}</b></span>";
today = "<span color='${sc.${accentColourName}}'><b><i>{}</i></b></span>"; weekdays = "<span color='${sc.orange}'><b>{}</b></span>";
}; days = "<span color='${sc.base05}'><b>{}</b></span>";
today = "<span color='${sc.${accentColourName}}'><b><i>{}</i></b></span>";
};
}; };
actions = { actions = {
on-scroll-up = "shift_up"; on-scroll-up = "shift_up";
@ -186,7 +204,17 @@
backlight = { backlight = {
format = "{icon}"; format = "{icon}";
tooltip-format = "{percent}%"; tooltip-format = "{percent}%";
format-icons = [" " " " " " " " " " " " " " " " " "]; format-icons = [
" "
" "
" "
" "
" "
" "
" "
" "
" "
];
}; };
battery = { battery = {
states = { states = {
@ -197,144 +225,162 @@
format-charging = "󰂄 "; format-charging = "󰂄 ";
format-plugged = "󰚥 "; format-plugged = "󰚥 ";
tooltip-format = "{capacity}% {time}"; tooltip-format = "{capacity}% {time}";
format-icons = ["󱃍 " "󰁺 " "󰁻 " "󰁼 " "󰁽 " "󰁾 " "󰁿 " "󰂀 " "󰂁 " "󰂂 " "󰁹 "]; format-icons = [
"󱃍 "
"󰁺 "
"󰁻 "
"󰁼 "
"󰁽 "
"󰁾 "
"󰁿 "
"󰂀 "
"󰂁 "
"󰂂 "
"󰁹 "
];
}; };
"custom/notification" = let "custom/notification" =
swaync = pkgs.swaynotificationcenter; let
in { swaync = pkgs.swaynotificationcenter;
tooltip = false; in
format = "{icon}{}"; {
format-icons = { tooltip = false;
notification = "󱅫 "; format = "{icon}{}";
none = "󰂚 "; format-icons = {
dnd-notification = "󰅸 "; notification = "󱅫 ";
dnd-none = "󰂜 "; none = "󰂚 ";
inhibited-notification = "󰅸 "; dnd-notification = "󰅸 ";
inhibited-none = "󰂜 "; dnd-none = "󰂜 ";
dnd-inhibited-notification = "󰅸 "; inhibited-notification = "󰅸 ";
dnd-inhibited-none = "󰂜 "; inhibited-none = "󰂜 ";
dnd-inhibited-notification = "󰅸 ";
dnd-inhibited-none = "󰂜 ";
};
return-type = "json";
exec-if = "which ${swaync}/bin/swaync-client";
exec = "${swaync}/bin/swaync-client -swb";
on-click = "${swaync}/bin/swaync-client -t -sw";
on-click-right = "${swaync}/bin/swaync-client -d -sw";
escape = true;
};
"custom/weather" =
let
date-format = "%Y-%m-%d";
custom-indicator = "{ICON}{temp_C}({FeelsLikeC})";
in
{
format = "{}°";
tooltip = true;
interval = 900; # Every 15 minutes
exec = ''${pkgs.wttrbar}/bin/wttrbar --location Didcot --date-format "${date-format}" --custom-indicator "${custom-indicator}"'';
return-type = "json";
}; };
return-type = "json";
exec-if = "which ${swaync}/bin/swaync-client";
exec = "${swaync}/bin/swaync-client -swb";
on-click = "${swaync}/bin/swaync-client -t -sw";
on-click-right = "${swaync}/bin/swaync-client -d -sw";
escape = true;
};
"custom/weather" = let
date-format = "%Y-%m-%d";
custom-indicator = "{ICON}{temp_C}({FeelsLikeC})";
in {
format = "{}°";
tooltip = true;
interval = 900; # Every 15 minutes
exec = ''${pkgs.wttrbar}/bin/wttrbar --location Didcot --date-format "${date-format}" --custom-indicator "${custom-indicator}"'';
return-type = "json";
};
tray = { tray = {
icon-size = builtins.floor fonts.sizes.popups; icon-size = builtins.floor fonts.sizes.popups;
show-passive-items = true; show-passive-items = true;
spacing = 5; spacing = 5;
}; };
}; };
style = let style =
sc = config.scheme.withHashtag; let
alpha = "0.85"; sc = config.scheme.withHashtag;
in '' alpha = "0.85";
* { in
all: unset; ''
font-size: ${toString fonts.sizes.popups}px; * {
font-family: ${fonts.monospace.name}; all: unset;
} font-size: ${toString fonts.sizes.popups}px;
font-family: ${fonts.monospace.name};
}
window { window {
background: transparent; background: transparent;
box-shadow: none; box-shadow: none;
} }
window > box { window > box {
color: ${sc.base05}; color: ${sc.base05};
background: alpha(${sc.base00}, ${alpha}); background: alpha(${sc.base00}, ${alpha});
margin: 5px 5px 0px; margin: 5px 5px 0px;
padding: 0px; padding: 0px;
border-top: 1px solid ${sc.base04}; border-top: 1px solid ${sc.base04};
border-radius: 5px; border-radius: 5px;
} }
tooltip { tooltip {
background: ${sc.base00}; background: ${sc.base00};
border: 1px solid ${sc.${accentColourName}}; border: 1px solid ${sc.${accentColourName}};
border-radius: 5px; border-radius: 5px;
box-shadow: none; box-shadow: none;
} }
tooltip label { tooltip label {
color: ${sc.base05}; color: ${sc.base05};
border: none; border: none;
padding: 5px; padding: 5px;
margin: 0px; margin: 0px;
} }
#workspaces, #workspaces,
#window, #window,
#mpris, #mpris,
#pulseaudio, #pulseaudio,
#network, #network,
#bluetooth, #bluetooth,
#backlight, #backlight,
#battery, #battery,
#clock, #clock,
#custom-notification, #custom-notification,
#custom-weather, #custom-weather,
#tray { #tray {
margin: 0px; margin: 0px;
padding: 1px 5px; padding: 1px 5px;
} }
#workspaces, #workspaces,
#window, #window,
#mpris, #mpris,
#tray, #tray,
#backlight, #backlight,
#battery, #battery,
#custom-weather { #custom-weather {
color: ${sc.base05}; color: ${sc.base05};
} }
#workspaces button { #workspaces button {
background: transparent; background: transparent;
color: ${sc.base05}; color: ${sc.base05};
margin: 0px; margin: 0px;
padding: 0px 5px; padding: 0px 5px;
} }
#workspaces button.persistent { #workspaces button.persistent {
color: ${sc.base03}; color: ${sc.base03};
} }
#workspaces button.focused { #workspaces button.focused {
color: ${sc.${accentColourName}}; color: ${sc.${accentColourName}};
} }
#workspaces button.urgent { #workspaces button.urgent {
color: ${sc.base09}; color: ${sc.base09};
} }
#custom-notification { #custom-notification {
color: ${sc.base08}; color: ${sc.base08};
} }
#pulseaudio { #pulseaudio {
color: ${sc.base09}; color: ${sc.base09};
} }
#network { #network {
color: ${sc.base0A}; color: ${sc.base0A};
} }
#bluetooth { #bluetooth {
color: ${sc.base0B}; color: ${sc.base0B};
} }
#clock.calendar { #clock.calendar {
color: ${sc.base0C}; color: ${sc.base0C};
} }
#clock { #clock {
color: ${sc.base0D}; color: ${sc.base0D};
} }
''; '';
}; };
} }

View file

@ -1,8 +1,5 @@
{ config, fonts, ... }:
{ {
config,
fonts,
...
}: {
programs.wlogout = { programs.wlogout = {
enable = true; enable = true;
layout = [ layout = [
@ -25,53 +22,55 @@
keybind = "l"; keybind = "l";
} }
]; ];
style = let style =
sc = config.scheme.withHashtag; let
shutdownIcon = ./icons/shutdown.png; sc = config.scheme.withHashtag;
rebootIcon = ./icons/reboot.png; shutdownIcon = ./icons/shutdown.png;
logoutIcon = ./icons/logout.png; rebootIcon = ./icons/reboot.png;
in '' logoutIcon = ./icons/logout.png;
* { in
font-size: ${toString fonts.sizes.popups}px; ''
font-family: "${fonts.sansSerif.name}"; * {
} font-size: ${toString fonts.sizes.popups}px;
font-family: "${fonts.sansSerif.name}";
}
window { window {
border: none; border: none;
background-color: transparent; background-color: transparent;
} }
button { button {
background-color: ${sc.base00}; background-color: ${sc.base00};
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 25%; background-size: 25%;
box-shadow: none; box-shadow: none;
margin: 5px; margin: 5px;
color: ${sc.base05}; color: ${sc.base05};
} }
button:hover { button:hover {
background-color: ${sc.base01}; background-color: ${sc.base01};
color: ${sc.base05}; color: ${sc.base05};
} }
button:focus { button:focus {
background-color: ${sc.base02}; background-color: ${sc.base02};
color: ${sc.base05}; color: ${sc.base05};
} }
#shutdown { #shutdown {
background-image: url("${shutdownIcon}"); background-image: url("${shutdownIcon}");
} }
#reboot { #reboot {
background-image: url("${rebootIcon}"); background-image: url("${rebootIcon}");
} }
#logout { #logout {
background-image: url("${logoutIcon}"); background-image: url("${logoutIcon}");
} }
''; '';
}; };
} }

View file

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

View file

@ -14,24 +14,36 @@ buildLuarocksPackage {
(fetchurl { (fetchurl {
url = "mirror://luarocks/graph-toolkit-scm-1.rockspec"; url = "mirror://luarocks/graph-toolkit-scm-1.rockspec";
sha256 = "0hsrf7k45w8ri18mdrx44mv1kr4zfr5mg76cxi8nnr30ssrblvgb"; sha256 = "0hsrf7k45w8ri18mdrx44mv1kr4zfr5mg76cxi8nnr30ssrblvgb";
}) }).outPath;
.outPath; src = fetchgit (
src = fetchgit (removeAttrs (builtins.fromJSON '' { removeAttrs
"url": "https://github.com/franko/graph-toolkit", (builtins.fromJSON ''
"rev": "126a11bdbb98faf785c373516a288b7fa609f824", {
"date": "2015-01-02T08:44:01-08:00", "url": "https://github.com/franko/graph-toolkit",
"path": "/nix/store/gbwbjrl4j42kaqk3pjzvmckmr6dimkd0-graph-toolkit", "rev": "126a11bdbb98faf785c373516a288b7fa609f824",
"sha256": "1pqjpqfandi7brk2213vlq891bl8drb0q32m5wmf0l21li0l4zrp", "date": "2015-01-02T08:44:01-08:00",
"hash": "sha256-N39CQaRBUOAqL1UMDFZuiK6QEKZ7BCFmXic2qxy+Et8=", "path": "/nix/store/gbwbjrl4j42kaqk3pjzvmckmr6dimkd0-graph-toolkit",
"fetchLFS": false, "sha256": "1pqjpqfandi7brk2213vlq891bl8drb0q32m5wmf0l21li0l4zrp",
"fetchSubmodules": true, "hash": "sha256-N39CQaRBUOAqL1UMDFZuiK6QEKZ7BCFmXic2qxy+Et8=",
"deepClone": false, "fetchLFS": false,
"leaveDotGit": false "fetchSubmodules": true,
} "deepClone": false,
'') ["date" "path" "sha256"]); "leaveDotGit": false
}
'')
[
"date"
"path"
"sha256"
]
);
disabled = luaOlder "5.1"; disabled = luaOlder "5.1";
propagatedBuildInputs = [lua agg freetype]; propagatedBuildInputs = [
lua
agg
freetype
];
meta = { meta = {
homepage = "http://franko.github.io/graph-toolkit/"; homepage = "http://franko.github.io/graph-toolkit/";

View file

@ -6,29 +6,33 @@
callPackage, callPackage,
luajit, luajit,
openblas, openblas,
}: let }:
xsys = callPackage ./xsys.nix {}; let
xsys = callPackage ./xsys.nix { };
in in
buildLuarocksPackage { buildLuarocksPackage {
pname = "sci"; pname = "sci";
version = "1.0.0.beta12-1"; version = "1.0.0.beta12-1";
knownRockspec = knownRockspec =
(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 = [luajit xsys openblas]; propagatedBuildInputs = [
luajit
xsys
openblas
];
meta = { meta = {
homepage = "https://github.com/stepelu/lua-sci"; homepage = "https://github.com/stepelu/lua-sci";
description = "Scientific Computing with LuaJIT"; description = "Scientific Computing with LuaJIT";
license.fullName = "MIT"; license.fullName = "MIT";
}; };
} }

View file

@ -12,15 +12,14 @@ 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";
}; };
disabled = (luaOlder "5.1") || (luaAtLeast "5.4"); disabled = (luaOlder "5.1") || (luaAtLeast "5.4");
propagatedBuildInputs = [luajit]; propagatedBuildInputs = [ luajit ];
meta = { meta = {
homepage = "http://scilua.org/xsys.html"; homepage = "http://scilua.org/xsys.html";

View file

@ -1,10 +1,11 @@
{pkgs, ...}: { { pkgs, ... }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
prismlauncher prismlauncher
cartridges cartridges
(lutris.override { (lutris.override {
steamSupport = false; steamSupport = false;
extraPkgs = pkgs: with pkgs; [wineWowPackages.waylandFull]; extraPkgs = pkgs: with pkgs; [ wineWowPackages.waylandFull ];
}) })
]; ];
} }

View file

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

View file

@ -1,12 +1,10 @@
{pkgs, ...}: { { pkgs, ... }:
{
home = { home = {
packages = [ packages = [
(pkgs.writeShellScriptBin "git-sync-all" (pkgs.writeShellScriptBin "git-sync-all" (builtins.readFile ./shell/git-sync-all.sh))
(builtins.readFile ./shell/git-sync-all.sh)) (pkgs.writeShellScriptBin "rsync-local-config" (builtins.readFile ./shell/rsync-local-config.sh))
(pkgs.writeShellScriptBin "rsync-local-config" (pkgs.writeShellScriptBin "xdg-query-program" (builtins.readFile ./shell/xdg-query-program.sh))
(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.writeShellScriptBin "ukaea-vpn-connect" pkgs:
"sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf}") (pkgs.writeShellScriptBin "ukaea-vpn-connect" "sudo ${pkgs.openfortivpn}/bin/openfortivpn -c ${./ukaea-vpn.conf}")

View file

@ -1,12 +1,8 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
...
}: {
home.packages = with pkgs; [ home.packages = with pkgs; [
protonmail-bridge-gui protonmail-bridge-gui
(writeShellScriptBin "mbsync-ensure-pass" (writeShellScriptBin "mbsync-ensure-pass" (builtins.readFile ./mbsync-ensure-pass.sh))
(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
@ -19,112 +15,132 @@
}; };
accounts.email = { accounts.email = {
maildirBasePath = "Mail"; maildirBasePath = "Mail";
accounts = let accounts =
realName = "Evie Litherland-Smith"; let
in { realName = "Evie Litherland-Smith";
proton = let in
address = "e.litherlandsmith@proton.me"; {
host = "127.0.0.1"; proton =
tls.enable = false; let
in { address = "e.litherlandsmith@proton.me";
inherit realName address; host = "127.0.0.1";
primary = true; tls.enable = false;
maildir.path = "Proton"; in
imap = { {
inherit host tls; inherit realName address;
port = 1143; primary = true;
}; maildir.path = "Proton";
smtp = { imap = {
inherit host tls; inherit host tls;
port = 1025; port = 1143;
}; };
aliases = ["evie@xenia.me.uk" "evie@litherlandsmith.slmail.me"]; smtp = {
userName = address; inherit host tls;
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}"; port = 1025;
mu.enable = true; };
msmtp = { aliases = [
enable = true; "evie@xenia.me.uk"
extraConfig = { "evie@litherlandsmith.slmail.me"
tls = "off"; ];
auth = "login"; userName = address;
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
mu.enable = true;
msmtp = {
enable = true;
extraConfig = {
tls = "off";
auth = "login";
};
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns = [
"*"
"!All Mail"
"!Labels*"
"!Starred"
"!Recovered Messages"
];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
}; };
}; icloud =
mbsync = { let
enable = true; address = "e.litherlandsmith@icloud.com";
create = "both"; in
expunge = "both"; {
remove = "both"; inherit realName address;
patterns = ["*" "!All Mail" "!Labels*" "!Starred" "!Recovered Messages"]; primary = false;
subFolders = "Verbatim"; maildir.path = "iCloud";
extraConfig.account.AuthMechs = "LOGIN"; imap.host = "imap.mail.me.com";
}; smtp.host = "smtp.mail.me.com";
}; userName = address;
icloud = let passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
address = "e.litherlandsmith@icloud.com"; mu.enable = true;
in { msmtp.enable = true;
inherit realName address; mbsync = {
primary = false; enable = true;
maildir.path = "iCloud"; create = "both";
imap.host = "imap.mail.me.com"; expunge = "both";
smtp.host = "smtp.mail.me.com"; remove = "both";
userName = address; patterns = [
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}"; "*"
mu.enable = true; "!Notes"
msmtp.enable = true; ];
mbsync = { subFolders = "Verbatim";
enable = true; };
create = "both"; };
expunge = "both"; outlook =
remove = "both"; let
patterns = ["*" "!Notes"]; address = "evie.litherland-smith@ukaea.uk";
subFolders = "Verbatim"; host = "127.0.0.1";
}; tls.enable = false;
}; in
outlook = let {
address = "evie.litherland-smith@ukaea.uk"; inherit realName address;
host = "127.0.0.1"; primary = false;
tls.enable = false; maildir.path = "Outlook";
in { imap = {
inherit realName address; inherit host tls;
primary = false; port = 1144;
maildir.path = "Outlook"; };
imap = { smtp = {
inherit host tls; inherit host tls;
port = 1144; port = 1026;
}; };
smtp = { aliases = [ "elitherl@jet.uk" ];
inherit host tls; userName = address;
port = 1026; passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}";
}; mu.enable = true;
aliases = ["elitherl@jet.uk"]; msmtp = {
userName = address; enable = true;
passwordCommand = "${pkgs.libsecret}/bin/secret-tool lookup email ${address}"; extraConfig = {
mu.enable = true; tls = "off";
msmtp = { auth = "login";
enable = true; };
extraConfig = { };
tls = "off"; mbsync = {
auth = "login"; enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns = [
"*"
"!Conversation History"
"!Snoozed"
"!Social Activity Notifications"
"!Sync Issues*"
"!Unsent Messages"
];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
}; };
};
mbsync = {
enable = true;
create = "both";
expunge = "both";
remove = "both";
patterns = [
"*"
"!Conversation History"
"!Snoozed"
"!Social Activity Notifications"
"!Sync Issues*"
"!Unsent Messages"
];
subFolders = "Verbatim";
extraConfig.account.AuthMechs = "LOGIN";
};
}; };
};
}; };
programs = { programs = {
mu.enable = true; mu.enable = true;
@ -132,26 +148,26 @@
mbsync = { mbsync = {
enable = true; enable = true;
groups.inboxes = { groups.inboxes = {
proton = ["INBOX"]; proton = [ "INBOX" ];
icloud = ["INBOX"]; icloud = [ "INBOX" ];
outlook = ["INBOX"]; outlook = [ "INBOX" ];
}; };
}; };
}; };
systemd.user.services.davmail = { systemd.user.services.davmail = {
Unit = { Unit = {
Description = "Davmail server"; Description = "Davmail server";
Wants = ["network-online.target"]; Wants = [ "network-online.target" ];
After = ["network-online.target"]; After = [ "network-online.target" ];
}; };
Service = { Service = {
Environment = ["PATH=/run/current-system/sw/bin/:$PATH"]; Environment = [ "PATH=/run/current-system/sw/bin/:$PATH" ];
Restart = "always"; Restart = "always";
ExecStartPre = with config.home; '' ExecStartPre = with config.home; ''
/bin/sh -c "if [ ! -f ${homeDirectory}/.davmail.properties ]; then cp ${./davmail.properties} ${homeDirectory}/.davmail.properties; fi; chmod 644 ${homeDirectory}/.davmail.properties" /bin/sh -c "if [ ! -f ${homeDirectory}/.davmail.properties ]; then cp ${./davmail.properties} ${homeDirectory}/.davmail.properties; fi; chmod 644 ${homeDirectory}/.davmail.properties"
''; '';
ExecStart = "${pkgs.davmail}/bin/davmail -notray ${config.home.homeDirectory}/.davmail.properties"; ExecStart = "${pkgs.davmail}/bin/davmail -notray ${config.home.homeDirectory}/.davmail.properties";
}; };
Install.WantedBy = ["default.target"]; Install.WantedBy = [ "default.target" ];
}; };
} }

View file

@ -3,16 +3,19 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
xdg.configFile."pass-git-helper/git-pass-mapping.ini".source = {
./git-pass-mapping.ini; xdg.configFile."pass-git-helper/git-pass-mapping.ini".source = ./git-pass-mapping.ini;
programs = { programs = {
gpg.enable = true; gpg.enable = true;
password-store = { password-store = {
enable = true; enable = true;
package = package = pkgs.pass-nodmenu.withExtensions (
pkgs.pass-nodmenu.withExtensions exts: with exts; [
(exts: with exts; [pass-update pass-import]); # pass-audit pass-update
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,8 +1,5 @@
{ config, accentColourName, ... }:
{ {
config,
accentColourName,
...
}: {
programs.bottom = { programs.bottom = {
enable = true; enable = true;
settings = { settings = {
@ -13,33 +10,42 @@
enable_gpu = true; enable_gpu = true;
enable_cache_memory = true; enable_cache_memory = true;
}; };
colors = let colors =
sc = config.scheme.withHashtag; let
rainbow = with sc; [red yellow green cyan blue magenta]; sc = config.scheme.withHashtag;
in { rainbow = with sc; [
table_header_color = sc.base05; red
all_cpu_color = sc.base05; yellow
avg_cpu_color = sc.base05; green
cpu_core_colors = rainbow; cyan
ram_color = sc.red; blue
cache_color = sc.green; magenta
swap_color = sc.blue; ];
rx_color = sc.green; in
tx_color = sc.blue; {
widget_title_color = sc.${accentColourName}; table_header_color = sc.base05;
border_color = sc.base02; all_cpu_color = sc.base05;
highlighted_border_color = sc.${accentColourName}; avg_cpu_color = sc.base05;
text_color = sc.base05; cpu_core_colors = rainbow;
graph_color = sc.base04; ram_color = sc.red;
cursor_color = sc.base02; cache_color = sc.green;
selected_text_color = sc.base05; swap_color = sc.blue;
selected_bg_color = sc.base01; rx_color = sc.green;
high_battery_color = sc.green; tx_color = sc.blue;
medium_battery_color = sc.yellow; widget_title_color = sc.${accentColourName};
low_battery_color = sc.red; border_color = sc.base02;
gpu_core_colors = rainbow; highlighted_border_color = sc.${accentColourName};
arc_color = sc.cyan; 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,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
imports = [ imports = [
./bottom.nix ./bottom.nix
./fastfetch.nix ./fastfetch.nix
@ -28,7 +29,7 @@
enable = true; enable = true;
git = true; git = true;
icons = true; icons = true;
extraOptions = ["--octal-permissions"]; extraOptions = [ "--octal-permissions" ];
}; };
direnv = { direnv = {
enable = true; enable = true;

View file

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

View file

@ -3,45 +3,54 @@
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 = let programs.git =
package = pkgs.git.override { let
withLibsecret = true; package = pkgs.git.override {
withSsh = true; withLibsecret = true;
}; withSsh = true;
in { };
inherit package; in
enable = true; {
userName = "Evie Litherland-Smith"; inherit package;
userEmail = lib.mkDefault "evie@xenia.me.uk";
delta = {
enable = true; enable = true;
options = { userName = "Evie Litherland-Smith";
line-numbers = true; userEmail = lib.mkDefault "evie@xenia.me.uk";
hyprlinks = true; delta = {
navigate = true; enable = true;
side-by-side = true; options = {
syntax-theme = with config.programs; lib.mkIf bat.enable bat.config.theme; line-numbers = true;
hyprlinks = true;
navigate = true;
side-by-side = true;
syntax-theme = with config.programs; lib.mkIf bat.enable bat.config.theme;
};
}; };
attributes = [
"*.gpg filter=gpg diff=gpg"
"*.asc filter=gpg diff=gpg"
];
extraConfig =
let
user = "pixelifytica";
in
{
github = {
inherit user;
};
gitea = {
inherit user;
};
pull.rebase = false;
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
credential.helper = "${package}/bin/git-credential-libsecret";
diff = {
colorMoved = "default";
gpg.textconv = "gpg --no-tty --decrypt";
};
};
}; };
attributes = [
"*.gpg filter=gpg diff=gpg"
"*.asc filter=gpg diff=gpg"
];
extraConfig = let
user = "pixelifytica";
in {
github = {inherit user;};
gitea = {inherit user;};
pull.rebase = false;
init.defaultBranch = "main";
merge.conflictstyle = "diff3";
credential.helper = "${package}/bin/git-credential-libsecret";
diff = {
colorMoved = "default";
gpg.textconv = "gpg --no-tty --decrypt";
};
};
};
} }

View file

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

View file

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

View file

@ -1,13 +1,18 @@
{ 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 red green yellow blue magenta cyan orange; inherit
red
green
yellow
blue
magenta
cyan
orange
;
black = base00; black = base00;
bg = black; bg = black;
white = base05; white = base05;

View file

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

View file

@ -1,10 +1,13 @@
{pkgs, ...}: { { pkgs, ... }:
home.packages = with pkgs; {
with kdePackages; [ home.packages =
helvum with pkgs;
kdenlive with kdePackages;
krita [
]; helvum
kdenlive
krita
];
programs.obs-studio = { programs.obs-studio = {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [

View file

@ -3,8 +3,9 @@
lib, lib,
pkgs, pkgs,
... ...
}: { }:
imports = [./default.nix]; {
imports = [ ./default.nix ];
home.packages = with pkgs; [ home.packages = with pkgs; [
twinkle twinkle
(import ./scripts/ukaea-vpn.nix pkgs) (import ./scripts/ukaea-vpn.nix pkgs)

View file

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

View file

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

View file

@ -1,9 +1,12 @@
{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 = {"/crypto_keyfile.bin" = null;}; secrets = {
"/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";
@ -14,6 +17,9 @@
etc."ppp/options".text = '' etc."ppp/options".text = ''
ipcp-accept-remote ipcp-accept-remote
''; '';
systemPackages = with pkgs; [openfortivpn samba]; systemPackages = with pkgs; [
openfortivpn
samba
];
}; };
} }

View file

@ -1,10 +1,13 @@
{pkgs, ...}: { { pkgs, ... }:
{
imports = [ imports = [
./laptop.nix ./laptop.nix
./desktop/plasma.nix ./desktop/plasma.nix
]; ];
boot.initrd = { boot.initrd = {
secrets = {"/crypto_keyfile.bin" = null;}; secrets = {
"/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";
@ -14,7 +17,7 @@
etc."ppp/options".text = '' etc."ppp/options".text = ''
ipcp-accept-remote ipcp-accept-remote
''; '';
systemPackages = with pkgs; [openfortivpn]; systemPackages = with pkgs; [ openfortivpn ];
}; };
services = { services = {
samba.enable = true; samba.enable = true;

View file

@ -1,8 +1,9 @@
{config, ...}: { { config, ... }:
imports = [./desktop/plasma.nix]; {
imports = [ ./desktop/plasma.nix ];
boot = { boot = {
initrd.kernelModules = ["amdgpu"]; initrd.kernelModules = [ "amdgpu" ];
extraModulePackages = with config.boot.kernelPackages; [v4l2loopback]; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
extraModprobeConfig = '' extraModprobeConfig = ''
options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1
''; '';

View file

@ -3,14 +3,18 @@
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 = ["nix-command" "flakes"]; experimental-features = [
"nix-command"
"flakes"
];
auto-optimise-store = true; auto-optimise-store = true;
}; };
channel.enable = true; channel.enable = true;
@ -64,7 +68,7 @@
networking = { networking = {
networkmanager.enable = true; networkmanager.enable = true;
firewall.enable = true; firewall.enable = true;
nameservers = ["9.9.9.9"]; nameservers = [ "9.9.9.9" ];
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
@ -72,7 +76,7 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICPypUUGVAdpl0SHrUDVw0RureuFNsljrXQvrf0uc055 pixelifytica@Northstar" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICPypUUGVAdpl0SHrUDVw0RureuFNsljrXQvrf0uc055 pixelifytica@Northstar"
]; ];
environment = { environment = {
pathsToLink = ["/share/zsh"]; pathsToLink = [ "/share/zsh" ];
sessionVariables = { sessionVariables = {
XDG_CONFIG_HOME = "$HOME/.config"; XDG_CONFIG_HOME = "$HOME/.config";
XDG_CACHE_HOME = "$HOME/.cache"; XDG_CACHE_HOME = "$HOME/.cache";
@ -121,23 +125,25 @@
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
console.useXkbConfig = true; console.useXkbConfig = true;
fonts = { fonts = {
packages = with pkgs; packages =
with iosevkaCustom.packages; [ with pkgs;
iosevka-custom-nerdfont with iosevkaCustom.packages;
iosevka-custom-aile [
emacs-all-the-icons-fonts # Emacs iosevka-custom-nerdfont
weather-icons # Emacs iosevka-custom-aile
lmodern # LaTeX emacs-all-the-icons-fonts # Emacs
noto-fonts-emoji # Emoji weather-icons # Emacs
(nerdfonts.override {fonts = ["NerdFontsSymbolsOnly"];}) lmodern # LaTeX
]; noto-fonts-emoji # Emoji
(nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
];
fontconfig = { fontconfig = {
enable = true; enable = true;
defaultFonts = with iosevkaCustom.names; { defaultFonts = with iosevkaCustom.names; {
serif = [iosevka-custom-aile]; serif = [ iosevka-custom-aile ];
sansSerif = [iosevka-custom-aile]; sansSerif = [ iosevka-custom-aile ];
monospace = [iosevka-custom-nerdfont]; monospace = [ iosevka-custom-nerdfont ];
emoji = ["Noto Color Emoji"]; emoji = [ "Noto Color Emoji" ];
}; };
}; };
}; };

View file

@ -3,7 +3,8 @@
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,6 +1,7 @@
{pkgs, ...}: { { pkgs, ... }:
imports = [./default.nix]; {
environment.plasma6.excludePackages = with pkgs.kdePackages; [plasma-browser-integration]; imports = [ ./default.nix ];
environment.plasma6.excludePackages = with pkgs.kdePackages; [ plasma-browser-integration ];
services = { services = {
displayManager.sddm = { displayManager.sddm = {
enable = true; enable = true;

View file

@ -1,9 +1,6 @@
{ lib, pkgs, ... }:
{ {
lib, imports = [ ./default.nix ];
pkgs,
...
}: {
imports = [./default.nix];
environment = { environment = {
sessionVariables.GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim"; sessionVariables.GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim";
systemPackages = with pkgs; [ systemPackages = with pkgs; [
@ -19,7 +16,7 @@
brightnessctl brightnessctl
]; ];
}; };
security.pam.services.swaylock = {}; security.pam.services.swaylock = { };
programs = { programs = {
light.enable = true; light.enable = true;
nm-applet.enable = true; nm-applet.enable = true;
@ -33,16 +30,16 @@
}; };
sway = { sway = {
enable = true; enable = true;
package = package = pkgs.swayfx.overrideAttrs (old: {
pkgs.swayfx.overrideAttrs passthru.providedSessions = [ "sway" ];
(old: {passthru.providedSessions = ["sway"];}); });
extraPackages = []; extraPackages = [ ];
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
xwayland.enable = true; xwayland.enable = true;
}; };
}; };
services = { services = {
dbus.packages = with pkgs; [gcr]; dbus.packages = with pkgs; [ gcr ];
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
blueman.enable = true; blueman.enable = true;
accounts-daemon.enable = true; accounts-daemon.enable = true;
@ -54,12 +51,18 @@
}; };
greetd = { greetd = {
enable = true; enable = true;
settings = let settings =
command = "sway"; let
in { command = "sway";
initial_session = {inherit command;}; in
default_session = {inherit command;}; {
}; initial_session = {
inherit command;
};
default_session = {
inherit command;
};
};
}; };
}; };
qt = { qt = {
@ -70,6 +73,6 @@
xdg.portal = { xdg.portal = {
enable = true; enable = true;
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
extraPortals = [pkgs.xdg-desktop-portal-gtk]; extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
}; };
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -3,15 +3,22 @@
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 = ["127.0.0.1" "192.168.1.230"]; bind_hosts = [
bootstrap_dns = ["9.9.9.9" "149.112.112.10"]; "127.0.0.1"
"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 = [
@ -24,20 +31,24 @@
answer = "192.168.1.230"; answer = "192.168.1.230";
} }
]; ];
blocked_services.ids = []; blocked_services.ids = [ ];
};
filtering = {
inherit (dns) safe_search rewrites blocked_services;
}; };
filtering = {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 = {inherit (querylog) ignored;}; statistics = {
inherit (querylog) ignored;
};
}; };
openFirewall = true; openFirewall = true;
}; };
networking.firewall = { networking.firewall = {
allowedTCPPorts = [53]; allowedTCPPorts = [ 53 ];
allowedUDPPorts = [53]; allowedUDPPorts = [ 53 ];
}; };
} }

View file

@ -1,5 +1,6 @@
{pkgs, ...}: { { pkgs, ... }:
environment.systemPackages = with pkgs; [steamcmd]; {
networking.firewall.allowedTCPPorts = [8777]; environment.systemPackages = with pkgs; [ steamcmd ];
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,10 +1,14 @@
{...}: { { ... }:
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";
virtualHosts."xenia.me.uk" = { virtualHosts."xenia.me.uk" = {
serverAliases = ["www.xenia.me.uk"]; serverAliases = [ "www.xenia.me.uk" ];
extraConfig = '' extraConfig = ''
file_server * { file_server * {
root /var/www/xenia.me.uk/ root /var/www/xenia.me.uk/
@ -14,7 +18,13 @@
}; };
services.fail2ban = { services.fail2ban = {
enable = true; enable = true;
ignoreIP = ["127.0.0.1/8" "::1" "192.168.1.0/16"]; ignoreIP = [
bantime-increment = {enable = true;}; "127.0.0.1/8"
"::1"
"192.168.1.0/16"
];
bantime-increment = {
enable = true;
};
}; };
} }

View file

@ -1,9 +1,6 @@
{ config, pkgs, ... }:
{ {
config, imports = [ ./caddy.nix ];
pkgs,
...
}: {
imports = [./caddy.nix];
services = { services = {
forgejo = { forgejo = {
enable = true; enable = true;
@ -15,9 +12,15 @@
HTTP_PORT = 3100; HTTP_PORT = 3100;
DISABLE_SSH = true; DISABLE_SSH = true;
}; };
ui = {DEFAULT_THEME = "forgejo-auto";}; ui = {
admin = {DISABLE_REGULAR_ORG_CREATION = true;}; DEFAULT_THEME = "forgejo-auto";
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,6 @@
{...}: { { ... }:
imports = [./caddy.nix]; {
imports = [ ./caddy.nix ];
services.gitea = { services.gitea = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,5 +1,6 @@
{...}: { { ... }:
imports = [./caddy.nix]; {
imports = [ ./caddy.nix ];
services.grafana = { services.grafana = {
enable = true; enable = true;
settings = { settings = {
@ -16,14 +17,14 @@
exporters = { exporters = {
node = { node = {
enable = true; enable = true;
enabledCollectors = ["systemd"]; enabledCollectors = [ "systemd" ];
port = 9002; port = 9002;
}; };
}; };
scrapeConfigs = [ scrapeConfigs = [
{ {
job_name = "legion"; job_name = "legion";
static_configs = [{targets = ["127.0.0.1:${toString exporters.node.port}"];}]; static_configs = [ { targets = [ "127.0.0.1:${toString exporters.node.port}" ]; } ];
} }
# { # {
# job_name = "minecraft"; # job_name = "minecraft";

View file

@ -1,11 +1,15 @@
{config, ...}: { { config, ... }:
{
virtualisation.oci-containers = { virtualisation.oci-containers = {
backend = "podman"; backend = "podman";
containers.homeassistant = { containers.homeassistant = {
volumes = ["home-assistant:/config" "/run/dbus:/run/dbus:ro"]; volumes = [
"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" ];
}; };
}; };
services.caddy.virtualHosts."home.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8123"; services.caddy.virtualHosts."home.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8123";

View file

@ -1,8 +1,10 @@
{...}: 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 = {
enable = true; enable = true;
@ -12,20 +14,26 @@ in {
listeners = [ listeners = [
{ {
inherit port; inherit port;
bind_addresses = ["127.0.0.1" "::1"]; bind_addresses = [
"127.0.0.1"
"::1"
];
type = "http"; type = "http";
tls = false; tls = false;
x_forwarded = true; x_forwarded = true;
resources = [ resources = [
{ {
names = ["client" "federation"]; names = [
"client"
"federation"
];
compress = true; compress = true;
} }
]; ];
} }
]; ];
}; };
extraConfigFiles = ["/run/secrets/matrix-shared-secret"]; extraConfigFiles = [ "/run/secrets/matrix-shared-secret" ];
}; };
caddy.virtualHosts."xenia.me.uk".extraConfig = '' caddy.virtualHosts."xenia.me.uk".extraConfig = ''
header /.well-known/matrix/* Content-Type application/json header /.well-known/matrix/* Content-Type application/json

View file

@ -1,18 +1,19 @@
{ 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 (
pinnedPkgs = import (builtins.fetchTarball { final: prev:
url = "https://github.com/NixOS/nixpkgs/archive/03a94c776f261b78b95de0971a94dea0199b4cd8.tar.gz"; let
sha256 = "0vngf4g468qd5fqch85nzyvn7bpa6p2i6rdmzc6ws2653x868w3g"; pinnedPkgs = import (builtins.fetchTarball {
}) {inherit (pkgs) system;}; url = "https://github.com/NixOS/nixpkgs/archive/03a94c776f261b78b95de0971a94dea0199b4cd8.tar.gz";
in { sha256 = "0vngf4g468qd5fqch85nzyvn7bpa6p2i6rdmzc6ws2653x868w3g";
inherit (pinnedPkgs) papermc papermcServers; }) { inherit (pkgs) system; };
}) in
{
inherit (pinnedPkgs) papermc papermcServers;
}
)
]; ];
services.minecraft-server = { services.minecraft-server = {
enable = true; enable = true;

View file

@ -1,6 +1,7 @@
{pkgs, ...}: { { pkgs, ... }:
imports = [./caddy.nix]; {
environment.systemPackages = with pkgs; [ffmpeg]; imports = [ ./caddy.nix ];
environment.systemPackages = with pkgs; [ ffmpeg ];
services = { services = {
navidrome = { navidrome = {
enable = true; enable = true;

View file

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

View file

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

View file

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

View file

@ -1,11 +1,13 @@
{...}: let { ... }:
let
port = "5232"; port = "5232";
in { in
{
services.radicale = { services.radicale = {
enable = true; enable = true;
settings = { settings = {
server = { server = {
hosts = ["0.0.0.0:${port}"]; hosts = [ "0.0.0.0:${port}" ];
}; };
auth = { auth = {
type = "htpasswd"; type = "htpasswd";

View file

@ -1,7 +1,8 @@
{...}: { { ... }:
{
services.openssh = { services.openssh = {
enable = true; enable = true;
ports = [22]; ports = [ 22 ];
settings = { settings = {
UseDns = true; UseDns = true;
PermitRootLogin = "no"; PermitRootLogin = "no";

View file

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

View file

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

View file

@ -1,12 +1,15 @@
{...}: { { ... }:
{
services.znc = { services.znc = {
enable = true; enable = true;
mutable = false; mutable = false;
useLegacyConfig = false; useLegacyConfig = false;
openFirewall = true; openFirewall = true;
config = { config = {
LoadModule = ["adminlog"]; LoadModule = [ "adminlog" ];
Listener.l = {Port = 6697;}; Listener.l = {
Port = 6697;
};
User.pixelifytica = { User.pixelifytica = {
Admin = true; Admin = true;
Pass.password = { Pass.password = {
@ -18,7 +21,7 @@
liberachat = { liberachat = {
Server = "irc.libera.chat +6697"; Server = "irc.libera.chat +6697";
Nick = "pixelifytica"; Nick = "pixelifytica";
Chan = {}; Chan = { };
JoinDelay = 2; JoinDelay = 2;
}; };
}; };