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
@ -24,5 +23,4 @@
};
};
};
}

View file

@ -1,4 +1,8 @@
{ lib, pkgs, ... }: let
{
lib,
pkgs,
...
}: let
inherit (lib) mkDefault;
in {
imports = [

View file

@ -55,4 +55,3 @@
};
};
}

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,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"];
}

View file

@ -1,4 +1,9 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf mkForce;
inherit (config) conf;
in {

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,81 +25,139 @@ 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"];
};
"Googlee" = {
urls = [{
urls = [
{
template = "https://google.com/search";
params = [
{ name = "q"; value = "{searchTerms}"; }
{
name = "q";
value = "{searchTerms}";
}
];
}
];
}];
definedAliases = ["@g"];
};
"Wikipedia" = {
urls = [{
urls = [
{
template = "https://en.wikipedia.org/wiki/Special:Search";
params = [
{ name = "search"; value = "{searchTerms}"; }
{
name = "search";
value = "{searchTerms}";
}
];
}
];
}];
definedAliases = ["@wiki"];
};
"YouTube" = {
urls = [{
urls = [
{
template = "https://youtube.com/results";
params = [
{ name = "search_query"; value = "{searchTerms}"; }
{
name = "search_query";
value = "{searchTerms}";
}
];
}
];
}];
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"];
};
"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"];
};
"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"];
};
"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"];
};
};

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

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

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 = {

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,7 +42,8 @@ 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;
@ -48,6 +55,8 @@ in mkIf conf.apps.enable {
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,7 +1,13 @@
{ 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;

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 {
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 = {

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

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;
@ -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;

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} = {

View file

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

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";

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";

View file

@ -1,15 +1,20 @@
{ config, lib, pkgs, ... }: let
{
config,
lib,
pkgs,
...
}: let
inherit (config) conf;
inherit (lib) mkIf;
in mkIf conf.networkmanager.enable {
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";

View file

@ -1,7 +1,13 @@
{ lib, config, pkgs, ... }: let
{
lib,
config,
pkgs,
...
}: let
inherit (lib) mkIf;
inherit (config) conf;
swayosd-style = pkgs.writeText "swayosd.css"
swayosd-style =
pkgs.writeText "swayosd.css"
(import ./swayosd.css.nix {config = config;}).style;
in {
config = mkIf conf.niri.enable {
@ -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,12 +61,18 @@ in {
};
programs.niri = {
settings = import ./niri.conf.nix { lib = lib; config = config; };
settings = import ./niri.conf.nix {
lib = lib;
config = config;
};
};
programs.fuzzel = {
enable = true;
settings = import ./fuzzel.conf.nix { lib = lib; config = config; };
settings = import ./fuzzel.conf.nix {
lib = lib;
config = config;
};
};
programs.waybar = {
@ -71,10 +83,13 @@ in {
programs.swaylock = {
enable = true;
package = (pkgs.swaylock-effects.overrideAttrs (final: prev: {
package = pkgs.swaylock-effects.overrideAttrs (final: prev: {
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 = {

View file

@ -1,4 +1,8 @@
{ lib, config, ... }: let
{
lib,
config,
...
}: let
inherit (lib.strings) concatStrings;
inherit (config) theme;
in {

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";
};
};
@ -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 = [];

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 {

View file

@ -1,4 +1,10 @@
{ 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];
@ -6,7 +12,8 @@
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 = {
@ -22,4 +26,5 @@
allowUnfree = true;
};
};
environment.systemPackages = [inputs.alejandra.defaultPackage.${pkgs.system}];
}

View file

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

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 = {

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;
@ -77,8 +82,14 @@ in {
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,7 +1,13 @@
{ 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];

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;

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;
};
};
}