Compare commits

..

3 commits

Author SHA1 Message Date
Evie Litherland-Smith 5ff572a9b7 Major rewrite/refactor to simplify things
Move home/ directory under system/ directory. Remove duplicated
machine-specific config files, now handled as one per host (excluding
hardware-configuration directory)

Move as much configuration as possible out of flake.nix and into more
appropriate files (e.g. system/default.nix)

Add a desktop.nix and laptop.nix for system, both will import
home/desktop.nix and home/laptop.nix respectively to reduce
duplication in machine-specific config files

Remove games and streaming directories, moved directly into Vanguard
config file

Remove home/personal.nix since it ended up being empty after changes

Remove old sway config since I haven't been maintaining it and this
refactor will definitely break it
2024-08-30 12:57:02 +01:00
Evie Litherland-Smith 90bd505fbb Don't install librewolf by default
Remove nyxt and librewolf from browser mimeapps
2024-08-30 11:04:07 +01:00
Evie Litherland-Smith 88a4291f65 Bring back steam autostart using osConfig 2024-08-30 11:03:00 +01:00
388 changed files with 281 additions and 1966 deletions

202
flake.nix
View file

@ -32,196 +32,56 @@
}; };
outputs = outputs =
inputs@{ nixpkgs, ... }:
{ {
nixpkgs,
home-manager,
plasma-manager,
nix-index-database,
iosevka-custom,
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",
...
}:
[
home-manager.nixosModules.home-manager
./system/default.nix
./system/${hostName}.nix
./system/hardware-configuration/${hostName}.nix
(
{
config,
lib,
pkgs,
...
}:
{
networking = {
inherit hostName;
};
nix = {
package = pkgs.nixVersions.latest;
settings.trusted-users = [ 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
nix-index-database.hmModules.nix-index
{ 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
{
devShells.x86_64-linux.default =
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
pkgs.mkShellNoCC {
packages = with pkgs; [
nil
pre-commit
];
shellHook = "pre-commit install --install-hooks";
};
nixosConfigurations = { nixosConfigurations = {
## Server ## Server
Legion = Legion = nixpkgs.lib.nixosSystem {
let specialArgs = {
system = "x86_64-linux"; inherit inputs;
username = "pixelifytica"; username = "pixelifytica";
hostName = "Legion"; hostName = "Legion";
in loginShell = "bash";
nixpkgs.lib.nixosSystem { };
specialArgs = defaultSpecialArgs { inherit system; }; modules = [ ./system/default.nix ];
modules = defaultModules { inherit system username hostName; };
}; };
## Personal ## Personal
Vanguard = Vanguard = nixpkgs.lib.nixosSystem {
let specialArgs = {
system = "x86_64-linux"; inherit inputs;
username = "pixelifytica"; username = "pixelifytica";
hostName = "Vanguard"; hostName = "Vanguard";
in loginShell = "bash";
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs { inherit system; };
modules = defaultModules { inherit system username hostName; };
}; };
Northstar = modules = [ ./system/default.nix ];
let };
system = "x86_64-linux"; Northstar = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
username = "pixelifytica"; username = "pixelifytica";
hostName = "Northstar"; hostName = "Northstar";
in loginShell = "bash";
nixpkgs.lib.nixosSystem { };
specialArgs = defaultSpecialArgs { inherit system; }; modules = [ ./system/default.nix ];
modules = defaultModules { inherit system username hostName; };
}; };
## Work ## Work
Tone = Tone = nixpkgs.lib.nixosSystem {
let specialArgs = {
system = "x86_64-linux"; inherit inputs;
username = "elitherl"; username = "elitherl";
hostName = "Tone"; hostName = "Tone";
in loginShell = "bash";
nixpkgs.lib.nixosSystem {
specialArgs = defaultSpecialArgs { inherit system; };
modules = defaultModules { inherit system username hostName; };
}; };
Ronin = modules = [ ./system/default.nix ];
let };
system = "x86_64-linux"; Ronin = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
username = "elitherl"; username = "elitherl";
hostName = "Ronin"; hostName = "Ronin";
in loginShell = "bash";
nixpkgs.lib.nixosSystem { };
specialArgs = defaultSpecialArgs { inherit system; }; modules = [ ./system/default.nix ];
modules = defaultModules { inherit system username hostName; };
}; };
}; };
}; };

View file

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

View file

@ -1,23 +0,0 @@
{ ... }:
{
imports = [
./personal.nix
./desktop/plasma/default.nix
];
programs.plasma = {
# input.touchpads = [
# {
# disableWhileTyping = true;
# enable = true;
# name = "SYNA32AA:00 06CB:CE17 Touchpad";
# naturalScroll = true;
# productId = "52759";
# tapToClick = true;
# vendorId = "1739";
# }
# ];
configFile = {
bluedevilglobalrc.Global.launchState.value = "disable";
};
};
}

View file

@ -1,23 +0,0 @@
{ ... }:
{
imports = [
./work.nix
./desktop/plasma/default.nix
];
programs.plasma = {
# input.touchpads = [
# {
# disableWhileTyping = true;
# enable = true;
# name = "DELL0A21:00 0488:1024 Touchpad";
# naturalScroll = true;
# productId = "1024";
# tapToClick = true;
# vendorId = "0488";
# }
# ];
configFile = {
bluedevilglobalrc.Global.launchState.value = "disable";
};
};
}

View file

@ -1,7 +0,0 @@
{ ... }:
{
imports = [
./work.nix
./desktop/plasma/default.nix
];
}

View file

@ -1,27 +0,0 @@
{ pkgs, ... }:
{
imports = [
./personal.nix
./games/default.nix
./streaming/default.nix
./desktop/plasma/default.nix
];
home.packages = with pkgs; [
kdePackages.ktorrent
krita
prusa-slicer
blender
freecad
openscad
kicad-small
];
programs.plasma = {
configFile = {
bluedevilglobalrc.Global.launchState.value = "enable";
};
};
xdg.configFile = {
"autostart/org.kde.ktorrent.desktop".source = "${pkgs.kdePackages.ktorrent}/share/applications/org.kde.ktorrent.desktop";
"autostart/webcord.desktop".source = "${pkgs.webcord}/share/applications/webcord.desktop";
};
}

View file

@ -1,45 +0,0 @@
{
config,
pkgs,
accentColourName,
...
}:
{
imports = [
# Programs
./desktop/default.nix
./shell/default.nix
./alacritty/default.nix
./emacs/default.nix
./browser/default.nix
# Services
./services/email/default.nix
./services/password-store/default.nix
# Additional Scripts
./scripts/default.nix
];
home.packages = with pkgs; [
libreoffice-qt-fresh
krdc
tokodon
ferdium
webcord
signal-desktop
teams-for-linux
];
xdg.configFile = {
"autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop";
"autostart/ferdium.desktop".source = "${pkgs.ferdium}/share/applications/ferdium.desktop";
"Ferdium/config/settings.json".text =
let
accentColor = config.scheme.withHashtag.${accentColourName};
in
builtins.toJSON (
import ./config/ferdium.nix {
inherit accentColor;
progressbarAccentColor = accentColor;
}
);
"teams-for-linux/config.json".text = builtins.toJSON (import ./config/teams-for-linux.nix);
};
}

View file

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

View file

@ -1,285 +0,0 @@
{
config,
lib,
pkgs,
fonts,
accentColourName,
...
}:
let
set-background = pkgs.writeShellScriptBin "set-background" ''
${pkgs.swaybg}/bin/swaybg -m fill -i ${../wallpapers/landscapes/tropic_island_day.jpg}
'';
in
{
imports = [
../default.nix
./avizo/default.nix
./fuzzel/default.nix
./swaylock/default.nix
./swayidle/default.nix
./swaync/default.nix
./waybar/default.nix
./wlogout/default.nix
];
home.packages = with pkgs; [
set-background
pinentry-gnome3
gnome.seahorse
ffmpeg
evince
grim
slurp
swayimg
swaybg
(writeShellScriptBin "protonmail-setup-bridge" ''
pkill -9 -f protonmail-bridge
${protonmail-bridge}/bin/protonmail-bridge -c
swaymsg exec "${protonmail-bridge}/bin/protonmail-bridge -n"
'')
(writeShellScriptBin "davmail-setup" ''
systemctl --user restart davmail # Ensure config file is present
systemctl --user stop davmail
${davmail}/bin/davmail -n ~/.davmail.properties
systemctl --user restart davmail
'')
];
programs = {
waybar.systemd.target = "sway-session.target";
alacritty.settings.window = {
decorations = "none";
opacity = 0.85;
};
};
services = {
kanshi.systemdTarget = "sway-session.target";
gpg-agent.pinentryPackage = pkgs.pinentry-gnome3;
avizo.enable = true;
kdeconnect = {
enable = true;
indicator = true;
};
udiskie = {
enable = true;
notify = true;
automount = true;
tray = "never";
};
};
gtk =
let
toCapital = import ../lib/to_capital.nix lib;
in
{
enable = true;
theme = {
package = pkgs.materia-theme;
name = "Materia-${config.scheme.variant}";
};
iconTheme = {
package = pkgs.papirus-icon-theme.override { color = "violet"; };
name = "Papirus-${toCapital config.scheme.variant}";
};
};
wayland.windowManager.sway = {
enable = true;
package = pkgs.swayfx.overrideAttrs (old: {
passthru.providedSessions = [ "sway" ];
});
swaynag.enable = true;
systemd.enable = true;
xwayland = true;
checkConfig = false;
config = {
input = {
"*" = {
xkb_layout = "gb";
xkb_options = "ctrl:nocaps";
};
"type:touchpad" = {
tap = "enabled";
natural_scroll = "enabled";
};
};
seat = {
"seat0" = {
xcursor_theme = with config.gtk.cursorTheme; "${name} ${toString size}";
};
};
modifier = "Mod4";
terminal = "${config.programs.alacritty.package}/bin/alacritty";
menu = "${config.programs.fuzzel.package}/bin/fuzzel";
workspaceAutoBackAndForth = true;
bars = [ ];
gaps = {
inner = 5;
outer = 0;
};
fonts = {
names = [ fonts.monospace.name ];
style = "regular";
size = fonts.sizes.desktop * 1.0;
};
colors =
let
sc = config.scheme.withHashtag;
text = toString sc.base05;
indicator = toString sc.${accentColourName};
background = toString sc.base00;
in
{
inherit background;
focused =
let
border = toString sc.${accentColourName};
in
{
inherit
background
text
indicator
border
;
childBorder = border;
};
focusedInactive =
let
border = toString sc.base04;
in
{
inherit
background
text
indicator
border
;
childBorder = border;
};
unfocused =
let
border = toString sc.base03;
in
{
inherit
background
text
indicator
border
;
childBorder = border;
};
urgent =
let
border = toString sc.red;
in
{
inherit
background
text
indicator
border
;
childBorder = border;
};
};
startup = [
{ command = "${pkgs.libsForQt5.polkit-kde-agent}/libexec/polkit-kde-authentication-agent-1"; }
{ command = "${set-background}/bin/set-background"; }
];
window = {
border = 1;
titlebar = false;
commands = [
{
criteria.window_role = "(?:pop-up|bubble|dialog)";
command = "floating enable";
}
{
criteria.app_id = "(?:org\.kde\.polkit-kde-authentication-agent-1|Pinentry|pavucontrol|\.blueman-manager-wrapped|nm-connection-editor)";
command = "floating enable";
}
{
criteria.class = "(?:[Mm]atplotlib|.*\.py|Idl)";
command = "floating enable";
}
{
# Catch-all for file dialog windows
criteria.title = "(?:Open|Save) (?:File|Folder|As)";
command = "floating enable, resize set width 1030 height 710";
}
{
# Inhibit idle when watching vidoes
criteria.app_id = "(?:firefox|mpv)";
command = "inhibit_idle fullscreen";
}
{
# Window rules for game sessions.
# Note: controllers don't reset idle timer
criteria.class = "(?:steam_app|Minecraft).*";
command = "floating enable, fullscreen enable, inhibit_idle focus";
}
];
};
floating.border = 1;
keybindings =
with config;
let
modifier = wayland.windowManager.sway.config.modifier;
in
lib.mkOptionDefault {
# Movement
"${modifier}+comma" = "workspace prev";
"${modifier}+period" = "workspace next";
"${modifier}+shift+comma" = "move workspace prev";
"${modifier}+shift+period" = "move workspace next";
"${modifier}+bracketleft" = "move workspace to output left";
"${modifier}+bracketright" = "move workspace to output right";
# Function keys
## Sound
"XF86AudioMute" = "exec ${services.avizo.package}/bin/volumectl %";
"XF86AudioMicMute" = "exec ${services.avizo.package}/bin/volumectl -m %";
"XF86AudioRaiseVolume" = "exec ${services.avizo.package}/bin/volumectl -u + 5";
"XF86AudioLowerVolume" = "exec ${services.avizo.package}/bin/volumectl -u - 5";
## Playback
"XF86AudioPlay" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioStop" = "exec ${pkgs.playerctl}/bin/playerctl play-pause";
"XF86AudioPrev" = "exec ${pkgs.playerctl}/bin/playerctl previous";
"XF86AudioNext" = "exec ${pkgs.playerctl}/bin/playerctl next";
## Brightness
"XF86MonBrightnessUp" = "exec ${services.avizo.package}/bin/lightctl + 5";
"XF86MonBrightnessDown" = "exec ${services.avizo.package}/bin/lightctl - 5";
# System utilities
"Mod4+Mod1+l" = "exec swaylockfx";
"${modifier}+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -t -sw";
"${modifier}+Shift+z" = "exec ${pkgs.swaynotificationcenter}/bin/swaync-client -d -sw";
"${modifier}+Shift+p" = "exec ${programs.wlogout.package}/bin/wlogout";
"${modifier}+Shift+Return" = "exec ${programs.emacs.finalPackage}/bin/emacsclient -c";
};
};
extraConfig = ''
bindgesture swipe:right workspace prev
bindgesture swipe:left workspace next
corner_radius 5
blur enable
blur_xray disable
blur_passes 3
blur_radius 5
shadows enable
shadow_blur_radius 5
layer_effects "system-menu" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "gtk-layer-shell" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "notifications" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "launcher" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "logout_dialog" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "waybar" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "avizo" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "swaync-notification-window" blur enable; blur_ignore_transparent enable; shadows enable
layer_effects "swaync-control-center" blur enable; blur_ignore_transparent enable; shadows enable
titlebar_separator enable
'';
};
}

View file

@ -1,48 +0,0 @@
{ config, fonts, ... }:
{
programs.foot = {
enable = true;
server.enable = true;
settings = {
main = {
term = "xterm-256color";
locked-title = false;
font = "${fonts.monospace.name}:size=${toString fonts.sizes.applications}";
dpi-aware = false;
pad = "10x10";
};
bell = {
urgent = false;
notify = false;
visual = false;
};
cursor = {
blink = true;
};
mouse = {
hide-when-typing = true;
};
colors = with config.scheme; rec {
alpha = 0.85;
background = base00;
foreground = base05;
regular0 = base02;
regular1 = red;
regular2 = green;
regular3 = yellow;
regular4 = blue;
regular5 = magenta;
regular6 = cyan;
regular7 = base05;
bright0 = base04;
bright1 = regular1;
bright2 = regular2;
bright3 = regular3;
bright4 = regular4;
bright5 = regular5;
bright6 = regular6;
bright7 = base05;
};
};
};
}

View file

@ -1,47 +0,0 @@
{
config,
pkgs,
fonts,
accentColourName,
...
}:
{
programs.fuzzel = {
enable = true;
settings = {
main = {
dpi-aware = false;
font = "${fonts.monospace.name}:size=${toString fonts.sizes.popups}";
icon-theme = config.gtk.iconTheme.name;
icons-enabled = true;
fields = "filename,name,generic,categories";
fuzzy = true;
filter-desktop = true;
terminal =
with config.programs;
"${if alacritty.enable then alacritty.package else pkgs.alacritty}/bin/alacritty -e";
lines = 24;
width = 80;
tabs = 4;
layer = "overlay";
};
colors =
let
sc = config.scheme;
in
{
background = "${sc.base00}cc"; # 80% Opacity
text = "${sc.base05}ff";
match = "${sc.red}ff";
selection = "${sc.base01}ff";
selection-text = "${sc.base05}ff";
selection-match = "${sc.red}ff";
border = "${sc.${accentColourName}}ff";
};
border = {
width = 1;
radius = 5;
};
};
};
}

View file

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

View file

@ -1,144 +0,0 @@
{
config,
pkgs,
fonts,
accentColourName,
...
}:
{
programs.rofi = {
enable = true;
package = pkgs.rofi-wayland;
terminal =
with config.programs;
"${if alacritty.enable then alacritty.package else pkgs.alacritty}/bin/alacritty";
font = fonts.monospace.name;
location = "center";
plugins = with pkgs; [ rofi-emoji ];
extraConfig = {
modi = "run,drun,ssh,window,emoji,combi";
combi-modi = "drun,ssh,window,emoji";
sidebar-mode = true;
sort = true;
sorting-method = "fzf";
matching = "fuzzy";
icon-theme = config.gtk.iconTheme.name;
show-icons = true;
application-fallback-icon = "application-x-addon";
drun-display-format = "{icon} {name} ({categories})";
disable-history = false;
hide-scrollbar = true;
display-run = " 󰅴 Run ";
display-drun = " 󱓞 Apps ";
display-ssh = " 󰢹 SSH ";
display-window = " 󰧨 Move ";
display-emoji = " 󰞅 Emoji ";
display-combi = " 󰛡 Combi ";
};
theme =
with builtins;
let
inherit (config.lib.formats.rasi) mkLiteral;
sc = config.scheme;
bg = mkLiteral "rgba (${sc.base00-rgb-r}, ${sc.base00-rgb-g}, ${sc.base00-rgb-b}, 80%)";
bg2 = mkLiteral "rgba (${sc.base01-rgb-r}, ${sc.base01-rgb-g}, ${sc.base01-rgb-b}, 100%)";
fg = mkLiteral sc.withHashtag.base05;
fg2 = mkLiteral sc.withHashtag.base04;
border = mkLiteral sc.withHashtag.${accentColour};
blue = mkLiteral sc.withHashtag.blue;
in
{
"*" = {
background-color = mkLiteral "transparent";
text-color = fg;
font = with fonts; "${monospace.name} ${toString sizes.popups}";
};
window = {
height = mkLiteral "75%";
width = mkLiteral "75%";
border = mkLiteral "1px";
border-color = border;
border-radius = mkLiteral "5px";
background-color = bg;
};
inputbar = {
children = map mkLiteral [
"prompt"
"entry"
];
padding = mkLiteral "2px";
};
prompt = {
background-color = bg2;
padding = mkLiteral "6px";
text-color = blue;
border-radius = mkLiteral "5px";
margin = mkLiteral "20px 0px 0px 20px";
};
textbox-prompt-colon = {
expand = false;
str = "=";
};
entry = {
padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 10px";
};
listview = {
border = mkLiteral "0px 0px 0px";
padding = mkLiteral "6px 0px 0px";
margin = mkLiteral "10px 0px 0px 20px";
columns = 2;
lines = 5;
};
element = {
padding = mkLiteral "5px";
};
"element-icon" = {
size = mkLiteral "25px";
};
"element selected" = {
background-color = bg2;
text-color = blue;
border-radius = mkLiteral "5px";
};
mode-switcher = {
spacing = 0;
};
button = {
padding = mkLiteral "10px";
text-color = fg2;
border-radius = mkLiteral "5px";
vertical-align = mkLiteral "0.5";
horizontal-align = mkLiteral "0.5";
};
"button selected" = {
background-color = bg2;
text-color = blue;
};
message = {
margin = mkLiteral "2px";
padding = mkLiteral "2px";
border-radius = mkLiteral "5px";
};
textbox = {
padding = mkLiteral "6px";
margin = mkLiteral "20px 0px 0px 20px";
text-color = blue;
};
};
};
}

View file

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

View file

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

View file

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

View file

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

View file

@ -1,386 +0,0 @@
{
config,
pkgs,
fonts,
accentColourName,
...
}:
{
systemd.user.targets.tray.Unit = {
Description = "Home Manager System Tray";
Requires = [ "graphical-session.target" ];
};
programs.waybar = {
enable = true;
systemd.enable = true;
settings.main = {
name = "main";
layer = "top";
position = "top";
# Layout
"modules-left" = [
"sway/workspaces"
"sway/window"
];
"modules-center" = [ ];
"modules-right" = [
"mpris"
"custom/notification"
"pulseaudio"
"network"
"bluetooth"
"clock#calendar"
"clock"
"backlight"
"battery"
"custom/weather"
"tray"
];
# Module config
"sway/workspaces" = {
format = "{icon}";
format-icons = {
"1" = "󰫃 ";
"2" = "󰫄 ";
"3" = "󰫅 ";
"4" = "󰫆 ";
"5" = "󰫇 ";
"6" = "󰫈 ";
default = "󰋙 ";
urgent = "󰁡 ";
};
all-outputs = false;
persistent-workspaces = {
"1" = [ ];
"2" = [ ];
"3" = [ ];
"4" = [ ];
"5" = [ ];
"6" = [ ];
};
};
"sway/window" = {
"format" = "{title}";
"max-length" = 50;
"rewrite" = {
"(.*) - GNU Emacs at (.*)" = " $1 [$2]";
"(alacritty.*)" = " $1";
"(.*) - mpv" = "󰦟 $1";
"swayimg: (.*)" = "󰋩 $1";
"(btm)" = " Resource Usage [$1]";
"(cava)" = "󰝚 Music Visualiser [$1]";
"(.*) - Thunar" = "󰝰 $1";
"Mozilla Firefox" = "󰈹 $1";
"(.*) Mozilla Firefox" = "󰈹 $1";
"Nyxt - (.*)" = "󰀹 $1";
"(.*) - Chromium" = "󰊯 $1";
"(Signal.*)" = "󰭹 $1";
"((?:.*)WebCord.*)" = "󰙯 $1";
"(Cartridges.*)" = "󰊗 $1";
"([Ss]team.*)" = "󰓓 $1";
"(Prism Launcher.*)" = "󰍳 Minecraft ($1)";
"(X2Go Client)" = "󰢹 $1";
"(NoMachine|Nxplayer.bin) (.*)" = "󰢹 $1 $2";
};
};
mpris = {
"format" = "{player_icon} {artist} - {title} {status_icon}";
"tooltip-format" = "{player_icon} ({player}) {dynamic}";
"title-len" = 64;
"interval" = 1;
"dynamic-order" = [
"album"
"artist"
"title"
"position"
"length"
];
"player-icons" = {
"default" = "󰲸 ";
"emms" = " ";
"firefox" = "󰈹 ";
"mpv" = "󰦟 ";
};
"status-icons" = {
"playing" = "󰐊";
"paused" = "󰏤";
"stopped" = "󰓛";
};
"ignored-players" = [ ];
};
pulseaudio = {
scroll-step = 5;
format = "{format_source}{icon}{volume}%";
format-muted = "{format_source} 󰝟 ";
format-source = "󰍬 ";
format-source-muted = "󰍭 ";
format-icons = {
car = "󰄍 ";
default = [
"󰕿 "
"󰖀 "
"󰕾 "
];
hands-free = "󰥰 ";
headset = "󰋎 ";
phone = "󰏲 ";
portable = "󰏳 ";
headphone = "󰋋 ";
};
on-click = "${pkgs.pavucontrol}/bin/pavucontrol";
on-click-right = "${pkgs.pamixer}/bin/pamixer -t";
on-scroll-up = "${pkgs.pamixer}/bin/pamixer -i 5";
on-scroll-down = "${pkgs.pamixer}/bin/pamixer -d 5";
};
disk = {
format = "󰋊 {percentage_used}%";
path = config.home.homeDirectory;
};
cpu = {
format = "󰻠 {usage}%";
tooltip = false;
};
memory = {
format = "󰍛 {}%";
};
temperature = {
critical-threshold = 80;
format = "{icon} {temperatureC}°C";
format-icons = [
"󱃃"
"󰔏"
"󱃂"
];
};
network = {
format-icons = [
"󰤟 "
"󰤢 "
"󰤥 "
"󰤨 "
];
format-wifi = "{icon}";
format-ethernet = "󰈁 ";
format-linked = "󰈂 ";
format-disconnected = "󰈂 ";
tooltip-format = "{essid} ({signalStrength}%)";
on-click = "${pkgs.networkmanagerapplet}/bin/nm-connection-editor";
};
bluetooth = {
format = "󰂯";
format-disabled = "󰂲";
format-off = "󰂲";
format-on = "󰂯";
format-connected = "󰂱";
tooltip-format = "{status} | {device_alias}";
on-click = "${pkgs.blueman}/bin/blueman-manager";
};
"clock#calendar" = {
format = "󰃭 {:%Y-%m-%d}";
tooltip-format = "<tt>{calendar}</tt>";
calendar = {
mode = "month";
mode-mon-col = 3;
weeks-pos = "left";
on-scroll = 1;
format =
let
sc = config.scheme.withHashtag;
in
{
months = "<span color='${sc.red}'><b>{}</b></span>";
weeks = "<span color='${sc.cyan}'><b>W{}</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 = {
on-scroll-up = "shift_up";
on-scroll-down = "shift_down";
};
};
clock.format = "󰥔 {:%R}";
backlight = {
format = "{icon}";
tooltip-format = "{percent}%";
format-icons = [
" "
" "
" "
" "
" "
" "
" "
" "
" "
];
};
battery = {
states = {
warning = 30;
critical = 20;
};
format = "{icon}";
format-charging = "󰂄 ";
format-plugged = "󰚥 ";
tooltip-format = "{capacity}% {time}";
format-icons = [
"󱃍 "
"󰁺 "
"󰁻 "
"󰁼 "
"󰁽 "
"󰁾 "
"󰁿 "
"󰂀 "
"󰂁 "
"󰂂 "
"󰁹 "
];
};
"custom/notification" =
let
swaync = pkgs.swaynotificationcenter;
in
{
tooltip = false;
format = "{icon}{}";
format-icons = {
notification = "󱅫 ";
none = "󰂚 ";
dnd-notification = "󰅸 ";
dnd-none = "󰂜 ";
inhibited-notification = "󰅸 ";
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";
};
tray = {
icon-size = builtins.floor fonts.sizes.popups;
show-passive-items = true;
spacing = 5;
};
};
style =
let
sc = config.scheme.withHashtag;
alpha = "0.85";
in
''
* {
all: unset;
font-size: ${toString fonts.sizes.popups}px;
font-family: ${fonts.monospace.name};
}
window {
background: transparent;
box-shadow: none;
}
window > box {
color: ${sc.base05};
background: alpha(${sc.base00}, ${alpha});
margin: 5px 5px 0px;
padding: 0px;
border-top: 1px solid ${sc.base04};
border-radius: 5px;
}
tooltip {
background: ${sc.base00};
border: 1px solid ${sc.${accentColourName}};
border-radius: 5px;
box-shadow: none;
}
tooltip label {
color: ${sc.base05};
border: none;
padding: 5px;
margin: 0px;
}
#workspaces,
#window,
#mpris,
#pulseaudio,
#network,
#bluetooth,
#backlight,
#battery,
#clock,
#custom-notification,
#custom-weather,
#tray {
margin: 0px;
padding: 1px 5px;
}
#workspaces,
#window,
#mpris,
#tray,
#backlight,
#battery,
#custom-weather {
color: ${sc.base05};
}
#workspaces button {
background: transparent;
color: ${sc.base05};
margin: 0px;
padding: 0px 5px;
}
#workspaces button.persistent {
color: ${sc.base03};
}
#workspaces button.focused {
color: ${sc.${accentColourName}};
}
#workspaces button.urgent {
color: ${sc.base09};
}
#custom-notification {
color: ${sc.base08};
}
#pulseaudio {
color: ${sc.base09};
}
#network {
color: ${sc.base0A};
}
#bluetooth {
color: ${sc.base0B};
}
#clock.calendar {
color: ${sc.base0C};
}
#clock {
color: ${sc.base0D};
}
'';
};
}

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

View file

@ -1,15 +0,0 @@
{ pkgs, ... }:
{
home.packages = [
pkgs.prismlauncher
pkgs.cartridges
(pkgs.lutris.override {
extraPkgs =
pkgs: with pkgs; [
wineWowPackages.waylandFull
winetricks
dxvk
];
})
];
}

View file

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

View file

@ -1,16 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
helvum
kdenlive
];
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-vkcapture
obs-pipewire-audio-capture
input-overlay
];
};
}

View file

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

View file

@ -1,9 +1,9 @@
{ pkgs, ... }: { pkgs, username, ... }:
{ {
imports = [ imports = [ ./laptop.nix ];
./laptop.nix home-manager.users.${username} = {
./desktop/plasma.nix imports = [ ./home/work.nix ];
]; };
boot.initrd = { boot.initrd = {
secrets = { secrets = {
"/crypto_keyfile.bin" = null; "/crypto_keyfile.bin" = null;

View file

@ -1,6 +1,9 @@
{ pkgs, ... }: { pkgs, username, ... }:
{ {
imports = [ ./desktop/plasma.nix ]; imports = [ ./desktop.nix ];
home-manager.users.${username} = {
imports = [ ./home/work.nix ];
};
boot = { boot = {
loader.efi.efiSysMountPoint = "/boot/efi"; loader.efi.efiSysMountPoint = "/boot/efi";
initrd = { initrd = {

View file

@ -1,15 +1,58 @@
{ config, ... }:
{ {
imports = [ ./desktop/plasma.nix ]; config,
pkgs,
username,
...
}:
{
imports = [ ./desktop.nix ];
home-manager.users.${username} = {
home.packages = with pkgs; [
kdePackages.ktorrent
krita
kdenlive
helvum
prusa-slicer
blender
freecad
openscad
kicad-small
prismlauncher
cartridges
(lutris.override {
extraPkgs =
pkg: with pkg; [
wineWowPackages.waylandFull
winetricks
dxvk
];
})
];
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
wlrobs
obs-vkcapture
obs-pipewire-audio-capture
input-overlay
];
};
xdg.configFile = {
"autostart/org.kde.ktorrent.desktop".source = "${pkgs.kdePackages.ktorrent}/share/applications/org.kde.ktorrent.desktop";
"autostart/webcord.desktop".source = "${pkgs.webcord}/share/applications/webcord.desktop";
"autostart/steam.desktop".source = "${config.programs.steam.package}/share/applications/steam.desktop";
};
};
boot = { boot = {
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
''; '';
}; };
hardware = { hardware = {
amdgpu.initrd.enable = true;
opengl = { opengl = {
enable = true;
driSupport = true; driSupport = true;
driSupport32Bit = true; driSupport32Bit = true;
}; };
@ -18,5 +61,6 @@
programs.steam = { programs.steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
gamescopeSession.enable = true;
}; };
} }

View file

@ -2,16 +2,28 @@
config, config,
lib, lib,
pkgs, pkgs,
iosevkaCustom, inputs,
username,
hostName,
loginShell,
... ...
}: }:
{ {
imports = [
inputs.home-manager.nixosModules.home-manager
./${hostName}.nix
./hardware-configuration/${hostName}.nix
];
nix = { nix = {
enable = true; enable = true;
package = pkgs.nixVersions.latest;
settings = { settings = {
cores = 0; cores = 0;
max-jobs = "auto"; max-jobs = "auto";
trusted-users = [ "root" ]; trusted-users = [
"root"
username
];
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
"flakes" "flakes"
@ -41,7 +53,16 @@
max-free = ${toString (1024 * 1024 * 1024)} max-free = ${toString (1024 * 1024 * 1024)}
''; '';
}; };
nixpkgs.config.allowUnfree = true; nixpkgs = {
config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-run"
];
overlays = [ (final: prev: { inherit (inputs.plasma-manager.packages.${prev.system}) rc2nix; }) ];
};
system = { system = {
stateVersion = "23.05"; stateVersion = "23.05";
autoUpgrade = { autoUpgrade = {
@ -71,15 +92,75 @@
efi.canTouchEfiVariables = true; efi.canTouchEfiVariables = true;
}; };
networking = { networking = {
inherit hostName;
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 =
let
authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINI1dWlS16Keil0MGPWmMsBzx8F9ylfz+fRwxUr8/tZ/ ion"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC4M1zV3yLMMI1tYwdY9QDXJDlOBugm7UXKC+Xk89yHq pixelifytica@Vanguard" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC4M1zV3yLMMI1tYwdY9QDXJDlOBugm7UXKC+Xk89yHq pixelifytica@Vanguard"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICPypUUGVAdpl0SHrUDVw0RureuFNsljrXQvrf0uc055 pixelifytica@Northstar" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICPypUUGVAdpl0SHrUDVw0RureuFNsljrXQvrf0uc055 pixelifytica@Northstar"
]; ];
in
{
root.openssh = {
inherit authorizedKeys;
};
${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 authorizedKeys;
};
};
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
users.${username} = {
imports = [ ./home/default.nix ];
home = {
inherit username;
stateVersion = "23.05";
homeDirectory = "/home/${username}";
};
};
extraSpecialArgs = {
inherit inputs;
accentColourName = "base0E";
# Emulating stylix behaviour, rewrite at some point
fonts =
let
monospace.name = inputs.iosevka-custom.outputs.names.iosevka-custom-nerdfont;
serif.name = inputs.iosevka-custom.outputs.names.iosevka-custom-aile;
sansSerif.name = serif.name;
in
{
inherit monospace serif sansSerif;
sizes = {
applications = 12;
desktop = 10;
popups = 14;
terminal = 12;
};
};
};
};
environment = { environment = {
pathsToLink = [ "/share/zsh" ]; pathsToLink = [ "/share/zsh" ];
sessionVariables = { sessionVariables = {
@ -104,6 +185,7 @@
localBinInPath = true; localBinInPath = true;
}; };
programs = { programs = {
${loginShell} = lib.mkIf (loginShell != "bash") { enable = true; };
command-not-found.enable = false; command-not-found.enable = false;
ssh.startAgent = true; ssh.startAgent = true;
nano = { nano = {
@ -130,18 +212,19 @@
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
console.useXkbConfig = true; console.useXkbConfig = true;
fonts = { fonts = {
packages = [ packages =
iosevkaCustom.packages.iosevka-custom-nerdfont (with inputs.iosevka-custom.outputs.packages.${pkgs.system}; [
iosevkaCustom.packages.iosevka-custom-aile iosevka-custom-nerdfont
pkgs.emacs-all-the-icons-fonts # Emacs iosevka-custom-aile
pkgs.weather-icons # Emacs ])
pkgs.lmodern # LaTeX ++ (with pkgs; [
pkgs.noto-fonts-emoji # Emoji lmodern # LaTeX
(pkgs.nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; }) noto-fonts-emoji # Emoji
]; (nerdfonts.override { fonts = [ "NerdFontsSymbolsOnly" ]; })
]);
fontconfig = { fontconfig = {
enable = true; enable = true;
defaultFonts = with iosevkaCustom.names; { defaultFonts = with inputs.iosevka-custom.outputs.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 ];

View file

@ -1,10 +1,15 @@
{ pkgs, ... }: { pkgs, username, ... }:
{ {
home-manager.users.${username}.imports = [ ./home/desktop.nix ];
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;
environment = { environment = {
sessionVariables.NIXOS_OZONE_WL = "1"; plasma6.excludePackages = [ pkgs.kdePackages.plasma-browser-integration ];
sessionVariables = {
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
};
systemPackages = with pkgs; [ systemPackages = with pkgs; [
libsecret libsecret
libnotify libnotify
@ -46,6 +51,14 @@
support32Bit = true; support32Bit = true;
}; };
}; };
displayManager.sddm = {
enable = true;
wayland.enable = true;
};
desktopManager.plasma6 = {
enable = true;
enableQt5Integration = true;
};
xserver = { xserver = {
enable = true; enable = true;
xkb = { xkb = {

View file

@ -1,18 +0,0 @@
{ pkgs, ... }:
{
imports = [ ./default.nix ];
environment = {
plasma6.excludePackages = with pkgs.kdePackages; [ plasma-browser-integration ];
sessionVariables.QT_QPA_PLATFORM = "wayland";
};
services = {
displayManager.sddm = {
enable = true;
wayland.enable = true;
};
desktopManager.plasma6 = {
enable = true;
enableQt5Integration = true;
};
};
}

View file

@ -1,81 +0,0 @@
{ lib, pkgs, ... }:
{
imports = [ ./default.nix ];
environment = {
sessionVariables = {
QT_QPA_PLATFORM = "wayland";
GRIM_DEFAULT_DIR = "$HOME/Pictures/Grim";
};
systemPackages = with pkgs; [
wtype
wl-clipboard
libnotify
libcamera
glib
gsettings-desktop-schemas
pamixer
pavucontrol
playerctl
brightnessctl
];
};
security.pam.services.swaylock = { };
programs = {
light.enable = true;
nm-applet.enable = true;
file-roller.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
sway = {
enable = true;
package = pkgs.swayfx.overrideAttrs (old: {
passthru.providedSessions = [ "sway" ];
});
extraPackages = [ ];
wrapperFeatures.gtk = true;
xwayland.enable = true;
};
};
services = {
dbus.packages = with pkgs; [ gcr ];
gnome.gnome-keyring.enable = true;
blueman.enable = true;
accounts-daemon.enable = true;
tumbler.enable = true;
udisks2.enable = true;
gvfs = {
enable = true;
package = lib.mkForce pkgs.gnome3.gvfs;
};
greetd = {
enable = true;
settings =
let
command = "sway";
in
{
initial_session = {
inherit command;
};
default_session = {
inherit command;
};
};
};
};
qt = {
enable = true;
style = "gtk2";
platformTheme = "gtk2";
};
xdg.portal = {
enable = true;
config.common.default = "*"; # TODO change for xdg-desktop-portal > 1.17 changes
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}

View file

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

18
system/home/default.nix Normal file
View file

@ -0,0 +1,18 @@
{ inputs, osConfig, ... }:
{
imports = [
inputs.base16.homeManagerModule
inputs.nix-index-database.hmModules.nix-index
inputs.plasma-manager.homeManagerModules.plasma-manager
./shell/default.nix
./emacs/default.nix
./services/password-store/default.nix
./scripts/default.nix
];
programs.home-manager.enable = true;
scheme = "${inputs.tt-schemes}/base16/one-light.yaml";
fonts.fontconfig = {
enable = true;
inherit (osConfig.fonts.fontconfig) defaultFonts;
};
}

View file

@ -1,6 +1,26 @@
{ config, pkgs, ... }:
{ {
config,
pkgs,
accentColourName,
...
}:
{
imports = [
./plasma/default.nix
./alacritty/default.nix
./browser/default.nix
./services/email/default.nix
];
home = { home = {
packages = with pkgs; [
libreoffice-qt-fresh
krdc
tokodon
ferdium
webcord
signal-desktop
teams-for-linux
];
pointerCursor = pointerCursor =
let let
name = if config.scheme.variant == "light" then "volantes_cursors" else "volantes_light_cursors"; name = if config.scheme.variant == "light" then "volantes_cursors" else "volantes_light_cursors";
@ -22,7 +42,7 @@
mime.enable = true; mime.enable = true;
mimeApps = mimeApps =
let let
defaultApplications = import ./mimeapps.nix; defaultApplications = import ./mimeapps/default.nix;
in in
{ {
enable = true; enable = true;
@ -41,6 +61,21 @@
XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects"; XDG_PROJECTS_DIR = "${config.home.homeDirectory}/Projects";
}; };
}; };
configFile = {
"autostart/signal-desktop.desktop".source = "${pkgs.signal-desktop}/share/applications/signal-desktop.desktop";
"autostart/ferdium.desktop".source = "${pkgs.ferdium}/share/applications/ferdium.desktop";
"Ferdium/config/settings.json".text =
let
accentColor = config.scheme.withHashtag.${accentColourName};
in
builtins.toJSON (
import ./config/ferdium.nix {
inherit accentColor;
progressbarAccentColor = accentColor;
}
);
"teams-for-linux/config.json".text = builtins.toJSON (import ./config/teams-for-linux.nix);
};
}; };
xresources.properties = with config.scheme.withHashtag; { xresources.properties = with config.scheme.withHashtag; {
"*background" = base00; "*background" = base00;

View file

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View file

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

View file

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 64 KiB

View file

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

View file

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

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

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

View file

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

View file

@ -2,22 +2,16 @@
config, config,
lib, lib,
pkgs, pkgs,
inputs,
fonts, fonts,
rc2nix,
accentColourName, accentColourName,
... ...
}: }:
{ {
imports = [ imports = [ ./konsole.nix ];
inputs.plasma-manager.homeManagerModules.plasma-manager home.packages = with pkgs; [
../default.nix
./konsole.nix
];
home.packages = [
rc2nix rc2nix
pkgs.wl-clipboard wl-clipboard
(pkgs.papirus-icon-theme.override { color = "violet"; }) (papirus-icon-theme.override { color = "violet"; })
]; ];
services.gpg-agent.pinentryPackage = pkgs.pinentry-qt; services.gpg-agent.pinentryPackage = pkgs.pinentry-qt;
programs.plasma = { programs.plasma = {
@ -41,7 +35,7 @@
inherit (config.home.pointerCursor) size; inherit (config.home.pointerCursor) size;
theme = config.home.pointerCursor.name; theme = config.home.pointerCursor.name;
}; };
wallpaper = "${../wallpapers/landscapes/tropic_island_day.jpg}"; wallpaper = "${./wallpapers/landscapes/tropic_island_day.jpg}";
}; };
fonts = fonts =

View file

Before

Width:  |  Height:  |  Size: 562 KiB

After

Width:  |  Height:  |  Size: 562 KiB

View file

Before

Width:  |  Height:  |  Size: 642 KiB

After

Width:  |  Height:  |  Size: 642 KiB

View file

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

View file

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View file

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 140 KiB

View file

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 133 KiB

View file

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 125 KiB

After

Width:  |  Height:  |  Size: 125 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 146 KiB

View file

Before

Width:  |  Height:  |  Size: 167 KiB

After

Width:  |  Height:  |  Size: 167 KiB

View file

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 111 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

View file

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 112 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View file

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

View file

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

View file

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

Before

Width:  |  Height:  |  Size: 14 MiB

After

Width:  |  Height:  |  Size: 14 MiB

View file

Before

Width:  |  Height:  |  Size: 183 KiB

After

Width:  |  Height:  |  Size: 183 KiB

View file

Before

Width:  |  Height:  |  Size: 528 KiB

After

Width:  |  Height:  |  Size: 528 KiB

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