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
mkIf conf.apps.enable {
programs.adb.enable = true; programs.adb.enable = true;
users.users.${conf.username}.extraGroups = [ "adbusers" ]; 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,7 +1,13 @@
{ 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
mkIf conf.apps.enable {
home-manager.users.${conf.username} = { home-manager.users.${conf.username} = {
programs.firefox = { programs.firefox = {
enable = true; enable = true;
@ -19,82 +25,140 @@ in mkIf conf.apps.enable {
"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/"; template = "https://duckduckgo.com/";
params = [ params = [
{ name = "q"; value = "{searchTerms}"; } {
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; force = true;
@ -110,7 +174,7 @@ in mkIf conf.apps.enable {
]; ];
}; };
bookmarks = { }; bookmarks = {};
settings = { settings = {
"browser.aboutConfig.showWarning" = false; "browser.aboutConfig.showWarning" = false;
@ -148,4 +212,4 @@ in mkIf conf.apps.enable {
}; };
}; };
}; };
} }

View file

@ -1,8 +1,13 @@
{ 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-manager.users.${conf.username} = {
home.packages = with pkgs; [ home.packages = with pkgs; [
loupe loupe
@ -14,4 +19,4 @@ in mkIf conf.apps.enable {
enable = true; enable = true;
}; };
}; };
} }

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;
inherit (config.conf) keys; inherit (config.conf) keys;
in mkIf conf.apps.enable { in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = { home-manager.users.${conf.username} = {
home.packages = with pkgs; [ home.packages = with pkgs; [
rnote rnote
@ -22,4 +28,4 @@ in mkIf conf.apps.enable {
pdf = "sioyek"; 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,14 +12,16 @@
desktopName = "Time"; desktopName = "Time";
exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock"; exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock";
}; };
in mkIf conf.apps.enable { in
mkIf conf.apps.enable {
services = { services = {
# Needed for some features in nautilus such as auto-mounting and trash # Needed for some features in nautilus such as auto-mounting and trash
gvfs.enable = true; gvfs.enable = true;
}; };
home-manager.users.${conf.username} = { home-manager.users.${conf.username} = {
home.packages = with pkgs; [ home.packages = with pkgs;
[
signal-desktop signal-desktop
vesktop vesktop
snapshot snapshot
@ -31,10 +38,19 @@ in mkIf conf.apps.enable {
peaclock peaclock
fractal fractal
element-desktop element-desktop
] ++ [ ]
++ [
time time
(mkXwlWrapper { pkgs = pkgs; name = "Prusa"; pkg = "prusa-slicer"; }) (mkXwlWrapper {
(mkXwlWrapper { pkgs = pkgs; name = "Vial"; pkg = "vial"; }) pkgs = pkgs;
name = "Prusa";
pkg = "prusa-slicer";
})
(mkXwlWrapper {
pkgs = pkgs;
name = "Vial";
pkg = "vial";
})
]; ];
home.file = { home.file = {
@ -61,7 +77,7 @@ in mkIf conf.apps.enable {
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
settings = import ./alacritty.conf.nix { config = config; }; settings = import ./alacritty.conf.nix {config = config;};
}; };
}; };
} }

View file

@ -1,7 +1,13 @@
{ 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
mkIf conf.apps.enable {
home-manager.users.${conf.username} = { home-manager.users.${conf.username} = {
home.packages = with pkgs; [ home.packages = with pkgs; [
adwaita-icon-theme adwaita-icon-theme
@ -36,18 +42,21 @@ in mkIf conf.apps.enable {
}; };
}; };
home.pointerCursor = let getFrom = url: hash: name: { home.pointerCursor = let
getFrom = url: hash: name: {
gtk.enable = true; gtk.enable = true;
x11.enable = true; x11.enable = true;
name = name; name = name;
size = 24; size = 24;
package = pkgs.runCommand "moveUp" {} '' package = pkgs.runCommand "moveUp" {} ''
mkdir -p $out/share/icons mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip{ ln -s ${pkgs.fetchzip {
url = url; url = url;
hash = hash; hash = hash;
}} $out/share/icons/${name} }} $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
mkIf conf.containers.enable {
virtualisation.podman = { virtualisation.podman = {
enable = true; enable = true;
dockerCompat = 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,13 +1,19 @@
{ 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
mkIf conf.fedi.enable {
services.akkoma = { services.akkoma = {
enable = true; enable = true;
config = { config = {
@ -117,4 +123,4 @@ in mkIf conf.fedi.enable {
forceSSL = true; 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,7 +1,13 @@
{ 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
mkIf conf.fonts.enable {
fonts = { fonts = {
packages = with pkgs; [ packages = with pkgs; [
alegreya alegreya
@ -12,10 +18,10 @@ in mkIf conf.fonts.enable {
]; ];
fontconfig = { fontconfig = {
defaultFonts = { defaultFonts = {
serif = [ "Alegreya" ]; serif = ["Alegreya"];
sansSerif = [ "Alegreya Sans" ]; sansSerif = ["Alegreya Sans"];
monospace = [ "Fira Code Nerd Font" ]; 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,7 +24,8 @@
name = "Steam Wrapped"; name = "Steam Wrapped";
pkg = "steam"; pkg = "steam";
}; };
in mkIf conf.games.enable { in
mkIf conf.games.enable {
programs.steam.enable = true; programs.steam.enable = true;
programs.gamescope.enable = true; programs.gamescope.enable = true;
programs.gamemode.enable = true; programs.gamemode.enable = true;
@ -46,4 +52,4 @@ in mkIf conf.games.enable {
}; };
}; };
}; };
} }

View file

@ -1,8 +1,13 @@
{ 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
mkIf conf.git.enable {
services = { services = {
nginx = { nginx = {
virtualHosts.${cfg.DOMAIN} = { virtualHosts.${cfg.DOMAIN} = {
@ -36,4 +41,4 @@ in mkIf conf.git.enable {
}; };
}; };
}; };
} }

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
mkIf extraLayout.enable {
services.xserver.xkb = { services.xserver.xkb = {
layout = "custom,us"; layout = "custom,us";
options = "compose:ralt"; 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,7 +1,12 @@
{ config, lib, ... }: let {
config,
lib,
...
}: let
inherit (config) conf; inherit (config) conf;
inherit (lib) mkIf; inherit (lib) mkIf;
in mkIf conf.mail.enable { in
mkIf conf.mail.enable {
services.nginx = { services.nginx = {
virtualHosts."chpu.eu" = { virtualHosts."chpu.eu" = {
serverName = "chpu.eu"; serverName = "chpu.eu";
@ -20,7 +25,7 @@ in mkIf conf.mail.enable {
}; };
}; };
users.users."stalwart-mail".extraGroups = [ "nginx" ]; users.users."stalwart-mail".extraGroups = ["nginx"];
services.stalwart-mail = { services.stalwart-mail = {
enable = true; enable = true;
@ -90,4 +95,4 @@ in mkIf conf.mail.enable {
}; };
}; };
}; };
} }

View file

@ -1,7 +1,12 @@
{ config, lib, ... }: let {
config,
lib,
...
}: let
inherit (config) conf; inherit (config) conf;
inherit (lib) mkIf; inherit (lib) mkIf;
in mkIf conf.matrix.enable { in
mkIf conf.matrix.enable {
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"twoneis.site" = { "twoneis.site" = {
serverName = "twoneis.site"; serverName = "twoneis.site";
@ -48,5 +53,5 @@ in mkIf conf.matrix.enable {
}; };
}; };
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 (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 {
home-manager.users.${conf.username}.home.packages = [pkgs.networkmanagerapplet];
networking = { networking = {
networkmanager = { networkmanager = {
enable = true; enable = true;
wifi.backend = "iwd"; wifi.backend = "iwd";
}; };
extraHosts = extraHosts = ''
''
10.10.11.245 surveillance.htb 10.10.11.245 surveillance.htb
''; '';
}; };
} }

View file

@ -1,7 +1,12 @@
{ config, lib, ... }: let {
config,
lib,
...
}: let
inherit (config) conf; inherit (config) conf;
inherit (lib) mkIf; inherit (lib) mkIf;
in mkIf conf.nginx.enable { in
mkIf conf.nginx.enable {
security.acme = { security.acme = {
acceptTerms = true; acceptTerms = true;
defaults.email = "mira.cp.0909@gmail.com"; defaults.email = "mira.cp.0909@gmail.com";
@ -9,7 +14,7 @@ in mkIf conf.nginx.enable {
"twoneis.site" = { "twoneis.site" = {
group = "nginx"; group = "nginx";
domain = "twoneis.site"; domain = "twoneis.site";
extraDomainNames = [ "*.twoneis.site" ]; extraDomainNames = ["*.twoneis.site"];
dnsProvider = "porkbun"; dnsProvider = "porkbun";
email = "mira.cp.0909@gmail.com"; email = "mira.cp.0909@gmail.com";
environmentFile = "/root/porkbun-creds"; environmentFile = "/root/porkbun-creds";
@ -18,7 +23,7 @@ in mkIf conf.nginx.enable {
"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";
@ -26,7 +31,7 @@ in mkIf conf.nginx.enable {
}; };
}; };
users.users.nginx.extraGroups = [ "acme" ]; users.users.nginx.extraGroups = ["acme"];
services.nginx = { services.nginx = {
enable = true; enable = true;
@ -49,4 +54,4 @@ in mkIf conf.nginx.enable {
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,4 +1,8 @@
{ 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;
@ -6,7 +10,10 @@ in {
input = { input = {
keyboard = { keyboard = {
xkb = { xkb = {
layout = if extraLayout.enable then "custom,us" else "us"; layout =
if extraLayout.enable
then "custom,us"
else "us";
options = "compose:ralt"; options = "compose:ralt";
}; };
}; };
@ -82,18 +89,18 @@ in {
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 = {
@ -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,4 +1,4 @@
{ 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;

View file

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

View file

@ -1,4 +1,4 @@
{ 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;

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
pkgs.makeDesktopItem {
name = name; name = name;
desktopName = name; desktopName = name;
exec = "${pkgs.xwayland-run}/bin/xwayland-run -- ${pkgs.i3}/bin/i3 -c ${config}"; 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,8 +1,14 @@
{ 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;
@ -10,4 +16,4 @@ in mkIf conf.secureboot.enable {
enable = true; enable = true;
pkiBundle = "/var/lib/sbctl"; pkiBundle = "/var/lib/sbctl";
}; };
} }

View file

@ -1,7 +1,12 @@
{ lib, config, ... }: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) conf; inherit (config) conf;
in mkIf conf.ssh.enable { in
mkIf conf.ssh.enable {
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {
@ -16,4 +21,4 @@ in mkIf conf.ssh.enable {
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 = {

View file

@ -1,4 +1,4 @@
{ ... }: { {...}: {
preset = "transgender"; preset = "transgender";
mode = "rgb"; mode = "rgb";
light_dark = "dark"; light_dark = "dark";

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
mkIf conf.vm.enable {
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = true; enable = true;
qemu.vhostUserPackages = [ pkgs.virtiofsd ]; 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,7 +1,12 @@
{ lib, config, ... }: let {
lib,
config,
...
}: let
inherit (lib) mkIf; inherit (lib) mkIf;
inherit (config) conf; inherit (config) conf;
in mkIf conf.website.enable { in
mkIf conf.website.enable {
services.nginx.virtualHosts = { services.nginx.virtualHosts = {
"twoneis.site" = { "twoneis.site" = {
default = true; default = true;
@ -11,4 +16,4 @@ in mkIf conf.website.enable {
root = "/var/lib/website/"; 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,4 +1,12 @@
{ 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
@ -18,10 +26,12 @@ in {
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };
modules = [ modules =
[
./devices/inkvine ./devices/inkvine
nixos-hardware.nixosModules.framework-13-7040-amd nixos-hardware.nixosModules.framework-13-7040-amd
] ++ modules; ]
++ modules;
}; };
ellaca = nixpkgs.lib.nixosSystem { ellaca = nixpkgs.lib.nixosSystem {
@ -29,9 +39,11 @@ in {
specialArgs = { specialArgs = {
inherit inputs; inherit inputs;
}; };
modules = [ modules =
[
./devices/ellaca ./devices/ellaca
] ++ modules; ]
++ modules;
}; };
}; };
} }