Compare commits

..

5 commits

18 changed files with 491 additions and 21 deletions

View file

@ -159,14 +159,14 @@
"pre-commit-hooks": "pre-commit-hooks_3" "pre-commit-hooks": "pre-commit-hooks_3"
}, },
"locked": { "locked": {
"lastModified": 1722890313, "lastModified": 1719760654,
"narHash": "sha256-+LV1Lpu+nQmSqbd3/xF2C6E9RBKu2xSFEwwwlvHT+Tg=", "narHash": "sha256-L3VIJ9182wsYJqP27xO5qiWwfK+a00x0JHiy8ns3NQE=",
"owner": "ashhhleyyy", "owner": "nix-community",
"repo": "crate2nix", "repo": "crate2nix",
"rev": "1830ff005ba3fe2f5b1cc4483e3b4ec83111b418", "rev": "a6ca1e58132bab26fc08572f22a34bbb86f4d91d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"repo": "crate2nix", "repo": "crate2nix",
"type": "github" "type": "github"

View file

@ -99,6 +99,7 @@
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
overlays-module overlays-module
niri-flake.nixosModules.niri
./hosts/alex/configuration.nix ./hosts/alex/configuration.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
@ -112,6 +113,7 @@
./home/ash/desktop.nix ./home/ash/desktop.nix
./home/ash/emacs.nix ./home/ash/emacs.nix
# ./home/ash/obs.nix # ./home/ash/obs.nix
./home/ash/niri.nix
./home/ash/tpm-fido.nix ./home/ash/tpm-fido.nix
./home/ash/vscodium.nix ./home/ash/vscodium.nix
./home/ash/zoom.nix ./home/ash/zoom.nix
@ -139,9 +141,11 @@
./home/ash/alex.nix ./home/ash/alex.nix
./home/ash/desktop.nix ./home/ash/desktop.nix
./home/ash/emacs.nix ./home/ash/emacs.nix
./home/ash/niri.nix
./home/ash/obs.nix ./home/ash/obs.nix
./home/ash/intellij.nix ./home/ash/intellij.nix
./home/ash/lutris.nix ./home/ash/lutris.nix
./home/ash/vscodium.nix ./home/ash/vscodium.nix
./home/ash/zoom.nix ./home/ash/zoom.nix
]; ];
@ -179,8 +183,10 @@
./hosts/amy/configuration.nix ./hosts/amy/configuration.nix
./roles/conduit.nix ./roles/conduit.nix
./roles/coredns ./roles/coredns
./roles/gts-sandbox.nix
./roles/iceshrimp.nix ./roles/iceshrimp.nix
./roles/keycloak.nix ./roles/keycloak.nix
./roles/mc-proxy.nix
./roles/podman.nix ./roles/podman.nix
./roles/postgres.nix ./roles/postgres.nix
./roles/zulip.nix ./roles/zulip.nix
@ -208,6 +214,28 @@
]; ];
}; };
nixosConfigurations.em = nixpkgs-unstable.lib.nixosSystem {
system = "x86_64-linux";
modules = [
overlays-module
niri-flake.nixosModules.niri
./hosts/em/configuration.nix
home-manager-unstable.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.ash = { ... }: {
imports = [
fsh.homeModules.fsh
./home/ash
./home/ash/niri.nix
./home/ash/desktop.nix
];
};
}
];
};
packages.x86_64-linux = { packages.x86_64-linux = {
emira = nixos-generators.nixosGenerate { emira = nixos-generators.nixosGenerate {
system = "x86_64-linux"; system = "x86_64-linux";

View file

@ -18,6 +18,7 @@
kdePackages.plasma-browser-integration kdePackages.plasma-browser-integration
kdePackages.qtwebengine kdePackages.qtwebengine
rtl-sdr rtl-sdr
signal-desktop
]; ];
services.kdeconnect = { services.kdeconnect = {
enable = true; enable = true;

View file

@ -1,5 +1,6 @@
{ config, pkgs, ... }: { { config, pkgs, ... }: {
home.packages = with pkgs; [ home.packages = with pkgs; [
jetbrains.idea-ultimate jetbrains.idea-ultimate
android-studio
]; ];
} }

View file

@ -1,5 +1,274 @@
{ config, pkgs, ... }: { { config, pkgs, ... }: {
programs.niri = { programs.niri = {
# enable = true; settings = {
input = {
focus-follows-mouse.enable = true;
keyboard.xkb.layout = "gb";
};
layout = {
gaps = 8;
preset-column-widths = [
{ proportion = 1. / 3.; }
{ proportion = 1. / 2.; }
{ proportion = 2. / 3.; }
];
default-column-width.proportion = 1. / 2.;
focus-ring = {
active.color = "#cba6f7";
inactive.color = "#313244";
};
};
binds = with config.lib.niri.actions; {
"Mod+Shift+Slash".action = show-hotkey-overlay;
"Mod+T".action = spawn "kitty";
"Mod+Space".action = spawn "fuzzel";
"Super+Alt+L".action = spawn "swaylock";
"XF86AudioRaiseVolume" = {
allow-when-locked = true;
action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1+";
};
"XF86AudioLowerVolume" = {
allow-when-locked = true;
action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.1-";
};
"XF86AudioMute" = {
allow-when-locked = true;
action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
};
"XF86AudioMicMute" = {
allow-when-locked = true;
action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
};
"Mod+Q".action = close-window;
"Mod+Left".action = focus-column-left;
"Mod+Down".action = focus-window-down;
"Mod+Up".action = focus-window-up;
"Mod+Right".action = focus-column-right;
"Mod+H".action = focus-column-left;
"Mod+J".action = focus-window-down;
"Mod+K".action = focus-window-up;
"Mod+L".action = focus-column-right;
"Mod+Ctrl+Left".action = move-column-left;
"Mod+Ctrl+Down".action = move-window-down;
"Mod+Ctrl+Up".action = move-window-up;
"Mod+Ctrl+Right".action = move-column-right;
"Mod+Ctrl+H".action = move-column-left;
"Mod+Ctrl+J".action = move-window-down;
"Mod+Ctrl+K".action = move-window-up;
"Mod+Ctrl+L".action = move-column-right;
"Mod+Home".action = focus-column-first;
"Mod+End".action = focus-column-last;
"Mod+Ctrl+Home".action = move-column-to-first;
"Mod+Ctrl+End".action = move-column-to-last;
"Mod+Shift+Left".action = focus-monitor-left;
"Mod+Shift+Down".action = focus-monitor-down;
"Mod+Shift+Up".action = focus-monitor-up;
"Mod+Shift+Right".action = focus-monitor-right;
"Mod+Shift+H".action = focus-monitor-left;
"Mod+Shift+J".action = focus-monitor-down;
"Mod+Shift+K".action = focus-monitor-up;
"Mod+Shift+L".action = focus-monitor-right;
"Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left;
"Mod+Shift+Ctrl+Down".action = move-column-to-monitor-down;
"Mod+Shift+Ctrl+Up".action = move-column-to-monitor-up;
"Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right;
"Mod+Shift+Ctrl+H".action = move-column-to-monitor-left;
"Mod+Shift+Ctrl+J".action = move-column-to-monitor-down;
"Mod+Shift+Ctrl+K".action = move-column-to-monitor-up;
"Mod+Shift+Ctrl+L".action = move-column-to-monitor-right;
"Mod+Page_Down".action = focus-workspace-down;
"Mod+Page_Up".action = focus-workspace-up;
"Mod+U".action = focus-workspace-down;
"Mod+I".action = focus-workspace-up;
"Mod+Ctrl+Page_Down".action = move-column-to-workspace-down;
"Mod+Ctrl+Page_Up".action = move-column-to-workspace-up;
"Mod+Ctrl+U".action = move-column-to-workspace-down;
"Mod+Ctrl+I".action = move-column-to-workspace-up;
"Mod+Shift+Page_Down".action = move-workspace-down;
"Mod+Shift+Page_Up".action = move-workspace-up;
"Mod+Shift+U".action = move-workspace-down;
"Mod+Shift+I".action = move-workspace-up;
"Mod+1".action = focus-workspace 1;
"Mod+2".action = focus-workspace 2;
"Mod+3".action = focus-workspace 3;
"Mod+4".action = focus-workspace 4;
"Mod+5".action = focus-workspace 5;
"Mod+6".action = focus-workspace 6;
"Mod+7".action = focus-workspace 7;
"Mod+8".action = focus-workspace 8;
"Mod+9".action = focus-workspace 9;
"Mod+Ctrl+1".action = move-column-to-workspace 1;
"Mod+Ctrl+2".action = move-column-to-workspace 2;
"Mod+Ctrl+3".action = move-column-to-workspace 3;
"Mod+Ctrl+4".action = move-column-to-workspace 4;
"Mod+Ctrl+5".action = move-column-to-workspace 5;
"Mod+Ctrl+6".action = move-column-to-workspace 6;
"Mod+Ctrl+7".action = move-column-to-workspace 7;
"Mod+Ctrl+8".action = move-column-to-workspace 8;
"Mod+Ctrl+9".action = move-column-to-workspace 9;
"Mod+Comma".action = consume-window-into-column;
"Mod+Period".action = expel-window-from-column;
"Mod+R".action = switch-preset-column-width;
"Mod+Shift+R".action = reset-window-height;
"Mod+F".action = maximize-column;
"Mod+Shift+F".action = fullscreen-window;
"Mod+C".action = center-column;
"Mod+Minus".action = set-column-width "-10%";
"Mod+Equal".action = set-column-width "+10%";
"Mod+Shift+Minus".action = set-window-height "-10%";
"Mod+Shift+Equal".action = set-window-height "+10%";
"Print".action = screenshot;
"Ctrl+Print".action = screenshot-screen;
"Alt+Print".action = screenshot-window;
"Mod+Shift+E".action = quit;
"Mod+Shift+P".action = power-off-monitors;
};
};
};
programs.swaylock.enable = true;
programs.fuzzel = {
enable = true;
};
programs.waybar = {
enable = true;
style = ./waybar/style.css;
settings = [{
"layer" = "top"; # Waybar at top layer
"position" = "top"; # Waybar position (top|bottom|left|right)
# "width" = 1280; # Waybar width
# Choose the order of the modules
"modules-left" = [
"wlr/workspaces"
];
"modules-center" = [
# "custom/music"
];
"modules-right" = [
"wireplumber"
"backlight"
"battery"
"clock"
"tray"
"custom/lock"
"custom/power"
];
"wlr/workspaces" = {
"disable-scroll" = true;
"sort-by-name" = true;
"format" = " {icon} ";
"format-icons" = {
"default" = "";
};
};
"tray" = {
"icon-size" = 21;
"spacing" = 10;
};
# "custom/music" = {
# "format" = " {}";
# "escape" = true;
# "interval" = 5;
# "tooltip" = false;
# "exec" = "playerctl metadata --format='{{ title }}'";
# "on-click" = "playerctl play-pause";
# "max-length" = 50
# };
"clock" = {
"timezone" = "Europe/London";
"tooltip-format" = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
"format-alt" = " {:%d/%m/%Y}";
"format" = "󰥔 {:%H:%M}";
};
"backlight" = {
"device" = "intel_backlight";
"format" = "{icon}";
"format-icons" = ["" "" "" "" "" "" "" "" ""];
};
"battery" = {
"states" = {
"warning" = 30;
"critical" = 15;
};
"format" = "{icon}";
"format-charging" = "{icon} 󰚥";
"format-plugged" = "󰐧";
"format-alt" = "{icon}";
"format-icons" = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ""];
};
"wireplumber" = {
# "scroll-step" = 1, # %, can be a float
"format" = "{icon} {volume}%";
"format-muted" = " {volume}%";
"format-icons" = {
"default" = ["" "" " "];
};
};
"wireplumber#source" = {
format = " {source}";
};
"custom/lock" = {
"tooltip" = false;
"on-click" = "sh -c '(sleep 0.5s; swaylock --grace 0)' & disown";
"format" = "";
};
"custom/power" = {
"tooltip" = false;
"on-click" = "niri msg action quit";
"format" = "Logout";
};
}];
systemd.enable = true;
};
services.mako = {
enable = true;
};
systemd.user.services."swaybg" = {
Unit = {
Description = "swaybg";
PartOf = ["graphical-session.target"];
After = ["niri.service"];
Requisite = ["graphical-session.target"];
};
Service = {
ExecStart = "${pkgs.swaybg}/bin/swaybg -i /home/ash/wallpaper.png";
Restart = "on-failure";
};
};
systemd.user.services."pam_kwallet_init" = {
Unit = {
Description = "Unlock kwallet on login";
PartOf = ["graphical-session.target"];
Requisite = ["graphical-session.target"];
After = ["niri.service"];
};
Service = {
ExecStart = "${pkgs.kwallet-pam}/libexec/pam_kwallet_init";
Type = "simple";
Restart = "no";
Slice = "background.slice";
};
}; };
} }

View file

@ -32,6 +32,9 @@
vue.volar vue.volar
editorconfig.editorconfig editorconfig.editorconfig
arcanis.vscode-zipfs arcanis.vscode-zipfs
jakebecker.elixir-ls
phoenixframework.phoenix
bradlc.vscode-tailwindcss
]); ]);
}) })
]; ];

0
home/ash/waybar/config Normal file
View file

131
home/ash/waybar/style.css Normal file
View file

@ -0,0 +1,131 @@
@define-color base #1e1e2e;
@define-color mantle #181825;
@define-color crust #11111b;
@define-color text #cdd6f4;
@define-color subtext0 #a6adc8;
@define-color subtext1 #bac2de;
@define-color surface0 #313244;
@define-color surface1 #45475a;
@define-color surface2 #585b70;
@define-color overlay0 #6c7086;
@define-color overlay1 #7f849c;
@define-color overlay2 #9399b2;
@define-color blue #89b4fa;
@define-color lavender #b4befe;
@define-color sapphire #74c7ec;
@define-color sky #89dceb;
@define-color teal #94e2d5;
@define-color green #a6e3a1;
@define-color yellow #f9e2af;
@define-color peach #fab387;
@define-color maroon #eba0ac;
@define-color red #f38ba8;
@define-color mauve #cba6f7;
@define-color pink #f5c2e7;
@define-color flamingo #f2cdcd;
@define-color rosewater #f5e0dc;
* {
font-family: Maple Mono NF;
font-size: 17px;
min-height: 0;
}
#waybar {
background: transparent;
color: @text;
margin: 5px 5px;
}
#workspaces {
border-radius: 1rem;
margin: 5px;
background-color: @surface0;
margin-left: 1rem;
}
#workspaces button {
color: @lavender;
border-radius: 1rem;
padding: 0.4rem;
}
#workspaces button.active {
color: @sky;
border-radius: 1rem;
}
#workspaces button:hover {
color: @sapphire;
border-radius: 1rem;
}
#custom-music,
#tray,
#backlight,
#clock,
#battery,
#pulseaudio,
#custom-lock,
#custom-power {
background-color: @surface0;
padding: 0.5rem 1rem;
margin: 5px 0;
}
#clock {
color: @blue;
border-radius: 0px 1rem 1rem 0px;
margin-right: 1rem;
}
#battery {
color: @green;
}
#battery.charging {
color: @green;
}
#battery.warning:not(.charging) {
color: @red;
}
#backlight {
color: @yellow;
}
#backlight, #battery {
border-radius: 0;
}
#pulseaudio {
color: @maroon;
border-radius: 1rem 0px 0px 1rem;
margin-left: 1rem;
}
#custom-music {
color: @mauve;
border-radius: 1rem;
}
#custom-lock {
border-radius: 1rem 0px 0px 1rem;
color: @lavender;
}
#custom-power {
margin-right: 1rem;
border-radius: 0px 1rem 1rem 0px;
color: @red;
}
#tray {
margin-right: 1rem;
border-radius: 1rem;
}

View file

@ -7,6 +7,7 @@
../../common/tpm.nix ../../common/tpm.nix
../../roles/kodi.nix ../../roles/kodi.nix
../../roles/libvirt.nix ../../roles/libvirt.nix
../../roles/niri.nix
../../roles/podman.nix ../../roles/podman.nix
./hardware-config.nix ./hardware-config.nix
]; ];
@ -22,7 +23,6 @@
networking.hostName = "alex"; networking.hostName = "alex";
networking.firewall.enable = false; networking.firewall.enable = false;
sound.enable = true;
hardware.pulseaudio.enable = false; hardware.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;
services.pipewire = { services.pipewire = {
@ -45,7 +45,6 @@
xkb.layout = "gb"; xkb.layout = "gb";
}; };
displayManager.sddm.enable = true; displayManager.sddm.enable = true;
desktopManager.plasma6.enable = true;
}; };
#environment.systemPackages = with pkgs; [ #environment.systemPackages = with pkgs; [

View file

@ -8,16 +8,16 @@
zramSwap.enable = true; zramSwap.enable = true;
networking.hostName = "amy"; networking.hostName = "amy";
networking.domain = "serv.ashhhleyyy.dev"; networking.domain = "net.isnt-a.top";
time.timeZone = "Europe/London"; time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8"; i18n.defaultLocale = "en_GB.UTF-8";
services.xserver = { #services.xserver = {
layout = "gb"; # layout = "gb";
xkbVariant = ""; # xkbVariant = "";
}; #};
console.keyMap = "uk"; console.keyMap = "uk";

View file

@ -17,12 +17,6 @@
networking.hostName = "lea"; networking.hostName = "lea";
networking.networkmanager.enable = true;
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
services.xserver = { services.xserver = {
layout = "gb"; layout = "gb";
xkbVariant = ""; xkbVariant = "";
@ -32,8 +26,6 @@
nix.settings.trusted-users = [ "@wheel" ]; nix.settings.trusted-users = [ "@wheel" ];
users.users.ash.extraGroups = [ "networkmanager" ];
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -6,6 +6,7 @@
../../common/tailscale.nix ../../common/tailscale.nix
../../common/tpm.nix ../../common/tpm.nix
../../roles/libvirt.nix ../../roles/libvirt.nix
../../roles/niri.nix
../../roles/podman.nix ../../roles/podman.nix
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -54,6 +55,10 @@
hardware.rtl-sdr.enable = true; hardware.rtl-sdr.enable = true;
users.users.ash.extraGroups = ["plugdev"]; users.users.ash.extraGroups = ["plugdev"];
hardware.usb-modeswitch.enable = true; hardware.usb-modeswitch.enable = true;
services.udev.packages = with pkgs; [
platformio-core
openocd
];
programs.steam.enable = true; programs.steam.enable = true;
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;

23
roles/gts-sandbox.nix Normal file
View file

@ -0,0 +1,23 @@
{
config
, pkgs
, ...
}:
{
age.secrets.gts-sandbox.file = ../secrets/gts-sandbox.age;
services.gotosocial = {
enable = true;
setupPostgresqlDB = true;
settings = {
host = "sandbox.isnt-a.top";
port = 3001;
trusted-proxies = ["100.64.0.0/10"];
bind-address = "0.0.0.0";
accounts-registration-open = true;
accounts-reason-required = true;
};
#environmentFile = config.age.secrets.gts-sandbox.path;
};
}

View file

@ -15,4 +15,5 @@
}; };
}; };
users.users.ash.extraGroups = ["libvirtd"]; users.users.ash.extraGroups = ["libvirtd"];
virtualisation.spiceUSBRedirection.enable = true;
} }

13
roles/mc-proxy.nix Normal file
View file

@ -0,0 +1,13 @@
{ pkgs, ... }:
{
networking.firewall.allowedTCPPorts = [ 25565 ];
users.users.proxy = {
isNormalUser = false;
isSystemUser = true;
home = "/tmp";
description = "proxy";
group = "proxy";
};
users.groups.proxy = {};
}

View file

@ -10,5 +10,8 @@
}; };
}; };
programs.niri.enable = true; programs.niri.enable = true;
services.gnome.gnome-keyring.enable = lib.mkForce false;
hardware.graphics.enable = true; hardware.graphics.enable = true;
programs.nm-applet.enable = true;
} }

BIN
secrets/gts-sandbox.age Normal file

Binary file not shown.

View file

@ -10,4 +10,5 @@ in
"keycloakPostgres.age".publicKeys = users ++ systems; "keycloakPostgres.age".publicKeys = users ++ systems;
"zulip-redis.age".publicKeys = users ++ systems; "zulip-redis.age".publicKeys = users ++ systems;
"zulip-env.age".publicKeys = users ++ systems; "zulip-env.age".publicKeys = users ++ systems;
"gts-sandbox.age".publicKeys = users ++ systems;
} }