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 = [ imports = [
./options.nix ./options.nix
./disko.nix ./disko.nix
@ -13,16 +12,15 @@
}; };
boot = { 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; kernelPackages = pkgs.linuxPackages_latest;
loader = { loader = {
grub = { grub = {
devices = [ "/dev/sda" ]; devices = ["/dev/sda"];
useOSProber = true; useOSProber = true;
efiSupport = true; efiSupport = true;
efiInstallAsRemovable = true; efiInstallAsRemovable = true;
}; };
}; };
}; };
} }

View file

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

View file

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

View file

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

View file

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

View file

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

79
flake.lock generated
View file

@ -1,5 +1,28 @@
{ {
"nodes": { "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": { "crane": {
"locked": { "locked": {
"lastModified": 1731098351, "lastModified": 1731098351,
@ -36,6 +59,28 @@
"type": "github" "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-compat": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -109,6 +154,22 @@
"type": "github" "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": { "gitignore": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
@ -420,6 +481,7 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"alejandra": "alejandra",
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"lanzaboote": "lanzaboote", "lanzaboote": "lanzaboote",
@ -430,6 +492,23 @@
"nur": "nur" "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": { "rust-overlay": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [

View file

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

View file

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

View file

@ -1,7 +1,12 @@
{ config, lib, ... }: let {
config,
lib,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) conf; inherit (config) conf;
in mkIf conf.apps.enable { in
programs.adb.enable = true; mkIf conf.apps.enable {
users.users.${conf.username}.extraGroups = [ "adbusers" ]; 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 (lib) mkIf mkForce;
inherit (config) conf; inherit (config) conf;
in { in {
@ -45,7 +50,7 @@ in {
# Regularly clean download folder # Regularly clean download folder
systemd = { systemd = {
timers."clean-download" = { timers."clean-download" = {
wantedBy = [ "timers.target" ]; wantedBy = ["timers.target"];
timerConfig = { timerConfig = {
OnCalendar = "*-*-* 03:00:00"; OnCalendar = "*-*-* 03:00:00";
Unit = "clean-download.service"; Unit = "clean-download.service";

View file

@ -1,151 +1,215 @@
{ lib, config, pkgs, ... }: let {
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) conf; inherit (config) conf;
in mkIf conf.apps.enable { in
home-manager.users.${conf.username} = { mkIf conf.apps.enable {
programs.firefox = { home-manager.users.${conf.username} = {
enable = true; programs.firefox = {
profiles = { enable = true;
"default" = { profiles = {
id = 0; "default" = {
id = 0;
search = { search = {
default = "DuckDuckGoo"; default = "DuckDuckGoo";
privateDefault = "DuckDuckGoo"; privateDefault = "DuckDuckGoo";
engines = { engines = {
"DuckDuckGo".metaData.hidden = true; "DuckDuckGo".metaData.hidden = true;
"Google".metaData.hidden = true; "Google".metaData.hidden = true;
"Amazon.com".metaData.hidden = true; "Amazon.com".metaData.hidden = true;
"Bing".metaData.hidden = true; "Bing".metaData.hidden = true;
"Wikipedia (en)".metaData.hidden = true; "Wikipedia (en)".metaData.hidden = true;
"DuckDuckGoo" = { "DuckDuckGoo" = {
urls = [{ urls = [
template = "https://duckduckgo.com/"; {
params = [ template = "https://duckduckgo.com/";
{ name = "q"; value = "{searchTerms}"; } params = [
{
name = "q";
value = "{searchTerms}";
}
];
}
]; ];
}]; definedAliases = ["@ddg"];
definedAliases = [ "@ddg" ]; };
}; "Googlee" = {
"Googlee" = { urls = [
urls = [{ {
template = "https://google.com/search"; template = "https://google.com/search";
params = [ params = [
{ name = "q"; value = "{searchTerms}"; } {
name = "q";
value = "{searchTerms}";
}
];
}
]; ];
}]; definedAliases = ["@g"];
definedAliases = [ "@g" ]; };
}; "Wikipedia" = {
"Wikipedia" = { urls = [
urls = [{ {
template = "https://en.wikipedia.org/wiki/Special:Search"; template = "https://en.wikipedia.org/wiki/Special:Search";
params = [ params = [
{ name = "search"; value = "{searchTerms}"; } {
name = "search";
value = "{searchTerms}";
}
];
}
]; ];
}]; definedAliases = ["@wiki"];
definedAliases = [ "@wiki" ]; };
}; "YouTube" = {
"YouTube" = { urls = [
urls = [{ {
template = "https://youtube.com/results"; template = "https://youtube.com/results";
params = [ params = [
{ name = "search_query"; value = "{searchTerms}"; } {
name = "search_query";
value = "{searchTerms}";
}
];
}
]; ];
}]; definedAliases = ["@yt"];
definedAliases = [ "@yt" ]; };
}; "Nix Packages" = {
"Nix Packages" = { urls = [
urls = [{ {
template = "https://search.nixos.org/packages"; template = "https://search.nixos.org/packages";
params = [ params = [
{ name = "channel"; value = "unstable"; } {
{ name = "type"; value = "packages"; } name = "channel";
{ name = "query"; value = "{searchTerms}"; } value = "unstable";
}
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
]; ];
}]; definedAliases = ["@np"];
definedAliases = [ "@np" ]; };
}; "Nix Options" = {
"Nix Options" = { urls = [
urls = [{ {
template = "https://search.nixos.org/options"; template = "https://search.nixos.org/options";
params = [ params = [
{ name = "channel"; value = "unstable"; } {
{ name = "type"; value = "packages"; } name = "channel";
{ name = "query"; value = "{searchTerms}"; } value = "unstable";
}
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}
]; ];
}]; definedAliases = ["@no"];
definedAliases = [ "@no" ]; };
}; "Arch Wiki" = {
"Arch Wiki" = { urls = [
urls = [{ {
template = "https://wiki.archlinux.org/index.php"; template = "https://wiki.archlinux.org/index.php";
params = [ params = [
{ name = "search"; value = "{searchTerms}"; } {
{ name = "fulltext"; value = "1"; } name = "search";
value = "{searchTerms}";
}
{
name = "fulltext";
value = "1";
}
];
}
]; ];
}]; definedAliases = ["@aw"];
definedAliases = [ "@aw" ]; };
}; "Github" = {
"Github" = { urls = [
urls = [{ {
template = "https://github.com/search"; template = "https://github.com/search";
params = [ params = [
{ name = "q"; value = "{searchTerms}"; } {
{ name = "type"; value = "repositories"; } 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 = [ bookmarks = {};
"DuckDuckGoo"
"Googlee" settings = {
"Wikipedia" "browser.aboutConfig.showWarning" = false;
"YouTube" "browser.bookmarks.addedImportButton" = false;
"Nix Packages" "browser.newtabpage.enabled" = false;
"Nix Options" "browser.preferences.moreFromMozilla" = false;
"Arch Wiki" "browser.shell.checkDefaultBrowser" = false;
"Github" "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 (lib) mkIf;
inherit (config) conf; 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} = { programs.mpv = {
home.packages = with pkgs; [ enable = true;
loupe };
spotify
amberol
];
programs.mpv = {
enable = true;
}; };
}; }
}

View file

@ -1,25 +1,31 @@
{ lib, config, pkgs, ... }: let {
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) conf; inherit (config) conf;
inherit (config.conf) keys; inherit (config.conf) keys;
in mkIf conf.apps.enable { in
home-manager.users.${conf.username} = { mkIf conf.apps.enable {
home.packages = with pkgs; [ home-manager.users.${conf.username} = {
rnote home.packages = with pkgs; [
]; rnote
];
programs.sioyek = { programs.sioyek = {
enable = true; enable = true;
bindings = { bindings = {
"move_up" = keys.up; "move_up" = keys.up;
"move_down" = keys.down; "move_down" = keys.down;
"move_left" = keys.left; "move_left" = keys.left;
"move_right" = keys.right; "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 (lib) mkIf;
inherit (config) conf; inherit (config) conf;
mkXwlWrapper = import ../niri/xwl-wrapper.nix; mkXwlWrapper = import ../niri/xwl-wrapper.nix;
@ -7,61 +12,72 @@
desktopName = "Time"; desktopName = "Time";
exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock"; exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock";
}; };
in mkIf conf.apps.enable { in
services = { mkIf conf.apps.enable {
# Needed for some features in nautilus such as auto-mounting and trash services = {
gvfs.enable = true; # 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;
};
}; };
programs.pandoc = { home-manager.users.${conf.username} = {
enable = true; 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 = { home.file = {
enable = true; ".config/vesktop/settings.json" = {
profiles = { source = ./vesktop.conf.json;
"default" = { };
isDefault = true; ".config/vesktop/settings/settings.json" = {
source = ./vencord.conf.json;
}; };
}; };
};
programs.alacritty = { programs.pandoc = {
enable = true; enable = true;
settings = import ./alacritty.conf.nix { config = config; }; };
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 (lib) mkIf;
inherit (config) conf; inherit (config) conf;
in mkIf conf.apps.enable { in
home-manager.users.${conf.username} = { mkIf conf.apps.enable {
home.packages = with pkgs; [ home-manager.users.${conf.username} = {
adwaita-icon-theme home.packages = with pkgs; [
adwaita-qt adwaita-icon-theme
adwaita-qt6 adwaita-qt
]; adwaita-qt6
];
qt = { qt = {
enable = true; enable = true;
platformTheme.name = "adwaita"; platformTheme.name = "adwaita";
style.name = "adwaita-dark"; style.name = "adwaita-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 = { gtk = {
enable = true; enable = true;
settings = { gtk4.extraConfig = {
"org/gnome/desktop/interface" = { gtk-application-prefer-dark-theme = true;
color-scheme = "prefer-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";
};
}; };
}; };
};
home.pointerCursor = let getFrom = url: hash: name: { home.pointerCursor = let
gtk.enable = true; getFrom = url: hash: name: {
x11.enable = true; gtk.enable = true;
name = name; x11.enable = true;
size = 24; name = name;
package = pkgs.runCommand "moveUp" {} '' size = 24;
mkdir -p $out/share/icons package = pkgs.runCommand "moveUp" {} ''
ln -s ${pkgs.fetchzip{ mkdir -p $out/share/icons
url = url; ln -s ${pkgs.fetchzip {
hash = hash; url = url;
}} $out/share/icons/${name} 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"; '';
}; };
} 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 (lib) mkIf;
inherit (config) conf; inherit (config) conf;
in mkIf conf.containers.enable { in
virtualisation.podman = { mkIf conf.containers.enable {
enable = true; virtualisation.podman = {
dockerCompat = true; 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; inherit (config) conf;
in { in {
imports = [ imports = [
@ -31,10 +31,10 @@ in {
defaultLocale = "en_US.UTF-8"; defaultLocale = "en_US.UTF-8";
}; };
users.users.${conf.username}= { users.users.${conf.username} = {
isNormalUser = true; isNormalUser = true;
description = conf.username; description = conf.username;
extraGroups = [ "networkmanager" "wheel" ]; extraGroups = ["networkmanager" "wheel"];
}; };
system.stateVersion = conf.stateVersion; system.stateVersion = conf.stateVersion;

View file

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

View file

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

View file

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

View file

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

View file

@ -1,21 +1,27 @@
{ lib, config, pkgs, ... }: let {
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) conf; inherit (config) conf;
in mkIf conf.fonts.enable { in
fonts = { mkIf conf.fonts.enable {
packages = with pkgs; [ fonts = {
alegreya packages = with pkgs; [
alegreya-sans alegreya
nerd-fonts.fira-code alegreya-sans
roboto nerd-fonts.fira-code
ubuntu_font_family roboto
]; ubuntu_font_family
fontconfig = { ];
defaultFonts = { fontconfig = {
serif = [ "Alegreya" ]; defaultFonts = {
sansSerif = [ "Alegreya Sans" ]; serif = ["Alegreya"];
monospace = [ "Fira Code Nerd Font" ]; 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 (lib) mkIf;
inherit (config) conf; inherit (config) conf;
mkXwlWrapper = import ../niri/xwl-wrapper.nix; mkXwlWrapper = import ../niri/xwl-wrapper.nix;
holo-script = pkgs.writeShellApplication { holo-script = pkgs.writeShellApplication {
name = "holo-script"; name = "holo-script";
runtimeInputs = [ pkgs.steam pkgs.gamescope ]; runtimeInputs = [pkgs.steam pkgs.gamescope];
text = '' text = ''
gamescope -f -r 60 -h 900 -F fsr -e --mangoapp -- steam -tenfoot gamescope -f -r 60 -h 900 -F fsr -e --mangoapp -- steam -tenfoot
''; '';
@ -19,31 +24,32 @@
name = "Steam Wrapped"; name = "Steam Wrapped";
pkg = "steam"; pkg = "steam";
}; };
in mkIf conf.games.enable { in
programs.steam.enable = true; mkIf conf.games.enable {
programs.gamescope.enable = true; programs.steam.enable = true;
programs.gamemode.enable = true; programs.gamescope.enable = true;
programs.gamemode.enable = true;
environment.sessionVariables = { environment.sessionVariables = {
MANGOHUD_CONFIGFILE = "$HOME/.config/MangoHud/MangoHud.conf"; MANGOHUD_CONFIGFILE = "$HOME/.config/MangoHud/MangoHud.conf";
MANGOHUD_CONFIG = "read_cfg"; MANGOHUD_CONFIG = "read_cfg";
}; };
home-manager.users.${conf.username} = { home-manager.users.${conf.username} = {
home.packages = [ home.packages = [
pkgs.prismlauncher pkgs.prismlauncher
holo holo
steam-wrapped steam-wrapped
]; ];
programs.mangohud = { programs.mangohud = {
enable = true; enable = true;
settings = { settings = {
gamemode = true; gamemode = true;
refresh_rate = true; refresh_rate = true;
fsr = true; fsr = true;
resolution = true; resolution = true;
};
}; };
}; };
}; }
}

View file

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

View file

@ -1,17 +1,22 @@
{ lib, config, ... }: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config.conf) extraLayout; inherit (config.conf) extraLayout;
in mkIf extraLayout.enable { in
services.xserver.xkb = { mkIf extraLayout.enable {
layout = "custom,us"; services.xserver.xkb = {
options = "compose:ralt"; layout = "custom,us";
options = "compose:ralt";
extraLayouts."custom" = { extraLayouts."custom" = {
description = "custom dvorak-like layout."; description = "custom dvorak-like layout.";
languages = [ "en" ]; languages = ["en"];
symbolsFile = ./custom.xkb; 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 (config) conf;
inherit (lib) mkIf; inherit (lib) mkIf;
in mkIf conf.mail.enable { in
services.nginx = { mkIf conf.mail.enable {
virtualHosts."chpu.eu" = { services.nginx = {
serverName = "chpu.eu"; virtualHosts."chpu.eu" = {
serverAliases = [ serverName = "chpu.eu";
"webadmin.chpu.eu" serverAliases = [
"autoconfig.chpu.eu" "webadmin.chpu.eu"
"autodiscover.chpu.eu" "autoconfig.chpu.eu"
]; "autodiscover.chpu.eu"
forceSSL = true; ];
useACMEHost = "chpu.eu"; forceSSL = true;
locations = { useACMEHost = "chpu.eu";
"/" = { locations = {
proxyPass = "http://localhost:9090"; "/" = {
proxyPass = "http://localhost:9090";
};
}; };
}; };
}; };
};
users.users."stalwart-mail".extraGroups = [ "nginx" ]; users.users."stalwart-mail".extraGroups = ["nginx"];
services.stalwart-mail = { services.stalwart-mail = {
enable = true; enable = true;
settings = { settings = {
config.local-keys = [ config.local-keys = [
"certificate.default.cert" "certificate.default.cert"
"certificate.default.private-key" "certificate.default.private-key"
"authentication.fallback-admin.secret" "authentication.fallback-admin.secret"
]; ];
server = { server = {
hostname = "chpu.eu"; hostname = "chpu.eu";
tls = { 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; enable = true;
implicit = true;
}; };
listener = { session.rcpt = {
submissions = { directory = "'internal'";
protocol = "smtp"; };
bind = "[::]:465"; authentication.fallback-admin = {
}; user = "admin";
smtp = { secret = "%{file:/var/lib/stalwart-mail/secret/admin}%";
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;
};
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 (config) conf;
inherit (lib) mkIf; inherit (lib) mkIf;
in mkIf conf.matrix.enable { in
services.nginx.virtualHosts = { mkIf conf.matrix.enable {
"twoneis.site" = { services.nginx.virtualHosts = {
serverName = "twoneis.site"; "twoneis.site" = {
useACMEHost = "twoneis.site"; serverName = "twoneis.site";
forceSSL = true; useACMEHost = "twoneis.site";
locations = { forceSSL = true;
"/.well-known/matrix/server" = { locations = {
return = "200 '{\"m.server\": \"matrix.twoneis.site:443\"}'"; "/.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\"}}'"; "matrix.twoneis.site" = {
}; serverName = "matrix.twoneis.site";
"/.well-known/matrix/support" = { forceSSL = true;
return = "200 '{\"contacts\": [{\"matrix_id\": \"@mira:twoneis.site\", \"email_address\": \"matrix@chpu.eu\", \"role\": \"m.role.admin\"}]}'"; 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"; services.conduwuit = {
forceSSL = true; enable = true;
useACMEHost = "twoneis.site"; settings.global = {
locations = { server_name = "matrix.twoneis.site";
"/" = { allow_registration = false;
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 = { networking.firewall.allowedTCPPorts = [443 8448];
enable = true; }
settings.global = {
server_name = "matrix.twoneis.site";
allow_registration = false;
};
};
networking.firewall.allowedTCPPorts = [ 443 8448 ];
}

View file

@ -1,16 +1,21 @@
{ config, lib, pkgs, ... }: let {
config,
lib,
pkgs,
...
}: let
inherit (config) conf; inherit (config) conf;
inherit (lib) mkIf; inherit (lib) mkIf;
in mkIf conf.networkmanager.enable { in
home-manager.users.${conf.username}.home.packages = [ pkgs.networkmanagerapplet ]; mkIf conf.networkmanager.enable {
networking = { home-manager.users.${conf.username}.home.packages = [pkgs.networkmanagerapplet];
networkmanager = { networking = {
enable = true; networkmanager = {
wifi.backend = "iwd"; 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 (config) conf;
inherit (lib) mkIf; inherit (lib) mkIf;
in mkIf conf.nginx.enable { in
security.acme = { mkIf conf.nginx.enable {
acceptTerms = true; security.acme = {
defaults.email = "mira.cp.0909@gmail.com"; acceptTerms = true;
certs = { defaults.email = "mira.cp.0909@gmail.com";
"twoneis.site" = { certs = {
group = "nginx"; "twoneis.site" = {
domain = "twoneis.site"; group = "nginx";
extraDomainNames = [ "*.twoneis.site" ]; domain = "twoneis.site";
dnsProvider = "porkbun"; extraDomainNames = ["*.twoneis.site"];
email = "mira.cp.0909@gmail.com"; dnsProvider = "porkbun";
environmentFile = "/root/porkbun-creds"; email = "mira.cp.0909@gmail.com";
}; environmentFile = "/root/porkbun-creds";
};
"chpu.eu" = { "chpu.eu" = {
group = "nginx"; group = "nginx";
domain = "chpu.eu"; domain = "chpu.eu";
extraDomainNames = [ "*.chpu.eu" ]; extraDomainNames = ["*.chpu.eu"];
dnsProvider = "porkbun"; dnsProvider = "porkbun";
email = "mira.cp.0909@gmail.com"; email = "mira.cp.0909@gmail.com";
environmentFile = "/root/porkbun-creds"; environmentFile = "/root/porkbun-creds";
};
}; };
}; };
};
users.users.nginx.extraGroups = [ "acme" ]; users.users.nginx.extraGroups = ["acme"];
services.nginx = { services.nginx = {
enable = true; enable = true;
recommendedProxySettings = true; recommendedProxySettings = true;
virtualHosts = { virtualHosts = {
"chpu.eu" = { "chpu.eu" = {
serverName = "chpu.eu"; serverName = "chpu.eu";
useACMEHost = "chpu.eu"; useACMEHost = "chpu.eu";
forceSSL = true; forceSSL = true;
}; };
"twoneis.site" = { "twoneis.site" = {
serverName = "twoneis.site"; serverName = "twoneis.site";
useACMEHost = "twoneis.site"; useACMEHost = "twoneis.site";
forceSSL = true; forceSSL = true;
};
}; };
}; };
};
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
80 80
443 443
]; ];
} }

View file

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

View file

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

View file

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

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Before After
Before After

View file

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

View file

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

View file

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

View file

@ -1,62 +1,62 @@
{ config, ... }: let {config, ...}: let
best = config.theme.pine; best = config.theme.pine;
better = config.theme.foam; better = config.theme.foam;
good = config.theme.iris; good = config.theme.iris;
bad = config.theme.rose; bad = config.theme.rose;
worse = config.theme.gold; worse = config.theme.gold;
worst = config.theme.love; worst = config.theme.love;
charging = config.theme.highlight-high; charging = config.theme.highlight-high;
in { in {
style = '' style = ''
* { * {
font-size: 1px; font-size: 1px;
} }
window#waybar { window#waybar {
background: rgba(0, 0, 0, 0); background: rgba(0, 0, 0, 0);
} }
#battery { #battery {
border: none; border: none;
border-radius: 4px; border-radius: 4px;
min-height: 4px; min-height: 4px;
min-width: 720px; min-width: 720px;
margin: 2px; margin: 2px;
background: ${best}; background: ${best};
} }
#battery.better { #battery.better {
background: ${better}; background: ${better};
} }
#battery.good { #battery.good {
background: ${good}; background: ${good};
} }
#battery.bad { #battery.bad {
background: ${bad}; background: ${bad};
} }
#battery.worse { #battery.worse {
background: ${worse}; background: ${worse};
} }
#battery.worst { #battery.worst {
background: ${worst}; background: ${worst};
} }
#battery.charging { #battery.charging {
background: linear-gradient(0deg, ${charging}, ${best}); background: linear-gradient(0deg, ${charging}, ${best});
} }
#battery.better.charging { #battery.better.charging {
background: linear-gradient(0deg, ${best}, ${better}); background: linear-gradient(0deg, ${best}, ${better});
} }
#battery.good.charging { #battery.good.charging {
background: linear-gradient(0deg, ${better}, ${good}); background: linear-gradient(0deg, ${better}, ${good});
} }
#battery.bad.charging { #battery.bad.charging {
background: linear-gradient(0deg, ${good}, ${bad}); background: linear-gradient(0deg, ${good}, ${bad});
} }
#battery.worse.charging { #battery.worse.charging {
background: linear-gradient(0deg, ${bad}, ${worse}); background: linear-gradient(0deg, ${bad}, ${worse});
} }
#battery.worst.charging { #battery.worst.charging {
background: linear-gradient(0deg, ${worse}, ${worst}); 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; inherit (pkgs.lib) concatStrings;
config = pkgs.writeTextFile { config = pkgs.writeTextFile {
name = concatStrings [ "i3-config" name ]; name = concatStrings ["i3-config" name];
text = '' text = ''
exec ${pkgs.${pkg}}/bin/${exe} exec ${pkgs.${pkg}}/bin/${exe}
''; '';
}; };
in pkgs.makeDesktopItem { in
name = name; pkgs.makeDesktopItem {
desktopName = name; name = name;
exec = "${pkgs.xwayland-run}/bin/xwayland-run -- ${pkgs.i3}/bin/i3 -c ${config}"; 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 = { nix = {
nixPath = ["nixpkgs=${inputs.nixpkgs}"]; nixPath = ["nixpkgs=${inputs.nixpkgs}"];
gc = { gc = {
@ -7,7 +11,7 @@
options = "--delete-older-than 14d"; options = "--delete-older-than 14d";
}; };
settings = { settings = {
experimental-features = [ "nix-command" "flakes" ]; experimental-features = ["nix-command" "flakes"];
auto-optimise-store = true; auto-optimise-store = true;
}; };
}; };
@ -22,4 +26,5 @@
allowUnfree = true; 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 (lib) mkIf mkForce;
inherit (config) conf; inherit (config) conf;
in mkIf conf.secureboot.enable { in
environment.systemPackages = [ pkgs.sbctl ]; mkIf conf.secureboot.enable {
environment.systemPackages = [pkgs.sbctl];
boot.loader.systemd-boot.enable = mkForce false; boot.loader.systemd-boot.enable = mkForce false;
boot.lanzaboote = { boot.lanzaboote = {
enable = true; enable = true;
pkiBundle = "/var/lib/sbctl"; pkiBundle = "/var/lib/sbctl";
}; };
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
{ lib, ... }: let {lib, ...}: let
inherit (lib) mkOption mkEnableOption; inherit (lib) mkOption mkEnableOption;
inherit (lib.types) nullOr attrsOf str; inherit (lib.types) nullOr attrsOf str;
in { in {
@ -48,7 +48,7 @@ in {
keys = mkOption { keys = mkOption {
type = attrsOf str; type = attrsOf str;
description =- "Default key binds."; description = - "Default key binds.";
default = { default = {
up = "t"; up = "t";
down = "n"; down = "n";
@ -68,7 +68,7 @@ in {
disks = mkOption { disks = mkOption {
type = attrsOf str; 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."; 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 = { example = {
boot = "4672-C1A9"; boot = "4672-C1A9";
crypt = "747ae319-f189-44f5-9737-a42672e2c02d"; 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 = [ modules = [
./options.nix ./options.nix
./modules ./modules
niri.nixosModules.niri niri.nixosModules.niri
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
lanzaboote.nixosModules.lanzaboote lanzaboote.nixosModules.lanzaboote
disko.nixosModules.disko disko.nixosModules.disko
]; ];
in { in {
nixosConfigurations = { nixosConfigurations = {
@ -18,10 +26,12 @@ in {
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };
modules = [ modules =
./devices/inkvine [
nixos-hardware.nixosModules.framework-13-7040-amd ./devices/inkvine
] ++ modules; nixos-hardware.nixosModules.framework-13-7040-amd
]
++ modules;
}; };
ellaca = nixpkgs.lib.nixosSystem { ellaca = nixpkgs.lib.nixosSystem {
@ -29,9 +39,11 @@ in {
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };
modules = [ modules =
./devices/ellaca [
] ++ modules; ./devices/ellaca
]
++ modules;
}; };
}; };
} }