This commit is contained in:
twoneis 2025-02-28 19:32:44 +01:00
parent 42d04f49fe
commit 606e382083
53 changed files with 1319 additions and 967 deletions

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
imports = [
./options.nix
./disko.nix
@ -13,16 +12,15 @@
};
boot = {
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ];
initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod"];
kernelPackages = pkgs.linuxPackages_latest;
loader = {
grub = {
devices = [ "/dev/sda" ];
devices = ["/dev/sda"];
useOSProber = true;
efiSupport = true;
efiInstallAsRemovable = true;
};
};
};
}

View file

@ -20,21 +20,21 @@
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
mountOptions = ["umask=0077"];
};
};
root = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [ "-f" ]; # Override existing partition
extraArgs = ["-f"]; # Override existing partition
subvolumes = {
"/root" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = ["compress=zstd" "noatime"];
mountpoint = "/";
};
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = ["compress=zstd" "noatime"];
mountpoint = "/nix";
};
"/swap" = {

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
conf = {
ssh.enable = true;
nginx.enable = true;

View file

@ -1,4 +1,8 @@
{ lib, pkgs, ... }: let
{
lib,
pkgs,
...
}: let
inherit (lib) mkDefault;
in {
imports = [
@ -11,9 +15,9 @@ in {
boot = {
initrd = {
availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod" ];
availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
luks.devices.root.device = "/dev/disk/by-label/CRYPT";
kernelModules = [ "amdgpu" ];
kernelModules = ["amdgpu"];
};
kernelPackages = pkgs.linuxPackages_latest;
loader = {
@ -33,28 +37,28 @@ in {
"/" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=root" "compress=zstd" "noatime" ];
options = ["subvol=root" "compress=zstd" "noatime"];
};
"/nix" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=nix" "compress=zstd" "noatime" ];
options = ["subvol=nix" "compress=zstd" "noatime"];
neededForBoot = true;
};
"/swap" = {
device = "/dev/disk/by-label/ROOT";
fsType = "btrfs";
options = [ "subvol=swap" "noatime" ];
options = ["subvol=swap" "noatime"];
};
};
swapDevices = [ { device = "/swap/swapfile"; } ];
swapDevices = [{device = "/swap/swapfile";}];
services = {
fwupd.enable = true;
power-profiles-daemon.enable = true;
btrfs.autoScrub = {
enable = true;
fileSystems = [ "/" ];
fileSystems = ["/"];
};
};

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
disko.devices = {
disk = {
main = {
@ -14,7 +14,7 @@
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
mountOptions = ["umask=0077"];
};
};
luks = {
@ -27,19 +27,19 @@
};
content = {
type = "btrfs";
extraArgs = [ "-f" ];
extraArgs = ["-f"];
subvolumes = {
"root" = {
mountpoint = "/";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = ["compress=zstd" "noatime"];
};
"nix" = {
mountpoint = "/nix";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = ["compress=zstd" "noatime"];
};
"persist" = {
mountpoint = "/persist";
mountOptions = [ "compress=zstd" "noatime" ];
mountOptions = ["compress=zstd" "noatime"];
};
"swap" = {
mountpoint = "/.swapvol";
@ -55,4 +55,3 @@
};
};
}

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
conf = {
apps.enable = true;
niri.enable = true;

79
flake.lock generated
View file

@ -1,5 +1,28 @@
{
"nodes": {
"alejandra": {
"inputs": {
"fenix": "fenix",
"flakeCompat": "flakeCompat",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1730688725,
"narHash": "sha256-g0SSfTWZ5mtMOpQic+eqq9sXMy1E/7yKxxfupZd9V4A=",
"owner": "kamadorueda",
"repo": "alejandra",
"rev": "2bb91e309ca99656addff5c74545acbf5813636d",
"type": "github"
},
"original": {
"owner": "kamadorueda",
"ref": "3.1.0",
"repo": "alejandra",
"type": "github"
}
},
"crane": {
"locked": {
"lastModified": 1731098351,
@ -36,6 +59,28 @@
"type": "github"
}
},
"fenix": {
"inputs": {
"nixpkgs": [
"alejandra",
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
"lastModified": 1730615655,
"narHash": "sha256-2HBR3zLn57LXKNRtxBb+O+uDqHM4n0pz51rPayMl4cg=",
"owner": "nix-community",
"repo": "fenix",
"rev": "efeb50e2535b17ffd4a135e6e3e5fd60a525180c",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "fenix",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
@ -109,6 +154,22 @@
"type": "github"
}
},
"flakeCompat": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
@ -420,6 +481,7 @@
},
"root": {
"inputs": {
"alejandra": "alejandra",
"disko": "disko",
"home-manager": "home-manager",
"lanzaboote": "lanzaboote",
@ -430,6 +492,23 @@
"nur": "nur"
}
},
"rust-analyzer-src": {
"flake": false,
"locked": {
"lastModified": 1730555913,
"narHash": "sha256-KNHZUlqsEibg3YtfUyOFQSofP8hp1HKoY+laoesBxRM=",
"owner": "rust-lang",
"repo": "rust-analyzer",
"rev": "f17a5bbfd0969ba2e63a74505a80e55ecb174ed9",
"type": "github"
},
"original": {
"owner": "rust-lang",
"ref": "nightly",
"repo": "rust-analyzer",
"type": "github"
}
},
"rust-overlay": {
"inputs": {
"nixpkgs": [

View file

@ -9,6 +9,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
alejandra = {
url = "github:kamadorueda/alejandra/3.1.0";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware = {
url = "github:nixos/nixos-hardware";
};

View file

@ -1,4 +1,4 @@
{ config, ... }: let
{config, ...}: let
inherit (config) theme;
in {
# Rose Pine

View file

@ -1,7 +1,12 @@
{ config, lib, ... }: let
{
config,
lib,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.apps.enable {
programs.adb.enable = true;
users.users.${conf.username}.extraGroups = [ "adbusers" ];
}
in
mkIf conf.apps.enable {
programs.adb.enable = true;
users.users.${conf.username}.extraGroups = ["adbusers"];
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf mkForce;
inherit (config) conf;
in {
@ -45,7 +50,7 @@ in {
# Regularly clean download folder
systemd = {
timers."clean-download" = {
wantedBy = [ "timers.target" ];
wantedBy = ["timers.target"];
timerConfig = {
OnCalendar = "*-*-* 03:00:00";
Unit = "clean-download.service";

View file

@ -1,151 +1,215 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
programs.firefox = {
enable = true;
profiles = {
"default" = {
id = 0;
in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
programs.firefox = {
enable = true;
profiles = {
"default" = {
id = 0;
search = {
default = "DuckDuckGoo";
privateDefault = "DuckDuckGoo";
engines = {
"DuckDuckGo".metaData.hidden = true;
"Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
"Bing".metaData.hidden = true;
"Wikipedia (en)".metaData.hidden = true;
"DuckDuckGoo" = {
urls = [{
template = "https://duckduckgo.com/";
params = [
{ name = "q"; value = "{searchTerms}"; }
search = {
default = "DuckDuckGoo";
privateDefault = "DuckDuckGoo";
engines = {
"DuckDuckGo".metaData.hidden = true;
"Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true;
"Bing".metaData.hidden = true;
"Wikipedia (en)".metaData.hidden = true;
"DuckDuckGoo" = {
urls = [
{
template = "https://duckduckgo.com/";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
}];
definedAliases = [ "@ddg" ];
};
"Googlee" = {
urls = [{
template = "https://google.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
definedAliases = ["@ddg"];
};
"Googlee" = {
urls = [
{
template = "https://google.com/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
];
}];
definedAliases = [ "@g" ];
};
"Wikipedia" = {
urls = [{
template = "https://en.wikipedia.org/wiki/Special:Search";
params = [
{ name = "search"; value = "{searchTerms}"; }
definedAliases = ["@g"];
};
"Wikipedia" = {
urls = [
{
template = "https://en.wikipedia.org/wiki/Special:Search";
params = [
{
name = "search";
value = "{searchTerms}";
}
];
}
];
}];
definedAliases = [ "@wiki" ];
};
"YouTube" = {
urls = [{
template = "https://youtube.com/results";
params = [
{ name = "search_query"; value = "{searchTerms}"; }
definedAliases = ["@wiki"];
};
"YouTube" = {
urls = [
{
template = "https://youtube.com/results";
params = [
{
name = "search_query";
value = "{searchTerms}";
}
];
}
];
}];
definedAliases = [ "@yt" ];
};
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "channel"; value = "unstable"; }
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
definedAliases = ["@yt"];
};
"Nix Packages" = {
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
}];
definedAliases = [ "@np" ];
};
"Nix Options" = {
urls = [{
template = "https://search.nixos.org/options";
params = [
{ name = "channel"; value = "unstable"; }
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
definedAliases = ["@np"];
};
"Nix Options" = {
urls = [
{
template = "https://search.nixos.org/options";
params = [
{
name = "channel";
value = "unstable";
}
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
];
}];
definedAliases = [ "@no" ];
};
"Arch Wiki" = {
urls = [{
template = "https://wiki.archlinux.org/index.php";
params = [
{ name = "search"; value = "{searchTerms}"; }
{ name = "fulltext"; value = "1"; }
definedAliases = ["@no"];
};
"Arch Wiki" = {
urls = [
{
template = "https://wiki.archlinux.org/index.php";
params = [
{
name = "search";
value = "{searchTerms}";
}
{
name = "fulltext";
value = "1";
}
];
}
];
}];
definedAliases = [ "@aw" ];
};
"Github" = {
urls = [{
template = "https://github.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
{ name = "type"; value = "repositories"; }
definedAliases = ["@aw"];
};
"Github" = {
urls = [
{
template = "https://github.com/search";
params = [
{
name = "q";
value = "{searchTerms}";
}
{
name = "type";
value = "repositories";
}
];
}
];
}];
definedAliases = [ "@gh" ];
definedAliases = ["@gh"];
};
};
force = true;
order = [
"DuckDuckGoo"
"Googlee"
"Wikipedia"
"YouTube"
"Nix Packages"
"Nix Options"
"Arch Wiki"
"Github"
];
};
force = true;
order = [
"DuckDuckGoo"
"Googlee"
"Wikipedia"
"YouTube"
"Nix Packages"
"Nix Options"
"Arch Wiki"
"Github"
bookmarks = {};
settings = {
"browser.aboutConfig.showWarning" = false;
"browser.bookmarks.addedImportButton" = false;
"browser.newtabpage.enabled" = false;
"browser.preferences.moreFromMozilla" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.startup.blankWindow" = true;
"browser.startup.page" = 3;
"browser.tabs.closeWindowWithLastTab" = false;
"browser.toolbars.bookmarks.visibility" = "never";
"browser.translation.enable" = false;
"dom.security.https_only_mode" = true;
"extensions.pocket.enabled" = false;
"gfx.webrender.all" = true;
"identity.fxaccounts.enabled" = false;
"media.cache_readhead_limit" = 9999;
"media.cache_resume_threshold" = 9999;
"medai.ffmpeg.vaapi.enabled" = true;
"media.videocontrols.picture-in-picture.enabled" = false;
"signon.rememberSignons" = false;
};
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
sponsorblock
ublock-origin
pronoundb
youtube-nonstop
enhancer-for-youtube
firefox-color
purpleadblock
];
};
bookmarks = { };
settings = {
"browser.aboutConfig.showWarning" = false;
"browser.bookmarks.addedImportButton" = false;
"browser.newtabpage.enabled" = false;
"browser.preferences.moreFromMozilla" = false;
"browser.shell.checkDefaultBrowser" = false;
"browser.startup.blankWindow" = true;
"browser.startup.page" = 3;
"browser.tabs.closeWindowWithLastTab" = false;
"browser.toolbars.bookmarks.visibility" = "never";
"browser.translation.enable" = false;
"dom.security.https_only_mode" = true;
"extensions.pocket.enabled" = false;
"gfx.webrender.all" = true;
"identity.fxaccounts.enabled" = false;
"media.cache_readhead_limit" = 9999;
"media.cache_resume_threshold" = 9999;
"medai.ffmpeg.vaapi.enabled" = true;
"media.videocontrols.picture-in-picture.enabled" = false;
"signon.rememberSignons" = false;
};
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
bitwarden
sponsorblock
ublock-origin
pronoundb
youtube-nonstop
enhancer-for-youtube
firefox-color
purpleadblock
];
};
};
};
};
}
}

View file

@ -1,17 +1,22 @@
{ config, lib, pkgs, ... }: let
{
config,
lib,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.apps.enable {
in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
loupe
spotify
amberol
];
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
loupe
spotify
amberol
];
programs.mpv = {
enable = true;
programs.mpv = {
enable = true;
};
};
};
}
}

View file

@ -1,25 +1,31 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
inherit (config.conf) keys;
in mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
rnote
];
in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
rnote
];
programs.sioyek = {
enable = true;
bindings = {
"move_up" = keys.up;
"move_down" = keys.down;
"move_left" = keys.left;
"move_right" = keys.right;
programs.sioyek = {
enable = true;
bindings = {
"move_up" = keys.up;
"move_down" = keys.down;
"move_left" = keys.left;
"move_right" = keys.right;
};
};
programs.fish.shellAbbrs = {
pdf = "sioyek";
};
};
programs.fish.shellAbbrs = {
pdf = "sioyek";
};
};
}
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
mkXwlWrapper = import ../niri/xwl-wrapper.nix;
@ -7,61 +12,72 @@
desktopName = "Time";
exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock";
};
in mkIf conf.apps.enable {
services = {
# Needed for some features in nautilus such as auto-mounting and trash
gvfs.enable = true;
};
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
signal-desktop
vesktop
snapshot
nautilus
inkscape
libresprite
# blender
gnome-disk-utility
fragments
element-desktop
tor-browser
libreoffice-qt6
chromium
peaclock
fractal
element-desktop
] ++ [
time
(mkXwlWrapper { pkgs = pkgs; name = "Prusa"; pkg = "prusa-slicer"; })
(mkXwlWrapper { pkgs = pkgs; name = "Vial"; pkg = "vial"; })
];
home.file = {
".config/vesktop/settings.json" = {
source = ./vesktop.conf.json;
};
".config/vesktop/settings/settings.json" = {
source = ./vencord.conf.json;
};
in
mkIf conf.apps.enable {
services = {
# Needed for some features in nautilus such as auto-mounting and trash
gvfs.enable = true;
};
programs.pandoc = {
enable = true;
};
home-manager.users.${conf.username} = {
home.packages = with pkgs;
[
signal-desktop
vesktop
snapshot
nautilus
inkscape
libresprite
# blender
gnome-disk-utility
fragments
element-desktop
tor-browser
libreoffice-qt6
chromium
peaclock
fractal
element-desktop
]
++ [
time
(mkXwlWrapper {
pkgs = pkgs;
name = "Prusa";
pkg = "prusa-slicer";
})
(mkXwlWrapper {
pkgs = pkgs;
name = "Vial";
pkg = "vial";
})
];
programs.thunderbird = {
enable = true;
profiles = {
"default" = {
isDefault = true;
home.file = {
".config/vesktop/settings.json" = {
source = ./vesktop.conf.json;
};
".config/vesktop/settings/settings.json" = {
source = ./vencord.conf.json;
};
};
};
programs.alacritty = {
enable = true;
settings = import ./alacritty.conf.nix { config = config; };
programs.pandoc = {
enable = true;
};
programs.thunderbird = {
enable = true;
profiles = {
"default" = {
isDefault = true;
};
};
};
programs.alacritty = {
enable = true;
settings = import ./alacritty.conf.nix {config = config;};
};
};
};
}
}

View file

@ -1,53 +1,62 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
adwaita-icon-theme
adwaita-qt
adwaita-qt6
];
in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
adwaita-icon-theme
adwaita-qt
adwaita-qt6
];
qt = {
enable = true;
platformTheme.name = "adwaita";
style.name = "adwaita-dark";
};
gtk = {
enable = true;
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
qt = {
enable = true;
platformTheme.name = "adwaita";
style.name = "adwaita-dark";
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme=1\n";
theme.name = "Adwaita Dark";
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
gtk = {
enable = true;
gtk4.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk3.extraConfig = {
gtk-application-prefer-dark-theme = true;
};
gtk2.extraConfig = "gtk-application-prefer-dark-theme=1\n";
theme.name = "Adwaita Dark";
};
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
};
home.pointerCursor = let getFrom = url: hash: name: {
gtk.enable = true;
x11.enable = true;
name = name;
size = 24;
package = pkgs.runCommand "moveUp" {} ''
mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip{
url = url;
hash = hash;
}} $out/share/icons/${name}
'';
}; in getFrom "https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz" "sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=" "BreezX-RosePine-Linux";
};
}
home.pointerCursor = let
getFrom = url: hash: name: {
gtk.enable = true;
x11.enable = true;
name = name;
size = 24;
package = pkgs.runCommand "moveUp" {} ''
mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip {
url = url;
hash = hash;
}} $out/share/icons/${name}
'';
};
in
getFrom "https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz" "sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=" "BreezX-RosePine-Linux";
};
}

View file

@ -1,11 +1,17 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.containers.enable {
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
in
mkIf conf.containers.enable {
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
environment.systemPackages = [ pkgs.distrobox ];
}
environment.systemPackages = [pkgs.distrobox];
}

View file

@ -1,4 +1,4 @@
{ config, ... }: let
{config, ...}: let
inherit (config) conf;
in {
imports = [
@ -31,10 +31,10 @@ in {
defaultLocale = "en_US.UTF-8";
};
users.users.${conf.username}= {
users.users.${conf.username} = {
isNormalUser = true;
description = conf.username;
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = ["networkmanager" "wheel"];
};
system.stateVersion = conf.stateVersion;

View file

@ -14,7 +14,7 @@ stdenvNoCC.mkDerivation {
sourceRoot = ".";
nativeBuildInputs = [ unzip ];
nativeBuildInputs = [unzip];
installPhase = ''
runHook preInstall

View file

@ -1,6 +1,4 @@
{
stdenvNoCC,
}:
{stdenvNoCC}:
stdenvNoCC.mkDerivation {
pname = "blobhaj";
version = "13.12.2022";

View file

@ -1,6 +1,4 @@
{
stdenvNoCC,
}:
{stdenvNoCC}:
stdenvNoCC.mkDerivation {
pname = "blobhajFlags";
version = "1.0";

View file

@ -1,120 +1,126 @@
{ lib, pkgs, config, ... }: let
{
lib,
pkgs,
config,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
inherit ((pkgs.formats.elixirConf { }).lib) mkMap;
neocat = (pkgs.callPackage ./neocat.nix { });
neofox = (pkgs.callPackage ./neofox.nix { });
blobfox = (pkgs.callPackage ./blobfox.nix { });
blobhaj = (pkgs.callPackage ./blobhaj.nix { });
blobhajFlags = (pkgs.callPackage ./blobhajFlags.nix { });
in mkIf conf.fedi.enable {
services.akkoma = {
enable = true;
config = {
":pleroma" = {
":instance" = {
name = "miras fedi";
description = "miras akkoma instance";
email = "fedi@chpu.eu";
registration_open = false;
};
inherit ((pkgs.formats.elixirConf {}).lib) mkMap;
neocat = pkgs.callPackage ./neocat.nix {};
neofox = pkgs.callPackage ./neofox.nix {};
blobfox = pkgs.callPackage ./blobfox.nix {};
blobhaj = pkgs.callPackage ./blobhaj.nix {};
blobhajFlags = pkgs.callPackage ./blobhajFlags.nix {};
in
mkIf conf.fedi.enable {
services.akkoma = {
enable = true;
config = {
":pleroma" = {
":instance" = {
name = "miras fedi";
description = "miras akkoma instance";
email = "fedi@chpu.eu";
registration_open = false;
};
# Initial block list copied from void.rehab
":mrf_simple" = {
reject = mkMap {
"1611.social" = "antisemitism";
"5dollah.click" = "racism";
"aspublic.org" = "privacy violation";
"annihilation.social" = "bigotry";
"bae.st" = "racism";
"baraag.net" = "unmarked lolisho";
"boymoder.biz" = "spam";
"bv.umbrellix.org" = "harassment";
"catposter.club" = "bigotry";
"cawfee.club" = "racism";
"childlove.space" = "csam";
"clew.lol" = "racism";
"clubcyberia.co" = "racism";
"cum.salon" = "spam, privacy violation";
"decayable.ink" = "racism";
"detroitriotcity.com" = "racism";
"eientei.org" = "racism";
"eveningzoo.club" = "transphobia";
"fluf.club" = "bigotry";
"freeatlantis.com" = "transphobia";
"freespeechextremist.com" = "racism";
"freesoftwareextremist.com" = "racism";
"fsebugoutzone.org" = "transphobia";
"gameliberty.club" = "racism";
"genderheretics.xyz" = "transphobia";
"geofront.rocks" = "transphobia";
"gleasonator.com" = "transphobia";
"gh0st.live" = "bigotry";
"h5q.net" = "unmarked lolisho";
"h-i.social" = "antisemitism";
"iddqd.social" = "racism";
"lab.nyanide.com" = "racism";
"linuxrocks.online" = "";
"minds.com" = "racism";
"momostr.pink" = "nostr bridge";
"mostr.pub" = "nostr bridge";
"mrhands.horse" = "racism";
"mugicha.club" = "racism";
"na.social" = "bigotry";
"nationalist.social" = "racism";
"newsmast.community" = "privacy violation";
"nicecrew.digital" = "racism";
"noauthority.social" = "racism";
"norwoodzero.net" = "racism";
"parcero.bond" = "racism";
"pawoo.net" = "csam";
"starnix.network" = "racism";
"plagu.ee" = "racism";
"pleroma.adachi.party" = "racism";
"poa.st" = "racism";
"probablyfreespeech.com" = "no incoming deletes";
"rape.pet" = "i really don't want to have to explain this to you";
"rebased.taihou.website" = "racism";
"ryona.agency" = "antisemitism";
"sacred.harpy.faith" = "racism";
"seal.cafe" = "transphobia";
"soc0.outrnat.nl" = "antisemitism";
"strelizia.net" = "racism";
"taihou.website" = "racism";
"the.asbestos.cafe" = "bigotry";
"thebag.social" = "bigotry";
"threads.net" = "i mean";
"tsundere.love" = "bigotry";
"ubiqueros.com" = "antisemitism";
"whinge.town" = "racism";
"youjo.love" = "unlabelled nsfw";
"youjo.observer" = "sexual harassment";
"qoto.org" = "everything";
"quietplace.xyz" = "slurs";
"zhub.link" = "homophobia";
# Initial block list copied from void.rehab
":mrf_simple" = {
reject = mkMap {
"1611.social" = "antisemitism";
"5dollah.click" = "racism";
"aspublic.org" = "privacy violation";
"annihilation.social" = "bigotry";
"bae.st" = "racism";
"baraag.net" = "unmarked lolisho";
"boymoder.biz" = "spam";
"bv.umbrellix.org" = "harassment";
"catposter.club" = "bigotry";
"cawfee.club" = "racism";
"childlove.space" = "csam";
"clew.lol" = "racism";
"clubcyberia.co" = "racism";
"cum.salon" = "spam, privacy violation";
"decayable.ink" = "racism";
"detroitriotcity.com" = "racism";
"eientei.org" = "racism";
"eveningzoo.club" = "transphobia";
"fluf.club" = "bigotry";
"freeatlantis.com" = "transphobia";
"freespeechextremist.com" = "racism";
"freesoftwareextremist.com" = "racism";
"fsebugoutzone.org" = "transphobia";
"gameliberty.club" = "racism";
"genderheretics.xyz" = "transphobia";
"geofront.rocks" = "transphobia";
"gleasonator.com" = "transphobia";
"gh0st.live" = "bigotry";
"h5q.net" = "unmarked lolisho";
"h-i.social" = "antisemitism";
"iddqd.social" = "racism";
"lab.nyanide.com" = "racism";
"linuxrocks.online" = "";
"minds.com" = "racism";
"momostr.pink" = "nostr bridge";
"mostr.pub" = "nostr bridge";
"mrhands.horse" = "racism";
"mugicha.club" = "racism";
"na.social" = "bigotry";
"nationalist.social" = "racism";
"newsmast.community" = "privacy violation";
"nicecrew.digital" = "racism";
"noauthority.social" = "racism";
"norwoodzero.net" = "racism";
"parcero.bond" = "racism";
"pawoo.net" = "csam";
"starnix.network" = "racism";
"plagu.ee" = "racism";
"pleroma.adachi.party" = "racism";
"poa.st" = "racism";
"probablyfreespeech.com" = "no incoming deletes";
"rape.pet" = "i really don't want to have to explain this to you";
"rebased.taihou.website" = "racism";
"ryona.agency" = "antisemitism";
"sacred.harpy.faith" = "racism";
"seal.cafe" = "transphobia";
"soc0.outrnat.nl" = "antisemitism";
"strelizia.net" = "racism";
"taihou.website" = "racism";
"the.asbestos.cafe" = "bigotry";
"thebag.social" = "bigotry";
"threads.net" = "i mean";
"tsundere.love" = "bigotry";
"ubiqueros.com" = "antisemitism";
"whinge.town" = "racism";
"youjo.love" = "unlabelled nsfw";
"youjo.observer" = "sexual harassment";
"qoto.org" = "everything";
"quietplace.xyz" = "slurs";
"zhub.link" = "homophobia";
};
};
"Pleroma.Web.Endpoint" = {
url.host = "fedi.twoneis.site";
};
"Pleroma.Upload" = {
base_url = "https://fedi.twoneis.site/media/";
};
};
"Pleroma.Web.Endpoint" = {
url.host = "fedi.twoneis.site";
};
"Pleroma.Upload" = {
base_url = "https://fedi.twoneis.site/media/";
};
};
extraStatic = {
"emoji/neocat" = neocat;
"emoji/neofox" = neofox;
"emoji/blobfox" = blobfox;
"emoji/blobhaj" = blobhaj;
"emoji/blobhajFlags" = blobhajFlags;
};
nginx = {
serverName = "fedi.twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
};
};
extraStatic = {
"emoji/neocat" = neocat;
"emoji/neofox" = neofox;
"emoji/blobfox" = blobfox;
"emoji/blobhaj" = blobhaj;
"emoji/blobhajFlags" = blobhajFlags;
};
nginx = {
serverName = "fedi.twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
};
};
}
}

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
networking = {
nftables.enable = true;
firewall.enable = true;

View file

@ -1,21 +1,27 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.fonts.enable {
fonts = {
packages = with pkgs; [
alegreya
alegreya-sans
nerd-fonts.fira-code
roboto
ubuntu_font_family
];
fontconfig = {
defaultFonts = {
serif = [ "Alegreya" ];
sansSerif = [ "Alegreya Sans" ];
monospace = [ "Fira Code Nerd Font" ];
in
mkIf conf.fonts.enable {
fonts = {
packages = with pkgs; [
alegreya
alegreya-sans
nerd-fonts.fira-code
roboto
ubuntu_font_family
];
fontconfig = {
defaultFonts = {
serif = ["Alegreya"];
sansSerif = ["Alegreya Sans"];
monospace = ["Fira Code Nerd Font"];
};
};
};
};
}
}

View file

@ -1,10 +1,15 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
mkXwlWrapper = import ../niri/xwl-wrapper.nix;
holo-script = pkgs.writeShellApplication {
name = "holo-script";
runtimeInputs = [ pkgs.steam pkgs.gamescope ];
runtimeInputs = [pkgs.steam pkgs.gamescope];
text = ''
gamescope -f -r 60 -h 900 -F fsr -e --mangoapp -- steam -tenfoot
'';
@ -19,31 +24,32 @@
name = "Steam Wrapped";
pkg = "steam";
};
in mkIf conf.games.enable {
programs.steam.enable = true;
programs.gamescope.enable = true;
programs.gamemode.enable = true;
in
mkIf conf.games.enable {
programs.steam.enable = true;
programs.gamescope.enable = true;
programs.gamemode.enable = true;
environment.sessionVariables = {
MANGOHUD_CONFIGFILE = "$HOME/.config/MangoHud/MangoHud.conf";
MANGOHUD_CONFIG = "read_cfg";
};
environment.sessionVariables = {
MANGOHUD_CONFIGFILE = "$HOME/.config/MangoHud/MangoHud.conf";
MANGOHUD_CONFIG = "read_cfg";
};
home-manager.users.${conf.username} = {
home.packages = [
pkgs.prismlauncher
holo
steam-wrapped
];
home-manager.users.${conf.username} = {
home.packages = [
pkgs.prismlauncher
holo
steam-wrapped
];
programs.mangohud = {
enable = true;
settings = {
gamemode = true;
refresh_rate = true;
fsr = true;
resolution = true;
programs.mangohud = {
enable = true;
settings = {
gamemode = true;
refresh_rate = true;
fsr = true;
resolution = true;
};
};
};
};
}
}

View file

@ -1,39 +1,44 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
cfg = config.services.forgejo.settings.server;
in mkIf conf.git.enable {
services = {
nginx = {
virtualHosts.${cfg.DOMAIN} = {
forceSSL = true;
useACMEHost = "twoneis.site";
extraConfig = ''
client_max_body_size 512M;
'';
locations."/".proxyPass = "http://localhost:${toString cfg.HTTP_PORT}";
in
mkIf conf.git.enable {
services = {
nginx = {
virtualHosts.${cfg.DOMAIN} = {
forceSSL = true;
useACMEHost = "twoneis.site";
extraConfig = ''
client_max_body_size 512M;
'';
locations."/".proxyPass = "http://localhost:${toString cfg.HTTP_PORT}";
};
};
};
forgejo = {
enable = true;
database = {
type = "postgres";
};
user = "forgejo";
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.twoneis.site";
ROOT_URL = "https://${cfg.DOMAIN}";
HTTP_PORT = 3000;
forgejo = {
enable = true;
database = {
type = "postgres";
};
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
user = "forgejo";
lfs.enable = true;
settings = {
server = {
DOMAIN = "git.twoneis.site";
ROOT_URL = "https://${cfg.DOMAIN}";
HTTP_PORT = 3000;
};
service.DISABLE_REGISTRATION = true;
actions = {
ENABLED = true;
DEFAULT_ACTIONS_URL = "github";
};
};
};
};
};
}
}

View file

@ -1,6 +1,6 @@
{ config, ... }: let
{config, ...}: let
inherit (config) conf;
in{
in {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View file

@ -1,17 +1,22 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
inherit (config.conf) extraLayout;
in mkIf extraLayout.enable {
services.xserver.xkb = {
layout = "custom,us";
options = "compose:ralt";
in
mkIf extraLayout.enable {
services.xserver.xkb = {
layout = "custom,us";
options = "compose:ralt";
extraLayouts."custom" = {
description = "custom dvorak-like layout.";
languages = [ "en" ];
symbolsFile = ./custom.xkb;
extraLayouts."custom" = {
description = "custom dvorak-like layout.";
languages = ["en"];
symbolsFile = ./custom.xkb;
};
};
};
console.keyMap = "us";
}
console.keyMap = "us";
}

View file

@ -1,93 +1,98 @@
{ config, lib, ... }: let
{
config,
lib,
...
}: let
inherit (config) conf;
inherit (lib) mkIf;
in mkIf conf.mail.enable {
services.nginx = {
virtualHosts."chpu.eu" = {
serverName = "chpu.eu";
serverAliases = [
"webadmin.chpu.eu"
"autoconfig.chpu.eu"
"autodiscover.chpu.eu"
];
forceSSL = true;
useACMEHost = "chpu.eu";
locations = {
"/" = {
proxyPass = "http://localhost:9090";
in
mkIf conf.mail.enable {
services.nginx = {
virtualHosts."chpu.eu" = {
serverName = "chpu.eu";
serverAliases = [
"webadmin.chpu.eu"
"autoconfig.chpu.eu"
"autodiscover.chpu.eu"
];
forceSSL = true;
useACMEHost = "chpu.eu";
locations = {
"/" = {
proxyPass = "http://localhost:9090";
};
};
};
};
};
users.users."stalwart-mail".extraGroups = [ "nginx" ];
users.users."stalwart-mail".extraGroups = ["nginx"];
services.stalwart-mail = {
enable = true;
settings = {
config.local-keys = [
"certificate.default.cert"
"certificate.default.private-key"
"authentication.fallback-admin.secret"
];
server = {
hostname = "chpu.eu";
tls = {
services.stalwart-mail = {
enable = true;
settings = {
config.local-keys = [
"certificate.default.cert"
"certificate.default.private-key"
"authentication.fallback-admin.secret"
];
server = {
hostname = "chpu.eu";
tls = {
enable = true;
implicit = true;
};
listener = {
submissions = {
protocol = "smtp";
bind = "[::]:465";
};
smtp = {
protocol = "smtp";
bind = "[::]:25";
};
imaps = {
protocol = "imap";
bind = "[::]:993";
};
management = {
protocol = "http";
bind = "127.0.0.1:9090";
};
};
};
lookup.default = {
hostname = "chpu.eu";
domain = "chpu.eu";
};
certificate.default = {
default = true;
cert = "%{file:/var/lib/acme/chpu.eu/cert.pem}%";
private-key = "%{file:/var/lib/acme/chpu.eu/key.pem}%";
};
storage = {
data = "db";
fts = "db";
block = "db";
lookup = "db";
directory = "internal";
};
directory."internal" = {
type = "internal";
store = "db";
};
tracer."stdout" = {
type = "stdout";
level = "info";
ansi = false;
enable = true;
implicit = true;
};
listener = {
submissions = {
protocol = "smtp";
bind = "[::]:465";
};
smtp = {
protocol = "smtp";
bind = "[::]:25";
};
imaps = {
protocol = "imap";
bind = "[::]:993";
};
management = {
protocol = "http";
bind = "127.0.0.1:9090";
};
session.rcpt = {
directory = "'internal'";
};
authentication.fallback-admin = {
user = "admin";
secret = "%{file:/var/lib/stalwart-mail/secret/admin}%";
};
};
lookup.default = {
hostname = "chpu.eu";
domain = "chpu.eu";
};
certificate.default = {
default = true;
cert = "%{file:/var/lib/acme/chpu.eu/cert.pem}%";
private-key = "%{file:/var/lib/acme/chpu.eu/key.pem}%";
};
storage = {
data = "db";
fts = "db";
block = "db";
lookup = "db";
directory = "internal";
};
directory."internal" = {
type = "internal";
store = "db";
};
tracer."stdout" = {
type = "stdout";
level = "info";
ansi = false;
enable = true;
};
session.rcpt = {
directory = "'internal'";
};
authentication.fallback-admin = {
user = "admin";
secret = "%{file:/var/lib/stalwart-mail/secret/admin}%";
};
};
};
}
}

View file

@ -1,52 +1,57 @@
{ config, lib, ... }: let
{
config,
lib,
...
}: let
inherit (config) conf;
inherit (lib) mkIf;
in mkIf conf.matrix.enable {
services.nginx.virtualHosts = {
"twoneis.site" = {
serverName = "twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
locations = {
"/.well-known/matrix/server" = {
return = "200 '{\"m.server\": \"matrix.twoneis.site:443\"}'";
in
mkIf conf.matrix.enable {
services.nginx.virtualHosts = {
"twoneis.site" = {
serverName = "twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
locations = {
"/.well-known/matrix/server" = {
return = "200 '{\"m.server\": \"matrix.twoneis.site:443\"}'";
};
"/.well-known/matrix/client" = {
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.twoneis.site\"}, \"org.matrix.msc3575.proxy\": {\"url\": \"https://matrix.twoneis.site\"}}'";
};
"/.well-known/matrix/support" = {
return = "200 '{\"contacts\": [{\"matrix_id\": \"@mira:twoneis.site\", \"email_address\": \"matrix@chpu.eu\", \"role\": \"m.role.admin\"}]}'";
};
};
"/.well-known/matrix/client" = {
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.twoneis.site\"}, \"org.matrix.msc3575.proxy\": {\"url\": \"https://matrix.twoneis.site\"}}'";
};
"/.well-known/matrix/support" = {
return = "200 '{\"contacts\": [{\"matrix_id\": \"@mira:twoneis.site\", \"email_address\": \"matrix@chpu.eu\", \"role\": \"m.role.admin\"}]}'";
};
"matrix.twoneis.site" = {
serverName = "matrix.twoneis.site";
forceSSL = true;
useACMEHost = "twoneis.site";
locations = {
"/" = {
proxyPass = "http://localhost:6167";
};
"/.well-known/matrix/server" = {
return = "200 '{\"m.server\": \"matrix.twoneis.site:443\"}'";
};
"/.well-known/matrix/client" = {
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.twoneis.site\"}, \"org.matrix.msc3575.proxy\": {\"url\": \"https://matrix.twoneis.site\"}}'";
};
"/.well-known/matrix/support" = {
return = "200 '{\"contacts\": [{\"matrix_id\": \"@mira:twoneis.site\", \"email_address\": \"matrix@chpu.eu\", \"role\": \"m.role.admin\"}]}'";
};
};
};
};
"matrix.twoneis.site" = {
serverName = "matrix.twoneis.site";
forceSSL = true;
useACMEHost = "twoneis.site";
locations = {
"/" = {
proxyPass = "http://localhost:6167";
};
"/.well-known/matrix/server" = {
return = "200 '{\"m.server\": \"matrix.twoneis.site:443\"}'";
};
"/.well-known/matrix/client" = {
return = "200 '{\"m.homeserver\": {\"base_url\": \"https://matrix.twoneis.site\"}, \"org.matrix.msc3575.proxy\": {\"url\": \"https://matrix.twoneis.site\"}}'";
};
"/.well-known/matrix/support" = {
return = "200 '{\"contacts\": [{\"matrix_id\": \"@mira:twoneis.site\", \"email_address\": \"matrix@chpu.eu\", \"role\": \"m.role.admin\"}]}'";
};
services.conduwuit = {
enable = true;
settings.global = {
server_name = "matrix.twoneis.site";
allow_registration = false;
};
};
};
services.conduwuit = {
enable = true;
settings.global = {
server_name = "matrix.twoneis.site";
allow_registration = false;
};
};
networking.firewall.allowedTCPPorts = [ 443 8448 ];
}
networking.firewall.allowedTCPPorts = [443 8448];
}

View file

@ -1,16 +1,21 @@
{ config, lib, pkgs, ... }: let
{
config,
lib,
pkgs,
...
}: let
inherit (config) conf;
inherit (lib) mkIf;
in mkIf conf.networkmanager.enable {
home-manager.users.${conf.username}.home.packages = [ pkgs.networkmanagerapplet ];
networking = {
networkmanager = {
enable = true;
wifi.backend = "iwd";
in
mkIf conf.networkmanager.enable {
home-manager.users.${conf.username}.home.packages = [pkgs.networkmanagerapplet];
networking = {
networkmanager = {
enable = true;
wifi.backend = "iwd";
};
extraHosts = ''
10.10.11.245 surveillance.htb
'';
};
extraHosts =
''
10.10.11.245 surveillance.htb
'';
};
}
}

View file

@ -1,52 +1,57 @@
{ config, lib, ... }: let
{
config,
lib,
...
}: let
inherit (config) conf;
inherit (lib) mkIf;
in mkIf conf.nginx.enable {
security.acme = {
acceptTerms = true;
defaults.email = "mira.cp.0909@gmail.com";
certs = {
"twoneis.site" = {
group = "nginx";
domain = "twoneis.site";
extraDomainNames = [ "*.twoneis.site" ];
dnsProvider = "porkbun";
email = "mira.cp.0909@gmail.com";
environmentFile = "/root/porkbun-creds";
};
in
mkIf conf.nginx.enable {
security.acme = {
acceptTerms = true;
defaults.email = "mira.cp.0909@gmail.com";
certs = {
"twoneis.site" = {
group = "nginx";
domain = "twoneis.site";
extraDomainNames = ["*.twoneis.site"];
dnsProvider = "porkbun";
email = "mira.cp.0909@gmail.com";
environmentFile = "/root/porkbun-creds";
};
"chpu.eu" = {
group = "nginx";
domain = "chpu.eu";
extraDomainNames = [ "*.chpu.eu" ];
dnsProvider = "porkbun";
email = "mira.cp.0909@gmail.com";
environmentFile = "/root/porkbun-creds";
"chpu.eu" = {
group = "nginx";
domain = "chpu.eu";
extraDomainNames = ["*.chpu.eu"];
dnsProvider = "porkbun";
email = "mira.cp.0909@gmail.com";
environmentFile = "/root/porkbun-creds";
};
};
};
};
users.users.nginx.extraGroups = [ "acme" ];
users.users.nginx.extraGroups = ["acme"];
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"chpu.eu" = {
serverName = "chpu.eu";
useACMEHost = "chpu.eu";
forceSSL = true;
};
"twoneis.site" = {
serverName = "twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
services.nginx = {
enable = true;
recommendedProxySettings = true;
virtualHosts = {
"chpu.eu" = {
serverName = "chpu.eu";
useACMEHost = "chpu.eu";
forceSSL = true;
};
"twoneis.site" = {
serverName = "twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
};
};
};
};
networking.firewall.allowedTCPPorts = [
80
443
];
}
networking.firewall.allowedTCPPorts = [
80
443
];
}

View file

@ -1,8 +1,14 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
swayosd-style = pkgs.writeText "swayosd.css"
(import ./swayosd.css.nix { config = config; }).style;
swayosd-style =
pkgs.writeText "swayosd.css"
(import ./swayosd.css.nix {config = config;}).style;
in {
config = mkIf conf.niri.enable {
environment.sessionVariables = {
@ -10,12 +16,12 @@ in {
};
environment.systemPackages = [
(pkgs.catppuccin-sddm.override ({
(pkgs.catppuccin-sddm.override {
flavor = "mocha";
font = "Fira Code Nerd Font";
background = "${./sddm.wallpaper.png}";
loginBackground = true;
}))
})
];
services.displayManager.sddm = {
@ -55,26 +61,35 @@ in {
};
programs.niri = {
settings = import ./niri.conf.nix { lib = lib; config = config; };
settings = import ./niri.conf.nix {
lib = lib;
config = config;
};
};
programs.fuzzel= {
programs.fuzzel = {
enable = true;
settings = import ./fuzzel.conf.nix { lib = lib; config = config; };
settings = import ./fuzzel.conf.nix {
lib = lib;
config = config;
};
};
programs.waybar = {
enable = true;
settings = import ./waybar.conf.nix { };
style = (import ./waybar.css.nix { config = config; }).style;
settings = import ./waybar.conf.nix {};
style = (import ./waybar.css.nix {config = config;}).style;
};
programs.swaylock = {
enable = true;
package = (pkgs.swaylock-effects.overrideAttrs (final: prev: {
buildInputs = prev.buildInputs ++ [ pkgs.wayland-scanner ];
}));
settings = import ./swaylock.conf.nix { lib = lib; config = config; };
package = pkgs.swaylock-effects.overrideAttrs (final: prev: {
buildInputs = prev.buildInputs ++ [pkgs.wayland-scanner];
});
settings = import ./swaylock.conf.nix {
lib = lib;
config = config;
};
};
services.mako = {

View file

@ -1,4 +1,8 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib.strings) concatStrings;
inherit (config) theme;
in {
@ -10,14 +14,14 @@ in {
prompt = "'󱄅 '";
};
colors = {
background = concatStrings [ theme.surface "ee" ];
prompt = concatStrings [ theme.text "ff" ];
input = concatStrings [ theme.text "ff" ];
text = concatStrings [ theme.text "ff" ];
match = concatStrings [ theme.gold "ff" ];
selection = concatStrings [ theme.highlight-med "ee" ];
selection-text = concatStrings [ theme.text "ff" ];
selection-match = concatStrings [ theme.gold "ff" ];
background = concatStrings [theme.surface "ee"];
prompt = concatStrings [theme.text "ff"];
input = concatStrings [theme.text "ff"];
text = concatStrings [theme.text "ff"];
match = concatStrings [theme.gold "ff"];
selection = concatStrings [theme.highlight-med "ee"];
selection-text = concatStrings [theme.text "ff"];
selection-match = concatStrings [theme.gold "ff"];
};
border = {
width = 0;

View file

@ -1,53 +1,60 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (config.conf) keys extraLayout;
inherit (lib.attrsets) genAttrs;
inherit (lib) mkMerge;
in {
input = {
keyboard = {
xkb = {
layout = if extraLayout.enable then "custom,us" else "us";
options = "compose:ralt";
};
keyboard = {
xkb = {
layout =
if extraLayout.enable
then "custom,us"
else "us";
options = "compose:ralt";
};
touchpad = {
tap = true;
natural-scroll = true;
dwt = true;
};
power-key-handling.enable = false;
};
touchpad = {
tap = true;
natural-scroll = true;
dwt = true;
};
power-key-handling.enable = false;
};
outputs = mkMerge [
{
# Framework builtin Display
"BOE 0x0BCA Unknown" = {
scale = 1;
mode = {
width = 2256;
height = 1504;
refresh = 59.999;
};
position = {
x = 0;
y = 0;
};
background-color = config.theme.base;
scale = 1;
mode = {
width = 2256;
height = 1504;
refresh = 59.999;
};
position = {
x = 0;
y = 0;
};
background-color = config.theme.base;
};
# Home Monitor
"Microstep MSI PS341WU 0000000000000" = {
scale = 1;
mode = {
width = 5120;
height = 2160;
refresh = 59.940;
};
position = {
x = -1280;
y = -2160;
};
background-color = config.theme.base;
"Microstep MSI PS341WU 0000000000000" = {
scale = 1;
mode = {
width = 5120;
height = 2160;
refresh = 59.940;
};
position = {
x = -1280;
y = -2160;
};
background-color = config.theme.base;
};
# Uni Monitors
@ -76,29 +83,29 @@ in {
];
layout = {
focus-ring = {
width = 2;
active.gradient = {
to = config.theme.rose;
from = config.theme.pine;
in' = "oklch shorter hue";
angle=135;
};
inactive.color = config.theme.iris;
focus-ring = {
width = 2;
active.gradient = {
to = config.theme.rose;
from = config.theme.pine;
in' = "oklch shorter hue";
angle = 135;
};
inactive.color = config.theme.iris;
};
preset-column-widths = [
{ proportion = 0.25; }
{ proportion = 0.5; }
{ proportion = 0.75; }
];
preset-column-widths = [
{proportion = 0.25;}
{proportion = 0.5;}
{proportion = 0.75;}
];
default-column-width = { };
default-column-width = {};
gaps = 4;
struts = {
top = 2;
};
gaps = 4;
struts = {
top = 2;
};
};
window-rules = [
@ -107,7 +114,7 @@ in {
top-left = 8.0;
top-right = 8.0;
bottom-left = 8.0;
bottom-right= 8.0;
bottom-right = 8.0;
};
clip-to-geometry = true;
}
@ -120,8 +127,8 @@ in {
hotkey-overlay.skip-at-startup = true;
spawn-at-startup = [
{ command = [ "waybar" ]; }
{ command = [ "swayidle" "-w" "before-sleep" "swaylock" ]; }
{command = ["waybar"];}
{command = ["swayidle" "-w" "before-sleep" "swaylock"];}
];
binds = {
@ -131,30 +138,46 @@ in {
"Mod+Space".action.spawn = "fuzzel";
"XF86AudioRaiseVolume".action.spawn = [
"swayosd-client" "--output-volume" "raise"
"swayosd-client"
"--output-volume"
"raise"
];
"XF86AudioLowerVolume".action.spawn = [
"swayosd-client" "--output-volume" "lower"
"swayosd-client"
"--output-volume"
"lower"
];
"XF86AudioMute".action.spawn = [
"swayosd-client" "--output-volume" "mute-toggle"
"swayosd-client"
"--output-volume"
"mute-toggle"
];
"Mod+XF86AudioRaiseVolume".action.spawn = [
"swayosd-client" "--input-volume" "raise"
"swayosd-client"
"--input-volume"
"raise"
];
"Mod+XF86AudioLowerVolume".action.spawn = [
"swayosd-client" "--input-volume" "lower"
"swayosd-client"
"--input-volume"
"lower"
];
"Mod+XF86AudioMute".action.spawn = [
"swayosd-client" "--output-volume" "mute-toggle"
"swayosd-client"
"--output-volume"
"mute-toggle"
];
"XF86MonBrightnessDown".action.spawn = [
"swayosd-client" "--brightness" "lower"
"swayosd-client"
"--brightness"
"lower"
];
"XF86MonBrightnessUp".action.spawn = [
"swayosd-client" "--brightness" "raise"
"swayosd-client"
"--brightness"
"raise"
];
"Mod+Backspace".action.close-window = [];

View file

@ -1,4 +1,4 @@
{ config, ... }: let
{config, ...}: let
base = config.theme.base;
surface = config.theme.surface;
text = config.theme.text;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View file

@ -1,4 +1,8 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib.strings) concatStrings;
inherit (config) theme;
in {
@ -16,11 +20,11 @@ in {
indicator-radius = 100;
indicator-thickness = 4;
inside-color = concatStrings [ theme.overlay "aa" ];
inside-clear-color = concatStrings [ theme.subtle "aa" ];
inside-caps-lock-color = concatStrings [ theme.rose "aa" ];
inside-ver-color = concatStrings [ theme.foam "aa" ];
inside-wrong-color = concatStrings [ theme.love "aa" ];
inside-color = concatStrings [theme.overlay "aa"];
inside-clear-color = concatStrings [theme.subtle "aa"];
inside-caps-lock-color = concatStrings [theme.rose "aa"];
inside-ver-color = concatStrings [theme.foam "aa"];
inside-wrong-color = concatStrings [theme.love "aa"];
line-uses-inside = true;
ring-color = theme.surface;
@ -36,8 +40,8 @@ in {
caps-lock-key-hl-color = theme.iris;
caps-lock-bs-hl-color = theme.love;
layout-bg-color = concatStrings [ theme.overlay "aa" ];
layout-border-color = concatStrings [ theme.overlay "aa" ];
layout-bg-color = concatStrings [theme.overlay "aa"];
layout-border-color = concatStrings [theme.overlay "aa"];
layout-text-color = theme.text;
text-color = theme.text;

View file

@ -1,30 +1,30 @@
{ config, ... }: let
background = config.theme.overlay;
muted = config.theme.muted;
font = config.theme.text;
{config, ...}: let
background = config.theme.overlay;
muted = config.theme.muted;
font = config.theme.text;
in {
style = ''
window#osd {
border-radius: 8px;
border: none;
background: ${background};
}
style = ''
window#osd {
border-radius: 8px;
border: none;
background: ${background};
}
image,
label {
color: ${font};
}
image,
label {
color: ${font};
}
progressbar {
background: ${muted};
}
progressbar {
background: ${muted};
}
progress:disabled {
background: ${font};
}
progress:disabled {
background: ${font};
}
progress {
background: ${font};
}
'';
progress {
background: ${font};
}
'';
}

View file

@ -1,4 +1,4 @@
{ ... }: {
{...}: {
mainBar = {
layer = "top";
position = "top";

View file

@ -1,62 +1,62 @@
{ config, ... }: let
best = config.theme.pine;
better = config.theme.foam;
good = config.theme.iris;
bad = config.theme.rose;
worse = config.theme.gold;
worst = config.theme.love;
charging = config.theme.highlight-high;
{config, ...}: let
best = config.theme.pine;
better = config.theme.foam;
good = config.theme.iris;
bad = config.theme.rose;
worse = config.theme.gold;
worst = config.theme.love;
charging = config.theme.highlight-high;
in {
style = ''
* {
font-size: 1px;
}
style = ''
* {
font-size: 1px;
}
window#waybar {
background: rgba(0, 0, 0, 0);
}
window#waybar {
background: rgba(0, 0, 0, 0);
}
#battery {
border: none;
border-radius: 4px;
min-height: 4px;
min-width: 720px;
margin: 2px;
background: ${best};
}
#battery.better {
background: ${better};
}
#battery.good {
background: ${good};
}
#battery.bad {
background: ${bad};
}
#battery.worse {
background: ${worse};
}
#battery.worst {
background: ${worst};
}
#battery {
border: none;
border-radius: 4px;
min-height: 4px;
min-width: 720px;
margin: 2px;
background: ${best};
}
#battery.better {
background: ${better};
}
#battery.good {
background: ${good};
}
#battery.bad {
background: ${bad};
}
#battery.worse {
background: ${worse};
}
#battery.worst {
background: ${worst};
}
#battery.charging {
background: linear-gradient(0deg, ${charging}, ${best});
}
#battery.better.charging {
background: linear-gradient(0deg, ${best}, ${better});
}
#battery.good.charging {
background: linear-gradient(0deg, ${better}, ${good});
}
#battery.bad.charging {
background: linear-gradient(0deg, ${good}, ${bad});
}
#battery.worse.charging {
background: linear-gradient(0deg, ${bad}, ${worse});
}
#battery.worst.charging {
background: linear-gradient(0deg, ${worse}, ${worst});
}
'';
#battery.charging {
background: linear-gradient(0deg, ${charging}, ${best});
}
#battery.better.charging {
background: linear-gradient(0deg, ${best}, ${better});
}
#battery.good.charging {
background: linear-gradient(0deg, ${better}, ${good});
}
#battery.bad.charging {
background: linear-gradient(0deg, ${good}, ${bad});
}
#battery.worse.charging {
background: linear-gradient(0deg, ${bad}, ${worse});
}
#battery.worst.charging {
background: linear-gradient(0deg, ${worse}, ${worst});
}
'';
}

View file

@ -1,13 +1,20 @@
{ pkgs, name, pkg ? name, exe ? pkg, ... }: let
{
pkgs,
name,
pkg ? name,
exe ? pkg,
...
}: let
inherit (pkgs.lib) concatStrings;
config = pkgs.writeTextFile {
name = concatStrings [ "i3-config" name ];
name = concatStrings ["i3-config" name];
text = ''
exec ${pkgs.${pkg}}/bin/${exe}
'';
};
in pkgs.makeDesktopItem {
name = name;
desktopName = name;
exec = "${pkgs.xwayland-run}/bin/xwayland-run -- ${pkgs.i3}/bin/i3 -c ${config}";
}
in
pkgs.makeDesktopItem {
name = name;
desktopName = name;
exec = "${pkgs.xwayland-run}/bin/xwayland-run -- ${pkgs.i3}/bin/i3 -c ${config}";
}

View file

@ -1,4 +1,8 @@
{ inputs, ... }: {
{
pkgs,
inputs,
...
}: {
nix = {
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
gc = {
@ -7,7 +11,7 @@
options = "--delete-older-than 14d";
};
settings = {
experimental-features = [ "nix-command" "flakes" ];
experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true;
};
};
@ -22,4 +26,5 @@
allowUnfree = true;
};
};
environment.systemPackages = [inputs.alejandra.defaultPackage.${pkgs.system}];
}

View file

@ -1,13 +1,19 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf mkForce;
inherit (config) conf;
in mkIf conf.secureboot.enable {
environment.systemPackages = [ pkgs.sbctl ];
in
mkIf conf.secureboot.enable {
environment.systemPackages = [pkgs.sbctl];
boot.loader.systemd-boot.enable = mkForce false;
boot.loader.systemd-boot.enable = mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
}
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
}

View file

@ -1,19 +1,24 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.ssh.enable {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
in
mkIf conf.ssh.enable {
services.openssh = {
enable = true;
settings = {
PasswordAuthentication = false;
};
};
};
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYy89cBNXjet2kBbOw7CKMJguyIq72EQV8ixo836nOH"
];
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYy89cBNXjet2kBbOw7CKMJguyIq72EQV8ixo836nOH"
];
users.users.${conf.username}.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYy89cBNXjet2kBbOw7CKMJguyIq72EQV8ixo836nOH"
];
}
users.users.${conf.username}.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYy89cBNXjet2kBbOw7CKMJguyIq72EQV8ixo836nOH"
];
}

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }: let
{
config,
lib,
pkgs,
...
}: let
inherit (config) conf;
inherit (config.conf) keys;
inherit (lib.strings) concatMapStrings;
@ -54,9 +59,9 @@ in {
programs.helix = {
enable = true;
defaultEditor = true;
extraPackages = with pkgs; [ nil marksman ];
settings = import ./helix.conf.nix { config = config; };
languages = import ./helix-languages.conf.nix { };
extraPackages = with pkgs; [nil marksman];
settings = import ./helix.conf.nix {config = config;};
languages = import ./helix-languages.conf.nix {};
};
programs.direnv = {
@ -71,14 +76,20 @@ in {
programs.hyfetch = {
enable = true;
settings = import ./hyfetch.conf.nix { };
settings = import ./hyfetch.conf.nix {};
};
programs.fish = {
enable = true;
plugins = with pkgs.fishPlugins; [
{ name = "pure"; src = pure.src; }
{ name = "bass"; src = bass.src; }
{
name = "pure";
src = pure.src;
}
{
name = "bass";
src = bass.src;
}
];
interactiveShellInit = concatMapStrings (x: "set --universal " + x + "\n") [
"pure_enable_nixdevshell true"

View file

@ -6,6 +6,10 @@
};
language = [{
name = "nix";
auto-format = true;
formatter.command = "alejandra";
} {
name = "gas";
scope = "source.gas";
auto-format = false;

View file

@ -1,4 +1,4 @@
{ config, ... }: let
{config, ...}: let
inherit (config.conf) keys;
in {
theme = "rose_pine";
@ -15,12 +15,12 @@ in {
display-inlay-hints = true;
};
gutters = [ "diagnostics" "line-numbers" "diff" ];
gutters = ["diagnostics" "line-numbers" "diff"];
statusline = {
left = [ "mode" "spinner" "version-control" ];
center = [ "file-modification-indicator" "read-only-indicator" "file-name" ];
right = [ "diagnostics" "position" ];
left = ["mode" "spinner" "version-control"];
center = ["file-modification-indicator" "read-only-indicator" "file-name"];
right = ["diagnostics" "position"];
};
cursor-shape = {
@ -30,7 +30,7 @@ in {
};
};
keys.normal = {
keys.normal = {
${keys.up} = "move_line_up";
${keys.down} = "move_line_down";
${keys.left} = "move_char_left";

View file

@ -1,10 +1,10 @@
{ ... }: {
{...}: {
preset = "transgender";
mode = "rgb";
light_dark = "dark";
lightness = 0.65;
color_align = {
mode = "horizontal";
mode = "horizontal";
};
backend = "neofetch";
distro = "nixos_old";

View file

@ -1,20 +1,26 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.vm.enable {
virtualisation.libvirtd = {
enable = true;
qemu.vhostUserPackages = [ pkgs.virtiofsd ];
};
programs.virt-manager.enable = true;
in
mkIf conf.vm.enable {
virtualisation.libvirtd = {
enable = true;
qemu.vhostUserPackages = [pkgs.virtiofsd];
};
programs.virt-manager.enable = true;
users.users.${conf.username}.extraGroups = [ "libvirtd" ];
home-manager.users.${conf.username} = {
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ];
uris = [ "qemu:///system" ];
users.users.${conf.username}.extraGroups = ["libvirtd"];
home-manager.users.${conf.username} = {
dconf.settings = {
"org/virt-manager/virt-manager/connections" = {
autoconnect = ["qemu:///system"];
uris = ["qemu:///system"];
};
};
};
};
}
}

View file

@ -1,14 +1,19 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.website.enable {
services.nginx.virtualHosts = {
"twoneis.site" = {
default = true;
serverName = "twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
root = "/var/lib/website/";
in
mkIf conf.website.enable {
services.nginx.virtualHosts = {
"twoneis.site" = {
default = true;
serverName = "twoneis.site";
useACMEHost = "twoneis.site";
forceSSL = true;
root = "/var/lib/website/";
};
};
};
}
}

View file

@ -1,4 +1,4 @@
{ lib, ... }: let
{lib, ...}: let
inherit (lib) mkOption mkEnableOption;
inherit (lib.types) nullOr attrsOf str;
in {
@ -48,7 +48,7 @@ in {
keys = mkOption {
type = attrsOf str;
description =- "Default key binds.";
description = - "Default key binds.";
default = {
up = "t";
down = "n";
@ -68,7 +68,7 @@ in {
disks = mkOption {
type = attrsOf str;
description = "A set of UUIDs of the partitions/lvms/... that can be used easily reused in the config. In this config boot and root are assumed to be always present.";
default = { };
default = {};
example = {
boot = "4672-C1A9";
crypt = "747ae319-f189-44f5-9737-a42672e2c02d";

View file

@ -1,11 +1,19 @@
{ nixpkgs, home-manager, nixos-hardware, disko, niri, lanzaboote, ... }@inputs: let
{
nixpkgs,
home-manager,
nixos-hardware,
disko,
niri,
lanzaboote,
...
} @ inputs: let
modules = [
./options.nix
./modules
niri.nixosModules.niri
home-manager.nixosModules.home-manager
lanzaboote.nixosModules.lanzaboote
disko.nixosModules.disko
./options.nix
./modules
niri.nixosModules.niri
home-manager.nixosModules.home-manager
lanzaboote.nixosModules.lanzaboote
disko.nixosModules.disko
];
in {
nixosConfigurations = {
@ -18,10 +26,12 @@ in {
specialArgs = {
inherit inputs;
};
modules = [
./devices/inkvine
nixos-hardware.nixosModules.framework-13-7040-amd
] ++ modules;
modules =
[
./devices/inkvine
nixos-hardware.nixosModules.framework-13-7040-amd
]
++ modules;
};
ellaca = nixpkgs.lib.nixosSystem {
@ -29,9 +39,11 @@ in {
specialArgs = {
inherit inputs;
};
modules = [
./devices/ellaca
] ++ modules;
modules =
[
./devices/ellaca
]
++ modules;
};
};
}