Compare commits
79 Commits
090c069a11
...
nixos
| Author | SHA1 | Date | |
|---|---|---|---|
|
b86cc94d23
|
|||
|
95825c6ff1
|
|||
|
3e7e404d4c
|
|||
|
bb4c77208d
|
|||
|
1f53cd2efb
|
|||
|
d9f8c16011
|
|||
|
4335805701
|
|||
|
|
4a18ae77fc | ||
|
|
5ebf3c9c5e | ||
|
|
f4e5628238 | ||
|
|
bf00621b02 | ||
|
|
ec8d9fafdd | ||
|
539b46393e
|
|||
|
|
e686aef94e | ||
|
54c45411fe
|
|||
|
|
23d6f855ee | ||
|
|
346c304427 | ||
|
0bab44bf04
|
|||
|
5579bf49c3
|
|||
|
11a8dfebff
|
|||
| c2a1654be8 | |||
|
6d431bdf9d
|
|||
|
5dc4e6d3c0
|
|||
|
5c1c326baf
|
|||
| 4e5b555498 | |||
|
895a495b3f
|
|||
|
7e4a6ac8fe
|
|||
|
cd52be2620
|
|||
|
34b2c4d015
|
|||
|
|
943956f119 | ||
|
|
27f3b76ab7 | ||
|
|
4decf54e13 | ||
|
|
abd567a8a5 | ||
|
5785832cbe
|
|||
|
0eacdcdc27
|
|||
|
0890c49887
|
|||
|
fb94547fa2
|
|||
|
c10e121604
|
|||
|
8a87dc6c93
|
|||
|
5db9d23792
|
|||
|
1651bb9356
|
|||
|
a9d4f6de5a
|
|||
|
404f35c0b9
|
|||
|
9baf54ef33
|
|||
|
5a9ff77a29
|
|||
|
87a6c1a862
|
|||
|
43660ff173
|
|||
|
fe6d79edb5
|
|||
|
da4309e2e0
|
|||
|
e1e72965f9
|
|||
|
0979956f16
|
|||
|
28c9799f60
|
|||
|
f9e29ce77f
|
|||
|
f4a8493dce
|
|||
|
e097c9d25f
|
|||
|
58ab2f07a7
|
|||
|
e1faa10e24
|
|||
|
f9ed56123d
|
|||
|
30934f006c
|
|||
|
31bec468c8
|
|||
|
6c1400e295
|
|||
|
8d3bbe9d75
|
|||
|
4f96bcda1d
|
|||
|
0ecd267fa8
|
|||
|
c590fb01dc
|
|||
|
d9a9d110de
|
|||
|
09f2e19683
|
|||
|
8b12178bfc
|
|||
|
4f0f6021e5
|
|||
|
00ead02ff1
|
|||
|
5e54dfded8
|
|||
|
|
eac8c77797 | ||
|
|
3aab004b55 | ||
|
270d7c2fe4
|
|||
|
4c87e635ab
|
|||
|
129fa4973f
|
|||
|
075ee51920
|
|||
|
aeb370f299
|
|||
|
edf8d639b3
|
@@ -1,6 +1,6 @@
|
|||||||
#Catpuccin Mocha
|
#Catpuccin Mocha
|
||||||
let
|
let
|
||||||
colors = rec{
|
colors = rec {
|
||||||
rosewater = "#F5E0DC";
|
rosewater = "#F5E0DC";
|
||||||
flamingo = "#F2CDCD";
|
flamingo = "#F2CDCD";
|
||||||
pink = "#F5C2E7";
|
pink = "#F5C2E7";
|
||||||
@@ -37,5 +37,9 @@ in
|
|||||||
rec {
|
rec {
|
||||||
default = with builtins; mapAttrs (_: color: substring 1 6 color) colors; # hex without hash
|
default = with builtins; mapAttrs (_: color: substring 1 6 color) colors; # hex without hash
|
||||||
hex = colors; # hex with hash
|
hex = colors; # hex with hash
|
||||||
argb = { a ? "ff" }: builtins.mapAttrs (_:color: a + color) default; # ARGB
|
argb =
|
||||||
|
{
|
||||||
|
a ? "ff",
|
||||||
|
}:
|
||||||
|
builtins.mapAttrs (_: color: a + color) default; # ARGB
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,14 @@
|
|||||||
marisa = "${ipPrefix}.2";
|
marisa = "${ipPrefix}.2";
|
||||||
satori = "${ipPrefix}.3";
|
satori = "${ipPrefix}.3";
|
||||||
hina = "${ipPrefix}.4";
|
hina = "${ipPrefix}.4";
|
||||||
|
okina = "${ipPrefix}.5";
|
||||||
|
suwako = "${ipPrefix}.6";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
domain = {
|
domain = {
|
||||||
natto = "weirdnatto.in";
|
natto = "weirdnatto.in";
|
||||||
|
amneesh = "amneesh.com";
|
||||||
|
chutiya = "chutiya.online";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
897
flake.lock
generated
897
flake.lock
generated
File diff suppressed because it is too large
Load Diff
123
flake.nix
123
flake.nix
@@ -1,56 +1,13 @@
|
|||||||
{
|
{
|
||||||
description = "dotfiles";
|
description = "dotfiles";
|
||||||
|
|
||||||
inputs = {
|
outputs =
|
||||||
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
|
inputs@{ self, ... }:
|
||||||
|
|
||||||
stable.url = github:nixos/nixpkgs/release-24.05;
|
|
||||||
|
|
||||||
flake-parts.url = github:hercules-ci/flake-parts;
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
url = github:nix-community/home-manager;
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
mailserver = {
|
|
||||||
url = gitlab:simple-nixos-mailserver/nixos-mailserver;
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
filehost = {
|
|
||||||
url = github:natto1784/simpler-filehost;
|
|
||||||
};
|
|
||||||
|
|
||||||
nix-gaming.url = github:fufexan/nix-gaming;
|
|
||||||
|
|
||||||
nbfc = {
|
|
||||||
url = github:nbfc-linux/nbfc-linux;
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
emacs-overlay.url = github:nix-community/emacs-overlay;
|
|
||||||
|
|
||||||
nvim-overlay.url = github:nix-community/neovim-nightly-overlay;
|
|
||||||
|
|
||||||
hyprland = {
|
|
||||||
type = "git";
|
|
||||||
url = "https://github.com/hyprwm/Hyprland";
|
|
||||||
submodules = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hyprland-contrib = {
|
|
||||||
url = github:hyprwm/contrib;
|
|
||||||
};
|
|
||||||
|
|
||||||
agenix.url = github:ryantm/agenix;
|
|
||||||
|
|
||||||
ags.url = github:Aylur/ags;
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = inputs@{ self, ... }:
|
|
||||||
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
inputs.flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./hosts
|
./hosts
|
||||||
@@ -59,18 +16,70 @@
|
|||||||
./conf
|
./conf
|
||||||
];
|
];
|
||||||
|
|
||||||
perSystem = { system, pkgs, ... }:
|
perSystem =
|
||||||
|
{ system, pkgs, ... }:
|
||||||
rec {
|
rec {
|
||||||
formatter = pkgs.nixpkgs-fmt;
|
formatter = pkgs.nixfmt-tree;
|
||||||
devShells.default = with pkgs; mkShell {
|
devShells.default =
|
||||||
packages = [
|
with pkgs;
|
||||||
nixd
|
mkShell {
|
||||||
formatter
|
packages = [
|
||||||
];
|
nixd
|
||||||
};
|
formatter
|
||||||
|
];
|
||||||
|
};
|
||||||
_module.args.pkgs = import inputs.nixpkgs {
|
_module.args.pkgs = import inputs.nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||||
|
|
||||||
|
stable.url = "github:nixos/nixpkgs/release-24.05";
|
||||||
|
|
||||||
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
mailserver = {
|
||||||
|
url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
filehost = {
|
||||||
|
url = "github:natto1784/yamaf";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix-gaming.url = "github:fufexan/nix-gaming";
|
||||||
|
|
||||||
|
nbfc = {
|
||||||
|
url = "github:nbfc-linux/nbfc-linux";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||||
|
|
||||||
|
nvim-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||||
|
|
||||||
|
hyprland = {
|
||||||
|
type = "git";
|
||||||
|
url = "https://github.com/hyprwm/Hyprland";
|
||||||
|
submodules = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hyprland-contrib = {
|
||||||
|
url = "github:hyprwm/contrib";
|
||||||
|
};
|
||||||
|
|
||||||
|
agenix.url = "github:ryantm/agenix";
|
||||||
|
|
||||||
|
ags.url = "github:Aylur/ags/v1";
|
||||||
|
|
||||||
|
nixgl.url = "github:nix-community/nixGL";
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
8
home/README
Normal file
8
home/README
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
natto : default user for okina (desktop - NixOS Unstable)
|
||||||
|
natto-laptop : default user for satori (laptop - NixOS Unstable)
|
||||||
|
bat : default user for remilia (Oracle VM - NixOS Unstable)
|
||||||
|
spin : default user for hina (Oracle VM - NixOS Unstable)
|
||||||
|
spark : default user for marisa (RPi4 - NixOS Unstable)
|
||||||
|
kero : default user for suwako (ARM OracleVM - NixOS Unstable)
|
||||||
|
amneesh : default user for nightbug (Workplace PC - Arch Linux)
|
||||||
|
|
||||||
37
home/amneesh/default.nix
Normal file
37
home/amneesh/default.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
homeDirectory = "/home/amneesh";
|
||||||
|
username = "amneesh";
|
||||||
|
stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
|
||||||
|
targets.genericLinux.enable = true;
|
||||||
|
|
||||||
|
imports = [
|
||||||
|
./pkgs.nix
|
||||||
|
./nixgl.nix
|
||||||
|
./screen.nix
|
||||||
|
./wayvnc.nix
|
||||||
|
|
||||||
|
# From personal
|
||||||
|
../natto/ags
|
||||||
|
../natto/emacs.nix
|
||||||
|
../natto/browser.nix
|
||||||
|
../natto/dunst.nix
|
||||||
|
../natto/gtk.nix
|
||||||
|
../natto/cursor.nix
|
||||||
|
../natto/wayland.nix
|
||||||
|
../natto/hypridle.nix
|
||||||
|
../natto/hyprlock.nix
|
||||||
|
../natto/hyprpaper.nix
|
||||||
|
../natto/hyprland.nix
|
||||||
|
../natto/tofi.nix
|
||||||
|
../natto/foot.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
29
home/amneesh/nixgl.nix
Normal file
29
home/amneesh/nixgl.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (inputs) nixgl;
|
||||||
|
inherit (inputs.hyprland.packages.${pkgs.system}) hyprland;
|
||||||
|
inherit (config.lib.nixGL) wrap;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixGL = {
|
||||||
|
packages = nixgl.packages;
|
||||||
|
defaultWrapper = "mesa";
|
||||||
|
offloadWrapper = "nvidiaPrime";
|
||||||
|
installScripts = [
|
||||||
|
"mesa"
|
||||||
|
"nvidiaPrime"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# hyprland
|
||||||
|
wayland.windowManager.hyprland.package = lib.mkForce (wrap hyprland);
|
||||||
|
|
||||||
|
# hypridle
|
||||||
|
services.hypridle.package = lib.mkForce (wrap pkgs.hypridle);
|
||||||
|
}
|
||||||
29
home/amneesh/pkgs.nix
Normal file
29
home/amneesh/pkgs.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
|
xdg.mime.enable = true;
|
||||||
|
programs = {
|
||||||
|
bash.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
cmake
|
||||||
|
corkscrew
|
||||||
|
dtc
|
||||||
|
file
|
||||||
|
htop
|
||||||
|
llvmPackages.clang
|
||||||
|
(nattovim.override { nvimPackage = inputs.nvim-overlay.packages.${pkgs.system}.neovim; })
|
||||||
|
meson
|
||||||
|
ninja
|
||||||
|
thunderbird
|
||||||
|
wget
|
||||||
|
xfce.thunar
|
||||||
|
libreoffice
|
||||||
|
git-repo
|
||||||
|
];
|
||||||
|
}
|
||||||
12
home/amneesh/screen.nix
Normal file
12
home/amneesh/screen.nix
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = [ pkgs.screen ];
|
||||||
|
|
||||||
|
file = {
|
||||||
|
".screenrc".text = ''
|
||||||
|
defscrollback 10000
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
home/amneesh/wayvnc.nix
Normal file
13
home/amneesh/wayvnc.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.wayvnc = rec {
|
||||||
|
enable = true;
|
||||||
|
autoStart = enable;
|
||||||
|
settings = {
|
||||||
|
address = "0.0.0.0";
|
||||||
|
port = 5900;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
4
home/common/direnv/default.nix
Normal file
4
home/common/direnv/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.direnv.enable = true;
|
||||||
|
}
|
||||||
20
home/common/fonts/default.nix
Normal file
20
home/common/fonts/default.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
fira-code
|
||||||
|
fira-mono
|
||||||
|
monoid
|
||||||
|
font-awesome
|
||||||
|
material-icons
|
||||||
|
material-design-icons
|
||||||
|
lohit-fonts.devanagari
|
||||||
|
lohit-fonts.gurmukhi
|
||||||
|
office-code-pro
|
||||||
|
eb-garamond
|
||||||
|
noto-fonts-cjk-sans
|
||||||
|
takao
|
||||||
|
liberation_ttf
|
||||||
|
];
|
||||||
|
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
}
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
{ config, ... }:
|
|
||||||
{
|
|
||||||
programs = {
|
|
||||||
home-manager.enable = true;
|
|
||||||
password-store.enable = true;
|
|
||||||
direnv.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ ... }:
|
{ lib, ... }:
|
||||||
{
|
{
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -16,9 +16,13 @@
|
|||||||
prompt.theme = "pure";
|
prompt.theme = "pure";
|
||||||
autosuggestions.color = "fg=yellow,bold";
|
autosuggestions.color = "fg=yellow,bold";
|
||||||
utility.safeOps = false;
|
utility.safeOps = false;
|
||||||
|
extraConfig = lib.mkBefore ''
|
||||||
|
export GREP_COLORS="mt=01;31"
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
initExtra = ''
|
initContent = lib.mkAfter ''
|
||||||
unsetopt extendedGlob
|
unsetopt extendedGlob
|
||||||
|
[[ -f ~/.zsh_custom ]] && source ~/.zsh_custom
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
144
home/default.nix
144
home/default.nix
@@ -1,84 +1,122 @@
|
|||||||
{ self, inputs, globalArgs, ... }:
|
{
|
||||||
|
self,
|
||||||
|
inputs,
|
||||||
|
globalArgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
common = [
|
common = [
|
||||||
./common/zsh.nix
|
{ programs.home-manager.enable = true; }
|
||||||
./common/programs.nix
|
./common/zsh
|
||||||
|
./common/direnv
|
||||||
|
./common/laptop.nix
|
||||||
|
inputs.agenix.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
mkPkgs = system: import inputs.nixpkgs {
|
mkPkgs =
|
||||||
inherit system;
|
system: overlays:
|
||||||
config = {
|
import inputs.nixpkgs {
|
||||||
allowUnfree = true;
|
inherit system;
|
||||||
allowBroken = true;
|
config = {
|
||||||
allowInsecure = true;
|
allowUnfree = true;
|
||||||
|
allowBroken = true;
|
||||||
|
allowInsecure = true;
|
||||||
|
};
|
||||||
|
overlays = overlays ++ [ self.overlays.default ];
|
||||||
};
|
};
|
||||||
overlays = [ self.overlays.default ];
|
|
||||||
};
|
|
||||||
|
|
||||||
extraSpecialArgs = globalArgs;
|
extraSpecialArgs = globalArgs;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.homeConfigurations =
|
flake.homeConfigurations = {
|
||||||
let
|
natto-laptop = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit extraSpecialArgs;
|
||||||
nattoModules = [
|
modules = [
|
||||||
./natto
|
./natto
|
||||||
./common/laptop.nix
|
./common/fonts
|
||||||
inputs.agenix.homeManagerModules.default
|
{ isLaptop = true; }
|
||||||
] ++ common;
|
]
|
||||||
in
|
++ common;
|
||||||
{
|
pkgs = mkPkgs "x86_64-linux" [ ];
|
||||||
natto-laptop = inputs.home-manager.lib.homeManagerConfiguration {
|
};
|
||||||
inherit extraSpecialArgs;
|
|
||||||
modules = nattoModules ++ [
|
|
||||||
{ isLaptop = true; }
|
|
||||||
];
|
|
||||||
pkgs = mkPkgs "x86_64-linux";
|
|
||||||
};
|
|
||||||
|
|
||||||
natto = inputs.home-manager.lib.homeManagerConfiguration {
|
natto = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
inherit extraSpecialArgs;
|
inherit extraSpecialArgs;
|
||||||
modules = nattoModules;
|
modules = [
|
||||||
pkgs = mkPkgs "x86_64-linux";
|
./natto
|
||||||
};
|
./common/fonts
|
||||||
|
]
|
||||||
|
++ common;
|
||||||
|
pkgs = mkPkgs "x86_64-linux" [ ];
|
||||||
|
};
|
||||||
|
|
||||||
}
|
spark = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit extraSpecialArgs;
|
||||||
// {
|
modules = [
|
||||||
spark = inputs.home-manager.lib.homeManagerConfiguration {
|
{
|
||||||
inherit extraSpecialArgs;
|
|
||||||
modules = [{
|
|
||||||
home = {
|
home = {
|
||||||
homeDirectory = "/home/spark";
|
homeDirectory = "/home/spark";
|
||||||
username = "spark";
|
username = "spark";
|
||||||
stateVersion = "23.05";
|
stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
}] ++ common;
|
}
|
||||||
pkgs = mkPkgs "aarch64-linux";
|
]
|
||||||
};
|
++ common;
|
||||||
|
pkgs = mkPkgs "aarch64-linux" [ ];
|
||||||
|
};
|
||||||
|
|
||||||
bat = inputs.home-manager.lib.homeManagerConfiguration {
|
bat = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
inherit extraSpecialArgs;
|
inherit extraSpecialArgs;
|
||||||
modules = [{
|
modules = [
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
homeDirectory = "/home/bat";
|
homeDirectory = "/home/bat";
|
||||||
username = "bat";
|
username = "bat";
|
||||||
stateVersion = "23.05";
|
stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
}] ++ common;
|
}
|
||||||
pkgs = mkPkgs "x86_64-linux";
|
]
|
||||||
};
|
++ common;
|
||||||
|
pkgs = mkPkgs "x86_64-linux" [ ];
|
||||||
|
};
|
||||||
|
|
||||||
spin = inputs.home-manager.lib.homeManagerConfiguration {
|
spin = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
inherit extraSpecialArgs;
|
inherit extraSpecialArgs;
|
||||||
modules = [{
|
modules = [
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
homeDirectory = "/home/spin";
|
homeDirectory = "/home/spin";
|
||||||
username = "spin";
|
username = "spin";
|
||||||
stateVersion = "23.05";
|
stateVersion = "23.05";
|
||||||
};
|
};
|
||||||
}] ++ common;
|
}
|
||||||
pkgs = mkPkgs "x86_64-linux";
|
]
|
||||||
};
|
++ common;
|
||||||
|
pkgs = mkPkgs "x86_64-linux" [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
kero = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit extraSpecialArgs;
|
||||||
|
modules = [
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
homeDirectory = "/home/kero";
|
||||||
|
username = "kero";
|
||||||
|
stateVersion = "24.05";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++ common;
|
||||||
|
pkgs = mkPkgs "aarch64-linux" [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
amneesh = inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit extraSpecialArgs;
|
||||||
|
modules = [
|
||||||
|
./amneesh
|
||||||
|
]
|
||||||
|
++ common;
|
||||||
|
pkgs = mkPkgs "x86_64-linux" [ (import ./overlays/standalone.nix) ];
|
||||||
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,26 +1,35 @@
|
|||||||
{ pkgs, lib, config, inputs, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
cfg = config.programs.ags;
|
cfg = config.programs.ags;
|
||||||
|
|
||||||
deps = with pkgs; [
|
deps =
|
||||||
sass
|
with pkgs;
|
||||||
gawk
|
[
|
||||||
bash
|
sass
|
||||||
procps
|
gawk
|
||||||
coreutils
|
bash
|
||||||
imagemagick
|
procps
|
||||||
systemd
|
coreutils
|
||||||
config.wayland.windowManager.hyprland.package
|
imagemagick
|
||||||
] ++ lib.optional config.isLaptop brightnessctl;
|
systemd
|
||||||
|
config.wayland.windowManager.hyprland.package
|
||||||
|
]
|
||||||
|
++ lib.optional config.isLaptop brightnessctl;
|
||||||
|
|
||||||
configDir = lib.cleanSourceWith {
|
configDir = lib.cleanSourceWith {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
filter = name: _:
|
filter =
|
||||||
|
name: _:
|
||||||
let
|
let
|
||||||
baseName = baseNameOf (toString name);
|
baseName = baseNameOf (toString name);
|
||||||
in
|
in
|
||||||
!(lib.hasSuffix ".nix" baseName);
|
!(lib.hasSuffix ".nix" baseName);
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
@@ -28,7 +37,10 @@ in
|
|||||||
inputs.ags.homeManagerModules.default
|
inputs.ags.homeManagerModules.default
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.ags.enable = true;
|
programs.ags = {
|
||||||
|
enable = true;
|
||||||
|
# package = pkgs.ags_1;
|
||||||
|
};
|
||||||
|
|
||||||
xdg.configFile."ags" = {
|
xdg.configFile."ags" = {
|
||||||
source = configDir;
|
source = configDir;
|
||||||
@@ -47,6 +59,7 @@ in
|
|||||||
Environment = "PATH=${lib.makeBinPath deps}";
|
Environment = "PATH=${lib.makeBinPath deps}";
|
||||||
ExecStart = "${cfg.package}/bin/ags";
|
ExecStart = "${cfg.package}/bin/ags";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
RestartSec = 10;
|
||||||
};
|
};
|
||||||
Install.WantedBy = [ "graphical-session.target" ];
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
|
|||||||
18
home/natto/browser.nix
Normal file
18
home/natto/browser.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
firefox = {
|
||||||
|
enable = true;
|
||||||
|
profiles.natto = {
|
||||||
|
name = "natto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
chromium = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.ungoogled-chromium;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
home.sessionVariables = {
|
||||||
|
BROWSER = "firefox";
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
#+TITLE: My Emacs Configuration
|
#+TITLE: My Emacs Configuration
|
||||||
#+AUTHOR: Amneesh Singh
|
#+AUTHOR: natto1784
|
||||||
#+PROPERTY: header-args :emacs-lisp :tangle yes
|
#+PROPERTY: header-args :emacs-lisp :tangle yes
|
||||||
|
|
||||||
* Settings
|
* Settings
|
||||||
@@ -20,6 +20,7 @@
|
|||||||
(fringe-mode 0)
|
(fringe-mode 0)
|
||||||
(global-display-line-numbers-mode 1)
|
(global-display-line-numbers-mode 1)
|
||||||
(xterm-mouse-mode 1)
|
(xterm-mouse-mode 1)
|
||||||
|
(electric-pair-mode)
|
||||||
(setq ring-bell-function 'ignore
|
(setq ring-bell-function 'ignore
|
||||||
gc-cons-threshold most-positive-fixnum
|
gc-cons-threshold most-positive-fixnum
|
||||||
initial-major-mode 'fundamental-mode)
|
initial-major-mode 'fundamental-mode)
|
||||||
@@ -33,7 +34,9 @@
|
|||||||
scroll-step 1
|
scroll-step 1
|
||||||
display-line-numbers-type 'relative
|
display-line-numbers-type 'relative
|
||||||
confirm-kill-processes nil
|
confirm-kill-processes nil
|
||||||
inhibit-startup-screen t)
|
inhibit-startup-screen t
|
||||||
|
isearch-lazy-count t
|
||||||
|
lazy-count-prefix-format "[%s/%s] ")
|
||||||
(setq-default tab-width 2
|
(setq-default tab-width 2
|
||||||
indent-tabs-mode nil)
|
indent-tabs-mode nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
@@ -57,8 +60,7 @@
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package benchmark-init
|
(use-package benchmark-init
|
||||||
:config
|
:config
|
||||||
;; To disable collection of benchmark data after init is done.
|
(add-hook 'after-init-hook 'benchmark-init/deactivate) )
|
||||||
:init (benchmark-init/deactivate))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Visual packages
|
** Visual packages
|
||||||
@@ -78,32 +80,55 @@
|
|||||||
(dark-theme t))
|
(dark-theme t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Configure Selectrum
|
*** Indent guides
|
||||||
Enable selectrum
|
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package selectrum
|
(use-package highlight-indent-guides
|
||||||
:defer t
|
|
||||||
:config
|
:config
|
||||||
(selectrum-mode +1))
|
(setq highlight-indent-guides-method 'column)
|
||||||
|
:hook
|
||||||
|
(prog-mode . highlight-indent-guides-mode))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Add selectrum-prescient
|
** Minibuffer
|
||||||
|
Enable vertico
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package selectrum-prescient
|
(use-package vertico
|
||||||
:config
|
:init
|
||||||
(selectrum-prescient-mode +1)
|
(vertico-mode)
|
||||||
(prescient-persist-mode +1))
|
:bind (:map vertico-map
|
||||||
|
("C-j" . vertico-next)
|
||||||
|
("C-k" . vertico-previous)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
Save history over restarts
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
(use-package savehist
|
||||||
|
:init
|
||||||
|
(savehist-mode))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Marginalia for description
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package marginalia
|
||||||
|
:after vertico
|
||||||
|
:config
|
||||||
|
(marginalia-mode 1))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
Orderless
|
||||||
|
#+begin_src emacs-lisp
|
||||||
(use-package orderless
|
(use-package orderless
|
||||||
:after selectrum
|
:after vertico
|
||||||
:config
|
:config
|
||||||
(setq completion-styles '(orderless basic))
|
(setq completion-styles '(orderless basic)))
|
||||||
(savehist-mode)
|
#+end_src
|
||||||
(setq orderless-skip-highlighting (lambda () selectrum-is-active)
|
|
||||||
selectrum-highlight-candidates-function #'orderless-highlight-matches))
|
Consult
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package consult
|
||||||
|
:bind (("M-s M-g" . consult-grep)
|
||||||
|
("M-s M-f" . consult-find)
|
||||||
|
("M-s M-b" . consult-buffer)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Evil
|
** Evil
|
||||||
@@ -124,6 +149,7 @@ Add selectrum-prescient
|
|||||||
(use-package evil
|
(use-package evil
|
||||||
:init
|
:init
|
||||||
(setq-default evil-shift-width 2)
|
(setq-default evil-shift-width 2)
|
||||||
|
(setq evil-want-keybinding nil)
|
||||||
:config
|
:config
|
||||||
(evil-set-initial-state 'vterm-mode 'insert)
|
(evil-set-initial-state 'vterm-mode 'insert)
|
||||||
(evil-set-undo-system 'undo-tree)
|
(evil-set-undo-system 'undo-tree)
|
||||||
@@ -132,6 +158,22 @@ Add selectrum-prescient
|
|||||||
(evil-mode 1))
|
(evil-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** Evil related packages
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package evil-collection
|
||||||
|
:after evil
|
||||||
|
:ensure t
|
||||||
|
:config
|
||||||
|
(evil-collection-init))
|
||||||
|
|
||||||
|
(use-package evil-terminal-cursor-changer
|
||||||
|
:after evil
|
||||||
|
:if (not (display-graphic-p))
|
||||||
|
:config
|
||||||
|
(evil-terminal-cursor-changer-activate))
|
||||||
|
(use-package evil-anzu :after evil)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
*** Configure undo tree
|
*** Configure undo tree
|
||||||
To undo and redo easily like vi
|
To undo and redo easily like vi
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -142,15 +184,6 @@ To undo and redo easily like vi
|
|||||||
(global-undo-tree-mode 1))
|
(global-undo-tree-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Miscellaneous evil related packages
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(use-package evil-terminal-cursor-changer
|
|
||||||
:if (not (display-graphic-p))
|
|
||||||
:config
|
|
||||||
(evil-terminal-cursor-changer-activate))
|
|
||||||
(use-package evil-anzu :after evil)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
** Treemacs
|
** Treemacs
|
||||||
*** Configure treemacs
|
*** Configure treemacs
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -169,7 +202,9 @@ To undo and redo easily like vi
|
|||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package lsp-mode
|
(use-package lsp-mode
|
||||||
:defer t
|
:defer t
|
||||||
:commands lsp)
|
:commands lsp
|
||||||
|
:init (setq lsp-enable-on-type-formatting nil)
|
||||||
|
:hook (prog-mode . lsp-deferred))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Configure lsp-ui
|
*** Configure lsp-ui
|
||||||
@@ -211,7 +246,6 @@ For autocomplete
|
|||||||
(add-to-list 'company-backends 'company-dabbrev)
|
(add-to-list 'company-backends 'company-dabbrev)
|
||||||
(setq company-backends (append '(company-files) (remove 'company-files company-backends)))
|
(setq company-backends (append '(company-files) (remove 'company-files company-backends)))
|
||||||
:hook (after-init . global-company-mode))
|
:hook (after-init . global-company-mode))
|
||||||
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Configure company-quickhelp
|
*** Configure company-quickhelp
|
||||||
@@ -242,6 +276,8 @@ For autocomplete
|
|||||||
|
|
||||||
** Languages
|
** Languages
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
|
(use-package dts-mode
|
||||||
|
:mode ("\\.dts\\'" "\\.dtsi\\'" "\\.overlay\\'"))
|
||||||
(use-package lsp-haskell
|
(use-package lsp-haskell
|
||||||
:mode "\\.hs\\'")
|
:mode "\\.hs\\'")
|
||||||
(use-package lsp-latex
|
(use-package lsp-latex
|
||||||
@@ -262,11 +298,26 @@ For autocomplete
|
|||||||
:mode "\\.go\\'")
|
:mode "\\.go\\'")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Magit
|
** Git
|
||||||
|
magit for git operations
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package magit :defer t)
|
(use-package magit :defer t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
blamer for git blame
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package blamer
|
||||||
|
:defer 20
|
||||||
|
:custom
|
||||||
|
(blamer-idle-time 0.3)
|
||||||
|
(blamer-min-offset 70)
|
||||||
|
:config
|
||||||
|
(global-blamer-mode 1)
|
||||||
|
:init
|
||||||
|
(setq blamer-show-avatar-p nil
|
||||||
|
blamer-max-commit-message-length 72))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
** VTerm
|
** VTerm
|
||||||
*** Configure vterm
|
*** Configure vterm
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -317,26 +368,64 @@ Do not use centaur tabs for now
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Misc packages
|
** Misc packages
|
||||||
#+begin_src emacs-lisp
|
*** Icons
|
||||||
|
For installing icons
|
||||||
|
#+begin_src emacs-lisp
|
||||||
(use-package all-the-icons
|
(use-package all-the-icons
|
||||||
|
:defer t
|
||||||
:if (display-graphic-p))
|
:if (display-graphic-p))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
(use-package elcord :defer t)
|
*** Projectile
|
||||||
|
For tracking project root
|
||||||
|
#+begin_src emacs-lisp
|
||||||
(use-package projectile
|
(use-package projectile
|
||||||
:defer t
|
:defer t
|
||||||
:config
|
:config
|
||||||
(define-key projectile-mode-map (kbd "C-x p") 'projectile-command-map)
|
(define-key projectile-mode-map (kbd "C-x p") 'projectile-command-map)
|
||||||
(projectile-mode +1))
|
(projectile-mode +1))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Rainbow
|
||||||
|
For highlighting colors
|
||||||
|
#+begin_src emacs-lisp
|
||||||
(use-package rainbow-mode :defer t)
|
(use-package rainbow-mode :defer t)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
*** Rainbow delimiters
|
||||||
|
To make distinguishing parens easier
|
||||||
|
#+begin_src emacs-lisp
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
:hook (prog-mode . rainbow-delimiters-mode))
|
:hook (prog-mode . rainbow-delimiters-mode))
|
||||||
|
|
||||||
(use-package flex-autopair)
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
*** Olivetti
|
||||||
|
When you want write prose or something similar
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package olivetti
|
||||||
|
:defer t
|
||||||
|
:diminish olivetti-mode
|
||||||
|
:custom
|
||||||
|
(olivetti-body-width 100)
|
||||||
|
(olivetti-minimum-body-width 50)
|
||||||
|
(olivetti-style 'fancy)
|
||||||
|
(olivetti-recall-visual-line-mode-entry-state t)
|
||||||
|
:config
|
||||||
|
(defvar-local my/olivetti--saved-line-numbers nil
|
||||||
|
"Stores the previous value of `display-line-numbers` before enabling Olivetti.")
|
||||||
|
|
||||||
|
(defun my/olivetti-toggle-line-numbers ()
|
||||||
|
"Hide line numbers when entering Olivetti, restore when exiting."
|
||||||
|
(if olivetti-mode
|
||||||
|
(progn
|
||||||
|
(setq my/olivetti--saved-line-numbers display-line-numbers)
|
||||||
|
(setq display-line-numbers nil))
|
||||||
|
(setq display-line-numbers my/olivetti--saved-line-numbers)))
|
||||||
|
|
||||||
|
(add-hook 'olivetti-mode-hook #'my/olivetti-toggle-line-numbers))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
** Org
|
** Org
|
||||||
** Add org-mode
|
** Add org-mode
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
@@ -384,22 +473,31 @@ Do not use centaur tabs for now
|
|||||||
(latex . t)))
|
(latex . t)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Mode specific hooks
|
|
||||||
#+begin_src emacs-lisp
|
|
||||||
(add-hook 'c-mode-hook 'lsp)
|
|
||||||
(add-hook 'c++-mode-hook 'lsp)
|
|
||||||
(add-hook 'haskell-mode-hook #'lsp)
|
|
||||||
(add-hook 'haskell-literate-mode-hook #'lsp)
|
|
||||||
#+end_src
|
|
||||||
|
|
||||||
* Random eye candy stuff
|
* Random eye candy stuff
|
||||||
|
* Mode line
|
||||||
* Custom mode line
|
** Doom modeline
|
||||||
switched to doom modeline after using my own modeline for a while
|
Switched to doom modeline after using my own modeline for a while
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(use-package doom-modeline
|
(use-package doom-modeline
|
||||||
:init (doom-modeline-mode 1))
|
:init (doom-modeline-mode 1))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
Also show columns
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(column-number-mode 1)
|
||||||
|
#+end_src
|
||||||
|
|
||||||
|
** Nyan Mode
|
||||||
|
#+begin_src emacs-lisp
|
||||||
|
(use-package nyan-mode
|
||||||
|
:ensure t
|
||||||
|
:init
|
||||||
|
(when (display-graphic-p)
|
||||||
|
(nyan-mode 1))
|
||||||
|
:custom
|
||||||
|
(nyan-animate-nyancat t)
|
||||||
|
:config
|
||||||
|
(nyan-start-animation))
|
||||||
|
#+end_src
|
||||||
|
|
||||||
* Pop-up terminal
|
* Pop-up terminal
|
||||||
Stolen from [[https://www.reddit.com/r/emacs/comments/ft84xy/run_shell_command_in_new_vterm/][this]] reddit post
|
Stolen from [[https://www.reddit.com/r/emacs/comments/ft84xy/run_shell_command_in_new_vterm/][this]] reddit post
|
||||||
@@ -427,33 +525,35 @@ Stolen from [[https://www.reddit.com/r/emacs/comments/ft84xy/run_shell_command_i
|
|||||||
(vterm-send-return)))
|
(vterm-send-return)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
Compilation shortcuts for standalone files
|
* LLMs
|
||||||
|
** gptel
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun candrun ()
|
(use-package gptel
|
||||||
(let ((full buffer-file-name)
|
:defer t
|
||||||
(file (file-name-sans-extension buffer-file-name)))
|
:config
|
||||||
(pcase (file-name-extension full)
|
(setq gptel-model 'claude-sonnet-4-20250514
|
||||||
("c" (concat "gcc " full " -lm -pthread -o " file " && " file " && rm " file))
|
gptel-backend (gptel-make-anthropic "Claude"
|
||||||
("java" (concat "java " full))
|
:stream t
|
||||||
("py" (concat "python " full))
|
:protocol "https"
|
||||||
("cpp" (concat "g++ " full " -o " file " && " file " && rm " file))
|
:key (getenv "ANTHROPIC_API_KEY")
|
||||||
("cc" (concat "g++ " full " -o " file " && " file " && rm " file))
|
:host (getenv "ANTHROPIC_API_BASE_DOMAIN")))
|
||||||
("hs" (concat "runhaskell " full))
|
(setq gptel-default-mode 'org-mode)
|
||||||
("sh" (concat "sh " full))
|
:bind (("C-c g" . gptel)))
|
||||||
("js" (concat "node " full))
|
|
||||||
("ts" (concat "tsc " full " && node " file ".js && rm " file ".js" ))
|
|
||||||
("rs" (concat "rustc " full " -o " file " && " file " && rm " file)))))
|
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Custom Functions
|
** Aidermacs
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(defun detach-process ()
|
(use-package aidermacs
|
||||||
"Run processes but detached from the parent"
|
:defer t
|
||||||
(interactive)
|
:bind (("C-c a" . aidermacs-transient-menu))
|
||||||
(let ((command (read-string "Enter command:")))
|
:custom
|
||||||
(call-process-shell-command (concat command " &") nil 0)))
|
; See the Configuration section below
|
||||||
|
(aidermacs-default-chat-mode 'architect)
|
||||||
|
(aidermacs-default-model "sonnet"))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
|
||||||
* Keybinds
|
* Keybinds
|
||||||
** General
|
** General
|
||||||
*** Colemak translations
|
*** Colemak translations
|
||||||
@@ -501,7 +601,7 @@ not using this anymore
|
|||||||
"M-C-k" 'enlarge-window
|
"M-C-k" 'enlarge-window
|
||||||
"C-q" 'delete-window
|
"C-q" 'delete-window
|
||||||
"M-C-S-q" 'kill-buffer-and-window
|
"M-C-S-q" 'kill-buffer-and-window
|
||||||
"M-w" 'centaur-tabs--kill-this-buffer-dont-ask
|
"M-w" (lambda () (interactive) (kill-buffer (current-buffer)))
|
||||||
"M-S-w" 'kill-window)
|
"M-S-w" 'kill-window)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
@@ -514,8 +614,7 @@ not using this anymore
|
|||||||
"<f4>" (lambda () (interactive) (vterm t))
|
"<f4>" (lambda () (interactive) (vterm t))
|
||||||
"C-S-t" 'vterm-toggle-cd
|
"C-S-t" 'vterm-toggle-cd
|
||||||
"C-t" 'vterm-toggle
|
"C-t" 'vterm-toggle
|
||||||
"<f1>" 'vterm-toggle
|
"<f1>" 'vterm-toggle)
|
||||||
"<f5>" (lambda () (interactive) (run-in-vterm (candrun))))
|
|
||||||
(general-define-key
|
(general-define-key
|
||||||
:keymaps 'vterm-mode-map
|
:keymaps 'vterm-mode-map
|
||||||
"<f3>" 'vterm-toggle-forward
|
"<f3>" 'vterm-toggle-forward
|
||||||
|
|||||||
@@ -1,173 +0,0 @@
|
|||||||
monitor=, highrr, auto, 1, bitdepth, 10
|
|
||||||
|
|
||||||
input {
|
|
||||||
kb_layout = us
|
|
||||||
kb_variant = colemak_dh
|
|
||||||
kb_model =
|
|
||||||
kb_options =
|
|
||||||
kb_rules =
|
|
||||||
|
|
||||||
follow_mouse = 1
|
|
||||||
|
|
||||||
touchpad {
|
|
||||||
natural_scroll = yes
|
|
||||||
scroll_factor = 0.4
|
|
||||||
}
|
|
||||||
|
|
||||||
repeat_delay = 300
|
|
||||||
accel_profile = flat
|
|
||||||
}
|
|
||||||
|
|
||||||
general {
|
|
||||||
gaps_in = 5
|
|
||||||
gaps_out = 10
|
|
||||||
border_size = 2
|
|
||||||
|
|
||||||
# home-manager is going to override these
|
|
||||||
col.active_border = rgba(b4befeee) rgba(f5c2e7ff) 135deg
|
|
||||||
col.inactive_border = rgba(595959ff)
|
|
||||||
|
|
||||||
layout = dwindle
|
|
||||||
}
|
|
||||||
|
|
||||||
decoration {
|
|
||||||
rounding = 1
|
|
||||||
inactive_opacity = 0.8
|
|
||||||
drop_shadow = true
|
|
||||||
|
|
||||||
blur {
|
|
||||||
enabled = true
|
|
||||||
size = 8
|
|
||||||
new_optimizations = true
|
|
||||||
xray = true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
animations {
|
|
||||||
enabled = yes
|
|
||||||
|
|
||||||
bezier =overshot,0.01, 0.9, 0.1, 1.05
|
|
||||||
bezier =easeoutexpo,0.16, 1, 0.3, 1
|
|
||||||
|
|
||||||
animation = windows, 1, 7, overshot, popin 50%
|
|
||||||
animation = windowsOut, 1, 7, easeoutexpo, popin 50%
|
|
||||||
animation = border, 1, 10, default
|
|
||||||
animation = fade, 1, 7, default
|
|
||||||
animation = workspaces, 1, 6, overshot
|
|
||||||
}
|
|
||||||
|
|
||||||
dwindle {
|
|
||||||
pseudotile = yes
|
|
||||||
preserve_split = yes
|
|
||||||
}
|
|
||||||
|
|
||||||
master {
|
|
||||||
new_is_master = false
|
|
||||||
}
|
|
||||||
|
|
||||||
gestures {
|
|
||||||
workspace_swipe = off
|
|
||||||
}
|
|
||||||
|
|
||||||
misc {
|
|
||||||
no_direct_scanout = true
|
|
||||||
disable_hyprland_logo = true
|
|
||||||
}
|
|
||||||
|
|
||||||
windowrule=float, ^.*(iwgtk)$
|
|
||||||
|
|
||||||
$mainMod=SUPER
|
|
||||||
|
|
||||||
binde=$mainMod, RETURN, exec, foot
|
|
||||||
bindr=SUPER, D, exec, pkill tofi || tofi-drun | xargs hyprctl dispatch exec --
|
|
||||||
bindr=SUPER SHIFT, D, exec, pkill tofi || tofi-run --require-match=false | xargs hyprctl dispatch exec --
|
|
||||||
|
|
||||||
$playerctl=playerctl -p 'playerctld,%any'
|
|
||||||
|
|
||||||
bind=$mainMod, P, exec, $playerctl play-pause
|
|
||||||
bind=, XF86AudioPlay, exec, $playerctl play-pause
|
|
||||||
bind=, XF86AudioNext, exec, $playerctl position 5+
|
|
||||||
bind=, XF86AudioPrev, exec, $playerctl position 5-
|
|
||||||
bind=$mainMod, XF86AudioNext, exec, $playerctl next
|
|
||||||
bind=$mainMod, XF86AudioPrev, exec, $playerctl previous
|
|
||||||
binde=, XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+
|
|
||||||
binde=, XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-
|
|
||||||
bind=, XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle
|
|
||||||
|
|
||||||
binde=, XF86MonBrightnessUp, exec, light -A 5
|
|
||||||
binde=, XF86MonBrightnessDown, exec, light -U 5
|
|
||||||
|
|
||||||
bind=$mainMod SHIFT, F1, exec, setxkbmap us colemak_dh
|
|
||||||
bind=$mainMod SHIFT, F2, exec, setxkbmap us basic
|
|
||||||
bind=$mainMod SHIFT, F3, exec, setxkbmap in deva
|
|
||||||
bind=$mainMod SHIFT, F4, exec, setxkbmap in guru
|
|
||||||
bind=$mainMod SHIFT, F5, exec, setxkbmap colemak dhz
|
|
||||||
|
|
||||||
bind=, PRINT, exec, grimblast --notify copysave screen
|
|
||||||
bind=SHIFT, PRINT, exec, grimblast --notify copysave area
|
|
||||||
|
|
||||||
binde=$mainMod SHIFT, Q, killactive,
|
|
||||||
bind=$mainMod ALT, f, exit,
|
|
||||||
bind=$mainMod SHIFT, t, pseudo,
|
|
||||||
bind=$mainMod, f, fullscreen,
|
|
||||||
bind=$mainMod, t, togglefloating,
|
|
||||||
|
|
||||||
bindm=SUPER, mouse:272, movewindow
|
|
||||||
bindm=SUPER, mouse:273, resizewindow
|
|
||||||
|
|
||||||
bind=$mainMod, left, movefocus, l
|
|
||||||
bind=$mainMod, h, movefocus, l
|
|
||||||
bind=$mainMod, right, movefocus, r
|
|
||||||
bind=$mainMod, l, movefocus, r
|
|
||||||
bind=$mainMod, up, movefocus, u
|
|
||||||
bind=$mainMod, k, movefocus, u
|
|
||||||
bind=$mainMod, down, movefocus, d
|
|
||||||
bind=$mainMod, j, movefocus, d
|
|
||||||
|
|
||||||
binde=$mainMod SHIFT, left, movewindow, l
|
|
||||||
binde=$mainMod SHIFT, h, movewindow, l
|
|
||||||
binde=$mainMod SHIFT, right, movewindow, r
|
|
||||||
binde=$mainMod SHIFT, l, movewindow, r
|
|
||||||
binde=$mainMod SHIFT, up, movewindow, u
|
|
||||||
binde=$mainMod SHIFT, k, movewindow, u
|
|
||||||
binde=$mainMod SHIFT, down, movewindow, d
|
|
||||||
binde=$mainMod SHIFT, j, movewindow, d
|
|
||||||
|
|
||||||
binde=SHIFT ALT, left, resizeactive, -10 0
|
|
||||||
binde=SHIFT ALT, h, resizeactive, -10 0
|
|
||||||
binde=SHIFT ALT, right, resizeactive, 10 0
|
|
||||||
binde=SHIFT ALT, l, resizeactive, 10 0
|
|
||||||
binde=SHIFT ALT, up, resizeactive, 0 -10
|
|
||||||
binde=SHIFT ALT, k, resizeactive, 0 -10
|
|
||||||
binde=SHIFT ALT, down, resizeactive, 0 10
|
|
||||||
binde=SHIFT ALT, j, resizeactive, 0 10
|
|
||||||
|
|
||||||
bind=$mainMod, 1, workspace, 1
|
|
||||||
bind=$mainMod, 2, workspace, 2
|
|
||||||
bind=$mainMod, 3, workspace, 3
|
|
||||||
bind=$mainMod, 4, workspace, 4
|
|
||||||
bind=$mainMod, 5, workspace, 5
|
|
||||||
bind=$mainMod, 6, workspace, 6
|
|
||||||
bind=$mainMod, 7, workspace, 7
|
|
||||||
bind=$mainMod, 8, workspace, 8
|
|
||||||
bind=$mainMod, 9, workspace, 9
|
|
||||||
bind=$mainMod, 0, workspace, 10
|
|
||||||
|
|
||||||
bind=$mainMod SHIFT, 1, movetoworkspacesilent, 1
|
|
||||||
bind=$mainMod SHIFT, 2, movetoworkspacesilent, 2
|
|
||||||
bind=$mainMod SHIFT, 3, movetoworkspacesilent, 3
|
|
||||||
bind=$mainMod SHIFT, 4, movetoworkspacesilent, 4
|
|
||||||
bind=$mainMod SHIFT, 5, movetoworkspacesilent, 5
|
|
||||||
bind=$mainMod SHIFT, 6, movetoworkspacesilent, 6
|
|
||||||
bind=$mainMod SHIFT, 7, movetoworkspacesilent, 7
|
|
||||||
bind=$mainMod SHIFT, 8, movetoworkspacesilent, 8
|
|
||||||
bind=$mainMod SHIFT, 9, movetoworkspacesilent, 9
|
|
||||||
bind=$mainMod SHIFT, 0, movetoworkspacesilent, 10
|
|
||||||
|
|
||||||
bind=$mainMod SHIFT, comma, focusmonitor, -1
|
|
||||||
bind=$mainMod SHIFT, period, focusmonitor, +1
|
|
||||||
|
|
||||||
bind=CTRL ALT, r, pass, ^(com\.obsproject\.Studio)$
|
|
||||||
|
|
||||||
exec-once=eww open bar
|
|
||||||
exec-once=swaybg -i ~/Wallpapers/current.*
|
|
||||||
13
home/natto/cursor.nix
Normal file
13
home/natto/cursor.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.pointerCursor = {
|
||||||
|
package = pkgs.catppuccin-cursors.mochaFlamingo;
|
||||||
|
name = "catppuccin-mocha-flamingo-cursors";
|
||||||
|
size = 32;
|
||||||
|
x11 = {
|
||||||
|
enable = true;
|
||||||
|
defaultCursor = "crosshair";
|
||||||
|
};
|
||||||
|
gtk.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
home = {
|
home = {
|
||||||
homeDirectory = "/home/natto";
|
homeDirectory = "/home/natto";
|
||||||
@@ -8,17 +8,32 @@
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./email.nix
|
./email.nix
|
||||||
./programs.nix
|
./pass.nix
|
||||||
# ./xsession.nix
|
./browser.nix
|
||||||
./wayland.nix
|
./pdf.nix
|
||||||
|
./mpv.nix
|
||||||
./pkgs.nix
|
./pkgs.nix
|
||||||
./stuff.nix
|
./stuff.nix
|
||||||
./emacs.nix
|
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
./dunst.nix
|
./dunst.nix
|
||||||
./git.nix
|
./git.nix
|
||||||
./music.nix
|
./music.nix
|
||||||
./zsh.nix
|
./zsh.nix
|
||||||
./games.nix
|
./games.nix
|
||||||
|
./cursor.nix
|
||||||
|
./emacs.nix
|
||||||
|
|
||||||
|
# when xserver
|
||||||
|
# ./xsession.nix
|
||||||
|
|
||||||
|
# when wayland
|
||||||
|
./wayland.nix
|
||||||
|
./hyprpaper.nix
|
||||||
|
./hyprlock.nix
|
||||||
|
./hypridle.nix
|
||||||
|
./hyprland.nix
|
||||||
|
./foot.nix
|
||||||
|
./tofi.nix
|
||||||
|
./ags
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,9 @@
|
|||||||
services = {
|
services = {
|
||||||
dunst = {
|
dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
iconTheme = with config.gtk.iconTheme; { inherit name package; };
|
iconTheme = with config.gtk.iconTheme; {
|
||||||
|
inherit name package;
|
||||||
|
};
|
||||||
settings = with conf.colors.hex; {
|
settings = with conf.colors.hex; {
|
||||||
global = {
|
global = {
|
||||||
mouse_left_click = "close_current";
|
mouse_left_click = "close_current";
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{ config, pkgs, inputs, lib, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
let
|
let
|
||||||
emacs = pkgs.emacs-pgtk;
|
emacs = pkgs.emacs-git-pgtk;
|
||||||
configFile = ./config/emacs/config.org;
|
configFile = ./config/emacs/config.org;
|
||||||
enable = true;
|
enable = true;
|
||||||
in
|
in
|
||||||
@@ -25,9 +25,20 @@ in
|
|||||||
alwaysTangle = true;
|
alwaysTangle = true;
|
||||||
defaultInitFile = true;
|
defaultInitFile = true;
|
||||||
extraEmacsPackages = epkgs: with epkgs; [
|
extraEmacsPackages = epkgs: with epkgs; [
|
||||||
use-package
|
use-package
|
||||||
(tree-sitter-langs.withPlugins (_: tree-sitter-langs.plugins))
|
(tree-sitter-langs.withPlugins (_: tree-sitter-langs.plugins))
|
||||||
];
|
];
|
||||||
|
|
||||||
|
override = final: prev: {
|
||||||
|
evil = prev.melpaPackages.evil.overrideAttrs(_: {
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "natto1784";
|
||||||
|
repo = "evil";
|
||||||
|
rev = "isearch-lazy-count";
|
||||||
|
sha256 = "sha256-YqXoqPqOWRvszzktb0MYHMe590mzTQxCMgBloy3MHkQ=";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.emacs = {
|
services.emacs = {
|
||||||
|
|||||||
@@ -1,45 +1,94 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
key = "53EC089EF230E47A83BA8F8195949BD4B853F559";
|
|
||||||
host = "mail.weirdnatto.in";
|
|
||||||
realName = "Amneesh Singh";
|
realName = "Amneesh Singh";
|
||||||
address = "natto@weirdnatto.in";
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
accounts.email = {
|
accounts.email = {
|
||||||
accounts = {
|
accounts = {
|
||||||
natto = rec {
|
natto =
|
||||||
inherit address realName;
|
let
|
||||||
primary = true;
|
domain = conf.network.addresses.domain.natto;
|
||||||
userName = address;
|
address = "natto@${domain}";
|
||||||
gpg = {
|
host = "mail.${domain}";
|
||||||
inherit key;
|
in
|
||||||
signByDefault = true;
|
{
|
||||||
|
inherit realName address;
|
||||||
|
primary = true;
|
||||||
|
userName = address;
|
||||||
|
gpg = {
|
||||||
|
key = "3C4BDBE7BBF45B52C14EA193007257B05FCC86A8";
|
||||||
|
signByDefault = true;
|
||||||
|
};
|
||||||
|
imap = {
|
||||||
|
inherit host;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
imapnotify.enable = true;
|
||||||
|
smtp = {
|
||||||
|
inherit host;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
};
|
||||||
|
passwordCommand = "pass show email/${address}";
|
||||||
|
neomutt = {
|
||||||
|
enable = true;
|
||||||
|
extraMailboxes = [
|
||||||
|
"Sent"
|
||||||
|
"Drafts"
|
||||||
|
"Trash"
|
||||||
|
"Junk"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
imap = {
|
|
||||||
inherit host;
|
amneesh =
|
||||||
tls.enable = true;
|
let
|
||||||
|
domain = conf.network.addresses.domain.amneesh;
|
||||||
|
address = "me@${domain}";
|
||||||
|
host = "mail.${domain}";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
inherit address realName;
|
||||||
|
userName = address;
|
||||||
|
|
||||||
|
gpg = {
|
||||||
|
key = "0C2FDA374F2D48D9F9F0F7788EAAB36980C424C2";
|
||||||
|
signByDefault = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
imap = {
|
||||||
|
inherit host;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
imapnotify.enable = true;
|
||||||
|
smtp = {
|
||||||
|
inherit host;
|
||||||
|
tls.enable = true;
|
||||||
|
};
|
||||||
|
mbsync = {
|
||||||
|
enable = true;
|
||||||
|
create = "both";
|
||||||
|
};
|
||||||
|
passwordCommand = "pass show email/${address}";
|
||||||
|
neomutt = {
|
||||||
|
enable = true;
|
||||||
|
extraMailboxes = [
|
||||||
|
"Sent"
|
||||||
|
"Drafts"
|
||||||
|
"Junk"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
imapnotify.enable = true;
|
|
||||||
smtp = {
|
|
||||||
inherit host;
|
|
||||||
tls.enable = true;
|
|
||||||
};
|
|
||||||
mbsync = {
|
|
||||||
enable = true;
|
|
||||||
create = "both";
|
|
||||||
};
|
|
||||||
passwordCommand = "pass show email/${address}";
|
|
||||||
neomutt = {
|
|
||||||
enable = true;
|
|
||||||
extraMailboxes = [
|
|
||||||
"Sent"
|
|
||||||
"Drafts"
|
|
||||||
"Trash"
|
|
||||||
"Junk"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
@@ -51,18 +100,17 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.neomutt;
|
package = pkgs.neomutt;
|
||||||
sort = "reverse-date";
|
sort = "reverse-date";
|
||||||
extraConfig =
|
extraConfig = lib.concatMapStringsSep "\n" builtins.readFile [
|
||||||
lib.concatMapStringsSep
|
./config/neomutt/neomuttrc
|
||||||
"\n"
|
./config/neomutt/theme
|
||||||
builtins.readFile
|
];
|
||||||
[
|
|
||||||
./config/neomutt/neomuttrc
|
|
||||||
./config/neomutt/theme
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [ mailcap w3m ];
|
packages = with pkgs; [
|
||||||
|
mailcap
|
||||||
|
w3m
|
||||||
|
];
|
||||||
file = {
|
file = {
|
||||||
mailcap = {
|
mailcap = {
|
||||||
source = ./config/mailcap;
|
source = ./config/mailcap;
|
||||||
|
|||||||
@@ -1,15 +1,21 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
programs.eww = {
|
programs.eww = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.eww;
|
package = pkgs.eww;
|
||||||
configDir = lib.cleanSourceWith {
|
configDir = lib.cleanSourceWith {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
filter = name: _:
|
filter =
|
||||||
|
name: _:
|
||||||
let
|
let
|
||||||
baseName = baseNameOf (toString name);
|
baseName = baseNameOf (toString name);
|
||||||
in
|
in
|
||||||
!(lib.hasSuffix ".nix" baseName);
|
!(lib.hasSuffix ".nix" baseName);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -22,9 +28,8 @@
|
|||||||
let
|
let
|
||||||
deps = [
|
deps = [
|
||||||
config.programs.eww.package
|
config.programs.eww.package
|
||||||
] ++ lib.optional
|
]
|
||||||
config.wayland.windowManager.hyprland.enable
|
++ lib.optional config.wayland.windowManager.hyprland.enable config.wayland.windowManager.hyprland.package
|
||||||
config.wayland.windowManager.hyprland.package
|
|
||||||
++ (with pkgs; [
|
++ (with pkgs; [
|
||||||
coreutils
|
coreutils
|
||||||
bash
|
bash
|
||||||
@@ -48,4 +53,3 @@
|
|||||||
Install.WantedBy = [ "graphical-session.target" ];
|
Install.WantedBy = [ "graphical-session.target" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
34
home/natto/foot.nix
Normal file
34
home/natto/foot.nix
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
{ conf, ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
foot = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
main = {
|
||||||
|
font = "Fira Mono:style=Regular:pixelsize=18";
|
||||||
|
font-bold = "Fira Mono:style=Bold:pixelsize=18";
|
||||||
|
};
|
||||||
|
scrollback.lines = 10000;
|
||||||
|
colors = with conf.colors.default; {
|
||||||
|
inherit foreground background;
|
||||||
|
regular0 = surface1;
|
||||||
|
regular1 = red;
|
||||||
|
regular2 = green;
|
||||||
|
regular3 = yellow;
|
||||||
|
regular4 = blue;
|
||||||
|
regular5 = pink;
|
||||||
|
regular6 = teal;
|
||||||
|
regular7 = subtext1;
|
||||||
|
bright0 = surface2;
|
||||||
|
bright1 = red;
|
||||||
|
bright2 = green;
|
||||||
|
bright3 = yellow;
|
||||||
|
bright4 = blue;
|
||||||
|
bright5 = pink;
|
||||||
|
bright6 = teal;
|
||||||
|
bright7 = subtext0;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -11,4 +11,3 @@
|
|||||||
|
|
||||||
programs.mangohud.enable = true;
|
programs.mangohud.enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
gtk = {
|
gtk = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = {
|
theme = {
|
||||||
name = "Catppuccin-Mocha-Standard-Teal-Dark";
|
name = "catppuccin-mocha-teal-standard";
|
||||||
package = pkgs.catppuccin-gtk.override {
|
package = pkgs.catppuccin-gtk.override {
|
||||||
accents = [ "teal" ];
|
accents = [ "teal" ];
|
||||||
variant = "mocha";
|
variant = "mocha";
|
||||||
|
|||||||
29
home/natto/hypridle.nix
Normal file
29
home/natto/hypridle.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
lock = "${pkgs.systemd}/bin/loginctl lock-session";
|
||||||
|
timeout = 300;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# screen idle
|
||||||
|
services.hypridle = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
general = {
|
||||||
|
before_sleep_cmd = lock;
|
||||||
|
lock_cmd = "pgrep hyprlock || ${config.programs.hyprlock.package}/bin/hyprlock";
|
||||||
|
};
|
||||||
|
|
||||||
|
listener = [
|
||||||
|
{
|
||||||
|
timeout = timeout;
|
||||||
|
on-timeout = lock;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
207
home/natto/hyprland.nix
Normal file
207
home/natto/hyprland.nix
Normal file
@@ -0,0 +1,207 @@
|
|||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
wayland = {
|
||||||
|
windowManager = {
|
||||||
|
hyprland = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||||
|
|
||||||
|
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||||
|
|
||||||
|
xwayland = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
monitor = ", highrr, auto, 1";
|
||||||
|
|
||||||
|
input = {
|
||||||
|
kb_layout = "us,us";
|
||||||
|
kb_variant = "colemak_dh";
|
||||||
|
kb_model = "";
|
||||||
|
kb_options = "grp:rctrl_toggle";
|
||||||
|
kb_rules = "";
|
||||||
|
repeat_delay = 300;
|
||||||
|
accel_profile = "flat";
|
||||||
|
follow_mouse = true;
|
||||||
|
|
||||||
|
touchpad = {
|
||||||
|
natural_scroll = true;
|
||||||
|
scroll_factor = 0.4;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
general = with conf.colors.argb { a = "ee"; }; {
|
||||||
|
gaps_in = 5;
|
||||||
|
gaps_out = 10;
|
||||||
|
border_size = 2;
|
||||||
|
layout = "dwindle";
|
||||||
|
"col.active_border" = "0x${mauve} 0x${flamingo} 135deg";
|
||||||
|
"col.inactive_border" = "0x${surface0}";
|
||||||
|
};
|
||||||
|
|
||||||
|
decoration = {
|
||||||
|
rounding = 1;
|
||||||
|
inactive_opacity = 0.8;
|
||||||
|
|
||||||
|
shadow = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
blur = {
|
||||||
|
enabled = true;
|
||||||
|
size = 8;
|
||||||
|
new_optimizations = true;
|
||||||
|
xray = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
animations = {
|
||||||
|
enabled = true;
|
||||||
|
|
||||||
|
bezier = [
|
||||||
|
"overshot,0.01,0.9,0.1,1.05"
|
||||||
|
"easeoutexpo,0.16,1,0.3,1"
|
||||||
|
];
|
||||||
|
|
||||||
|
animation = [
|
||||||
|
"windows,1,7,overshot,popin 50%"
|
||||||
|
"windowsOut,1,7,easeoutexpo,popin 50%"
|
||||||
|
"border,1,10,default"
|
||||||
|
"fade,1,7,default"
|
||||||
|
"workspaces,1,6,overshot"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
cursor = {
|
||||||
|
no_hardware_cursors = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
dwindle = {
|
||||||
|
pseudotile = true;
|
||||||
|
preserve_split = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
misc = {
|
||||||
|
disable_hyprland_logo = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
"$mod" = "SUPER";
|
||||||
|
|
||||||
|
bind =
|
||||||
|
let
|
||||||
|
playerctl = "playerctl -p 'playerctld,%any'";
|
||||||
|
in
|
||||||
|
[
|
||||||
|
# Hyprland operations
|
||||||
|
"$mod ALT, f, exit,"
|
||||||
|
"$mod SHIFT, t, pseudo,"
|
||||||
|
"$mod, f, fullscreen,"
|
||||||
|
"$mod, t, togglefloating,"
|
||||||
|
"$mod, left, movefocus, l"
|
||||||
|
"$mod, h, movefocus, l"
|
||||||
|
"$mod, right, movefocus, r"
|
||||||
|
"$mod, l, movefocus, r"
|
||||||
|
"$mod, up, movefocus, u"
|
||||||
|
"$mod, k, movefocus, u"
|
||||||
|
"$mod, down, movefocus, d"
|
||||||
|
"$mod, j, movefocus, d"
|
||||||
|
"$mod, 1, workspace, 1"
|
||||||
|
"$mod, 2, workspace, 2"
|
||||||
|
"$mod, 3, workspace, 3"
|
||||||
|
"$mod, 4, workspace, 4"
|
||||||
|
"$mod, 5, workspace, 5"
|
||||||
|
"$mod, 6, workspace, 6"
|
||||||
|
"$mod, 7, workspace, 7"
|
||||||
|
"$mod, 8, workspace, 8"
|
||||||
|
"$mod, 9, workspace, 9"
|
||||||
|
"$mod, 0, workspace, 10"
|
||||||
|
"$mod SHIFT, 1, movetoworkspacesilent, 1"
|
||||||
|
"$mod SHIFT, 2, movetoworkspacesilent, 2"
|
||||||
|
"$mod SHIFT, 3, movetoworkspacesilent, 3"
|
||||||
|
"$mod SHIFT, 4, movetoworkspacesilent, 4"
|
||||||
|
"$mod SHIFT, 5, movetoworkspacesilent, 5"
|
||||||
|
"$mod SHIFT, 6, movetoworkspacesilent, 6"
|
||||||
|
"$mod SHIFT, 7, movetoworkspacesilent, 7"
|
||||||
|
"$mod SHIFT, 8, movetoworkspacesilent, 8"
|
||||||
|
"$mod SHIFT, 9, movetoworkspacesilent, 9"
|
||||||
|
"$mod SHIFT, 0, movetoworkspacesilent, 10"
|
||||||
|
"$mod SHIFT, comma, focusmonitor, -1"
|
||||||
|
"$mod SHIFT, period, focusmonitor, +1"
|
||||||
|
|
||||||
|
# Launchers
|
||||||
|
"$mod, RETURN, exec, foot"
|
||||||
|
"$mod, D, exec, pkill tofi || tofi-drun | xargs hyprctl dispatch exec --"
|
||||||
|
"$mod SHIFT, D, exec, pkill tofi || tofi-run --require-match=false | xargs hyprctl dispatch exec --"
|
||||||
|
|
||||||
|
# Media
|
||||||
|
", XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
|
||||||
|
", XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
|
||||||
|
", XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||||
|
|
||||||
|
# Backlight
|
||||||
|
", XF86MonBrightnessUp, exec, light -A 5"
|
||||||
|
", XF86MonBrightnessDown, exec, light -U 5"
|
||||||
|
|
||||||
|
# XWayland Keymaps
|
||||||
|
"$mod SHIFT, F1, exec, setxkbmap us colemak_dh"
|
||||||
|
"$mod SHIFT, F2, exec, setxkbmap us basic"
|
||||||
|
|
||||||
|
# Screenshot
|
||||||
|
", PRINT, exec, grimblast --notify copysave screen"
|
||||||
|
"SHIFT, PRINT, exec, grimblast --notify copysave area"
|
||||||
|
|
||||||
|
# Playerctl
|
||||||
|
"$mod, P, exec, ${playerctl} play-pause"
|
||||||
|
", XF86AudioPlay, exec, ${playerctl} play-pause"
|
||||||
|
", XF86AudioNext, exec, ${playerctl} position 5+"
|
||||||
|
", XF86AudioPrev, exec, ${playerctl} position 5-"
|
||||||
|
"$mod, XF86AudioNext, exec, ${playerctl} next"
|
||||||
|
"$mod, XF86AudioPrev, exec, ${playerctl} previous"
|
||||||
|
];
|
||||||
|
|
||||||
|
binde = [
|
||||||
|
# Hyprland operations
|
||||||
|
"$mod SHIFT, Q, killactive,"
|
||||||
|
"$mod SHIFT, left, movewindow, l"
|
||||||
|
"$mod SHIFT, h, movewindow, l"
|
||||||
|
"$mod SHIFT, right, movewindow, r"
|
||||||
|
"$mod SHIFT, l, movewindow, r"
|
||||||
|
"$mod SHIFT, up, movewindow, u"
|
||||||
|
"$mod SHIFT, k, movewindow, u"
|
||||||
|
"$mod SHIFT, down, movewindow, d"
|
||||||
|
"$mod SHIFT, j, movewindow, d"
|
||||||
|
"SHIFT ALT, left, resizeactive, -10 0"
|
||||||
|
"SHIFT ALT, h, resizeactive, -10 0"
|
||||||
|
"SHIFT ALT, right, resizeactive, 10 0"
|
||||||
|
"SHIFT ALT, l, resizeactive, 10 0"
|
||||||
|
"SHIFT ALT, up, resizeactive, 0 -10"
|
||||||
|
"SHIFT ALT, k, resizeactive, 0 -10"
|
||||||
|
"SHIFT ALT, down, resizeactive, 0 10"
|
||||||
|
"SHIFT ALT, j, resizeactive, 0 10"
|
||||||
|
];
|
||||||
|
|
||||||
|
bindm = [
|
||||||
|
# Mouse
|
||||||
|
"$mod, mouse:272, movewindow"
|
||||||
|
"$mod, mouse:273, resizewindow"
|
||||||
|
"$mod ALT, mouse:272, resizewindow"
|
||||||
|
];
|
||||||
|
|
||||||
|
exec-once = [
|
||||||
|
(with config.home.pointerCursor; "hyprctl setcursor ${name} ${toString size} ")
|
||||||
|
]
|
||||||
|
++ (with config.programs; lib.optional eww.enable "${eww.package}/bin/eww open bar");
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
80
home/natto/hyprlock.nix
Normal file
80
home/natto/hyprlock.nix
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
programs.hyprlock = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = with conf.colors.argb { a = "ee"; }; {
|
||||||
|
general = {
|
||||||
|
hide_cursor = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
background = [
|
||||||
|
{
|
||||||
|
monitor = "";
|
||||||
|
path = "screenshot";
|
||||||
|
blur_passes = 2;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
input-field = [
|
||||||
|
{
|
||||||
|
monitor = "";
|
||||||
|
size = "300, 60";
|
||||||
|
outline_thickness = 4;
|
||||||
|
valign = "center";
|
||||||
|
halign = "center";
|
||||||
|
|
||||||
|
font_color = "0x${text}";
|
||||||
|
outer_color = "0x${mauve}";
|
||||||
|
inner_color = "0x${surface0}";
|
||||||
|
check_color = "0x${blue}";
|
||||||
|
fail_color = "0x${red}";
|
||||||
|
capslock_color = "0x${yellow}";
|
||||||
|
|
||||||
|
fade_on_empty = false;
|
||||||
|
hide_input = false;
|
||||||
|
placeholder_text = "Logged in as <b>$USER</b>";
|
||||||
|
fail_text = "Fail! <b>($ATTEMPTS)</b>";
|
||||||
|
|
||||||
|
dots_spacing = 0.2;
|
||||||
|
dots_center = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
label = [
|
||||||
|
{
|
||||||
|
monitor = "";
|
||||||
|
text = "Layout: $LAYOUT";
|
||||||
|
font_size = 25;
|
||||||
|
color = "0x${text}";
|
||||||
|
position = "30, -30";
|
||||||
|
valign = "top";
|
||||||
|
halign = "left";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
monitor = "";
|
||||||
|
text = "$TIME";
|
||||||
|
font_size = 90;
|
||||||
|
color = "0x${text}";
|
||||||
|
position = "-30, 0";
|
||||||
|
valign = "top";
|
||||||
|
halign = "right";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
monitor = "";
|
||||||
|
text = "cmd[update:3600000] date +\"%A, %d %B %Y\"";
|
||||||
|
font_size = 25;
|
||||||
|
color = "0x${text}";
|
||||||
|
position = "-30, -150";
|
||||||
|
valign = "top";
|
||||||
|
halign = "right";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
home/natto/hyprpaper.nix
Normal file
18
home/natto/hyprpaper.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
services.hyprpaper = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings =
|
||||||
|
let
|
||||||
|
wallpaper = "${config.home.homeDirectory}/wallpaper.png";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
preload = [ "${wallpaper}" ];
|
||||||
|
wallpaper = [ ", ${wallpaper}" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
13
home/natto/mpv.nix
Normal file
13
home/natto/mpv.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
mpv = {
|
||||||
|
enable = true;
|
||||||
|
config = {
|
||||||
|
force-window = true;
|
||||||
|
keep-open = true;
|
||||||
|
save-position-on-quit = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -18,8 +18,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
mpd-discord-rpc = {
|
mpd-discord-rpc = {
|
||||||
# inherit (mpd) enable;
|
inherit (mpd) enable;
|
||||||
enable = false;
|
|
||||||
settings = {
|
settings = {
|
||||||
id = 1039532008424099850; # dont really care
|
id = 1039532008424099850; # dont really care
|
||||||
format = {
|
format = {
|
||||||
@@ -67,7 +66,7 @@ in
|
|||||||
|
|
||||||
home = {
|
home = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
playerctl
|
spotify
|
||||||
mpc_cli
|
mpc_cli
|
||||||
(ncmpcpp.override {
|
(ncmpcpp.override {
|
||||||
visualizerSupport = true;
|
visualizerSupport = true;
|
||||||
@@ -82,16 +81,13 @@ in
|
|||||||
source = ./config/ncmpcpp/config;
|
source = ./config/ncmpcpp/config;
|
||||||
target = "${config.xdg.configHome}/ncmpcpp/config";
|
target = "${config.xdg.configHome}/ncmpcpp/config";
|
||||||
};
|
};
|
||||||
|
|
||||||
sessionVariables = {
|
|
||||||
# LV2_PATH = lib.makeSearchPath "lib/lv2" (with pkgs; [ calf ]);
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
age.secrets.mpdasrc = {
|
age.secrets.mpdasrc = {
|
||||||
file = ./secrets/mpdasrc.age;
|
file = ./secrets/mpdasrc.age;
|
||||||
path = "${home}/.config/mpdasrc";
|
path = "${home}/.config/mpdasrc";
|
||||||
symlink = false;
|
symlink = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.playerctld.enable = true;
|
||||||
}
|
}
|
||||||
|
|||||||
6
home/natto/pass.nix
Normal file
6
home/natto/pass.nix
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
password-store.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
18
home/natto/pdf.nix
Normal file
18
home/natto/pdf.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
|
zathura = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = builtins.readFile ./config/zathura/zathurarc;
|
||||||
|
options = {
|
||||||
|
recolor = true;
|
||||||
|
recolor-lightcolor = "rgba(0,0,0,0)";
|
||||||
|
default-bg = "rgba(0,0,0,0.8)";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
sioyek = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,75 +1,54 @@
|
|||||||
{ flake, pkgs, config, ... }:
|
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
flake,
|
||||||
# A/V, codec and media stuff
|
pkgs,
|
||||||
ffmpeg-full
|
config,
|
||||||
wireplumber
|
...
|
||||||
pulseaudio
|
}:
|
||||||
pavucontrol
|
{
|
||||||
spotify
|
home.packages =
|
||||||
imagemagick
|
with pkgs;
|
||||||
|
[
|
||||||
|
# A/V, codec and media stuff
|
||||||
|
ffmpeg-full
|
||||||
|
wireplumber
|
||||||
|
pulseaudio
|
||||||
|
pavucontrol
|
||||||
|
imagemagick
|
||||||
|
|
||||||
# Utils
|
# Utils
|
||||||
neofetch
|
neofetch
|
||||||
rage
|
rage
|
||||||
curl
|
curl
|
||||||
yt-dlp
|
yt-dlp
|
||||||
p7zip
|
p7zip
|
||||||
unrar
|
unrar
|
||||||
vim
|
vim
|
||||||
(flake.packages.${system}.customscripts)
|
(flake.packages.${system}.customscripts)
|
||||||
cachix
|
cachix
|
||||||
steam-run
|
steam-run
|
||||||
|
|
||||||
# GUI utils
|
# GUI
|
||||||
slack
|
vesktop
|
||||||
webcord
|
(xfce.thunar.override {
|
||||||
(xfce.thunar.override {
|
thunarPlugins = with xfce; [
|
||||||
thunarPlugins = with xfce; [
|
thunar-media-tags-plugin
|
||||||
thunar-media-tags-plugin
|
thunar-volman
|
||||||
thunar-volman
|
thunar-archive-plugin
|
||||||
thunar-archive-plugin
|
];
|
||||||
];
|
})
|
||||||
})
|
xfce.xfconf
|
||||||
xfce.xfconf
|
xfce.tumbler
|
||||||
xfce.tumbler
|
qbittorrent
|
||||||
qbittorrent
|
hexchat
|
||||||
hexchat
|
dunst
|
||||||
dunst
|
zenity
|
||||||
gnome.zenity
|
|
||||||
|
|
||||||
# Programming and dev stuff
|
# Misc
|
||||||
(texlive.combine {
|
mailcap
|
||||||
inherit (texlive)
|
libsForQt5.qtstyleplugins
|
||||||
scheme-small
|
]
|
||||||
babel
|
++ lib.optionals config.isLaptop [
|
||||||
lm
|
powertop
|
||||||
graphics-def
|
undervolt
|
||||||
url
|
];
|
||||||
mhchem
|
|
||||||
wrapfig
|
|
||||||
capt-of
|
|
||||||
minted
|
|
||||||
fvextra
|
|
||||||
xstring
|
|
||||||
catchfile
|
|
||||||
framed
|
|
||||||
upquote
|
|
||||||
pdfsync
|
|
||||||
tocloft
|
|
||||||
enumitem
|
|
||||||
multirow
|
|
||||||
tcolorbox;
|
|
||||||
})
|
|
||||||
python3Packages.pygments
|
|
||||||
|
|
||||||
# Misc
|
|
||||||
anki
|
|
||||||
tor-browser-bundle-bin
|
|
||||||
mailcap
|
|
||||||
libsForQt5.qtstyleplugins
|
|
||||||
] ++ lib.optionals config.isLaptop [
|
|
||||||
powertop
|
|
||||||
undervolt
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,70 +0,0 @@
|
|||||||
{ pkgs, config, conf, ... }:
|
|
||||||
{
|
|
||||||
programs = {
|
|
||||||
firefox = {
|
|
||||||
enable = true;
|
|
||||||
profiles.natto = {
|
|
||||||
name = "natto";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
chromium = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.ungoogled-chromium;
|
|
||||||
};
|
|
||||||
zathura = {
|
|
||||||
enable = true;
|
|
||||||
extraConfig = builtins.readFile ./config/zathura/zathurarc;
|
|
||||||
options = {
|
|
||||||
recolor = true;
|
|
||||||
recolor-lightcolor = "rgba(0,0,0,0)";
|
|
||||||
default-bg = "rgba(0,0,0,0.8)";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
sioyek = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
go.enable = true;
|
|
||||||
foot = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
main = {
|
|
||||||
font = "Fira Mono:style=Regular:pixelsize=18";
|
|
||||||
font-bold = "Fira Mono:style=Bold:pixelsize=18";
|
|
||||||
};
|
|
||||||
scrollback.lines = 4000;
|
|
||||||
colors = with conf.colors.default; {
|
|
||||||
inherit foreground background;
|
|
||||||
regular0 = surface1;
|
|
||||||
regular1 = red;
|
|
||||||
regular2 = green;
|
|
||||||
regular3 = yellow;
|
|
||||||
regular4 = blue;
|
|
||||||
regular5 = pink;
|
|
||||||
regular6 = teal;
|
|
||||||
regular7 = subtext1;
|
|
||||||
bright0 = surface2;
|
|
||||||
bright1 = red;
|
|
||||||
bright2 = green;
|
|
||||||
bright3 = yellow;
|
|
||||||
bright4 = blue;
|
|
||||||
bright5 = pink;
|
|
||||||
bright6 = teal;
|
|
||||||
bright7 = subtext0;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
mpv = {
|
|
||||||
enable = true;
|
|
||||||
config = {
|
|
||||||
force-window = true;
|
|
||||||
keep-open = true;
|
|
||||||
save-position-on-quit = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
home.sessionVariables = {
|
|
||||||
BROWSER = "firefox";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, lib, pkgs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
xdg = {
|
xdg = {
|
||||||
enable = true;
|
enable = true;
|
||||||
userDirs.enable = true;
|
userDirs.enable = true;
|
||||||
@@ -7,28 +13,20 @@
|
|||||||
age.identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
age.identityPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
pointerCursor = {
|
|
||||||
package = pkgs.catppuccin-cursors.mochaFlamingo;
|
|
||||||
name = "Catppuccin-Mocha-Flamingo-Cursors";
|
|
||||||
size = 32;
|
|
||||||
x11 = {
|
|
||||||
enable = true;
|
|
||||||
defaultCursor = "crosshair";
|
|
||||||
};
|
|
||||||
gtk.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
QT_X11_NO_MITSHM = "1";
|
QT_X11_NO_MITSHM = "1";
|
||||||
HM_CONF_DIR = "/etc/nixos";
|
HM_CONF_DIR = "/etc/nixos";
|
||||||
QT_QPA_PLATFORMTHEME = "gtk2";
|
QT_QPA_PLATFORMTHEME = "gtk2";
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
i18n = {
|
i18n = {
|
||||||
inputMethod = {
|
inputMethod = {
|
||||||
enabled = "fcitx5";
|
enable = true;
|
||||||
fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-mozc ];
|
type = "fcitx5";
|
||||||
|
fcitx5.addons = with pkgs; [
|
||||||
|
fcitx5-m17n
|
||||||
|
fcitx5-mozc
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
37
home/natto/tofi.nix
Normal file
37
home/natto/tofi.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
conf,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
home.file.tofi = {
|
||||||
|
source = pkgs.writeText "tofi-config" (
|
||||||
|
pkgs.lib.generators.toKeyValue { } (
|
||||||
|
with conf.colors.default;
|
||||||
|
{
|
||||||
|
# https://github.com/philj56/tofi/blob/master/themes/fullscreen
|
||||||
|
width = "100%";
|
||||||
|
height = "100%";
|
||||||
|
border-width = 0;
|
||||||
|
outline-width = 0;
|
||||||
|
padding-left = "35%";
|
||||||
|
padding-top = "35%";
|
||||||
|
result-spacing = 25;
|
||||||
|
num-results = 5;
|
||||||
|
font = "Fira Mono";
|
||||||
|
font-size = 15;
|
||||||
|
text-color = foreground;
|
||||||
|
selection-color = rosewater;
|
||||||
|
selection-match-color = red;
|
||||||
|
background-color = "#000A";
|
||||||
|
}
|
||||||
|
)
|
||||||
|
);
|
||||||
|
target = "${config.xdg.configHome}/tofi/config";
|
||||||
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
tofi
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,64 +1,11 @@
|
|||||||
{ pkgs, config, conf, inputs, ... }:
|
{ pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
inputs.hyprland.homeManagerModules.default
|
|
||||||
|
|
||||||
./ags
|
|
||||||
# ./eww
|
|
||||||
];
|
|
||||||
|
|
||||||
wayland = {
|
|
||||||
windowManager = {
|
|
||||||
sway = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
hyprland = {
|
|
||||||
enable = true;
|
|
||||||
xwayland = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
extraConfig = (builtins.readFile ./config/hypr/hyprland.conf)
|
|
||||||
+ (with config.home.pointerCursor; ''
|
|
||||||
exec-once=hyprctl setcursor ${name} ${toString size}
|
|
||||||
'')
|
|
||||||
+ (with conf.colors.argb { a = "ee"; };''
|
|
||||||
general {
|
|
||||||
col.active_border = 0x${mauve} 0x${flamingo} 135deg
|
|
||||||
col.inactive_border = 0x${surface0}
|
|
||||||
}
|
|
||||||
'');
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
home.file.tofi = {
|
|
||||||
source = pkgs.writeText "tofi-config" (pkgs.lib.generators.toKeyValue { } (with conf.colors.default; {
|
|
||||||
# https://github.com/philj56/tofi/blob/master/themes/fullscreen
|
|
||||||
width = "100%";
|
|
||||||
height = "100%";
|
|
||||||
border-width = 0;
|
|
||||||
outline-width = 0;
|
|
||||||
padding-left = "35%";
|
|
||||||
padding-top = "35%";
|
|
||||||
result-spacing = 25;
|
|
||||||
num-results = 5;
|
|
||||||
font = "Fira Mono";
|
|
||||||
font-size = 15;
|
|
||||||
text-color = foreground;
|
|
||||||
selection-color = rosewater;
|
|
||||||
selection-match-color = red;
|
|
||||||
background-color = "#000A";
|
|
||||||
}));
|
|
||||||
target = "${config.xdg.configHome}/tofi/config";
|
|
||||||
};
|
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
tofi
|
|
||||||
imv
|
|
||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
|
inputs.hyprland-contrib.packages.${pkgs.system}.grimblast
|
||||||
wl-clipboard
|
wl-clipboard
|
||||||
|
swayimg
|
||||||
swaybg
|
swaybg
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ pkgs, config, flake, ... }:
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
flake,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
xsession = {
|
xsession = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ let
|
|||||||
secretPath = "${config.home.homeDirectory}/.zshenv_secret";
|
secretPath = "${config.home.homeDirectory}/.zshenv_secret";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
programs.zsh.initExtra = lib.mkForce ''
|
programs.zsh.initContent = lib.mkAfter ''
|
||||||
. ${secretPath};
|
. ${secretPath};
|
||||||
unsetopt extendedGlob
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
age.secrets.zshenv_secret = {
|
age.secrets.zshenv_secret = {
|
||||||
|
|||||||
13
home/overlays/standalone.nix
Normal file
13
home/overlays/standalone.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
final: prev:
|
||||||
|
let
|
||||||
|
pam = prev.pam.overrideAttrs (oa: {
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace modules/module-meson.build \
|
||||||
|
--replace "sbindir / 'unix_chkpwd'" "'/usr/bin/unix_chkpwd'"
|
||||||
|
'';
|
||||||
|
});
|
||||||
|
in
|
||||||
|
{
|
||||||
|
hyprlock = prev.hyprlock.override { inherit pam; };
|
||||||
|
swaylock = prev.swaylock.override { inherit pam; };
|
||||||
|
}
|
||||||
@@ -3,3 +3,4 @@
|
|||||||
+ marisa is my Raspberry Pi 4 (B)
|
+ marisa is my Raspberry Pi 4 (B)
|
||||||
+ remilia is my cloud VM
|
+ remilia is my cloud VM
|
||||||
+ hina is another cloud VM I use for ZNC
|
+ hina is another cloud VM I use for ZNC
|
||||||
|
+ suwako is an ARM cloud VM
|
||||||
|
|||||||
4
hosts/common/programs/adb/default.nix
Normal file
4
hosts/common/programs/adb/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.adb.enable = true;
|
||||||
|
}
|
||||||
4
hosts/common/programs/dconf/default.nix
Normal file
4
hosts/common/programs/dconf/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.dconf.enable = true;
|
||||||
|
}
|
||||||
16
hosts/common/programs/doas/default.nix
Normal file
16
hosts/common/programs/doas/default.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
security = {
|
||||||
|
doas = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
groups = [ "wheel" ];
|
||||||
|
keepEnv = true;
|
||||||
|
persist = true;
|
||||||
|
setEnv = [ "PATH" ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
4
hosts/common/programs/git/default.nix
Normal file
4
hosts/common/programs/git/default.nix
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.git.enable = true;
|
||||||
|
}
|
||||||
9
hosts/common/programs/gnupg/default.nix
Normal file
9
hosts/common/programs/gnupg/default.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.gnupg = {
|
||||||
|
agent = {
|
||||||
|
enableSSHSupport = true;
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config = {
|
config = {
|
||||||
allowBroken = true;
|
allowBroken = true;
|
||||||
|
allowUnfree = true;
|
||||||
};
|
};
|
||||||
overlays = [
|
overlays = [
|
||||||
self.overlays.default
|
self.overlays.default
|
||||||
@@ -15,14 +16,15 @@
|
|||||||
'';
|
'';
|
||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
trusted-users = [ "root" "natto" ];
|
trusted-users = [
|
||||||
|
"root"
|
||||||
|
"@wheel"
|
||||||
|
];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://nix-gaming.cachix.org"
|
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
# "https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
|
"https://mirrors.tuna.tsinghua.edu.cn/nix-channels/store"
|
||||||
];
|
];
|
||||||
trusted-public-keys = [
|
trusted-public-keys = [
|
||||||
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
|
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
13
hosts/common/programs/zsh/default.nix
Normal file
13
hosts/common/programs/zsh/default.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
histSize = 30000;
|
||||||
|
enableBashCompletion = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestions = {
|
||||||
|
enable = true;
|
||||||
|
highlightStyle = "fg=yellow,bold";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
21
hosts/common/security/default.nix
Normal file
21
hosts/common/security/default.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
conf,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
domain = conf.network.addresses.domain.natto;
|
||||||
|
nginx = config.services.nginx;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
security = {
|
||||||
|
acme = lib.mkIf nginx.enable {
|
||||||
|
acceptTerms = true;
|
||||||
|
certs = lib.mapAttrs (n: _: { email = "natto@${domain}"; }) (
|
||||||
|
lib.filterAttrs (_: v: v.enableACME) nginx.virtualHosts
|
||||||
|
);
|
||||||
|
};
|
||||||
|
pki.certificateFiles = [ ../../../cert.pem ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
{ lib, config, pkgs, ... }: {
|
{ ... }:
|
||||||
# sound stuff
|
{
|
||||||
sound.enable = true;
|
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa = {
|
alsa = {
|
||||||
@@ -1,17 +1,11 @@
|
|||||||
{ config, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
#let
|
|
||||||
# compiledLayout = pkgs.runCommand "keyboard-layout" {} ''
|
|
||||||
# ${pkgs.xorg.xkbcomp}/bin/xkbcomp ${./colemak-dh.xkb} $out
|
|
||||||
# '';
|
|
||||||
#in
|
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
libinput = {
|
libinput = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mouse = {
|
mouse = {
|
||||||
accelSpeed = "0";
|
accelSpeed = "0";
|
||||||
# accelProfile = "flat";
|
|
||||||
};
|
};
|
||||||
touchpad = {
|
touchpad = {
|
||||||
middleEmulation = false;
|
middleEmulation = false;
|
||||||
@@ -22,13 +16,9 @@
|
|||||||
};
|
};
|
||||||
xserver = {
|
xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager = {
|
displayManager.startx.enable = true;
|
||||||
startx = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
xkb.layout = "us";
|
xkb.layout = "us";
|
||||||
xkb.variant = "colemak_dh"; # trying to ditch DHz now
|
xkb.variant = "colemak_dh";
|
||||||
autoRepeatDelay = 320;
|
autoRepeatDelay = 320;
|
||||||
autoRepeatInterval = 30;
|
autoRepeatInterval = 30;
|
||||||
};
|
};
|
||||||
@@ -1,5 +1,10 @@
|
|||||||
#Taken from https://github.com/MagicRB/dotfiles/blob/master/nix/nixos-modules/vault-agent.nix
|
#Taken from https://github.com/MagicRB/dotfiles/blob/master/nix/nixos-modules/vault-agent.nix
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
cfg = config.services.vault-agent;
|
cfg = config.services.vault-agent;
|
||||||
@@ -59,48 +64,49 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = mkIf cfg.enable
|
config = mkIf cfg.enable ({
|
||||||
({
|
users = {
|
||||||
users = {
|
users = {
|
||||||
users = {
|
"${cfg.userName}" = {
|
||||||
"${cfg.userName}" = {
|
group = cfg.groupName;
|
||||||
group = cfg.groupName;
|
uid = cfg.uid;
|
||||||
uid = cfg.uid;
|
isSystemUser = true;
|
||||||
isSystemUser = true;
|
description = "Vault-Agent User";
|
||||||
description = "Vault-Agent User";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
groups = {
|
|
||||||
"${cfg.groupName}" = {
|
|
||||||
gid = cfg.gid;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
systemd.tmpfiles.rules = mkIf (cfg.secretsDir != null) [
|
groups = {
|
||||||
"d ${cfg.secretsDir} 6755 vault-agent ${cfg.groupName} 0"
|
"${cfg.groupName}" = {
|
||||||
];
|
gid = cfg.gid;
|
||||||
systemd.services.vault-agent = {
|
};
|
||||||
description = "Vault Agent";
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
};
|
||||||
wants = [ "network-online.target" ];
|
systemd.tmpfiles.rules = mkIf (cfg.secretsDir != null) [
|
||||||
after = [ "network-online.target" ];
|
"d ${cfg.secretsDir} 6755 vault-agent ${cfg.groupName} 0"
|
||||||
path = (with pkgs; [
|
];
|
||||||
|
systemd.services.vault-agent = {
|
||||||
|
description = "Vault Agent";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
wants = [ "network-online.target" ];
|
||||||
|
after = [ "network-online.target" ];
|
||||||
|
path = (
|
||||||
|
with pkgs;
|
||||||
|
[
|
||||||
glibc
|
glibc
|
||||||
]);
|
]
|
||||||
serviceConfig = {
|
);
|
||||||
User = cfg.userName;
|
serviceConfig = {
|
||||||
Group = cfg.groupName;
|
User = cfg.userName;
|
||||||
ExecReload = "${pkgs.busybox}/bin/kill -HUP $MAINPID";
|
Group = cfg.groupName;
|
||||||
ExecStart = "${cfg.package}/bin/vault agent -config=${json.generate "vault.json" cfg.settings}";
|
ExecReload = "${pkgs.busybox}/bin/kill -HUP $MAINPID";
|
||||||
KillMode = "process";
|
ExecStart = "${cfg.package}/bin/vault agent -config=${json.generate "vault.json" cfg.settings}";
|
||||||
KillSignal = "SIGINT";
|
KillMode = "process";
|
||||||
Restart = "on-failure";
|
KillSignal = "SIGINT";
|
||||||
TimeoutStopSec = "30s";
|
Restart = "on-failure";
|
||||||
RestartSec = 2;
|
TimeoutStopSec = "30s";
|
||||||
ConfigurationDirectory = "vault-agent";
|
RestartSec = 2;
|
||||||
ConfigurationDirectoryMode = "0600";
|
ConfigurationDirectory = "vault-agent";
|
||||||
};
|
ConfigurationDirectoryMode = "0600";
|
||||||
};
|
};
|
||||||
});
|
};
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
26
hosts/common/x86builder.nix
Normal file
26
hosts/common/x86builder.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
extraOptions = ''
|
||||||
|
builders-use-substitutes = true
|
||||||
|
'';
|
||||||
|
buildMachines = [
|
||||||
|
{
|
||||||
|
hostName = "okina";
|
||||||
|
systems = [
|
||||||
|
"x86_64-linux"
|
||||||
|
"aarch64-linux"
|
||||||
|
];
|
||||||
|
maxJobs = 4;
|
||||||
|
speedFactor = 2;
|
||||||
|
supportedFeatures = [
|
||||||
|
"nixos-test"
|
||||||
|
"benchmark"
|
||||||
|
"big-parallel"
|
||||||
|
"kvm"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
distributedBuilds = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -3,19 +3,23 @@ let
|
|||||||
inherit (inputs) nixpkgs;
|
inherit (inputs) nixpkgs;
|
||||||
|
|
||||||
commonModules = [
|
commonModules = [
|
||||||
./nvim.nix
|
|
||||||
{
|
{
|
||||||
_module.args = globalArgs;
|
_module.args = globalArgs;
|
||||||
}
|
}
|
||||||
|
./common/programs/neovim
|
||||||
|
./common/programs/nix
|
||||||
|
./common/programs/zsh
|
||||||
|
./common/programs/gnupg
|
||||||
|
./common/programs/git
|
||||||
|
./common/programs/doas
|
||||||
|
./common/security
|
||||||
];
|
];
|
||||||
desktopModules = [
|
desktopModules = [
|
||||||
./xorg.nix
|
./common/programs/adb
|
||||||
./wayland.nix
|
./common/programs/dconf
|
||||||
./nix.nix
|
./common/services/xserver
|
||||||
./desktop-pkgs.nix
|
./common/services/pipewire
|
||||||
./sound.nix
|
|
||||||
];
|
];
|
||||||
serverModules = [ ./minimal.nix ];
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
flake.nixosConfigurations = {
|
flake.nixosConfigurations = {
|
||||||
@@ -45,8 +49,7 @@ in
|
|||||||
modules = [
|
modules = [
|
||||||
./marisa
|
./marisa
|
||||||
]
|
]
|
||||||
++ commonModules
|
++ commonModules;
|
||||||
++ serverModules;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#Oracle Cloud VM
|
#Oracle Cloud VM
|
||||||
@@ -54,11 +57,10 @@ in
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./remilia
|
./remilia
|
||||||
./x86builder.nix
|
./common/x86builder.nix
|
||||||
inputs.mailserver.nixosModules.mailserver
|
inputs.mailserver.nixosModules.mailserver
|
||||||
]
|
]
|
||||||
++ commonModules
|
++ commonModules;
|
||||||
++ serverModules;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#Oracle Cloud VM
|
#Oracle Cloud VM
|
||||||
@@ -66,10 +68,19 @@ in
|
|||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hina
|
./hina
|
||||||
./x86builder.nix
|
./common/x86builder.nix
|
||||||
]
|
]
|
||||||
++ commonModules
|
++ commonModules;
|
||||||
++ serverModules;
|
};
|
||||||
|
|
||||||
|
#Oracle Cloud VM
|
||||||
|
suwako = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "aarch64-linux";
|
||||||
|
modules = [
|
||||||
|
./suwako
|
||||||
|
inputs.mailserver.nixosModules.mailserver
|
||||||
|
]
|
||||||
|
++ commonModules;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,63 +0,0 @@
|
|||||||
{ lib, config, inputs, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
tmux
|
|
||||||
bc
|
|
||||||
gnumake
|
|
||||||
pciutils
|
|
||||||
usbutils
|
|
||||||
ntfs3g
|
|
||||||
python3
|
|
||||||
htop
|
|
||||||
wget
|
|
||||||
ripgrep
|
|
||||||
kbd
|
|
||||||
gcc
|
|
||||||
vulkan-tools
|
|
||||||
vulkan-headers
|
|
||||||
jq
|
|
||||||
dconf
|
|
||||||
];
|
|
||||||
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
fira-code
|
|
||||||
fira-mono
|
|
||||||
monoid
|
|
||||||
font-awesome
|
|
||||||
material-icons
|
|
||||||
material-design-icons
|
|
||||||
lohit-fonts.devanagari
|
|
||||||
lohit-fonts.gurmukhi
|
|
||||||
office-code-pro
|
|
||||||
eb-garamond
|
|
||||||
noto-fonts-cjk
|
|
||||||
takao
|
|
||||||
liberation_ttf
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
git.enable = true;
|
|
||||||
|
|
||||||
gnupg = {
|
|
||||||
agent = {
|
|
||||||
enableSSHSupport = true;
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
zsh = {
|
|
||||||
enable = true;
|
|
||||||
histSize = 30000;
|
|
||||||
enableBashCompletion = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestions = {
|
|
||||||
enable = true;
|
|
||||||
highlightStyle = "fg=yellow,bold";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
adb.enable = true;
|
|
||||||
gamemode.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -3,9 +3,19 @@
|
|||||||
boot = {
|
boot = {
|
||||||
kernel.sysctl."net.ipv4.ip_forward" = 1;
|
kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
initrd.kernelModules = [ "bochs" ];
|
initrd.kernelModules = [ "bochs" ];
|
||||||
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ];
|
initrd.availableKernelModules = [
|
||||||
|
"ata_piix"
|
||||||
|
"uhci_hcd"
|
||||||
|
"virtio_pci"
|
||||||
|
"virtio_scsi"
|
||||||
|
];
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ];
|
kernelParams = [
|
||||||
|
"console=ttyS0"
|
||||||
|
"console=tty1"
|
||||||
|
"nvme.shutdown_timeout=10"
|
||||||
|
"libiscsi.debug_libiscsi_eh=1"
|
||||||
|
];
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, conf, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./networking.nix
|
./networking.nix
|
||||||
@@ -16,7 +21,6 @@
|
|||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
|
openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
|
||||||
};
|
};
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "21.11";
|
system.stateVersion = "21.11";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
];
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{
|
device = "/dev/disk/by-label/cloudimg-rootfs";
|
||||||
device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
|
fsType = "ext4";
|
||||||
fsType = "ext4";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,16 +1,25 @@
|
|||||||
{ lib, config, conf, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
conf,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
hostName = "hina";
|
hostName = "hina";
|
||||||
firewall =
|
firewall = {
|
||||||
{
|
interfaces = {
|
||||||
interfaces = {
|
ens3 = {
|
||||||
ens3 = {
|
allowedTCPPorts = [
|
||||||
allowedTCPPorts = [ 9898 80 443 ];
|
9898
|
||||||
};
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
interfaces = {
|
interfaces = {
|
||||||
ens3 = {
|
ens3 = {
|
||||||
useDHCP = true;
|
useDHCP = true;
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, pkgs, lib, conf, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
domain = conf.network.addresses.domain.natto;
|
domain = conf.network.addresses.domain.natto;
|
||||||
in
|
in
|
||||||
@@ -31,12 +37,4 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
certs = lib.mapAttrs (n: _: { email = "natto@${domain}"; })
|
|
||||||
(lib.filterAttrs (_: v: v.enableACME) config.services.nginx.virtualHosts);
|
|
||||||
};
|
|
||||||
security.pki.certificateFiles = [ ../../cert.pem ];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,19 +2,33 @@
|
|||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
consoleLogLevel = 7;
|
consoleLogLevel = 7;
|
||||||
kernelParams = [ "console=ttyS0,115200n8" "console=ttyAMA0,115200n8" "console=tty0" ];
|
kernelParams = [
|
||||||
|
"console=ttyS0,115200n8"
|
||||||
|
"console=ttyAMA0,115200n8"
|
||||||
|
"console=tty0"
|
||||||
|
];
|
||||||
kernelPackages = pkgs.linuxPackages_5_10;
|
kernelPackages = pkgs.linuxPackages_5_10;
|
||||||
initrd.availableKernelModules = [ "xhci_pci" "usb_storage" "usbhid" "uas" "pcie-brcmstb" "vc4" ];
|
initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"uas"
|
||||||
|
"pcie-brcmstb"
|
||||||
|
"vc4"
|
||||||
|
];
|
||||||
loader = {
|
loader = {
|
||||||
grub.enable = false;
|
grub.enable = false;
|
||||||
generic-extlinux-compatible.enable = true;
|
generic-extlinux-compatible.enable = true;
|
||||||
/* raspberryPi= {
|
/*
|
||||||
|
raspberryPi= {
|
||||||
version = 4;
|
version = 4;
|
||||||
firmwareConfig = "dtparam=sd_poll_once=on";
|
firmwareConfig = "dtparam=sd_poll_once=on";
|
||||||
enable = true;
|
enable = true;
|
||||||
}; */
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
/* kernelPatches = [
|
/*
|
||||||
|
kernelPatches = [
|
||||||
{
|
{
|
||||||
name = "change-pgtable";
|
name = "change-pgtable";
|
||||||
patch = null;
|
patch = null;
|
||||||
@@ -22,6 +36,7 @@
|
|||||||
CONFIG_PGTABLE_LEVELS 4
|
CONFIG_PGTABLE_LEVELS 4
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
];*/
|
];
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, conf, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./networking.nix
|
./networking.nix
|
||||||
@@ -14,10 +19,7 @@
|
|||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
|
openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
|
||||||
};
|
};
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
time.timeZone = "Asia/Kolkata";
|
time.timeZone = "Asia/Kolkata";
|
||||||
system.stateVersion = "21.05";
|
system.stateVersion = "21.05";
|
||||||
|
|
||||||
security.pki.certificateFiles = [ ../../cert.pem ../../consul-agent-ca.pem ];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,21 +1,24 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||||||
device = "/dev/disk/by-label/NIXOS_SD";
|
fsType = "ext4";
|
||||||
fsType = "ext4";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/nix/store" =
|
fileSystems."/nix/store" = {
|
||||||
{
|
device = "/nix/store";
|
||||||
device = "/nix/store";
|
fsType = "none";
|
||||||
fsType = "none";
|
options = [ "bind" ];
|
||||||
options = [ "bind" ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, conf, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "marisa";
|
hostName = "marisa";
|
||||||
@@ -7,10 +12,10 @@
|
|||||||
22 # ssh
|
22 # ssh
|
||||||
80 # http
|
80 # http
|
||||||
# 5454
|
# 5454
|
||||||
5001 #gitea
|
5001 # gitea
|
||||||
4646 #nomad
|
4646 # nomad
|
||||||
# 8500 #vault nomad consul
|
# 8500 #vault nomad consul
|
||||||
8000 #simpler-filehost
|
8000 # simpler-filehost
|
||||||
# 6666 #concourse
|
# 6666 #concourse
|
||||||
# 202 #gitea-ssh
|
# 202 #gitea-ssh
|
||||||
];
|
];
|
||||||
@@ -25,16 +30,20 @@
|
|||||||
|
|
||||||
interfaces = {
|
interfaces = {
|
||||||
eth0 = {
|
eth0 = {
|
||||||
ipv4.addresses = [{
|
ipv4.addresses = [
|
||||||
prefixLength = 24;
|
{
|
||||||
address = "192.168.1.159";
|
prefixLength = 24;
|
||||||
}];
|
address = "192.168.1.159";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
wlan0 = {
|
wlan0 = {
|
||||||
ipv4.addresses = [{
|
ipv4.addresses = [
|
||||||
prefixLength = 24;
|
{
|
||||||
address = "192.168.1.159";
|
prefixLength = 24;
|
||||||
}];
|
address = "192.168.1.159";
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
|
wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
|
||||||
@@ -52,6 +61,9 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
defaultGateway = "192.168.1.1";
|
defaultGateway = "192.168.1.1";
|
||||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
nameservers = [
|
||||||
|
"1.1.1.1"
|
||||||
|
"8.8.8.8"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,33 +3,20 @@
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
# ./hashicorp.nix
|
# ./hashicorp.nix
|
||||||
./filehost.nix
|
|
||||||
./gitea.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Add secrets to nomad, consul and vault
|
|
||||||
virtualisation.docker = {
|
virtualisation.docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
daemon.settings = {
|
daemon.settings = {
|
||||||
# default-cgroupns-mode = "host";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ 22 22001 ];
|
ports = [
|
||||||
|
22
|
||||||
|
22001
|
||||||
|
];
|
||||||
};
|
};
|
||||||
postgresql = {
|
|
||||||
enable = true;
|
|
||||||
authentication = ''
|
|
||||||
local gitea all ident map=gitea-map
|
|
||||||
'';
|
|
||||||
identMap =
|
|
||||||
''
|
|
||||||
gitea-map gitea gitea
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
{ config, pkgs, inputs, conf, ... }:
|
|
||||||
{
|
|
||||||
systemd.services.filehost = {
|
|
||||||
enable = true;
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
Environment = [
|
|
||||||
"TITLE=nattofiles"
|
|
||||||
"USER_URL=https://f.${conf.network.addresses.domain.natto}"
|
|
||||||
"ROCKET_LIMITS={file=\"512MB\",data-form=\"512MB\"}"
|
|
||||||
"ROCKET_LOG_LEVEL=debug"
|
|
||||||
"ROCKET_ADDRESS=0.0.0.0"
|
|
||||||
];
|
|
||||||
Restart = "on-failure";
|
|
||||||
ExecStart = "${inputs.filehost.packages.${pkgs.system}.simpler-filehost}/bin/simpler-filehost";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -6,7 +6,10 @@
|
|||||||
enable = true;
|
enable = true;
|
||||||
enableDocker = true;
|
enableDocker = true;
|
||||||
dropPrivileges = false;
|
dropPrivileges = false;
|
||||||
extraPackages = with pkgs; [ consul cni-plugins ];
|
extraPackages = with pkgs; [
|
||||||
|
consul
|
||||||
|
cni-plugins
|
||||||
|
];
|
||||||
extraSettingsPaths = [ "/run/nomad/nomad.json" ];
|
extraSettingsPaths = [ "/run/nomad/nomad.json" ];
|
||||||
};
|
};
|
||||||
vault = {
|
vault = {
|
||||||
@@ -27,4 +30,3 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,41 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
security = {
|
|
||||||
sudo.enable = false;
|
|
||||||
doas = {
|
|
||||||
enable = true;
|
|
||||||
extraRules = [
|
|
||||||
{
|
|
||||||
groups = [ "wheel" ];
|
|
||||||
keepEnv = true;
|
|
||||||
persist = true;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
git
|
|
||||||
htop
|
|
||||||
vim
|
|
||||||
tmux
|
|
||||||
wireguard-tools
|
|
||||||
nmap
|
|
||||||
gcc
|
|
||||||
];
|
|
||||||
|
|
||||||
programs = {
|
|
||||||
gnupg = {
|
|
||||||
agent = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = {
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
settings.trusted-users = [ "root" ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,21 +1,41 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages;
|
kernelPackages = pkgs.linuxPackages;
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
kernelModules = [ ];
|
kernelModules = [ ];
|
||||||
};
|
};
|
||||||
kernelParams = [ "i915.force_probe=56a1" "resume_offset=11287312" ];
|
|
||||||
|
kernelParams = [ "i915.force_probe=56a1" ];
|
||||||
|
|
||||||
# kernelModules = [ "kvm-intel" "i2c-dev" "ddcci_backlight" ];
|
# kernelModules = [ "kvm-intel" "i2c-dev" "ddcci_backlight" ];
|
||||||
kernelModules = [ "kvm-intel" "i2c-dev" ];
|
kernelModules = [
|
||||||
|
"kvm-intel"
|
||||||
|
"i2c-dev"
|
||||||
|
];
|
||||||
# extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ddcci-driver ];
|
# extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ddcci-driver ];
|
||||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback r8125 ];
|
extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
v4l2loopback
|
||||||
|
r8125
|
||||||
|
];
|
||||||
blacklistedKernelModules = [ "r8169" ];
|
blacklistedKernelModules = [ "r8169" ];
|
||||||
|
extraModprobeConfig = ''options snd-intel-dspcfg dsp_driver=1 '';
|
||||||
|
|
||||||
resumeDevice = "/dev/disk/by-uuid/5679b901-3a70-4422-81f5-af91f287500b";
|
resumeDevice = "/dev/disk/by-uuid/3770e3bd-a200-4e36-b3a5-4963d13865f9";
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
efi = {
|
efi = {
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
./hardware.nix
|
||||||
./hardware.nix
|
./stuff.nix
|
||||||
./stuff.nix
|
./networking.nix
|
||||||
./networking.nix
|
./boot.nix
|
||||||
./boot.nix
|
./services.nix
|
||||||
./services.nix
|
];
|
||||||
];
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,42 +1,45 @@
|
|||||||
{ config, lib, modulesPath, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
];
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{
|
device = "/dev/disk/by-uuid/5679b901-3a70-4422-81f5-af91f287500b";
|
||||||
device = "/dev/disk/by-uuid/5679b901-3a70-4422-81f5-af91f287500b";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [ "compress-force=zstd:3" ];
|
||||||
options = [ "compress-force=zstd:3" ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
fileSystems."/boot/efi" = {
|
||||||
{
|
device = "/dev/disk/by-uuid/A2E5-006F";
|
||||||
device = "/dev/disk/by-uuid/A2E5-006F";
|
fsType = "vfat";
|
||||||
fsType = "vfat";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/media/omghi" =
|
fileSystems."/media/omghi" = {
|
||||||
{
|
device = "/dev/disk/by-uuid/0e862bdb-168a-42cc-8a28-0ae9e9a0753c";
|
||||||
device = "/dev/disk/by-uuid/0e862bdb-168a-42cc-8a28-0ae9e9a0753c";
|
fsType = "ext4";
|
||||||
fsType = "ext4";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/media/real" =
|
fileSystems."/media/real" = {
|
||||||
{
|
device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
|
||||||
device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
|
fsType = "btrfs";
|
||||||
fsType = "btrfs";
|
options = [ "compress-force=zstd:3" ];
|
||||||
options = [ "compress-force=zstd:3" ];
|
};
|
||||||
};
|
|
||||||
|
|
||||||
/* fileSystems."/media/ntfs" =
|
/*
|
||||||
|
fileSystems."/media/ntfs" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/54034ca6-d3cd-11ee-9e0c-f020ff87c985";
|
device = "/dev/disk/by-uuid/54034ca6-d3cd-11ee-9e0c-f020ff87c985";
|
||||||
fsType = "ntfs";
|
fsType = "ntfs";
|
||||||
};*/
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -46,7 +49,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = "/var/swap"; size = 32768; }
|
{ device = "/dev/disk/by-uuid/3770e3bd-a200-4e36-b3a5-4963d13865f9"; }
|
||||||
];
|
];
|
||||||
|
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
@@ -55,17 +58,18 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
|
steam-hardware.enable = true;
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
opengl = {
|
graphics = {
|
||||||
driSupport32Bit = true;
|
enable32Bit = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mesa.drivers;
|
package = pkgs.mesa;
|
||||||
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
package32 = pkgs.pkgsi686Linux.mesa;
|
||||||
extraPackages = with pkgs; [
|
extraPackages = with pkgs; [
|
||||||
intel-media-driver
|
intel-media-driver
|
||||||
intel-compute-runtime
|
intel-compute-runtime
|
||||||
onevpl-intel-gpu
|
vpl-gpu-rt
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, pkgs, conf, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
@@ -10,21 +16,53 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [ 22 18172 6600 8001 7590 25565 9092 8096 ];
|
allowedTCPPorts = [
|
||||||
allowedUDPPorts = [ 22 17840 18172 ];
|
22
|
||||||
|
18172
|
||||||
|
6600
|
||||||
|
8001
|
||||||
|
7590
|
||||||
|
25565
|
||||||
|
9092
|
||||||
|
8096
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
22
|
||||||
|
17840
|
||||||
|
18172
|
||||||
|
];
|
||||||
trustedInterfaces = [ "docker0" ];
|
trustedInterfaces = [ "docker0" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
interfaces = {
|
interfaces = {
|
||||||
enp7s0 = {
|
/*
|
||||||
ipv4.addresses = [{
|
enp7s0 = {
|
||||||
prefixLength = 24;
|
ipv4.addresses = [{
|
||||||
address = "192.168.1.106";
|
prefixLength = 24;
|
||||||
}];
|
address = "192.168.1.106";
|
||||||
};
|
}];
|
||||||
|
};
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultGateway = "192.168.1.1";
|
wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
|
||||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
ips = [ okina ];
|
||||||
|
listenPort = 17840;
|
||||||
|
privateKeyFile = "/var/secrets/wg.key";
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
#Oracle VM1
|
||||||
|
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
|
||||||
|
allowedIPs = [ remilia ];
|
||||||
|
endpoint = "${conf.network.addresses.domain.natto}:17840";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
nameservers = [
|
||||||
|
"1.1.1.1"
|
||||||
|
"8.8.8.8"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
openssh = {
|
openssh = {
|
||||||
@@ -8,14 +13,13 @@
|
|||||||
ratbagd.enable = true;
|
ratbagd.enable = true;
|
||||||
btrfs.autoScrub.enable = true;
|
btrfs.autoScrub.enable = true;
|
||||||
gvfs.enable = true;
|
gvfs.enable = true;
|
||||||
logind.extraConfig = "RuntimeDirectorySize=30%";
|
|
||||||
printing = {
|
printing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
drivers = [ pkgs.hplip ];
|
drivers = [ pkgs.hplip ];
|
||||||
};
|
};
|
||||||
avahi = lib.mkIf config.services.printing.enable {
|
avahi = lib.mkIf config.services.printing.enable {
|
||||||
enable = true;
|
enable = true;
|
||||||
nssmdns = true;
|
nssmdns4 = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -24,7 +28,6 @@
|
|||||||
libvirtd.wantedBy = lib.mkForce [ ];
|
libvirtd.wantedBy = lib.mkForce [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
security.pki.certificateFiles = [ ../../cert.pem ];
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
docker = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
time.timeZone = "Asia/Kolkata";
|
time.timeZone = "Asia/Kolkata";
|
||||||
|
|
||||||
@@ -8,25 +13,24 @@
|
|||||||
rtkit.enable = true;
|
rtkit.enable = true;
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
sudo.enable = true;
|
sudo.enable = true;
|
||||||
doas = {
|
|
||||||
enable = true;
|
|
||||||
extraRules = [
|
|
||||||
{
|
|
||||||
users = [ "natto" ];
|
|
||||||
keepEnv = true;
|
|
||||||
persist = true;
|
|
||||||
setEnv = [ "SSH_AUTH_SOCK" "PATH" "SHELL" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
console.useXkbConfig = true;
|
console.useXkbConfig = true;
|
||||||
|
|
||||||
users.users.natto = {
|
users.users.natto = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
home = "/home/natto";
|
home = "/home/natto";
|
||||||
extraGroups = [ "wheel" "adbusers" "video" "libvirtd" "docker" "networkmanager" "dialout" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"adbusers"
|
||||||
|
"video"
|
||||||
|
"libvirtd"
|
||||||
|
"docker"
|
||||||
|
"networkmanager"
|
||||||
|
"dialout"
|
||||||
|
"pipewire"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
|
|||||||
@@ -3,9 +3,19 @@
|
|||||||
boot = {
|
boot = {
|
||||||
kernel.sysctl."net.ipv4.ip_forward" = 1;
|
kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
initrd.kernelModules = [ "bochs" ];
|
initrd.kernelModules = [ "bochs" ];
|
||||||
initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" ];
|
initrd.availableKernelModules = [
|
||||||
|
"ata_piix"
|
||||||
|
"uhci_hcd"
|
||||||
|
"virtio_pci"
|
||||||
|
"virtio_scsi"
|
||||||
|
];
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
kernelParams = [ "console=ttyS0" "console=tty1" "nvme.shutdown_timeout=10" "libiscsi.debug_libiscsi_eh=1" ];
|
kernelParams = [
|
||||||
|
"console=ttyS0"
|
||||||
|
"console=tty1"
|
||||||
|
"nvme.shutdown_timeout=10"
|
||||||
|
"libiscsi.debug_libiscsi_eh=1"
|
||||||
|
];
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot.enable = true;
|
systemd-boot.enable = true;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, conf, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./networking.nix
|
./networking.nix
|
||||||
@@ -17,7 +22,6 @@
|
|||||||
extraGroups = [ "wheel" ];
|
extraGroups = [ "wheel" ];
|
||||||
openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
|
openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
|
||||||
};
|
};
|
||||||
programs.zsh.enable = true;
|
|
||||||
|
|
||||||
system.stateVersion = "21.11";
|
system.stateVersion = "21.11";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
(modulesPath + "/profiles/qemu-guest.nix")
|
];
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{
|
device = "/dev/disk/by-label/cloudimg-rootfs";
|
||||||
device = "/dev/disk/by-uuid/d91adce2-9059-4a8a-86e7-dee6ecc85b2b";
|
fsType = "ext4";
|
||||||
fsType = "ext4";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,14 +1,23 @@
|
|||||||
{ config, pkgs, conf, network, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
network,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
mailserver =
|
mailserver =
|
||||||
let domain = conf.network.addresses.domain.natto; in
|
let
|
||||||
|
domain = conf.network.addresses.domain.natto;
|
||||||
|
in
|
||||||
rec {
|
rec {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
stateVersion = 3;
|
||||||
fqdn = "mail.${domain}";
|
fqdn = "mail.${domain}";
|
||||||
sendingFqdn = fqdn;
|
sendingFqdn = fqdn;
|
||||||
domains = [ domain ];
|
domains = [ domain ];
|
||||||
certificateDomains = [ "mail.${domain}" ];
|
certificateDomains = [ "mail.${domain}" ];
|
||||||
certificateScheme = 3;
|
certificateScheme = "acme-nginx";
|
||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"natto@${domain}" = {
|
"natto@${domain}" = {
|
||||||
hashedPasswordFile = "/var/secrets/natto@${domain}.key";
|
hashedPasswordFile = "/var/secrets/natto@${domain}.key";
|
||||||
|
|||||||
@@ -1,27 +1,44 @@
|
|||||||
{ lib, config, conf, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
conf,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
hostName = "remilia";
|
hostName = "remilia";
|
||||||
firewall =
|
firewall = {
|
||||||
{
|
interfaces = {
|
||||||
interfaces = {
|
ens3 = {
|
||||||
ens3 = {
|
allowedTCPPorts = [
|
||||||
allowedTCPPorts = [ 80 81 443 444 993 465 143 25 22 22001 22002 4444 ]
|
80
|
||||||
++ (map (x: x.sourcePort) config.networking.nat.forwardPorts);
|
81
|
||||||
allowedUDPPorts = [ 17840 ];
|
443
|
||||||
};
|
444
|
||||||
|
993
|
||||||
|
465
|
||||||
|
143
|
||||||
|
25
|
||||||
|
22
|
||||||
|
22001
|
||||||
|
22002
|
||||||
|
4444
|
||||||
|
]
|
||||||
|
++ (map (x: x.sourcePort) config.networking.nat.forwardPorts);
|
||||||
|
allowedUDPPorts = [ 17840 ];
|
||||||
};
|
};
|
||||||
extraCommands = lib.concatMapStringsSep "\n"
|
|
||||||
(x:
|
|
||||||
let
|
|
||||||
t = lib.splitString ":" x.destination;
|
|
||||||
in
|
|
||||||
with lib;
|
|
||||||
"iptables -t nat -A POSTROUTING -d ${head t} -p tcp -m tcp --dport ${last t} -j MASQUERADE"
|
|
||||||
)
|
|
||||||
config.networking.nat.forwardPorts;
|
|
||||||
};
|
};
|
||||||
|
extraCommands = lib.concatMapStringsSep "\n" (
|
||||||
|
x:
|
||||||
|
let
|
||||||
|
t = lib.splitString ":" x.destination;
|
||||||
|
in
|
||||||
|
with lib;
|
||||||
|
"iptables -t nat -A POSTROUTING -d ${head t} -p tcp -m tcp --dport ${last t} -j MASQUERADE"
|
||||||
|
) config.networking.nat.forwardPorts;
|
||||||
|
};
|
||||||
interfaces = {
|
interfaces = {
|
||||||
ens3 = {
|
ens3 = {
|
||||||
useDHCP = true;
|
useDHCP = true;
|
||||||
@@ -65,13 +82,21 @@
|
|||||||
allowedIPs = [ ips.marisa ];
|
allowedIPs = [ ips.marisa ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
publicKey = "SqskEH7hz7Gv9ZS+FYLRFgKZyJCFbBFCyuvzBYnbfVU=";
|
publicKey = "oliAKHloLOulQrDwG+2NZIYg0sQAsuQ/q/lLkPCdcRE=";
|
||||||
allowedIPs = [ ips.satori ];
|
allowedIPs = [ ips.satori ];
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
publicKey = "IHYIan9Xq2PBTSzcMdHpzx4PM67l09WdsGa6s+siyH0=";
|
publicKey = "IHYIan9Xq2PBTSzcMdHpzx4PM67l09WdsGa6s+siyH0=";
|
||||||
allowedIPs = [ ips.hina ];
|
allowedIPs = [ ips.hina ];
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
publicKey = "BRdWQYPyfZeEWGtghhoYZf90nOsU/kXB3vOFJ6A17Ao=";
|
||||||
|
allowedIPs = [ ips.okina ];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
publicKey = "JriOM0LQr/YbdeIH++qY4O32vlcc8L2AC1MDoFGCpmA=";
|
||||||
|
allowedIPs = [ ips.suwako ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,4 +1,10 @@
|
|||||||
{ config, pkgs, lib, conf, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
domain = conf.network.addresses.domain.natto;
|
domain = conf.network.addresses.domain.natto;
|
||||||
in
|
in
|
||||||
@@ -8,7 +14,10 @@ in
|
|||||||
openssh = {
|
openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.PermitRootLogin = "yes";
|
settings.PermitRootLogin = "yes";
|
||||||
ports = [ 22 22002 ];
|
ports = [
|
||||||
|
22
|
||||||
|
22002
|
||||||
|
];
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -24,20 +33,28 @@ in
|
|||||||
'';
|
'';
|
||||||
virtualHosts =
|
virtualHosts =
|
||||||
let
|
let
|
||||||
genericHttpRProxy = { addr, ssl ? true, conf ? "" }: {
|
genericHttpRProxy =
|
||||||
enableACME = ssl;
|
{
|
||||||
# addSSL = ssl;
|
addr,
|
||||||
forceSSL = ssl;
|
ssl ? true,
|
||||||
locations."/" = {
|
conf ? "",
|
||||||
proxyPass = toString addr;
|
}:
|
||||||
extraConfig = ''
|
{
|
||||||
expires $expires;
|
enableACME = ssl;
|
||||||
proxy_set_header Host $host;
|
# addSSL = ssl;
|
||||||
'' + conf;
|
forceSSL = ssl;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = toString addr;
|
||||||
|
extraConfig = ''
|
||||||
|
expires $expires;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
''
|
||||||
|
+ conf;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
in
|
in
|
||||||
with conf.network.addresses.wireguard.ips; {
|
with conf.network.addresses.wireguard.ips;
|
||||||
|
{
|
||||||
"${domain}" = {
|
"${domain}" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
@@ -47,11 +64,13 @@ in
|
|||||||
};
|
};
|
||||||
serverAliases = [ "www.${domain}" ];
|
serverAliases = [ "www.${domain}" ];
|
||||||
};
|
};
|
||||||
# "vault.${domain}" = genericHttpRProxy { addr = "https://${marisa}:8800"; };
|
|
||||||
# "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
|
# MPD server
|
||||||
"f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8000"; };
|
|
||||||
"radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
|
"radio.${domain}" = genericHttpRProxy { addr = "http://${satori}:8001"; };
|
||||||
/* "radio.${domain}" = {
|
|
||||||
|
# Some random music server I once had
|
||||||
|
/*
|
||||||
|
"radio.${domain}" = {
|
||||||
addSSL = true;
|
addSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
@@ -62,13 +81,29 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
locations."= /".return = "301 /radio";
|
locations."= /".return = "301 /radio";
|
||||||
};*/
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
"git.${domain}" = genericHttpRProxy {
|
# Gitea
|
||||||
addr = "http://${marisa}:5001";
|
/*
|
||||||
conf = "client_max_body_size 64M;";
|
"git.${domain}" = genericHttpRProxy {
|
||||||
};
|
addr = "http://${marisa}:5001";
|
||||||
/*"nomad.${domain}" = genericHttpRProxy {
|
conf = "client_max_body_size 64M;";
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
|
||||||
|
# Personal filehost
|
||||||
|
# "f.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8000"; };
|
||||||
|
|
||||||
|
# Hashicorp Vault
|
||||||
|
# "vault.${domain}" = genericHttpRProxy { addr = "https://${marisa}:8800"; };
|
||||||
|
|
||||||
|
# Hashicorp Consul
|
||||||
|
# "consul.${domain}" = genericHttpRProxy { addr = "http://${marisa}:8500"; };
|
||||||
|
|
||||||
|
# Hashicorp Nomad
|
||||||
|
/*
|
||||||
|
"nomad.${domain}" = genericHttpRProxy {
|
||||||
addr = "http://${marisa}:4646";
|
addr = "http://${marisa}:4646";
|
||||||
conf = ''
|
conf = ''
|
||||||
proxy_buffering off;
|
proxy_buffering off;
|
||||||
@@ -79,15 +114,4 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
security.acme = {
|
|
||||||
acceptTerms = true;
|
|
||||||
certs = {
|
|
||||||
"${domain}".extraDomainNames = lib.singleton "www.${domain}";
|
|
||||||
} //
|
|
||||||
lib.mapAttrs (n: _: { email = "natto@${domain}"; })
|
|
||||||
(lib.filterAttrs (_: v: v.enableACME) config.services.nginx.virtualHosts);
|
|
||||||
};
|
|
||||||
security.pki.certificateFiles = [ ../../cert.pem ];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,22 +1,49 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
boot = {
|
boot = {
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "vfio-pci" ];
|
availableKernelModules = [
|
||||||
/* preDeviceCommands = ''
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"vfio-pci"
|
||||||
|
];
|
||||||
|
/*
|
||||||
|
preDeviceCommands = ''
|
||||||
DEVS="0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3"
|
DEVS="0000:01:00.0 0000:01:00.1 0000:01:00.2 0000:01:00.3"
|
||||||
for DEV in $DEVS; do
|
for DEV in $DEVS; do
|
||||||
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
|
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
|
||||||
done
|
done
|
||||||
modprobe -i vfio-pci
|
modprobe -i vfio-pci
|
||||||
'';*/
|
'';
|
||||||
|
*/
|
||||||
kernelModules = [ ];
|
kernelModules = [ ];
|
||||||
};
|
};
|
||||||
kernelParams = [ "intel_pstate=active" "intel_iommu=on" "nvidia_drm.modeset=1" "clearcpuid=512" ];
|
kernelParams = [
|
||||||
kernelModules = [ "kvm-intel" "snd-seq" "snd-rawmidi" "joydev" ];
|
"intel_pstate=active"
|
||||||
extraModulePackages = with config.boot.kernelPackages; [ nvidia_x11 v4l2loopback ];
|
"intel_iommu=on"
|
||||||
|
"nvidia_drm.modeset=1"
|
||||||
|
"clearcpuid=512"
|
||||||
|
];
|
||||||
|
kernelModules = [
|
||||||
|
"kvm-intel"
|
||||||
|
"snd-seq"
|
||||||
|
"snd-rawmidi"
|
||||||
|
"joydev"
|
||||||
|
];
|
||||||
|
extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
nvidia_x11
|
||||||
|
v4l2loopback
|
||||||
|
];
|
||||||
loader = {
|
loader = {
|
||||||
efi = {
|
efi = {
|
||||||
canTouchEfiVariables = true;
|
canTouchEfiVariables = true;
|
||||||
|
|||||||
@@ -1,13 +1,12 @@
|
|||||||
{ lib, config, ... }:
|
{ lib, config, ... }:
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
./hardware.nix
|
||||||
./hardware.nix
|
./stuff.nix
|
||||||
./stuff.nix
|
./networking.nix
|
||||||
./networking.nix
|
./boot.nix
|
||||||
./boot.nix
|
./services.nix
|
||||||
./services.nix
|
./graphics.nix
|
||||||
./graphics.nix
|
];
|
||||||
];
|
|
||||||
system.stateVersion = "23.05";
|
system.stateVersion = "23.05";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
nvidia-offload = pkgs.writeShellScriptBin "nvi" ''
|
nvidia-offload = pkgs.writeShellScriptBin "nvi" ''
|
||||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||||
@@ -13,21 +18,25 @@ in
|
|||||||
nvidia-offload
|
nvidia-offload
|
||||||
];
|
];
|
||||||
hardware = {
|
hardware = {
|
||||||
opengl = {
|
graphics = {
|
||||||
driSupport32Bit = true;
|
enable32Bit = true;
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mesa.drivers;
|
package = pkgs.mesa;
|
||||||
package32 = pkgs.pkgsi686Linux.mesa.drivers;
|
package32 = pkgs.pkgsi686Linux.mesa;
|
||||||
};
|
};
|
||||||
nvidia = {
|
nvidia = {
|
||||||
package = config.boot.kernelPackages.nvidia_x11;
|
package = config.boot.kernelPackages.nvidia_x11;
|
||||||
prime = {
|
prime = {
|
||||||
# sync.enable = true;
|
# sync.enable = true;
|
||||||
offload = { enable = true; };
|
offload = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
intelBusId = "PCI:0:2:0";
|
intelBusId = "PCI:0:2:0";
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
};
|
};
|
||||||
modesetting = { enable = true; };
|
modesetting = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
enable = true;
|
enable = true;
|
||||||
finegrained = true;
|
finegrained = true;
|
||||||
|
|||||||
@@ -1,23 +1,30 @@
|
|||||||
{ config, lib, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
];
|
||||||
];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" = {
|
||||||
{
|
device = "/dev/disk/by-uuid/59af143c-1a87-4654-9b31-7594ac8ba530";
|
||||||
device = "/dev/disk/by-uuid/4c02ddf5-d00e-4d84-856f-c327ae44d047";
|
fsType = "ext4";
|
||||||
fsType = "btrfs";
|
};
|
||||||
options = [ "compress-force=zstd:3" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fileSystems."/boot/efi" =
|
fileSystems."/media/real" = {
|
||||||
{
|
device = "/dev/disk/by-uuid/8086be20-c770-46be-bd8f-5bd2d7735c7d";
|
||||||
device = "/dev/disk/by-uuid/2424-5639";
|
fsType = "btrfs";
|
||||||
fsType = "vfat";
|
options = [ "compress-force=zstd:3" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot/efi" = {
|
||||||
|
device = "/dev/disk/by-uuid/2424-5639";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
@@ -27,7 +34,10 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{ device = "/var/swap"; size = 4096; }
|
{
|
||||||
|
device = "/var/swap";
|
||||||
|
size = 4096;
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
powerManagement = {
|
powerManagement = {
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ config, pkgs, conf, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
networking = {
|
networking = {
|
||||||
@@ -10,8 +15,20 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
firewall = {
|
firewall = {
|
||||||
allowedTCPPorts = [ 22 18172 6600 8001 7590 25565 9092 ];
|
allowedTCPPorts = [
|
||||||
allowedUDPPorts = [ 22 17840 18172 ];
|
22
|
||||||
|
18172
|
||||||
|
6600
|
||||||
|
8001
|
||||||
|
7590
|
||||||
|
25565
|
||||||
|
9092
|
||||||
|
];
|
||||||
|
allowedUDPPorts = [
|
||||||
|
22
|
||||||
|
17840
|
||||||
|
18172
|
||||||
|
];
|
||||||
trustedInterfaces = [ "docker0" ];
|
trustedInterfaces = [ "docker0" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -19,16 +36,21 @@
|
|||||||
ips = [ satori ];
|
ips = [ satori ];
|
||||||
listenPort = 17840;
|
listenPort = 17840;
|
||||||
privateKeyFile = "/var/secrets/wg.key";
|
privateKeyFile = "/var/secrets/wg.key";
|
||||||
peers = [{
|
peers = [
|
||||||
#Oracle VM1
|
{
|
||||||
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
|
#Oracle VM1
|
||||||
allowedIPs = [ remilia ];
|
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
|
||||||
endpoint = "${conf.network.addresses.domain.natto}:17840";
|
allowedIPs = [ remilia ];
|
||||||
persistentKeepalive = 25;
|
endpoint = "${conf.network.addresses.domain.natto}:17840";
|
||||||
}];
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
defaultGateway = "192.168.1.1";
|
defaultGateway = "192.168.1.1";
|
||||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
nameservers = [
|
||||||
|
"1.1.1.1"
|
||||||
|
"8.8.8.8"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
openssh = {
|
openssh = {
|
||||||
@@ -21,7 +26,6 @@
|
|||||||
libvirtd.wantedBy = lib.mkForce [ ];
|
libvirtd.wantedBy = lib.mkForce [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
security.pki.certificateFiles = [ ../../cert.pem ];
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
docker = {
|
docker = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -1,4 +1,9 @@
|
|||||||
{ lib, config, pkgs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
time.timeZone = "Asia/Kolkata";
|
time.timeZone = "Asia/Kolkata";
|
||||||
|
|
||||||
@@ -8,26 +13,22 @@
|
|||||||
rtkit.enable = true;
|
rtkit.enable = true;
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
sudo.enable = true;
|
sudo.enable = true;
|
||||||
doas = {
|
|
||||||
enable = true;
|
|
||||||
extraRules = [
|
|
||||||
{
|
|
||||||
users = [ "natto" ];
|
|
||||||
keepEnv = true;
|
|
||||||
persist = true;
|
|
||||||
setEnv = [ "SSH_AUTH_SOCK" "PATH" "SHELL" ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
console.useXkbConfig = true;
|
console.useXkbConfig = true;
|
||||||
|
|
||||||
|
|
||||||
users.users.natto = {
|
users.users.natto = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
home = "/home/natto";
|
home = "/home/natto";
|
||||||
extraGroups = [ "wheel" "adbusers" "video" "libvirtd" "docker" "networkmanager" "dialout" ];
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"adbusers"
|
||||||
|
"video"
|
||||||
|
"libvirtd"
|
||||||
|
"docker"
|
||||||
|
"networkmanager"
|
||||||
|
"dialout"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation = {
|
virtualisation = {
|
||||||
|
|||||||
24
hosts/suwako/boot.nix
Normal file
24
hosts/suwako/boot.nix
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
boot = {
|
||||||
|
kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
|
initrd.kernelModules = [ "bochs" ];
|
||||||
|
initrd.availableKernelModules = [
|
||||||
|
"ata_piix"
|
||||||
|
"uhci_hcd"
|
||||||
|
"virtio_pci"
|
||||||
|
"virtio_scsi"
|
||||||
|
];
|
||||||
|
kernelModules = [ "kvm-amd" ];
|
||||||
|
kernelParams = [
|
||||||
|
"console=ttyS0"
|
||||||
|
"console=tty1"
|
||||||
|
"nvme.shutdown_timeout=10"
|
||||||
|
"libiscsi.debug_libiscsi_eh=1"
|
||||||
|
];
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
27
hosts/suwako/default.nix
Normal file
27
hosts/suwako/default.nix
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./networking.nix
|
||||||
|
./hardware.nix
|
||||||
|
./boot.nix
|
||||||
|
./services
|
||||||
|
./mailserver.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
time.timeZone = "Asia/Kolkata";
|
||||||
|
|
||||||
|
users.users.kero = {
|
||||||
|
isNormalUser = true;
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
home = "/home/kero";
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
openssh.authorizedKeys.keys = conf.network.commonSSHKeys;
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "24.05";
|
||||||
|
}
|
||||||
26
hosts/suwako/hardware.nix
Normal file
26
hosts/suwako/hardware.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-label/cloudimg-rootfs";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/swapfile";
|
||||||
|
size = 3084;
|
||||||
|
priority = 0;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
}
|
||||||
26
hosts/suwako/mailserver.nix
Normal file
26
hosts/suwako/mailserver.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
mailserver =
|
||||||
|
let
|
||||||
|
domain = conf.network.addresses.domain.amneesh;
|
||||||
|
in
|
||||||
|
rec {
|
||||||
|
enable = true;
|
||||||
|
stateVersion = 3;
|
||||||
|
fqdn = "mail.${domain}";
|
||||||
|
sendingFqdn = fqdn;
|
||||||
|
domains = [ domain ];
|
||||||
|
certificateDomains = [ "mail.${domain}" ];
|
||||||
|
certificateScheme = "acme-nginx";
|
||||||
|
loginAccounts = {
|
||||||
|
"me@${domain}" = {
|
||||||
|
hashedPasswordFile = "/var/secrets/me@${domain}.key";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
enablePop3 = false;
|
||||||
|
enablePop3Ssl = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
42
hosts/suwako/networking.nix
Normal file
42
hosts/suwako/networking.nix
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
{
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
networking = {
|
||||||
|
useDHCP = false;
|
||||||
|
hostName = "suwako";
|
||||||
|
firewall = {
|
||||||
|
interfaces = {
|
||||||
|
enp0s6 = {
|
||||||
|
allowedTCPPorts = [
|
||||||
|
22
|
||||||
|
443
|
||||||
|
80
|
||||||
|
25565 # minecraft
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
interfaces = {
|
||||||
|
enp0s6 = {
|
||||||
|
useDHCP = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
wireguard.interfaces.wg0 = with conf.network.addresses.wireguard.ips; {
|
||||||
|
ips = [ suwako ];
|
||||||
|
listenPort = 17840;
|
||||||
|
privateKeyFile = "/var/secrets/wg.key";
|
||||||
|
peers = [
|
||||||
|
{
|
||||||
|
#Oracle VM1
|
||||||
|
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
|
||||||
|
allowedIPs = [ remilia ];
|
||||||
|
endpoint = "${conf.network.addresses.domain.natto}:17840";
|
||||||
|
persistentKeepalive = 25;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
33
hosts/suwako/services/default.nix
Normal file
33
hosts/suwako/services/default.nix
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./nginx.nix
|
||||||
|
./pufferpanel.nix
|
||||||
|
./filehost.nix
|
||||||
|
./gitea.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
cron.enable = true;
|
||||||
|
|
||||||
|
openssh = {
|
||||||
|
enable = true;
|
||||||
|
settings.PermitRootLogin = "yes";
|
||||||
|
ports = [ 22 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
postgresql = {
|
||||||
|
enable = true;
|
||||||
|
authentication = ''
|
||||||
|
local gitea all ident map=gitea-map
|
||||||
|
'';
|
||||||
|
identMap = ''
|
||||||
|
gitea-map gitea gitea
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
39
hosts/suwako/services/filehost.nix
Normal file
39
hosts/suwako/services/filehost.nix
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
conf,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
systemd.services = rec {
|
||||||
|
filehost = {
|
||||||
|
enable = true;
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "simple";
|
||||||
|
Environment = [
|
||||||
|
"TITLE=nattofiles"
|
||||||
|
"INTERNAL_HOST=0.0.0.0"
|
||||||
|
"INTERNAL_PORT=8000"
|
||||||
|
"MAX_FILESIZE_MB=500"
|
||||||
|
"EXTERNAL_HAS_TLS=1"
|
||||||
|
"EXTERNAL_HOST=f.${conf.network.addresses.domain.natto}"
|
||||||
|
];
|
||||||
|
Restart = "on-failure";
|
||||||
|
ExecStart = "${inputs.filehost.packages.${pkgs.system}.yamaf}/bin/yamaf";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
filehost-chutiya = lib.recursiveUpdate filehost {
|
||||||
|
serviceConfig.Environment = [
|
||||||
|
"TITLE=chutiyafiles"
|
||||||
|
"INTERNAL_HOST=0.0.0.0"
|
||||||
|
"INTERNAL_PORT=8001"
|
||||||
|
"MAX_FILESIZE_MB=500"
|
||||||
|
"EXTERNAL_HAS_TLS=1"
|
||||||
|
"EXTERNAL_HOST=f.${conf.network.addresses.domain.chutiya}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,4 +1,8 @@
|
|||||||
{ config, pkgs, conf, ... }:
|
{
|
||||||
|
conf,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
{
|
{
|
||||||
services = {
|
services = {
|
||||||
gitea = rec {
|
gitea = rec {
|
||||||
@@ -20,22 +24,32 @@
|
|||||||
HTTP_PORT = 5001;
|
HTTP_PORT = 5001;
|
||||||
ROOT_URL = "https://git.${domain}";
|
ROOT_URL = "https://git.${domain}";
|
||||||
SSH_DOMAIN = "git.${domain}";
|
SSH_DOMAIN = "git.${domain}";
|
||||||
SSH_PORT = 22001;
|
SSH_PORT = 22;
|
||||||
SSH_LISTEN_PORT = SSH_PORT;
|
SSH_LISTEN_PORT = SSH_PORT;
|
||||||
};
|
};
|
||||||
mailer = rec {
|
mailer = rec {
|
||||||
ENABLED = true;
|
ENABLED = true;
|
||||||
FROM = "masti@${domain}";
|
FROM = "masti@${domain}";
|
||||||
TYPE = "smtp";
|
SMTP_ADDR = "mail.${domain}";
|
||||||
HOST = "mail.${domain}";
|
PROTOCOL = "smtps";
|
||||||
IS_TLS_ENABLED = true;
|
|
||||||
USER = FROM;
|
USER = FROM;
|
||||||
REGISTER_MAIL_CONFIRM = true;
|
REGISTER_MAIL_CONFIRM = true;
|
||||||
};
|
};
|
||||||
|
service = {
|
||||||
|
ENABLE_CAPTCHA = true;
|
||||||
|
EMAIL_DOMAIN_ALLOWLIST = lib.strings.concatStringsSep "," [
|
||||||
|
"gmail.com"
|
||||||
|
"outlook.com"
|
||||||
|
"proton.me"
|
||||||
|
"protonmail.com"
|
||||||
|
conf.network.addresses.domain.natto
|
||||||
|
conf.network.addresses.domain.amneesh
|
||||||
|
conf.network.addresses.domain.chutiya
|
||||||
|
];
|
||||||
|
};
|
||||||
oauth2_client.REGISTER_MAIL_CONFIRM = true;
|
oauth2_client.REGISTER_MAIL_CONFIRM = true;
|
||||||
actions.ENABLED = false;
|
actions.ENABLED = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user