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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

79
flake.lock generated
View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,13 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.apps.enable {
in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
programs.firefox = {
enable = true;
@ -19,82 +25,140 @@ in mkIf conf.apps.enable {
"Bing".metaData.hidden = true;
"Wikipedia (en)".metaData.hidden = true;
"DuckDuckGoo" = {
urls = [{
urls = [
{
template = "https://duckduckgo.com/";
params = [
{ name = "q"; value = "{searchTerms}"; }
{
name = "q";
value = "{searchTerms}";
}
];
}];
definedAliases = [ "@ddg" ];
}
];
definedAliases = ["@ddg"];
};
"Googlee" = {
urls = [{
urls = [
{
template = "https://google.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
{
name = "q";
value = "{searchTerms}";
}
];
}];
definedAliases = [ "@g" ];
}
];
definedAliases = ["@g"];
};
"Wikipedia" = {
urls = [{
urls = [
{
template = "https://en.wikipedia.org/wiki/Special:Search";
params = [
{ name = "search"; value = "{searchTerms}"; }
{
name = "search";
value = "{searchTerms}";
}
];
}];
definedAliases = [ "@wiki" ];
}
];
definedAliases = ["@wiki"];
};
"YouTube" = {
urls = [{
urls = [
{
template = "https://youtube.com/results";
params = [
{ name = "search_query"; value = "{searchTerms}"; }
{
name = "search_query";
value = "{searchTerms}";
}
];
}];
definedAliases = [ "@yt" ];
}
];
definedAliases = ["@yt"];
};
"Nix Packages" = {
urls = [{
urls = [
{
template = "https://search.nixos.org/packages";
params = [
{ name = "channel"; value = "unstable"; }
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
{
name = "channel";
value = "unstable";
}
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
definedAliases = [ "@np" ];
}
];
definedAliases = ["@np"];
};
"Nix Options" = {
urls = [{
urls = [
{
template = "https://search.nixos.org/options";
params = [
{ name = "channel"; value = "unstable"; }
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
{
name = "channel";
value = "unstable";
}
{
name = "type";
value = "packages";
}
{
name = "query";
value = "{searchTerms}";
}
];
}];
definedAliases = [ "@no" ];
}
];
definedAliases = ["@no"];
};
"Arch Wiki" = {
urls = [{
urls = [
{
template = "https://wiki.archlinux.org/index.php";
params = [
{ name = "search"; value = "{searchTerms}"; }
{ name = "fulltext"; value = "1"; }
{
name = "search";
value = "{searchTerms}";
}
{
name = "fulltext";
value = "1";
}
];
}];
definedAliases = [ "@aw" ];
}
];
definedAliases = ["@aw"];
};
"Github" = {
urls = [{
urls = [
{
template = "https://github.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
{ name = "type"; value = "repositories"; }
{
name = "q";
value = "{searchTerms}";
}
{
name = "type";
value = "repositories";
}
];
}];
definedAliases = [ "@gh" ];
}
];
definedAliases = ["@gh"];
};
};
force = true;
@ -110,7 +174,7 @@ in mkIf conf.apps.enable {
];
};
bookmarks = { };
bookmarks = {};
settings = {
"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 (config) conf;
in mkIf conf.apps.enable {
in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
loupe
@ -14,4 +19,4 @@ in mkIf conf.apps.enable {
enable = true;
};
};
}
}

View file

@ -1,8 +1,14 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
inherit (config.conf) keys;
in mkIf conf.apps.enable {
in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
rnote
@ -22,4 +28,4 @@ in mkIf conf.apps.enable {
pdf = "sioyek";
};
};
}
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
mkXwlWrapper = import ../niri/xwl-wrapper.nix;
@ -7,14 +12,16 @@
desktopName = "Time";
exec = "alacritty -e ${pkgs.peaclock}/bin/peaclock";
};
in mkIf conf.apps.enable {
in
mkIf conf.apps.enable {
services = {
# Needed for some features in nautilus such as auto-mounting and trash
gvfs.enable = true;
};
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
home.packages = with pkgs;
[
signal-desktop
vesktop
snapshot
@ -31,10 +38,19 @@ in mkIf conf.apps.enable {
peaclock
fractal
element-desktop
] ++ [
]
++ [
time
(mkXwlWrapper { pkgs = pkgs; name = "Prusa"; pkg = "prusa-slicer"; })
(mkXwlWrapper { pkgs = pkgs; name = "Vial"; pkg = "vial"; })
(mkXwlWrapper {
pkgs = pkgs;
name = "Prusa";
pkg = "prusa-slicer";
})
(mkXwlWrapper {
pkgs = pkgs;
name = "Vial";
pkg = "vial";
})
];
home.file = {
@ -61,7 +77,7 @@ in mkIf conf.apps.enable {
programs.alacritty = {
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 (config) conf;
in mkIf conf.apps.enable {
in
mkIf conf.apps.enable {
home-manager.users.${conf.username} = {
home.packages = with pkgs; [
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;
x11.enable = true;
name = name;
size = 24;
package = pkgs.runCommand "moveUp" {} ''
mkdir -p $out/share/icons
ln -s ${pkgs.fetchzip{
ln -s ${pkgs.fetchzip {
url = url;
hash = hash;
}} $out/share/icons/${name}
'';
}; in getFrom "https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz" "sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=" "BreezX-RosePine-Linux";
};
}
in
getFrom "https://github.com/rose-pine/cursor/releases/download/v1.1.0/BreezeX-RosePine-Linux.tar.xz" "sha256-t5xwAPGhuQUfGThedLsmtZEEp1Ljjo3Udhd5Ql3O67c=" "BreezX-RosePine-Linux";
};
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,13 +1,19 @@
{ lib, pkgs, config, ... }: let
{
lib,
pkgs,
config,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
inherit ((pkgs.formats.elixirConf { }).lib) mkMap;
neocat = (pkgs.callPackage ./neocat.nix { });
neofox = (pkgs.callPackage ./neofox.nix { });
blobfox = (pkgs.callPackage ./blobfox.nix { });
blobhaj = (pkgs.callPackage ./blobhaj.nix { });
blobhajFlags = (pkgs.callPackage ./blobhajFlags.nix { });
in mkIf conf.fedi.enable {
inherit ((pkgs.formats.elixirConf {}).lib) mkMap;
neocat = pkgs.callPackage ./neocat.nix {};
neofox = pkgs.callPackage ./neofox.nix {};
blobfox = pkgs.callPackage ./blobfox.nix {};
blobhaj = pkgs.callPackage ./blobhaj.nix {};
blobhajFlags = pkgs.callPackage ./blobhajFlags.nix {};
in
mkIf conf.fedi.enable {
services.akkoma = {
enable = true;
config = {
@ -117,4 +123,4 @@ in mkIf conf.fedi.enable {
forceSSL = true;
};
};
}
}

View file

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

View file

@ -1,7 +1,13 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.fonts.enable {
in
mkIf conf.fonts.enable {
fonts = {
packages = with pkgs; [
alegreya
@ -12,10 +18,10 @@ in mkIf conf.fonts.enable {
];
fontconfig = {
defaultFonts = {
serif = [ "Alegreya" ];
sansSerif = [ "Alegreya Sans" ];
monospace = [ "Fira Code Nerd Font" ];
serif = ["Alegreya"];
sansSerif = ["Alegreya Sans"];
monospace = ["Fira Code Nerd Font"];
};
};
};
}
}

View file

@ -1,10 +1,15 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
mkXwlWrapper = import ../niri/xwl-wrapper.nix;
holo-script = pkgs.writeShellApplication {
name = "holo-script";
runtimeInputs = [ pkgs.steam pkgs.gamescope ];
runtimeInputs = [pkgs.steam pkgs.gamescope];
text = ''
gamescope -f -r 60 -h 900 -F fsr -e --mangoapp -- steam -tenfoot
'';
@ -19,7 +24,8 @@
name = "Steam Wrapped";
pkg = "steam";
};
in mkIf conf.games.enable {
in
mkIf conf.games.enable {
programs.steam.enable = true;
programs.gamescope.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 (config) conf;
cfg = config.services.forgejo.settings.server;
in mkIf conf.git.enable {
in
mkIf conf.git.enable {
services = {
nginx = {
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;
in{
in {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;

View file

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

View file

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

View file

@ -1,7 +1,12 @@
{ config, lib, ... }: let
{
config,
lib,
...
}: let
inherit (config) conf;
inherit (lib) mkIf;
in mkIf conf.nginx.enable {
in
mkIf conf.nginx.enable {
security.acme = {
acceptTerms = true;
defaults.email = "mira.cp.0909@gmail.com";
@ -9,7 +14,7 @@ in mkIf conf.nginx.enable {
"twoneis.site" = {
group = "nginx";
domain = "twoneis.site";
extraDomainNames = [ "*.twoneis.site" ];
extraDomainNames = ["*.twoneis.site"];
dnsProvider = "porkbun";
email = "mira.cp.0909@gmail.com";
environmentFile = "/root/porkbun-creds";
@ -18,7 +23,7 @@ in mkIf conf.nginx.enable {
"chpu.eu" = {
group = "nginx";
domain = "chpu.eu";
extraDomainNames = [ "*.chpu.eu" ];
extraDomainNames = ["*.chpu.eu"];
dnsProvider = "porkbun";
email = "mira.cp.0909@gmail.com";
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 = {
enable = true;
@ -49,4 +54,4 @@ in mkIf conf.nginx.enable {
80
443
];
}
}

View file

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

View file

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

View file

@ -1,4 +1,8 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (config.conf) keys extraLayout;
inherit (lib.attrsets) genAttrs;
inherit (lib) mkMerge;
@ -6,7 +10,10 @@ in {
input = {
keyboard = {
xkb = {
layout = if extraLayout.enable then "custom,us" else "us";
layout =
if extraLayout.enable
then "custom,us"
else "us";
options = "compose:ralt";
};
};
@ -82,18 +89,18 @@ in {
to = config.theme.rose;
from = config.theme.pine;
in' = "oklch shorter hue";
angle=135;
angle = 135;
};
inactive.color = config.theme.iris;
};
preset-column-widths = [
{ proportion = 0.25; }
{ proportion = 0.5; }
{ proportion = 0.75; }
{proportion = 0.25;}
{proportion = 0.5;}
{proportion = 0.75;}
];
default-column-width = { };
default-column-width = {};
gaps = 4;
struts = {
@ -107,7 +114,7 @@ in {
top-left = 8.0;
top-right = 8.0;
bottom-left = 8.0;
bottom-right= 8.0;
bottom-right = 8.0;
};
clip-to-geometry = true;
}
@ -120,8 +127,8 @@ in {
hotkey-overlay.skip-at-startup = true;
spawn-at-startup = [
{ command = [ "waybar" ]; }
{ command = [ "swayidle" "-w" "before-sleep" "swaylock" ]; }
{command = ["waybar"];}
{command = ["swayidle" "-w" "before-sleep" "swaylock"];}
];
binds = {
@ -131,30 +138,46 @@ in {
"Mod+Space".action.spawn = "fuzzel";
"XF86AudioRaiseVolume".action.spawn = [
"swayosd-client" "--output-volume" "raise"
"swayosd-client"
"--output-volume"
"raise"
];
"XF86AudioLowerVolume".action.spawn = [
"swayosd-client" "--output-volume" "lower"
"swayosd-client"
"--output-volume"
"lower"
];
"XF86AudioMute".action.spawn = [
"swayosd-client" "--output-volume" "mute-toggle"
"swayosd-client"
"--output-volume"
"mute-toggle"
];
"Mod+XF86AudioRaiseVolume".action.spawn = [
"swayosd-client" "--input-volume" "raise"
"swayosd-client"
"--input-volume"
"raise"
];
"Mod+XF86AudioLowerVolume".action.spawn = [
"swayosd-client" "--input-volume" "lower"
"swayosd-client"
"--input-volume"
"lower"
];
"Mod+XF86AudioMute".action.spawn = [
"swayosd-client" "--output-volume" "mute-toggle"
"swayosd-client"
"--output-volume"
"mute-toggle"
];
"XF86MonBrightnessDown".action.spawn = [
"swayosd-client" "--brightness" "lower"
"swayosd-client"
"--brightness"
"lower"
];
"XF86MonBrightnessUp".action.spawn = [
"swayosd-client" "--brightness" "raise"
"swayosd-client"
"--brightness"
"raise"
];
"Mod+Backspace".action.close-window = [];

View file

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

View file

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

View file

@ -1,4 +1,4 @@
{ config, ... }: let
{config, ...}: let
background = config.theme.overlay;
muted = config.theme.muted;
font = config.theme.text;

View file

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

View file

@ -1,4 +1,4 @@
{ config, ... }: let
{config, ...}: let
best = config.theme.pine;
better = config.theme.foam;
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;
config = pkgs.writeTextFile {
name = concatStrings [ "i3-config" name ];
name = concatStrings ["i3-config" name];
text = ''
exec ${pkgs.${pkg}}/bin/${exe}
'';
};
in pkgs.makeDesktopItem {
in
pkgs.makeDesktopItem {
name = name;
desktopName = name;
exec = "${pkgs.xwayland-run}/bin/xwayland-run -- ${pkgs.i3}/bin/i3 -c ${config}";
}
}

View file

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

View file

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

View file

@ -1,7 +1,12 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.ssh.enable {
in
mkIf conf.ssh.enable {
services.openssh = {
enable = true;
settings = {
@ -16,4 +21,4 @@ in mkIf conf.ssh.enable {
users.users.${conf.username}.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMYy89cBNXjet2kBbOw7CKMJguyIq72EQV8ixo836nOH"
];
}
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,12 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
in mkIf conf.website.enable {
in
mkIf conf.website.enable {
services.nginx.virtualHosts = {
"twoneis.site" = {
default = true;
@ -11,4 +16,4 @@ in mkIf conf.website.enable {
root = "/var/lib/website/";
};
};
}
}

View file

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

View file

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