Compare commits
193 commits
3207922b68
...
c343cc36cd
| Author | SHA1 | Date | |
|---|---|---|---|
| c343cc36cd | |||
| bd7ae3084a | |||
| 43f376d9ac | |||
| dbb165237e | |||
| 914d2ffde5 | |||
| 1fd0100b3c | |||
| 74624151b9 | |||
| ab40423e4e | |||
| b1f467866a | |||
| bc2ee9c165 | |||
| 65bdab45c6 | |||
| 323e3cc7ce | |||
| 113919f4b8 | |||
| a07a96b3bd | |||
| 324814f7e2 | |||
| 49d0cf16e3 | |||
| ed511cd0fd | |||
| 9da25c99fe | |||
| 3bf1bd220e | |||
| 30225c2678 | |||
| 560b6f1c2a | |||
| 4b7f28b93b | |||
| 991aeebc14 | |||
| 6237543c62 | |||
| 5e4c04502d | |||
| 18cf69a760 | |||
| ec9c0addc0 | |||
| 7588c36d97 | |||
| a2a82dbe7c | |||
| 981fe889ff | |||
| 3b78f02c27 | |||
| b00b0bceb0 | |||
| c091e2d40d | |||
| c73663340a | |||
| a8543c5090 | |||
| 665dc96362 | |||
| 0da79f1fd7 | |||
| 84e26f0573 | |||
| 1c5cdc9e27 | |||
| 1e50c2e9dc | |||
| b7d17a0173 | |||
| 1475ab2806 | |||
| 752f029bce | |||
| 82b8006bea | |||
| 77d82ba339 | |||
| 0c5a95665c | |||
| da1634aa29 | |||
| ea235409b8 | |||
| 99a9adc489 | |||
| 34de8dab67 | |||
| 4fdc28fd18 | |||
| b3aadef8cb | |||
| 2de6fdb7be | |||
| a4d1e30625 | |||
| 8bcdf0e67e | |||
| 8d4dbf5d71 | |||
| 03d852b612 | |||
| 3d0fe199ce | |||
| 19f1d8c1a0 | |||
| 325ba751d8 | |||
| f5945b14fa | |||
| cca203b104 | |||
| c4f9705002 | |||
| 0fa3ae4add | |||
| 6b85e09715 | |||
| 83d268e422 | |||
| f44b2cd53d | |||
| ada392b3f3 | |||
| bb023ea24a | |||
| 670c7d3629 | |||
| c98c2cd0db | |||
| 675708d695 | |||
| 9ce5b5b04d | |||
| 7f98148366 | |||
| af5a00b926 | |||
| f93ffbb1a9 | |||
| d0033a98f1 | |||
| 2057a24a63 | |||
| eb85e2573d | |||
| 538a7c202e | |||
| b1c96cb075 | |||
| 3c09386643 | |||
| a7f6983abe | |||
| d302447326 | |||
| 7426658f62 | |||
| b97940aa97 | |||
| ba4c57b914 | |||
| c8578c9ec9 | |||
| dd0531a825 | |||
| 0ca4b6910e | |||
| e27e9b584d | |||
| 9cdb3eb489 | |||
| dfb3b88ada | |||
| dfde651cb9 | |||
| 8aa35f1368 | |||
| b4876d9dd9 | |||
| 5d75616eda | |||
| e3325220f4 | |||
| be3f65adb9 | |||
| dbd1099e19 | |||
| 6b17b910f8 | |||
| 8625dbc8a2 | |||
| 30c7871610 | |||
| 2f67b084d2 | |||
| 36a717072a | |||
| 43dd44d237 | |||
| 655baa24b0 | |||
| 085ca01d56 | |||
| 26ca820d4e | |||
| 36636a8a98 | |||
| e9b3ed69c9 | |||
| 20d72d7787 | |||
| 07be28a2fb | |||
| 6859150622 | |||
| 9137829f02 | |||
| 90a08dfaa9 | |||
| 49074303af | |||
| ad12a22346 | |||
| 15c5e33060 | |||
| 5218277b3e | |||
| 2ce8246287 | |||
| cbeaa72101 | |||
| 3b411b0c6d | |||
| 3333772c23 | |||
| 686f605a6d | |||
| 2215da6dc5 | |||
| a30f87ec71 | |||
| 48c074f1f4 | |||
| 9f2382ef2d | |||
| 96c86f2cc8 | |||
| 4ddc0a4acd | |||
| 7bb5a7c5a0 | |||
| 5cc4532b24 | |||
| faca1d3c81 | |||
| f54f98ea4e | |||
| 8f0160ef73 | |||
| 2ce18fc7a0 | |||
| ba3ab547b7 | |||
| dc4ca50622 | |||
| be28de858d | |||
| b489452aba | |||
| e925f586a1 | |||
| 45383a0d8b | |||
| de2b80018b | |||
| d86b7db36e | |||
| e4b9bcca7e | |||
| 850be61bf3 | |||
| 9f10425c04 | |||
| 36d2bedd34 | |||
| 5f588d7e1a | |||
| 577328395d | |||
| 34c35fb4eb | |||
| 5161c3a5d8 | |||
| b4538b5db5 | |||
| 5fa213ab59 | |||
| 5571ebd26a | |||
| 5cbc3b799f | |||
| 061df3f2c4 | |||
| f6c2f4905b | |||
| f9d95745ef | |||
| b60fc8900a | |||
| c7999c3fbe | |||
| 78d6120281 | |||
| 916132cf9c | |||
| 33063a8b99 | |||
| 2deca2fc3d | |||
| c713e32440 | |||
| 1201faf5fe | |||
| 6c6e82aae8 | |||
| da736e199c | |||
| 8f2ccfea9d | |||
| 323a02c6fd | |||
| 0397a4e166 | |||
| f8e48e7fa0 | |||
| c40cbf74f3 | |||
| 2516836026 | |||
| 0f10937be8 | |||
| de26e20ed4 | |||
| 30ea33079a | |||
| 4f54c31dc5 | |||
| 3c8caa0a17 | |||
| a78e75055f | |||
| e67ed127b9 | |||
| 8518176f2b | |||
| bf382371cb | |||
| 3bf20808b5 | |||
| e53be29b0c | |||
| d06253b430 | |||
| ed4ded7402 | |||
| 9165fd4b6f | |||
| 68a7125822 | |||
| d0dd646246 | |||
| 5edca9c2c6 |
154 changed files with 3442 additions and 13479 deletions
814
flake.lock
generated
814
flake.lock
generated
File diff suppressed because it is too large
Load diff
146
flake.nix
146
flake.nix
|
|
@ -1,8 +1,8 @@
|
||||||
{
|
{
|
||||||
description = "My system config";
|
description = "My system config";
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
nixpkgs.url = "nixpkgs/nixos-24.05";
|
||||||
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
home-manager.url = "github:nix-community/home-manager/release-24.05";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nix-index-database = {
|
nix-index-database = {
|
||||||
|
|
@ -10,42 +10,37 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
hyprland = {
|
|
||||||
url = "github:hyprwm/Hyprland";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
ranger-icons.url = "github:alexanderjeurissen/ranger_devicons";
|
ranger-icons.url = "github:alexanderjeurissen/ranger_devicons";
|
||||||
ranger-icons.flake = false;
|
ranger-icons.flake = false;
|
||||||
|
|
||||||
material-wifi-icons.url = "github:dcousens/material-wifi-icons";
|
|
||||||
material-wifi-icons.flake = false;
|
|
||||||
|
|
||||||
plymouth-themes.url = "github:adi1090x/plymouth-themes";
|
plymouth-themes.url = "github:adi1090x/plymouth-themes";
|
||||||
plymouth-themes.flake = false;
|
plymouth-themes.flake = false;
|
||||||
|
|
||||||
lipsum.url = "github:hannenz/lipsum";
|
|
||||||
lipsum.flake = false;
|
|
||||||
|
|
||||||
agenix = {
|
agenix = {
|
||||||
url = "github:ryantm/agenix";
|
url = "github:ryantm/agenix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.home-manager.follows = "home-manager";
|
||||||
};
|
};
|
||||||
|
|
||||||
nixos-mailserver = {
|
nixos-mailserver = {
|
||||||
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-23.11";
|
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.nixpkgs-24_05.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
dzgui-nix = {
|
dzgui-nix = {
|
||||||
url = "github:lelgenio/dzgui-nix";
|
url = "github:lelgenio/dzgui-nix/dzgui-4.1.0";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
tlauncher = {
|
tlauncher = {
|
||||||
url = "github:lelgenio/tlauncher-nix";
|
url = "git+https://git.lelgenio.xyz/lelgenio/tlauncher-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
disko.url = "github:nix-community/disko";
|
||||||
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# my stuff
|
# my stuff
|
||||||
dhist = {
|
dhist = {
|
||||||
url = "github:lelgenio/dhist";
|
url = "github:lelgenio/dhist";
|
||||||
|
|
@ -55,82 +50,92 @@
|
||||||
url = "github:lelgenio/demoji";
|
url = "github:lelgenio/demoji";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
maildir-notify-daemon = {
|
|
||||||
url = "github:lelgenio/maildir-notify-daemon";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
wl-crosshair = {
|
wl-crosshair = {
|
||||||
url = "github:lelgenio/wl-crosshair";
|
url = "github:lelgenio/wl-crosshair";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
warthunder-leak-counter = {
|
||||||
|
url = "git+https://git.lelgenio.com/lelgenio/warthunder-leak-counter";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
# gnome stuff
|
niri-flake = {
|
||||||
nixos-conf-editor.url = "github:vlinkz/nixos-conf-editor";
|
url = "github:sodiboo/niri-flake";
|
||||||
nix-software-center.url = "github:vlinkz/nix-software-center";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
outputs = inputs:
|
outputs =
|
||||||
|
inputs:
|
||||||
let
|
let
|
||||||
nixpkgsConfig = {
|
nixpkgsConfig = {
|
||||||
inherit system;
|
inherit system;
|
||||||
config = { allowUnfree = true; };
|
config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
};
|
||||||
overlays = old_overlays.all;
|
overlays = old_overlays.all;
|
||||||
};
|
};
|
||||||
|
|
||||||
bootstrapPkgs = import inputs.nixpkgs nixpkgsConfig;
|
|
||||||
nixpkgs = bootstrapPkgs.applyPatches {
|
|
||||||
name = "patched-nixpkgs";
|
|
||||||
src = inputs.nixpkgs;
|
|
||||||
patches = lib.mapAttrsToList (k: v: ./patches/nixpkgs/${k})
|
|
||||||
(builtins.readDir ./patches/nixpkgs);
|
|
||||||
};
|
|
||||||
|
|
||||||
inherit (import ./user/variables.nix) desktop;
|
inherit (import ./user/variables.nix) desktop;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs nixpkgsConfig;
|
pkgs = import inputs.nixpkgs nixpkgsConfig;
|
||||||
lib = inputs.nixpkgs.lib;
|
lib = inputs.nixpkgs.lib;
|
||||||
|
|
||||||
packages = import ./pkgs { inherit pkgs inputs; };
|
packages = import ./pkgs { inherit pkgs inputs; };
|
||||||
|
|
||||||
old_overlays = (import ./overlays { inherit packages inputs; });
|
old_overlays = (import ./overlays { inherit packages inputs; });
|
||||||
|
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = {
|
||||||
common_modules = [
|
inherit inputs;
|
||||||
{ nixpkgs.pkgs = pkgs; }
|
};
|
||||||
./system/configuration.nix
|
common_modules =
|
||||||
./system/secrets.nix
|
[
|
||||||
./system/specialisation.nix
|
{ nixpkgs.pkgs = pkgs; }
|
||||||
./system/greetd.nix
|
|
||||||
{ login-manager.greetd.enable = desktop == "sway" || desktop == "hyprland"; }
|
|
||||||
|
|
||||||
inputs.agenix.nixosModules.default
|
inputs.niri-flake.nixosModules.niri
|
||||||
inputs.hyprland.nixosModules.default
|
{
|
||||||
inputs.dzgui-nix.nixosModules.default
|
programs.niri.enable = true;
|
||||||
{ programs.hyprland.enable = (desktop == "hyprland"); }
|
niri-flake.cache.enable = true;
|
||||||
inputs.home-manager.nixosModules.home-manager
|
environment.systemPackages = with pkgs; [ fuzzel ];
|
||||||
{
|
}
|
||||||
home-manager.useGlobalPkgs = true;
|
./system/configuration.nix
|
||||||
home-manager.useUserPackages = true;
|
./system/secrets.nix
|
||||||
home-manager.users.lelgenio = import ./user/home.nix;
|
./system/greetd.nix
|
||||||
home-manager.backupFileExtension = "bkp";
|
{ login-manager.greetd.enable = desktop == "sway"; }
|
||||||
# Optionally, use home-manager.extraSpecialArgs to pass
|
|
||||||
# arguments to home.nix
|
inputs.agenix.nixosModules.default
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
inputs.dzgui-nix.nixosModules.default
|
||||||
}
|
inputs.home-manager.nixosModules.home-manager
|
||||||
]
|
inputs.disko.nixosModules.disko
|
||||||
++ lib.optional (desktop == "gnome") ./system/gnome.nix
|
{
|
||||||
++ lib.optional (desktop == "kde") ./system/kde.nix;
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.users.lelgenio = import ./user/home.nix;
|
||||||
|
home-manager.backupFileExtension = "bkp";
|
||||||
|
# Optionally, use home-manager.extraSpecialArgs to pass
|
||||||
|
# arguments to home.nix
|
||||||
|
home-manager.extraSpecialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
]
|
||||||
|
++ lib.optional (desktop == "gnome") ./system/gnome.nix
|
||||||
|
++ lib.optional (desktop == "kde") ./system/kde.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
checks."${system}" = {
|
||||||
|
disko-format-i15 = pkgs.callPackage ./hosts/i15/partitions-test.nix { };
|
||||||
|
};
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
i15 = lib.nixosSystem {
|
i15 = lib.nixosSystem {
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules = [ ./hosts/i15.nix ] ++ common_modules;
|
modules = [ ./hosts/i15 ] ++ common_modules;
|
||||||
};
|
};
|
||||||
monolith = lib.nixosSystem {
|
monolith = lib.nixosSystem {
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/monolith.nix
|
./hosts/monolith
|
||||||
./system/monolith-gitlab-runner.nix
|
./system/monolith-gitlab-runner.nix
|
||||||
|
./system/monolith-forgejo-runner.nix
|
||||||
./system/nix-serve.nix
|
./system/nix-serve.nix
|
||||||
./system/steam.nix
|
./system/steam.nix
|
||||||
] ++ common_modules;
|
] ++ common_modules;
|
||||||
|
|
@ -138,7 +143,7 @@
|
||||||
rainbow = lib.nixosSystem {
|
rainbow = lib.nixosSystem {
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/rainbow.nix
|
./hosts/rainbow
|
||||||
./system/rainbow-gitlab-runner.nix
|
./system/rainbow-gitlab-runner.nix
|
||||||
] ++ common_modules;
|
] ++ common_modules;
|
||||||
};
|
};
|
||||||
|
|
@ -151,11 +156,16 @@
|
||||||
};
|
};
|
||||||
pixie = lib.nixosSystem {
|
pixie = lib.nixosSystem {
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
modules = [ ./hosts/pixie.nix ] ++ common_modules ++ [{
|
modules =
|
||||||
packages.media-packages.enable = lib.mkOverride 0 false;
|
[ ./hosts/pixie.nix ]
|
||||||
programs.steam.enable = lib.mkOverride 0 false;
|
++ common_modules
|
||||||
services.flatpak.enable = lib.mkOverride 0 false;
|
++ [
|
||||||
}];
|
{
|
||||||
|
packages.media-packages.enable = lib.mkOverride 0 false;
|
||||||
|
programs.steam.enable = lib.mkOverride 0 false;
|
||||||
|
services.flatpak.enable = lib.mkOverride 0 false;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
phantom = lib.nixosSystem {
|
phantom = lib.nixosSystem {
|
||||||
inherit system specialArgs;
|
inherit system specialArgs;
|
||||||
|
|
@ -176,6 +186,6 @@
|
||||||
|
|
||||||
packages.${system} = pkgs // packages;
|
packages.${system} = pkgs // packages;
|
||||||
|
|
||||||
formatter.${system} = pkgs.nixpkgs-fmt;
|
formatter.${system} = pkgs.nixfmt-rfc-style;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,32 @@
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
btrfs_options = [
|
||||||
btrfs_ssd = [ "ssd" "discard=async" ];
|
"compress=zstd:3"
|
||||||
|
"noatime"
|
||||||
|
"x-systemd.device-timeout=0"
|
||||||
|
];
|
||||||
|
btrfs_ssd = [
|
||||||
|
"ssd"
|
||||||
|
"discard=async"
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = [
|
||||||
[ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ "i915" ];
|
boot.initrd.kernelModules = [ "i915" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
@ -18,8 +37,7 @@ in
|
||||||
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
|
options = [ "subvol=@" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device =
|
boot.initrd.luks.devices."luks-d6573cf8-25f0-4ffc-8046-ac3a4db1e964".device = "/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
|
||||||
"/dev/disk/by-uuid/d6573cf8-25f0-4ffc-8046-ac3a4db1e964";
|
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/97EB-7DB5";
|
device = "/dev/disk/by-uuid/97EB-7DB5";
|
||||||
|
|
@ -28,6 +46,12 @@ in
|
||||||
|
|
||||||
swapDevices = [ ];
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# Force all disks to use mq-deadline scheduler
|
||||||
|
# For some reason "noop" is used by default which is kinda bad when io is saturated
|
||||||
|
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline"
|
||||||
|
'';
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
|
@ -37,8 +61,7 @@ in
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
hardware.cpu.intel.updateMicrocode =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
networking.hostName = "double-rainbow"; # Define your hostname.
|
networking.hostName = "double-rainbow"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,30 @@
|
||||||
# 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, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
btrfs_options = [
|
||||||
|
"compress=zstd:3"
|
||||||
|
"noatime"
|
||||||
|
"x-systemd.device-timeout=0"
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = [
|
||||||
[ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_usb_sdmmc" ];
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_usb_sdmmc"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
@ -45,10 +60,12 @@ in
|
||||||
options = [ "subvol=@swap" ] ++ btrfs_options;
|
options = [ "subvol=@swap" ] ++ btrfs_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{
|
swapDevices = [
|
||||||
device = "/swap/swapfile";
|
{
|
||||||
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
|
device = "/swap/swapfile";
|
||||||
}];
|
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
@ -59,7 +76,6 @@ in
|
||||||
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
hardware.cpu.intel.updateMicrocode =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
networking.hostName = "i15"; # Define your hostname.
|
networking.hostName = "i15"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
|
||||||
38
hosts/i15/default.nix
Normal file
38
hosts/i15/default.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
networking.hostName = "i15"; # Define your hostname.
|
||||||
|
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"rtsx_usb_sdmmc"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
disko.devices = (import ./partitions.nix { disks = [ "/dev/sda" ]; });
|
||||||
|
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/swap/swapfile";
|
||||||
|
size = (1024 * 8) + (1024 * 2); # RAM size + 2 GB
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
19
hosts/i15/partitions-test.nix
Normal file
19
hosts/i15/partitions-test.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
pkgs.makeDiskoTest {
|
||||||
|
name = "test-disko-i15";
|
||||||
|
disko-config = ./partitions.nix;
|
||||||
|
enableOCR = true;
|
||||||
|
bootCommands = ''
|
||||||
|
machine.wait_for_text("[Pp]assphrase for")
|
||||||
|
machine.send_chars("secretsecret\n")
|
||||||
|
'';
|
||||||
|
extraTestScript = ''
|
||||||
|
machine.succeed("cryptsetup isLuks /dev/vda2");
|
||||||
|
machine.succeed("mountpoint /home");
|
||||||
|
'';
|
||||||
|
}
|
||||||
73
hosts/i15/partitions.nix
Normal file
73
hosts/i15/partitions.nix
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
{
|
||||||
|
disks ? [ "/dev/sda" ],
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
btrfs_options = [
|
||||||
|
"compress=zstd:3"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
disk.sda = {
|
||||||
|
type = "disk";
|
||||||
|
device = builtins.elemAt disks 0;
|
||||||
|
content = {
|
||||||
|
type = "table";
|
||||||
|
format = "gpt";
|
||||||
|
partitions = [
|
||||||
|
{
|
||||||
|
type = "partition";
|
||||||
|
name = "NIX_BOOT";
|
||||||
|
start = "1MiB";
|
||||||
|
end = "300MiB";
|
||||||
|
bootable = true;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
extraArgs = [
|
||||||
|
"-n"
|
||||||
|
"BOOT_I15"
|
||||||
|
];
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
# options = [ "defaults" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
type = "partition";
|
||||||
|
name = "CRYPT_I15";
|
||||||
|
start = "300MiB";
|
||||||
|
end = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "main";
|
||||||
|
keyFile = "/tmp/secret.key";
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [
|
||||||
|
"--label"
|
||||||
|
"ROOT_I15"
|
||||||
|
];
|
||||||
|
subvolumes =
|
||||||
|
let
|
||||||
|
mountOptions = btrfs_options;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
"/home" = {
|
||||||
|
inherit mountOptions;
|
||||||
|
};
|
||||||
|
"/nixos" = {
|
||||||
|
inherit mountOptions;
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
"/swap" = {
|
||||||
|
inherit mountOptions;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,140 +0,0 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
|
||||||
# and may be overwritten by future invocations. Please make changes
|
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
|
||||||
let
|
|
||||||
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
|
||||||
btrfs_ssd = [ "ssd" "discard=async" ];
|
|
||||||
in
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
|
||||||
boot.initrd.availableKernelModules =
|
|
||||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
|
||||||
|
|
||||||
hardware.opentabletdriver.enable = true;
|
|
||||||
|
|
||||||
boot.extraModulePackages = with config.boot.kernelPackages; [
|
|
||||||
zenpower
|
|
||||||
];
|
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
|
||||||
boot.kernelModules = [
|
|
||||||
"kvm-amd"
|
|
||||||
"amdgpu"
|
|
||||||
"zenpower"
|
|
||||||
];
|
|
||||||
boot.kernelParams = [
|
|
||||||
"video=DP-1:1920x1080@144"
|
|
||||||
# hibernation
|
|
||||||
"resume=LABEL=BTRFS_ROOT" # findmnt -o LABEL --noheadings /swap/
|
|
||||||
"resume_offset=36709632" # btrfs inspect-internal map-swapfile -r /swap/swapfile
|
|
||||||
];
|
|
||||||
systemd.sleep.extraConfig = ''
|
|
||||||
HibernateDelaySec=30s
|
|
||||||
SuspendState=mem
|
|
||||||
'';
|
|
||||||
|
|
||||||
hardware.opengl.driSupport = true;
|
|
||||||
# # For 32 bit applications
|
|
||||||
hardware.opengl.driSupport32Bit = true;
|
|
||||||
|
|
||||||
hardware.opengl.extraPackages = with pkgs; [
|
|
||||||
libva
|
|
||||||
libvdpau
|
|
||||||
vaapiVdpau
|
|
||||||
rocm-opencl-icd
|
|
||||||
rocm-opencl-runtime
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.corectrl.enable = true;
|
|
||||||
virtualisation.virtualbox.host.enable = true;
|
|
||||||
|
|
||||||
fileSystems."/" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_ROOT";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=nixos" ] ++ btrfs_options ++ btrfs_ssd;
|
|
||||||
};
|
|
||||||
# boot.initrd.luks.reusePassphrases = true;
|
|
||||||
boot.initrd.luks.devices = {
|
|
||||||
"main" = {
|
|
||||||
bypassWorkqueues = true;
|
|
||||||
device = "/dev/disk/by-label/CRYPT_ROOT";
|
|
||||||
};
|
|
||||||
"data" = {
|
|
||||||
bypassWorkqueues = true;
|
|
||||||
device = "/dev/disk/by-label/CRYPT_DATA";
|
|
||||||
};
|
|
||||||
"bigboy" = {
|
|
||||||
bypassWorkqueues = true;
|
|
||||||
device = "/dev/disk/by-label/CRYPT_BIGBOY";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
fileSystems."/boot/efi" = {
|
|
||||||
device = "/dev/disk/by-label/NIXBOOT";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
fileSystems."/home" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_ROOT";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=home" ] ++ btrfs_options ++ btrfs_ssd;
|
|
||||||
};
|
|
||||||
fileSystems."/home/lelgenio/Games" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_DATA";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@games" "nofail" ] ++ btrfs_options;
|
|
||||||
};
|
|
||||||
fileSystems."/home/lelgenio/Downloads/Torrents" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_DATA";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@torrents" "nofail" ] ++ btrfs_options;
|
|
||||||
};
|
|
||||||
fileSystems."/home/lelgenio/Música" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_DATA";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@music" "nofail" ] ++ btrfs_options;
|
|
||||||
};
|
|
||||||
fileSystems."/home/lelgenio/.local/mount/data" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_DATA";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@data" "nofail" ] ++ btrfs_options;
|
|
||||||
};
|
|
||||||
fileSystems."/home/lelgenio/.local/mount/bigboy" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_BIGBOY";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "nofail" ] ++ btrfs_options ++ btrfs_ssd;
|
|
||||||
};
|
|
||||||
fileSystems."/home/lelgenio/projects" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_BIGBOY";
|
|
||||||
fsType = "btrfs";
|
|
||||||
options = [ "subvol=@projects" "nofail" ] ++ btrfs_options ++ btrfs_ssd;
|
|
||||||
};
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
|
||||||
powerManagement.cpuFreqGovernor = "ondemand";
|
|
||||||
hardware.cpu.amd.updateMicrocode =
|
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
networking.hostName = "monolith"; # Define your hostname.
|
|
||||||
|
|
||||||
# Fix broken suspend with Logitech USB dongle
|
|
||||||
# `lsusb | grep Logitech` will return "vendor:product"
|
|
||||||
services.udev.extraRules = ''
|
|
||||||
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled"
|
|
||||||
'';
|
|
||||||
|
|
||||||
# swap
|
|
||||||
fileSystems."/swap" = {
|
|
||||||
device = "/dev/disk/by-label/BTRFS_ROOT";
|
|
||||||
fsType = "btrfs";
|
|
||||||
# Note these options effect the entire BTRFS filesystem and not just this volume,
|
|
||||||
# with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
|
|
||||||
options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd;
|
|
||||||
};
|
|
||||||
swapDevices = [{
|
|
||||||
device = "/swap/swapfile";
|
|
||||||
size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
176
hosts/monolith/default.nix
Normal file
176
hosts/monolith/default.nix
Normal file
|
|
@ -0,0 +1,176 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
btrfs_options = [
|
||||||
|
"compress=zstd:3"
|
||||||
|
"noatime"
|
||||||
|
"x-systemd.device-timeout=0"
|
||||||
|
];
|
||||||
|
btrfs_ssd = [
|
||||||
|
"ssd"
|
||||||
|
"discard=async"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
./partition.nix
|
||||||
|
./undervolt.nix
|
||||||
|
];
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
|
||||||
|
hardware.opentabletdriver.enable = true;
|
||||||
|
|
||||||
|
boot.extraModulePackages = with config.boot.kernelPackages; [ zenpower ];
|
||||||
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
|
boot.kernelModules = [
|
||||||
|
"kvm-amd"
|
||||||
|
"amdgpu"
|
||||||
|
"zenpower"
|
||||||
|
];
|
||||||
|
boot.kernelParams = [
|
||||||
|
"amdgpu.dcdebugmask=0x10" # amdgpu undervolting bug
|
||||||
|
"video=DP-1:1920x1080@144"
|
||||||
|
];
|
||||||
|
systemd.sleep.extraConfig = ''
|
||||||
|
HibernateDelaySec=30s
|
||||||
|
SuspendState=mem
|
||||||
|
'';
|
||||||
|
|
||||||
|
hardware.opengl.driSupport = true;
|
||||||
|
# # For 32 bit applications
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
|
||||||
|
hardware.opengl.extraPackages = with pkgs; [
|
||||||
|
libva
|
||||||
|
libvdpau
|
||||||
|
vaapiVdpau
|
||||||
|
rocm-opencl-icd
|
||||||
|
rocm-opencl-runtime
|
||||||
|
rocmPackages.rocm-smi
|
||||||
|
];
|
||||||
|
|
||||||
|
fileSystems."/mnt/old" = {
|
||||||
|
device = "/dev/disk/by-label/BTRFS_ROOT";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "nofail" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
|
};
|
||||||
|
# boot.initrd.luks.reusePassphrases = true;
|
||||||
|
boot.initrd.luks.devices = {
|
||||||
|
"old" = {
|
||||||
|
bypassWorkqueues = true;
|
||||||
|
device = "/dev/disk/by-label/CRYPT_ROOT";
|
||||||
|
};
|
||||||
|
"data" = {
|
||||||
|
bypassWorkqueues = true;
|
||||||
|
device = "/dev/disk/by-label/CRYPT_DATA";
|
||||||
|
};
|
||||||
|
# "bigboy" = {
|
||||||
|
# bypassWorkqueues = true;
|
||||||
|
# device = "/dev/disk/by-label/CRYPT_BIGBOY";
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
# boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||||
|
# fileSystems."/boot/efi" = {
|
||||||
|
# device = "/dev/disk/by-label/NIXBOOT";
|
||||||
|
# fsType = "vfat";
|
||||||
|
# };
|
||||||
|
# fileSystems."/home" = {
|
||||||
|
# device = "/dev/disk/by-label/BTRFS_ROOT";
|
||||||
|
# fsType = "btrfs";
|
||||||
|
# options = [ "subvol=home" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
|
# };
|
||||||
|
fileSystems."/home/lelgenio/Games" = {
|
||||||
|
device = "/dev/disk/by-label/BTRFS_DATA";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [
|
||||||
|
"subvol=@games"
|
||||||
|
"nofail"
|
||||||
|
] ++ btrfs_options;
|
||||||
|
};
|
||||||
|
fileSystems."/home/lelgenio/Downloads/Torrents" = {
|
||||||
|
device = "/dev/disk/by-label/BTRFS_DATA";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [
|
||||||
|
"subvol=@torrents"
|
||||||
|
"nofail"
|
||||||
|
] ++ btrfs_options;
|
||||||
|
};
|
||||||
|
fileSystems."/home/lelgenio/Música" = {
|
||||||
|
device = "/dev/disk/by-label/BTRFS_DATA";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [
|
||||||
|
"subvol=@music"
|
||||||
|
"nofail"
|
||||||
|
] ++ btrfs_options;
|
||||||
|
};
|
||||||
|
fileSystems."/home/lelgenio/.local/mount/data" = {
|
||||||
|
device = "/dev/disk/by-label/BTRFS_DATA";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [
|
||||||
|
"subvol=@data"
|
||||||
|
"nofail"
|
||||||
|
] ++ btrfs_options;
|
||||||
|
};
|
||||||
|
fileSystems."/home/lelgenio/.local/mount/old" = {
|
||||||
|
device = "/dev/disk/by-label/BTRFS_ROOT";
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "nofail" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||||
|
powerManagement.cpuFreqGovernor = "ondemand";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
networking.hostName = "monolith"; # Define your hostname.
|
||||||
|
|
||||||
|
virtualisation.virtualbox.host.enable = true;
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# Fix broken suspend with Logitech USB dongle
|
||||||
|
# `lsusb | grep Logitech` will return "vendor:product"
|
||||||
|
ACTION=="add" SUBSYSTEM=="usb" ATTR{idVendor}=="046d" ATTR{idProduct}=="c547" ATTR{power/wakeup}="disabled"
|
||||||
|
# Force all disks to use mq-deadline scheduler
|
||||||
|
# For some reason "noop" is used by default which is kinda bad when io is saturated
|
||||||
|
ACTION=="add|change", KERNEL=="sd[a-z]*[0-9]*|mmcblk[0-9]*p[0-9]*|nvme[0-9]*n[0-9]*p[0-9]*", ATTR{../queue/scheduler}="mq-deadline"
|
||||||
|
'';
|
||||||
|
|
||||||
|
boot.tmp = {
|
||||||
|
cleanOnBoot = true;
|
||||||
|
useTmpfs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# swap
|
||||||
|
# fileSystems."/swap" = {
|
||||||
|
# device = "/dev/disk/by-label/BTRFS_ROOT";
|
||||||
|
# fsType = "btrfs";
|
||||||
|
# # Note these options effect the entire BTRFS filesystem and not just this volume,
|
||||||
|
# # with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
|
||||||
|
# options = [ "subvol=swap" ] ++ btrfs_options ++ btrfs_ssd;
|
||||||
|
# };
|
||||||
|
# swapDevices = [
|
||||||
|
# {
|
||||||
|
# device = "/swap/swapfile";
|
||||||
|
# size = (1024 * 16) + (1024 * 2); # RAM size + 2 GB
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
}
|
||||||
68
hosts/monolith/partition.nix
Normal file
68
hosts/monolith/partition.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
let
|
||||||
|
btrfs_options = [
|
||||||
|
"compress=zstd:3"
|
||||||
|
"noatime"
|
||||||
|
"x-systemd.device-timeout=0"
|
||||||
|
];
|
||||||
|
btrfs_ssd = btrfs_options ++ [
|
||||||
|
"ssd"
|
||||||
|
"discard=async"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
bigboy_disk = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
ESP = {
|
||||||
|
size = "2G";
|
||||||
|
type = "EF00";
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
mountOptions = [ "defaults" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
luks = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "luks";
|
||||||
|
name = "bigboy";
|
||||||
|
# disable settings.keyFile if you want to use interactive password entry
|
||||||
|
passwordFile = "/tmp/secret.key"; # Interactive
|
||||||
|
# settings = {
|
||||||
|
# allowDiscards = true;
|
||||||
|
# keyFile = "/tmp/secret.key";
|
||||||
|
# };
|
||||||
|
# additionalKeyFiles = [ "/tmp/additionalSecret.key" ];
|
||||||
|
content = {
|
||||||
|
type = "btrfs";
|
||||||
|
extraArgs = [ "-f" ];
|
||||||
|
subvolumes = {
|
||||||
|
"/@nixos" = {
|
||||||
|
mountpoint = "/";
|
||||||
|
mountOptions = btrfs_ssd;
|
||||||
|
};
|
||||||
|
"/@home" = {
|
||||||
|
mountpoint = "/home";
|
||||||
|
mountOptions = btrfs_ssd;
|
||||||
|
};
|
||||||
|
"/@swap" = {
|
||||||
|
mountpoint = "/.swapvol";
|
||||||
|
swap.swapfile.size = "32G";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
hosts/monolith/undervolt.nix
Normal file
18
hosts/monolith/undervolt.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
let
|
||||||
|
undervoltGpu = pkgs.writeShellScript "undervolt-gpu" ''
|
||||||
|
set -xe
|
||||||
|
cd $1
|
||||||
|
echo "manual" > power_dpm_force_performance_level
|
||||||
|
echo "1" > pp_power_profile_mode
|
||||||
|
test -e pp_od_clk_voltage
|
||||||
|
echo "vo -100" > pp_od_clk_voltage
|
||||||
|
echo "c" > pp_od_clk_voltage
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
boot.kernelParams = [ "amdgpu.ppfeaturemask=0xfffd7fff" ];
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
ACTION=="add", SUBSYSTEM=="hwmon", ATTR{name}=="amdgpu", ATTR{power1_cap}="186000000", RUN+="${undervoltGpu} %S%p/device"
|
||||||
|
'';
|
||||||
|
}
|
||||||
26
hosts/phantom/davi.nix
Normal file
26
hosts/phantom/davi.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
users.users.davikiwi = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Davi";
|
||||||
|
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGgZDBnj+gVMHqoNvjpx2T/HqnxUDbLPshu+t7301gXd Davi@DESKTOP-EVHFGJ9"
|
||||||
|
];
|
||||||
|
extraGroups = [ "docker" ];
|
||||||
|
packages = with pkgs; [
|
||||||
|
(pkgs.python3.withPackages (python-pkgs: [
|
||||||
|
python-pkgs.pip
|
||||||
|
python-pkgs.wheel
|
||||||
|
]))
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."davikiwi.lelgenio.com" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:24618";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./vpsadminos.nix
|
./vpsadminos.nix
|
||||||
inputs.agenix.nixosModules.default
|
inputs.agenix.nixosModules.default
|
||||||
|
|
@ -10,10 +16,33 @@
|
||||||
./syncthing.nix
|
./syncthing.nix
|
||||||
./users.nix
|
./users.nix
|
||||||
./writefreely.nix
|
./writefreely.nix
|
||||||
./renawiki.nix
|
|
||||||
./email.nix
|
./email.nix
|
||||||
|
./forgejo.nix
|
||||||
|
./warthunder-leak-counter.nix
|
||||||
|
./invidious.nix
|
||||||
|
./davi.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
networking.hostName = "phantom";
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."lelgenio.com" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
root = pkgs.runCommand "www-dir" { } ''
|
||||||
|
mkdir -p $out
|
||||||
|
cat > $out/index.html <<EOF
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<body>
|
||||||
|
<h1>
|
||||||
|
Nothing to see here!
|
||||||
|
<h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
EOF
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
# # Enable networking
|
# # Enable networking
|
||||||
# networking.networkmanager.enable = true;
|
# networking.networkmanager.enable = true;
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
|
|
@ -27,14 +56,25 @@
|
||||||
identityPaths = [ "/root/.ssh/id_rsa" ];
|
identityPaths = [ "/root/.ssh/id_rsa" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
nix.settings = {
|
||||||
|
cores = 1;
|
||||||
|
max-jobs = 1;
|
||||||
|
};
|
||||||
|
|
||||||
system.autoUpgrade = {
|
system.autoUpgrade = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dates = "04:40";
|
dates = "04:40";
|
||||||
operation = "switch";
|
operation = "switch";
|
||||||
flags = [ "--update-input" "nixpkgs" "--no-write-lock-file" "-L" ];
|
flags = [
|
||||||
flake = "github:lelgenio/nixos-config#phantom";
|
"--update-input"
|
||||||
|
"nixpkgs"
|
||||||
|
"--no-write-lock-file"
|
||||||
|
"--print-build-logs"
|
||||||
|
];
|
||||||
|
flake = "git+https://git.lelgenio.com/lelgenio/nixos-config#phantom";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
networking.firewall.allowedTCPPorts = [ 8745 ];
|
||||||
|
|
||||||
system.stateVersion = "23.05"; # Never change this
|
system.stateVersion = "23.05"; # Never change this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,35 +1,58 @@
|
||||||
{ pkgs, inputs, ... }: {
|
{
|
||||||
# It's important to let Digital Ocean set the hostname so we get rDNS to work
|
pkgs,
|
||||||
networking.hostName = "";
|
inputs,
|
||||||
|
config,
|
||||||
imports = [
|
...
|
||||||
inputs.nixos-mailserver.nixosModules.mailserver
|
}:
|
||||||
];
|
{
|
||||||
|
imports = [ inputs.nixos-mailserver.nixosModules.mailserver ];
|
||||||
|
|
||||||
mailserver = {
|
mailserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
fqdn = "mail.lelgenio.xyz";
|
fqdn = "lelgenio.com";
|
||||||
domains = [ "lelgenio.xyz" ];
|
domains = [
|
||||||
|
"lelgenio.xyz"
|
||||||
|
"git.lelgenio.xyz"
|
||||||
|
"lelgenio.com"
|
||||||
|
"git.lelgenio.com"
|
||||||
|
"social.lelgenio.com"
|
||||||
|
];
|
||||||
certificateScheme = "acme-nginx";
|
certificateScheme = "acme-nginx";
|
||||||
|
# Create passwords with
|
||||||
|
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
|
||||||
loginAccounts = {
|
loginAccounts = {
|
||||||
"lelgenio@lelgenio.xyz" = {
|
"lelgenio@lelgenio.com" = {
|
||||||
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
hashedPassword = "$2y$05$z5s7QCXcs5uTFsfyYpwNJeWzb3RmzgWxNgcPCr0zjSytkLFF/qZmS";
|
||||||
aliases = [ "postmaster@lelgenio.xyz" ];
|
aliases = [
|
||||||
|
"postmaster@lelgenio.com"
|
||||||
|
"lelgenio@lelgenio.xyz"
|
||||||
|
"lelgenio@lelgenio.xyz"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
"noreply@git.lelgenio.com" = {
|
||||||
|
hashedPassword = "$2b$05$TmR1R7ZwXfec7yrOfeBL7u3ZtyXf0up5dEO6uMWSvb/O7LPEm.j0.";
|
||||||
|
};
|
||||||
|
"noreply@social.lelgenio.com" = {
|
||||||
|
hashedPassword = "$2b$05$DcA9xMdvHqqQMZw2.zybI.vfKsQAJtaQ/JB.t9AHu6psstWq97m2C";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Prefer ipv4 and use main ipv6 to avoid reverse DNS issues
|
||||||
|
services.postfix.extraConfig = ''
|
||||||
|
smtp_address_preference = ipv4
|
||||||
|
'';
|
||||||
|
|
||||||
# Webmail
|
# Webmail
|
||||||
services.roundcube = rec {
|
services.roundcube = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.roundcube.withPlugins (p: [ p.carddav ]);
|
package = pkgs.roundcube.withPlugins (p: [ p.carddav ]);
|
||||||
hostName = "mail.lelgenio.xyz";
|
hostName = "mail.lelgenio.com";
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
$config['smtp_host'] = "tls://${hostName}:587";
|
$config['smtp_host'] = "tls://${config.mailserver.fqdn}:587";
|
||||||
$config['smtp_user'] = "%u";
|
$config['smtp_user'] = "%u";
|
||||||
$config['smtp_pass'] = "%p";
|
$config['smtp_pass'] = "%p";
|
||||||
$config['plugins'] = [ "carddav" ];
|
$config['plugins'] = [ "carddav", "archive" ];
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
50
hosts/phantom/forgejo.nix
Normal file
50
hosts/phantom/forgejo.nix
Normal file
|
|
@ -0,0 +1,50 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.services.forgejo;
|
||||||
|
srv = cfg.settings.server;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
services.nginx = {
|
||||||
|
virtualHosts.${cfg.settings.server.DOMAIN} = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
locations."/".proxyPass = "http://localhost:${toString srv.HTTP_PORT}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services.forgejo = {
|
||||||
|
enable = true;
|
||||||
|
database.type = "postgres";
|
||||||
|
lfs.enable = true;
|
||||||
|
settings = {
|
||||||
|
service.DISABLE_REGISTRATION = true;
|
||||||
|
actions = {
|
||||||
|
ENABLED = true;
|
||||||
|
DEFAULT_ACTIONS_URL = "github";
|
||||||
|
};
|
||||||
|
server = {
|
||||||
|
DOMAIN = "git.lelgenio.com";
|
||||||
|
HTTP_PORT = 3000;
|
||||||
|
ROOT_URL = "https://${srv.DOMAIN}/";
|
||||||
|
};
|
||||||
|
mailer = {
|
||||||
|
ENABLED = true;
|
||||||
|
SMTP_ADDR = "lelgenio.com";
|
||||||
|
FROM = "noreply@git.lelgenio.com";
|
||||||
|
USER = "noreply@git.lelgenio.com";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
mailerPasswordFile = config.age.secrets.phantom-forgejo-mailer-password.path;
|
||||||
|
};
|
||||||
|
|
||||||
|
age.secrets.phantom-forgejo-mailer-password = {
|
||||||
|
file = ../../secrets/phantom-forgejo-mailer-password.age;
|
||||||
|
mode = "400";
|
||||||
|
owner = "forgejo";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,7 +1,14 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
swapDevices = [{
|
config,
|
||||||
device = "/swap/swapfile";
|
pkgs,
|
||||||
size = (1024 * 2); # 2 GB
|
inputs,
|
||||||
}];
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
swapDevices = [
|
||||||
|
{
|
||||||
|
device = "/swap/swapfile";
|
||||||
|
size = (1024 * 2); # 2 GB
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
12
hosts/phantom/invidious.nix
Normal file
12
hosts/phantom/invidious.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
services.invidious = {
|
||||||
|
enable = true;
|
||||||
|
domain = "invidious.lelgenio.com";
|
||||||
|
nginx.enable = true;
|
||||||
|
port = 10601;
|
||||||
|
settings.db = {
|
||||||
|
user = "invidious";
|
||||||
|
dbname = "invidious";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,29 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.mastodon = {
|
services.mastodon = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configureNginx = true;
|
configureNginx = true;
|
||||||
localDomain = "social.lelgenio.xyz";
|
localDomain = "social.lelgenio.com";
|
||||||
smtp.fromAddress = "lelgenio@disroot.org";
|
smtp = {
|
||||||
|
authenticate = true;
|
||||||
|
host = "lelgenio.com";
|
||||||
|
fromAddress = "noreply@social.lelgenio.com";
|
||||||
|
user = "noreply@social.lelgenio.com";
|
||||||
|
passwordFile = config.age.secrets.phantom-mastodon-mailer-password.path;
|
||||||
|
};
|
||||||
streamingProcesses = 2;
|
streamingProcesses = 2;
|
||||||
extraConfig.SINGLE_USER_MODE = "true";
|
extraConfig.SINGLE_USER_MODE = "true";
|
||||||
|
mediaAutoRemove.olderThanDays = 5;
|
||||||
|
};
|
||||||
|
|
||||||
|
age.secrets.phantom-mastodon-mailer-password = {
|
||||||
|
file = ../../secrets/phantom-mastodon-mailer-password.age;
|
||||||
|
mode = "400";
|
||||||
|
owner = "mastodon";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,25 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.nextcloud27;
|
package = pkgs.nextcloud29;
|
||||||
hostName = "cloud.lelgenio.xyz";
|
hostName = "cloud.lelgenio.com";
|
||||||
https = true;
|
https = true;
|
||||||
config = {
|
config = {
|
||||||
adminpassFile = config.age.secrets.phantom-nextcloud.path;
|
adminpassFile = config.age.secrets.phantom-nextcloud.path;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts.${config.services.nextcloud.hostName} = {
|
||||||
|
forceSSL = true;
|
||||||
|
enableACME = true;
|
||||||
|
};
|
||||||
|
|
||||||
age = {
|
age = {
|
||||||
secrets.phantom-nextcloud = {
|
secrets.phantom-nextcloud = {
|
||||||
file = ../../secrets/phantom-nextcloud.age;
|
file = ../../secrets/phantom-nextcloud.age;
|
||||||
|
|
@ -17,6 +28,4 @@
|
||||||
group = "nextcloud";
|
group = "nextcloud";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,47 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
recommendedTlsSettings = true;
|
recommendedTlsSettings = true;
|
||||||
|
recommendedOptimisation = true;
|
||||||
|
recommendedGzipSettings = true;
|
||||||
|
clientMaxBodySize = "512M";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Redirect *lelgenio.xyz -> *lelgenio.com
|
||||||
|
services.nginx.virtualHosts =
|
||||||
|
lib.mapAttrs' (key: value: lib.nameValuePair "${key}lelgenio.xyz" value)
|
||||||
|
(
|
||||||
|
lib.genAttrs
|
||||||
|
[
|
||||||
|
""
|
||||||
|
"social."
|
||||||
|
"blog."
|
||||||
|
"cloud."
|
||||||
|
"mail."
|
||||||
|
"git."
|
||||||
|
"syncthing."
|
||||||
|
]
|
||||||
|
(name: {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/".return = "301 $scheme://${name}lelgenio.com$request_uri";
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
security.acme = {
|
security.acme = {
|
||||||
acceptTerms = true;
|
acceptTerms = true;
|
||||||
defaults.email = "lelgenio@disroot.org";
|
defaults.email = "lelgenio@disroot.org";
|
||||||
};
|
};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
80
|
||||||
|
443
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
|
||||||
services.mediawiki = {
|
|
||||||
enable = true;
|
|
||||||
name = "Rena Wiki";
|
|
||||||
|
|
||||||
webserver = "nginx";
|
|
||||||
nginx.hostName = "renawiki.lelgenio.xyz";
|
|
||||||
passwordFile = config.age.secrets.phantom-renawiki.path;
|
|
||||||
|
|
||||||
extensions.VisualEditor = null;
|
|
||||||
};
|
|
||||||
services.nginx.virtualHosts."renawiki.lelgenio.xyz" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
age.secrets.phantom-renawiki = {
|
|
||||||
file = ../../secrets/phantom-renawiki.age;
|
|
||||||
mode = "400";
|
|
||||||
owner = "mediawiki";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
|
||||||
services.syncthing = {
|
services.syncthing = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
@ -7,18 +13,17 @@
|
||||||
openDefaultPorts = true;
|
openDefaultPorts = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."syncthing.lelgenio.xyz" = {
|
services.nginx.virtualHosts."syncthing.lelgenio.com" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://127.0.0.1:8384";
|
proxyPass = "http://127.0.0.1:8384";
|
||||||
extraConfig =
|
extraConfig =
|
||||||
# required when the target is also TLS server with multiple hosts
|
# required when the target is also TLS server with multiple hosts
|
||||||
"proxy_ssl_server_name on;" +
|
"proxy_ssl_server_name on;"
|
||||||
# required when the server wants to use HTTP Authentication
|
+
|
||||||
"proxy_pass_header Authorization;"
|
# required when the server wants to use HTTP Authentication
|
||||||
;
|
"proxy_pass_header Authorization;";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.openssh = {
|
services.openssh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
ports = [ 9022 ];
|
ports = [
|
||||||
|
9022
|
||||||
|
22
|
||||||
|
];
|
||||||
settings = {
|
settings = {
|
||||||
PasswordAuthentication = false;
|
PasswordAuthentication = false;
|
||||||
KbdInteractiveAuthentication = false;
|
KbdInteractiveAuthentication = false;
|
||||||
|
|
@ -15,7 +19,15 @@
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Leonardo Eugênio";
|
description = "Leonardo Eugênio";
|
||||||
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
"adbusers"
|
||||||
|
"bluetooth"
|
||||||
|
"corectrl"
|
||||||
|
"vboxusers"
|
||||||
|
];
|
||||||
shell = pkgs.fish;
|
shell = pkgs.fish;
|
||||||
openssh.authorizedKeys.keys = [
|
openssh.authorizedKeys.keys = [
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
||||||
|
|
@ -28,11 +40,10 @@
|
||||||
];
|
];
|
||||||
initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
|
initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
|
||||||
};
|
};
|
||||||
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
programs.fish.enable = true;
|
programs.fish.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [ git ];
|
||||||
git
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,14 +6,20 @@
|
||||||
#
|
#
|
||||||
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
|
# https://github.com/vpsfreecz/vpsadminos/blob/staging/os/lib/nixos-container/vpsadminos.nix
|
||||||
|
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
nameservers = [
|
nameservers = [
|
||||||
"1.1.1.1"
|
"1.1.1.1"
|
||||||
"2606:4700:4700::1111"
|
"2606:4700:4700::1111"
|
||||||
];
|
];
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
networking.nameservers = mkDefault nameservers;
|
networking.nameservers = mkDefault nameservers;
|
||||||
services.resolved = mkDefault { fallbackDns = nameservers; };
|
services.resolved = mkDefault { fallbackDns = nameservers; };
|
||||||
networking.dhcpcd.extraConfig = "noipv4ll";
|
networking.dhcpcd.extraConfig = "noipv4ll";
|
||||||
|
|
@ -21,16 +27,19 @@ in {
|
||||||
systemd.services.systemd-sysctl.enable = false;
|
systemd.services.systemd-sysctl.enable = false;
|
||||||
systemd.services.systemd-oomd.enable = false;
|
systemd.services.systemd-oomd.enable = false;
|
||||||
systemd.sockets."systemd-journald-audit".enable = false;
|
systemd.sockets."systemd-journald-audit".enable = false;
|
||||||
systemd.mounts = [ {where = "/sys/kernel/debug"; enable = false;} ];
|
systemd.mounts = [
|
||||||
|
{
|
||||||
|
where = "/sys/kernel/debug";
|
||||||
|
enable = false;
|
||||||
|
}
|
||||||
|
];
|
||||||
systemd.services.rpc-gssd.enable = false;
|
systemd.services.rpc-gssd.enable = false;
|
||||||
|
|
||||||
# Due to our restrictions in /sys, the default systemd-udev-trigger fails
|
# Due to our restrictions in /sys, the default systemd-udev-trigger fails
|
||||||
# on accessing PCI devices, etc. Override it to match only network devices.
|
# on accessing PCI devices, etc. Override it to match only network devices.
|
||||||
# In addition, boot.isContainer prevents systemd-udev-trigger.service from
|
# In addition, boot.isContainer prevents systemd-udev-trigger.service from
|
||||||
# being enabled at all, so add it explicitly.
|
# being enabled at all, so add it explicitly.
|
||||||
systemd.additionalUpstreamSystemUnits = [
|
systemd.additionalUpstreamSystemUnits = [ "systemd-udev-trigger.service" ];
|
||||||
"systemd-udev-trigger.service"
|
|
||||||
];
|
|
||||||
systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [
|
systemd.services.systemd-udev-trigger.serviceConfig.ExecStart = [
|
||||||
""
|
""
|
||||||
"-udevadm trigger --subsystem-match=net --action=add"
|
"-udevadm trigger --subsystem-match=net --action=add"
|
||||||
|
|
|
||||||
19
hosts/phantom/warthunder-leak-counter.nix
Normal file
19
hosts/phantom/warthunder-leak-counter.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
inputs,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ inputs.warthunder-leak-counter.nixosModules.default ];
|
||||||
|
|
||||||
|
services.warthunder-leak-counter.enable = true;
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."warthunder-leak-counter.lelgenio.com" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:${toString config.services.warthunder-leak-counter.port}";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,10 +1,16 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.writefreely = {
|
services.writefreely = {
|
||||||
enable = true;
|
enable = true;
|
||||||
acme.enable = true;
|
acme.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
nginx.forceSSL = true;
|
nginx.forceSSL = true;
|
||||||
host = "blog.lelgenio.xyz";
|
host = "blog.lelgenio.com";
|
||||||
admin.name = "lelgenio";
|
admin.name = "lelgenio";
|
||||||
admin.initialPasswordFile = config.age.secrets.phantom-writefreely.path;
|
admin.initialPasswordFile = config.age.secrets.phantom-writefreely.path;
|
||||||
settings.app = {
|
settings.app = {
|
||||||
|
|
@ -22,4 +28,3 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,25 @@
|
||||||
# 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, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = [
|
||||||
[ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
@ -18,8 +30,7 @@
|
||||||
options = [ "subvol=nixos" ];
|
options = [ "subvol=nixos" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."pixie".device =
|
boot.initrd.luks.devices."pixie".device = "/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
|
||||||
"/dev/disk/by-uuid/f4ae5858-d2d6-4cd1-a054-bf5147a9a928";
|
|
||||||
|
|
||||||
fileSystems."/home" = {
|
fileSystems."/home" = {
|
||||||
device = "/dev/mapper/pixie";
|
device = "/dev/mapper/pixie";
|
||||||
|
|
@ -46,8 +57,7 @@
|
||||||
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp4s0.useDHCP = lib.mkDefault true;
|
||||||
# networking.interfaces.veth74f3ffc.useDHCP = lib.mkDefault true;
|
# networking.interfaces.veth74f3ffc.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode =
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
networking.hostName = "pixie"; # Define your hostname.
|
networking.hostName = "pixie"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
@ -1,16 +1,34 @@
|
||||||
# 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, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
btrfs_options = [ "compress=zstd:3" "noatime" "x-systemd.device-timeout=0" ];
|
btrfs_options = [
|
||||||
btrfs_ssd = [ "ssd" "discard=async" ];
|
"compress=zstd:3"
|
||||||
|
"noatime"
|
||||||
|
"x-systemd.device-timeout=0"
|
||||||
|
];
|
||||||
|
btrfs_ssd = [
|
||||||
|
"ssd"
|
||||||
|
"discard=async"
|
||||||
|
];
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules =
|
boot.initrd.availableKernelModules = [
|
||||||
[ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
|
"xhci_pci"
|
||||||
|
"ahci"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ "i915" ];
|
boot.initrd.kernelModules = [ "i915" ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
@ -46,10 +64,12 @@ in
|
||||||
options = [ "subvol=@swap" ] ++ btrfs_ssd;
|
options = [ "subvol=@swap" ] ++ btrfs_ssd;
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{
|
swapDevices = [
|
||||||
device = "/swap/swapfile";
|
{
|
||||||
size = (1024 * 8);
|
device = "/swap/swapfile";
|
||||||
}];
|
size = (1024 * 8);
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
@ -59,8 +79,7 @@ in
|
||||||
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
# networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
hardware.cpu.intel.updateMicrocode =
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
|
|
||||||
networking.hostName = "rainbow"; # Define your hostname.
|
networking.hostName = "rainbow"; # Define your hostname.
|
||||||
}
|
}
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
|
|
||||||
set -xe
|
|
||||||
|
|
||||||
settle() {
|
|
||||||
udevadm trigger --subsystem-match=block
|
|
||||||
udevadm settle
|
|
||||||
}
|
|
||||||
|
|
||||||
lsblk
|
|
||||||
echo 'Enter the name of the device to WIPE and install (something like "sda"):'
|
|
||||||
read DRIVE_ID
|
|
||||||
|
|
||||||
echo 'Enter a passphrase to encrypt the disk:'
|
|
||||||
read -s DRIVE_PASSPHRASE
|
|
||||||
|
|
||||||
echo "Creating partition table..."
|
|
||||||
parted -s "/dev/${DRIVE_ID}" -- mklabel gpt
|
|
||||||
|
|
||||||
echo "Creating EFI system partition..."
|
|
||||||
parted -s "/dev/${DRIVE_ID}" -- mkpart ESP 1MiB 1GiB
|
|
||||||
parted -s "/dev/${DRIVE_ID}" -- set 1 boot on
|
|
||||||
mkfs.fat -F32 "/dev/${DRIVE_ID}1" -n NIX_BOOT
|
|
||||||
|
|
||||||
echo "Creating encrypted root partition..."
|
|
||||||
parted -s "/dev/${DRIVE_ID}" -- mkpart luks 1GiB 100%
|
|
||||||
echo "$DRIVE_PASSPHRASE" | cryptsetup --batch-mode luksFormat --label CRYPT_ROOT "/dev/${DRIVE_ID}2"
|
|
||||||
settle
|
|
||||||
echo "$DRIVE_PASSPHRASE" | cryptsetup luksOpen /dev/disk/by-label/CRYPT_ROOT "crypt_root"
|
|
||||||
|
|
||||||
echo "Creating btrfs partition..."
|
|
||||||
mkfs.btrfs --quiet --label NIX_ROOT /dev/mapper/"crypt_root"
|
|
||||||
MNTPOINT=$(mktemp -d)
|
|
||||||
mount /dev/mapper/"crypt_root" "$MNTPOINT"
|
|
||||||
|
|
||||||
echo "Creating subvolumes..."
|
|
||||||
btrfs subvolume create "$MNTPOINT"/@nixos
|
|
||||||
btrfs subvolume create "$MNTPOINT"/@home
|
|
||||||
btrfs subvolume create "$MNTPOINT"/@swap
|
|
||||||
|
|
||||||
echo "Closing btrfs partition..."
|
|
||||||
umount -Rl "$MNTPOINT"
|
|
||||||
rm -rf "$MNTPOINT"
|
|
||||||
|
|
||||||
echo "Mounting root btrfs submodule to '$MNTPOINT' ..."
|
|
||||||
MNTPOINT=$(mktemp -d)
|
|
||||||
mount /dev/disk/by-label/NIX_ROOT "$MNTPOINT" -o subvol=@nixos,noatime,compress=zstd
|
|
||||||
|
|
||||||
echo "Creating and mounting EFI system partition mountpoint..."
|
|
||||||
mkdir -p "$MNTPOINT/boot"
|
|
||||||
mount /dev/disk/by-label/NIX_BOOT "$MNTPOINT/boot"
|
|
||||||
|
|
||||||
echo "Creating home partition mountpoint..."
|
|
||||||
mkdir -p "$MNTPOINT/home"
|
|
||||||
mount /dev/disk/by-label/NIX_ROOT "$MNTPOINT/home" -o subvol=@home,noatime,compress=zstd
|
|
||||||
|
|
||||||
echo "Swapfile"
|
|
||||||
mkdir -p "$MNTPOINT/swap"
|
|
||||||
mount /dev/disk/by-label/NIX_ROOT "$MNTPOINT/swap" -o subvol=@swap,noatime
|
|
||||||
|
|
||||||
# echo "Installing system..."
|
|
||||||
nixos-generate-config --root "$MNTPOINT"
|
|
||||||
# nixos-install --root "$MNTPOINT"
|
|
||||||
|
|
@ -1,74 +1,84 @@
|
||||||
{ inputs, packages, ... }: rec {
|
{ inputs, packages, ... }:
|
||||||
|
rec {
|
||||||
all = [
|
all = [
|
||||||
scripts
|
scripts
|
||||||
sway
|
|
||||||
themes
|
themes
|
||||||
new-packages
|
new-packages
|
||||||
patches
|
patches
|
||||||
variables
|
|
||||||
lib_extended
|
lib_extended
|
||||||
|
disko
|
||||||
];
|
];
|
||||||
|
|
||||||
scripts = (import ../scripts);
|
scripts = (import ../scripts);
|
||||||
|
|
||||||
sway = (import ./sway.nix);
|
themes = (
|
||||||
|
final: prev: {
|
||||||
|
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
|
||||||
|
orchis_theme_compact = (
|
||||||
|
final.orchis-theme.override {
|
||||||
|
border-radius = 0;
|
||||||
|
tweaks = [
|
||||||
|
"compact"
|
||||||
|
"solid"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
nerdfonts_fira_hack = (
|
||||||
|
final.nerdfonts.override {
|
||||||
|
fonts = [
|
||||||
|
"FiraCode"
|
||||||
|
"Hack"
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
themes = (final: prev: {
|
new-packages = (
|
||||||
material-wifi-icons = final.stdenv.mkDerivation rec {
|
final: prev:
|
||||||
name = "material-wifi-icons";
|
packages
|
||||||
src = inputs.material-wifi-icons;
|
// {
|
||||||
installPhase = ''
|
dhist = inputs.dhist.packages.${prev.system}.dhist;
|
||||||
install -D material-wifi.ttf $out/share/fonts/${name}
|
demoji = inputs.demoji.packages.${prev.system}.default;
|
||||||
'';
|
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
|
||||||
};
|
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
|
||||||
papirus_red = (final.papirus-icon-theme.override { color = "red"; });
|
}
|
||||||
orchis_theme_compact = (final.orchis-theme.override {
|
);
|
||||||
border-radius = 0;
|
|
||||||
tweaks = [ "compact" "solid" ];
|
|
||||||
});
|
|
||||||
nerdfonts_fira_hack = (final.nerdfonts.override { fonts = [ "FiraCode" "Hack" ]; });
|
|
||||||
});
|
|
||||||
|
|
||||||
new-packages = (final: prev: packages // {
|
patches = (
|
||||||
dhist = inputs.dhist.packages.${prev.system}.dhist;
|
final: prev: {
|
||||||
demoji = inputs.demoji.packages.${prev.system}.default;
|
mySway = prev.sway.override {
|
||||||
tlauncher = inputs.tlauncher.packages.${prev.system}.tlauncher;
|
withBaseWrapper = true;
|
||||||
maildir-notify-daemon = inputs.maildir-notify-daemon.packages.${prev.system}.default;
|
withGtkWrapper = true;
|
||||||
wl-crosshair = inputs.wl-crosshair.packages.${prev.system}.default;
|
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
|
||||||
|
patches = old.patches ++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
|
||||||
|
});
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
webcord = (prev.webcord.overrideAttrs (old: {
|
lib_extended = (
|
||||||
patches = (old.patches or [ ]) ++ [ ../patches/webcord/fix-reading-config.patch ];
|
final: prev: {
|
||||||
}));
|
lib = prev.lib // rec {
|
||||||
});
|
# Utility function
|
||||||
|
# Input: [{v1=1;} {v2=2;}]
|
||||||
|
# Output: {v1=1;v2=2;}
|
||||||
|
mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { };
|
||||||
|
|
||||||
patches = (final: prev: {
|
# Easily translate imperative templating code
|
||||||
bemenu = prev.bemenu.overrideAttrs (o: {
|
# Input: [ 1 2 ] (num: { "v${num}" = num; })
|
||||||
postPatch = ''
|
# Output: {v1=1;v2=2;}
|
||||||
substituteInPlace lib/renderers/wayland/window.c \
|
forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func);
|
||||||
--replace ZWLR_LAYER_SHELL_V1_LAYER_TOP ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY
|
};
|
||||||
'';
|
}
|
||||||
});
|
);
|
||||||
sway-unwrapped = prev.sway-unwrapped.overrideAttrs (old: {
|
|
||||||
patches = old.patches
|
|
||||||
++ [ ../patches/sway/fix-hide_cursor-clearing-focus.patch ];
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
variables = (final: prev: {
|
disko = final: prev: {
|
||||||
uservars = import ../user/variables.nix;
|
makeDiskoTest =
|
||||||
});
|
let
|
||||||
|
makeTest = import (prev.path + "/nixos/tests/make-test-python.nix");
|
||||||
lib_extended = (final: prev: {
|
eval-config = import (prev.path + "/nixos/lib/eval-config.nix");
|
||||||
lib = prev.lib // rec {
|
in
|
||||||
# Utility function
|
(prev.callPackage "${inputs.disko}/tests/lib.nix" { inherit makeTest eval-config; }).makeDiskoTest;
|
||||||
# Input: [{v1=1;} {v2=2;}]
|
};
|
||||||
# Output: {v1=1;v2=2;}
|
|
||||||
mergeAttrsSet = prev.lib.foldAttrs (n: _: n) { };
|
|
||||||
|
|
||||||
# Easily translate imperative templating code
|
|
||||||
# Input: [ 1 2 ] (num: { "v${num}" = num; })
|
|
||||||
# Output: {v1=1;v2=2;}
|
|
||||||
forEachMerge = list: func: mergeAttrsSet (prev.lib.forEach list func);
|
|
||||||
};
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,19 +0,0 @@
|
||||||
(pkgs: _: {
|
|
||||||
# bash script to let dbus know about important env variables and
|
|
||||||
# propogate them to relevent services run at the end of sway config
|
|
||||||
# see
|
|
||||||
# https://github.com/emersion/xdg-desktop-portal-wlr/wiki/"It-doesn't-work"-Troubleshooting-Checklist
|
|
||||||
# note: this is pretty much the same as /etc/sway/config.d/nixos.conf but also restarts
|
|
||||||
# some user services to make sure they have the correct environment variables
|
|
||||||
dbus-sway-environment = pkgs.writeTextFile {
|
|
||||||
name = "dbus-sway-environment";
|
|
||||||
destination = "/bin/dbus-sway-environment";
|
|
||||||
executable = true;
|
|
||||||
text = ''
|
|
||||||
systemctl --user import-environment
|
|
||||||
dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway
|
|
||||||
# systemctl --user stop pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
|
||||||
# systemctl --user start pipewire wireplumber xdg-desktop-portal xdg-desktop-portal-wlr
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
})
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
||||||
From ac4d51306af54a088e29e2e5efcfac5dfe87d95c Mon Sep 17 00:00:00 2001
|
|
||||||
From: lelgenio <lelgenio@disroot.org>
|
|
||||||
Date: Fri, 4 Aug 2023 01:25:04 -0300
|
|
||||||
Subject: [PATCH] HACK: fix steam after generation switch
|
|
||||||
|
|
||||||
---
|
|
||||||
pkgs/build-support/build-fhsenv-bubblewrap/default.nix | 4 ++++
|
|
||||||
1 file changed, 4 insertions(+)
|
|
||||||
|
|
||||||
diff --git a/pkgs/build-support/build-fhsenv-bubblewrap/default.nix b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
|
|
||||||
index 3500e5e9216f..4d7ac0aa7618 100644
|
|
||||||
--- a/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
|
|
||||||
+++ b/pkgs/build-support/build-fhsenv-bubblewrap/default.nix
|
|
||||||
@@ -152,6 +152,10 @@ let
|
|
||||||
fi
|
|
||||||
if [[ -L $i ]]; then
|
|
||||||
symlinks+=(--symlink "$(${coreutils}/bin/readlink "$i")" "$i")
|
|
||||||
+ elif [[ -f $i && -r $i ]]; then
|
|
||||||
+ SNAPSHOT=$(mktemp --dry-run)
|
|
||||||
+ cp "$i" "$SNAPSHOT"
|
|
||||||
+ ro_mounts+=(--ro-bind-try "$SNAPSHOT" "$i")
|
|
||||||
else
|
|
||||||
ro_mounts+=(--ro-bind-try "$i" "$i")
|
|
||||||
fi
|
|
||||||
--
|
|
||||||
2.42.0
|
|
||||||
|
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,14 +0,0 @@
|
||||||
diff --git a/sources/code/main/modules/config.ts b/sources/code/main/modules/config.ts
|
|
||||||
index caf51df..41faabe 100644
|
|
||||||
--- a/sources/code/main/modules/config.ts
|
|
||||||
+++ b/sources/code/main/modules/config.ts
|
|
||||||
@@ -158,6 +158,9 @@ class Config<T> {
|
|
||||||
#read(): unknown {
|
|
||||||
const encodedData = readFileSync(this.#path+this.#pathExtension);
|
|
||||||
let decodedData = encodedData.toString();
|
|
||||||
+ if (decodedData === "")
|
|
||||||
+ return {};
|
|
||||||
+
|
|
||||||
if(this.#pathExtension === FileExt.Encrypted)
|
|
||||||
decodedData = safeStorage.decryptString(encodedData);
|
|
||||||
return JSON.parse(decodedData);
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{ lib
|
{
|
||||||
, mkYarnPackage
|
lib,
|
||||||
, fetchFromGitHub
|
mkYarnPackage,
|
||||||
, fetchYarnDeps
|
fetchFromGitHub,
|
||||||
, testers
|
fetchYarnDeps,
|
||||||
, writeText
|
testers,
|
||||||
, runCommand
|
writeText,
|
||||||
, blade-formatter
|
runCommand,
|
||||||
|
blade-formatter,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
mkYarnPackage rec {
|
mkYarnPackage rec {
|
||||||
|
|
@ -40,15 +41,17 @@ mkYarnPackage rec {
|
||||||
Hello world!
|
Hello world!
|
||||||
@endif
|
@endif
|
||||||
'';
|
'';
|
||||||
actual = runCommand "actual"
|
actual =
|
||||||
{
|
runCommand "actual"
|
||||||
nativeBuildInputs = [ blade-formatter ];
|
{
|
||||||
base = writeText "base" ''
|
nativeBuildInputs = [ blade-formatter ];
|
||||||
@if( true ) Hello world! @endif
|
base = writeText "base" ''
|
||||||
|
@if( true ) Hello world! @endif
|
||||||
|
'';
|
||||||
|
}
|
||||||
|
''
|
||||||
|
blade-formatter $base > $out
|
||||||
'';
|
'';
|
||||||
} ''
|
|
||||||
blade-formatter $base > $out
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
{ lib
|
{
|
||||||
, rustPlatform
|
lib,
|
||||||
, fetchFromGitHub
|
rustPlatform,
|
||||||
, pkg-config
|
fetchFromGitHub,
|
||||||
, openssl
|
pkg-config,
|
||||||
, zlib
|
openssl,
|
||||||
, stdenv
|
zlib,
|
||||||
, Security ? null
|
stdenv,
|
||||||
|
Security ? null,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
|
@ -22,9 +23,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
|
cargoSha256 = "sha256-hOB84u55ishahIFSqBnqccqH3OlC9J8mCYzsd23jTyA=";
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config ];
|
nativeBuildInputs = [ pkg-config ];
|
||||||
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [
|
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ Security ];
|
||||||
Security
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Check all the things.";
|
description = "Check all the things.";
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,13 @@
|
||||||
# Custom packages, that can be defined similarly to ones from nixpkgs
|
# Custom packages, that can be defined similarly to ones from nixpkgs
|
||||||
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example'
|
# You can build them using 'nix build .#example' or (legacy) 'nix-build -A example'
|
||||||
|
|
||||||
{ pkgs, inputs }: {
|
{ pkgs, inputs }:
|
||||||
|
rec {
|
||||||
blade-formatter = pkgs.callPackage ./blade-formatter { };
|
blade-formatter = pkgs.callPackage ./blade-formatter { };
|
||||||
cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { };
|
cargo-checkmate = pkgs.callPackage ./cargo-checkmate.nix { };
|
||||||
lipsum = pkgs.callPackage ./lipsum.nix { inherit inputs; };
|
lipsum = pkgs.callPackage ./lipsum.nix { };
|
||||||
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
|
emmet-cli = pkgs.callPackage ./emmet-cli.nix { };
|
||||||
|
material-wifi-icons = pkgs.callPackage ./material-wifi-icons.nix { };
|
||||||
|
gnome-pass-search-provider = pkgs.callPackage ./gnome-pass-search-provider.nix { };
|
||||||
|
kak-tree-sitter = pkgs.callPackage ./kak-tree-sitter.nix { };
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{ lib
|
{
|
||||||
, buildNpmPackage
|
lib,
|
||||||
, fetchFromGitHub
|
buildNpmPackage,
|
||||||
|
fetchFromGitHub,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildNpmPackage rec {
|
buildNpmPackage rec {
|
||||||
|
|
|
||||||
64
pkgs/gnome-pass-search-provider.nix
Normal file
64
pkgs/gnome-pass-search-provider.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
{
|
||||||
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
python3Packages,
|
||||||
|
wrapGAppsHook,
|
||||||
|
gtk3,
|
||||||
|
gobject-introspection,
|
||||||
|
gnome,
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
inherit (python3Packages)
|
||||||
|
dbus-python
|
||||||
|
pygobject3
|
||||||
|
fuzzywuzzy
|
||||||
|
levenshtein
|
||||||
|
;
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "gnome-pass-search-provider";
|
||||||
|
version = "1.4.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "jle64";
|
||||||
|
repo = "gnome-pass-search-provider";
|
||||||
|
rev = version;
|
||||||
|
hash = "sha256-PDR8fbDoT8IkHiTopQp0zd4DQg7JlacA6NdKYKYmrWw=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
python3Packages.wrapPython
|
||||||
|
wrapGAppsHook
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
dbus-python
|
||||||
|
pygobject3
|
||||||
|
fuzzywuzzy
|
||||||
|
levenshtein
|
||||||
|
|
||||||
|
gtk3
|
||||||
|
gobject-introspection
|
||||||
|
];
|
||||||
|
|
||||||
|
env = {
|
||||||
|
LIBDIR = builtins.placeholder "out" + "/lib";
|
||||||
|
DATADIR = builtins.placeholder "out" + "/share";
|
||||||
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace conf/org.gnome.Pass.SearchProvider.service.{dbus,systemd} \
|
||||||
|
--replace-fail "/usr/lib" "$LIBDIR"
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
bash ./install.sh
|
||||||
|
'';
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
makeWrapperArgs=( "''${gappsWrapperArgs[@]}" )
|
||||||
|
wrapPythonProgramsIn "$out/lib" "$out $propagatedBuildInputs"
|
||||||
|
'';
|
||||||
|
}
|
||||||
34
pkgs/kak-tree-sitter.nix
Normal file
34
pkgs/kak-tree-sitter.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
rustPlatform,
|
||||||
|
fetchFromSourcehut,
|
||||||
|
makeWrapper,
|
||||||
|
}:
|
||||||
|
|
||||||
|
rustPlatform.buildRustPackage rec {
|
||||||
|
pname = "kak-tree-sitter";
|
||||||
|
version = "1.1.2";
|
||||||
|
|
||||||
|
src = fetchFromSourcehut {
|
||||||
|
owner = "~hadronized";
|
||||||
|
repo = "kak-tree-sitter";
|
||||||
|
rev = "kak-tree-sitter-v${version}";
|
||||||
|
hash = "sha256-wBWfSyR8LGtug/mCD0bJ4lbdN3trIA/03AnCxZoEOSA=";
|
||||||
|
};
|
||||||
|
|
||||||
|
cargoSha256 = "sha256-OQPUWqJAts8DbFNSsC/CmMCbuZ9TVxRTR05O7oiodKI=";
|
||||||
|
|
||||||
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
|
postFixup = ''
|
||||||
|
wrapProgram "$out/bin/ktsctl" \
|
||||||
|
--suffix PATH : ${stdenv.cc}
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "Server that interfaces tree-sitter with kakoune";
|
||||||
|
homepage = "https://git.sr.ht/~hadronized/kak-tree-sitter";
|
||||||
|
license = with licenses; [ mit ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,19 +1,28 @@
|
||||||
{ pkgs, inputs }:
|
{
|
||||||
pkgs.stdenv.mkDerivation rec {
|
stdenv,
|
||||||
|
fetchFromGitHub,
|
||||||
|
pkg-config,
|
||||||
|
vala,
|
||||||
|
wrapGAppsHook,
|
||||||
|
}:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
pname = "lipsum";
|
pname = "lipsum";
|
||||||
version = "0.0.1";
|
version = "0.0.1";
|
||||||
|
|
||||||
src = inputs.lipsum;
|
src = fetchFromGitHub {
|
||||||
|
owner = "hannenz";
|
||||||
|
repo = "lipsum";
|
||||||
|
rev = "0fb31e6ede10fbd78d7652f5fb21670cddd8e3ed";
|
||||||
|
hash = "sha256-a6uv0tJulN9cAGWxvQr8B0PUJEY8Rx4e759xzS66Xlo=";
|
||||||
|
};
|
||||||
|
|
||||||
nativeBuildInputs = with pkgs; [
|
nativeBuildInputs = [
|
||||||
pkg-config
|
pkg-config
|
||||||
vala
|
vala
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
makeFlags = [
|
makeFlags = [ "PRG=${pname}" ];
|
||||||
"PRG=${pname}"
|
|
||||||
];
|
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
install -Dm 755 "$pname" "$out/bin/$pname"
|
install -Dm 755 "$pname" "$out/bin/$pname"
|
||||||
|
|
@ -21,4 +30,3 @@ pkgs.stdenv.mkDerivation rec {
|
||||||
glib-compile-schemas "$out/share/glib-2.0/schemas/"
|
glib-compile-schemas "$out/share/glib-2.0/schemas/"
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
16
pkgs/material-wifi-icons.nix
Normal file
16
pkgs/material-wifi-icons.nix
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
{ stdenv, fetchFromGitHub }:
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "material-wifi-icons";
|
||||||
|
version = "0.0.1";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "dcousens";
|
||||||
|
repo = "material-wifi-icons";
|
||||||
|
rev = "2daf6b3d96d65beb2a3e37a9a53556aab3826d97";
|
||||||
|
hash = "sha256-KykU5J7SdpBDG+6rkD//XeHd+6pK3qabe+88RduhwKc=";
|
||||||
|
};
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -D material-wifi.ttf $out/share/fonts/${pname}
|
||||||
|
'';
|
||||||
|
}
|
||||||
0
scripts/_diffr
Normal file → Executable file
0
scripts/_diffr
Normal file → Executable file
0
scripts/_sway_idle_toggle
Normal file → Executable file
0
scripts/_sway_idle_toggle
Normal file → Executable file
0
scripts/bmenu
Normal file → Executable file
0
scripts/bmenu
Normal file → Executable file
0
scripts/br
Normal file → Executable file
0
scripts/br
Normal file → Executable file
|
|
@ -1,58 +1,138 @@
|
||||||
(final: prev:
|
(
|
||||||
with prev;
|
final: prev:
|
||||||
let
|
let
|
||||||
import_script = (_: path: import (path) { inherit pkgs lib; });
|
lib = prev.lib;
|
||||||
create_script = (name: text: runtimeInputs:
|
|
||||||
let
|
|
||||||
script_body = pkgs.writeTextFile {
|
|
||||||
inherit name;
|
|
||||||
executable = true;
|
|
||||||
text = ''
|
|
||||||
${builtins.readFile text}
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
in
|
|
||||||
(pkgs.writeShellApplication {
|
|
||||||
inherit name runtimeInputs;
|
|
||||||
text = ''exec ${script_body} "$@"'';
|
|
||||||
checkPhase = "";
|
|
||||||
}));
|
|
||||||
create_scripts =
|
|
||||||
lib.mapAttrs (name: deps: create_script name ./${name} deps);
|
|
||||||
|
|
||||||
pass = pkgs.pass.withExtensions (ex: with ex; [
|
importScript = (_: path: import (path) { inherit (final) pkgs lib; });
|
||||||
pass-otp
|
wrapScript =
|
||||||
]);
|
name: text: runtimeInputs:
|
||||||
in
|
final.runCommand name
|
||||||
create_scripts
|
{
|
||||||
{
|
nativeBuildInputs = [ final.makeWrapper ];
|
||||||
|
meta.mainProgram = name;
|
||||||
|
}
|
||||||
|
''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp ${text} $out/bin/${name}
|
||||||
|
wrapProgram $out/bin/${name} \
|
||||||
|
--suffix PATH : ${lib.makeBinPath runtimeInputs}
|
||||||
|
'';
|
||||||
|
createScripts = lib.mapAttrs (name: deps: wrapScript name ./${name} deps);
|
||||||
|
|
||||||
|
myPass = final.pass.withExtensions (ex: with ex; [ pass-otp ]);
|
||||||
|
in
|
||||||
|
with final;
|
||||||
|
createScripts {
|
||||||
br = [ ];
|
br = [ ];
|
||||||
bmenu = [ final.bemenu final.dhist fish j4-dmenu-desktop jq sway ];
|
bmenu = [
|
||||||
down_meme = [ wl-clipboard yt-dlp libnotify ];
|
bemenu
|
||||||
wl-copy-file = [ wl-clipboard fish ];
|
dhist
|
||||||
|
fish
|
||||||
|
j4-dmenu-desktop
|
||||||
|
jq
|
||||||
|
sway
|
||||||
|
];
|
||||||
|
down_meme = [
|
||||||
|
wl-clipboard
|
||||||
|
yt-dlp
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
wl-copy-file = [
|
||||||
|
wl-clipboard
|
||||||
|
fish
|
||||||
|
];
|
||||||
_diffr = [ diffr ];
|
_diffr = [ diffr ];
|
||||||
_thunar-terminal = [ final.terminal ];
|
_thunar-terminal = [ terminal ];
|
||||||
_sway_idle_toggle = [ final.swayidle ];
|
_sway_idle_toggle = [ swayidle ];
|
||||||
kak-pager = [ fish final._diffr ];
|
kak-pager = [
|
||||||
kak-man-pager = [ final.kak-pager ];
|
fish
|
||||||
helix-pager = [ fish final._diffr ];
|
_diffr
|
||||||
helix-man-pager = [ final.helix-pager ];
|
];
|
||||||
musmenu = [ mpc-cli final.wdmenu trash-cli xdg-user-dirs libnotify sd wl-clipboard ];
|
kak-man-pager = [ kak-pager ];
|
||||||
showkeys =
|
helix-pager = [
|
||||||
[ ]; # This will not work unless programs.wshowkeys is enabled systemwide
|
fish
|
||||||
|
_diffr
|
||||||
|
];
|
||||||
|
helix-man-pager = [ helix-pager ];
|
||||||
|
musmenu = [
|
||||||
|
mpc-cli
|
||||||
|
wdmenu
|
||||||
|
trash-cli
|
||||||
|
xdg-user-dirs
|
||||||
|
libnotify
|
||||||
|
sd
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
showkeys = [ ]; # This will not work unless programs.wshowkeys is enabled systemwide
|
||||||
terminal = [ alacritty ];
|
terminal = [ alacritty ];
|
||||||
playerctl-status = [ playerctl ];
|
playerctl-status = [ playerctl ];
|
||||||
wpass = [ final.wdmenu fd pass sd wl-clipboard wtype ];
|
pass-export = [
|
||||||
screenshotsh =
|
pass2csv
|
||||||
[ capitaine-cursors grim slurp jq sway wl-clipboard xdg-user-dirs ];
|
gnupg
|
||||||
volumesh = [ pulseaudio libnotify ];
|
sd
|
||||||
pulse_sink = [ pulseaudio pamixer final.wdmenu ];
|
];
|
||||||
color_picker = [ grim slurp wl-clipboard libnotify imagemagick ];
|
wpass = [
|
||||||
dzadd = [ procps libnotify final.wdmenu jq mpv pqiv python3Packages.deemix mpc-cli final.mpdDup ];
|
wdmenu
|
||||||
mpdDup = [ mpc-cli perl ];
|
fd
|
||||||
readQrCode = [ grim zbar wl-clipboard ];
|
myPass
|
||||||
} // lib.mapAttrs import_script {
|
sd
|
||||||
wdmenu = ./wdmenu.nix;
|
wl-clipboard
|
||||||
wlauncher = ./wlauncher.nix;
|
wtype
|
||||||
_gpg-unlock = ./_gpg-unlock.nix;
|
];
|
||||||
})
|
screenshotsh = [
|
||||||
|
capitaine-cursors
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
jq
|
||||||
|
sway
|
||||||
|
wl-clipboard
|
||||||
|
xdg-user-dirs
|
||||||
|
];
|
||||||
|
volumesh = [
|
||||||
|
pulseaudio
|
||||||
|
libnotify
|
||||||
|
];
|
||||||
|
pulse_sink = [
|
||||||
|
pulseaudio
|
||||||
|
pamixer
|
||||||
|
wdmenu
|
||||||
|
];
|
||||||
|
color_picker = [
|
||||||
|
grim
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
libnotify
|
||||||
|
imagemagick
|
||||||
|
];
|
||||||
|
dzadd = [
|
||||||
|
procps
|
||||||
|
libnotify
|
||||||
|
wdmenu
|
||||||
|
jq
|
||||||
|
mpv
|
||||||
|
pqiv
|
||||||
|
python3Packages.deemix
|
||||||
|
mpc-cli
|
||||||
|
mpdDup
|
||||||
|
];
|
||||||
|
mpdDup = [
|
||||||
|
mpc-cli
|
||||||
|
perl
|
||||||
|
];
|
||||||
|
readQrCode = [
|
||||||
|
grim
|
||||||
|
zbar
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
powerplay-led-idle = [
|
||||||
|
bash
|
||||||
|
libinput
|
||||||
|
libratbag
|
||||||
|
];
|
||||||
|
}
|
||||||
|
// lib.mapAttrs importScript {
|
||||||
|
wdmenu = ./wdmenu.nix;
|
||||||
|
wlauncher = ./wlauncher.nix;
|
||||||
|
_gpg-unlock = ./_gpg-unlock.nix;
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
|
||||||
0
scripts/helix-pager
Normal file → Executable file
0
scripts/helix-pager
Normal file → Executable file
0
scripts/kak-pager
Normal file → Executable file
0
scripts/kak-pager
Normal file → Executable file
13
scripts/pass-export
Executable file
13
scripts/pass-export
Executable file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if test -z "$PASSWORD_STORE_DIR"; then
|
||||||
|
PASSWORD_STORE_DIR="$HOME/.password-store"
|
||||||
|
fi
|
||||||
|
|
||||||
|
pass2csv "$PASSWORD_STORE_DIR" "$HOME/passwords.csv" \
|
||||||
|
-f User '(user|login)(:\s*)?' \
|
||||||
|
-f TOTP 'otpauth(:)?' \
|
||||||
|
-f URL 'url(:\s*)?'
|
||||||
|
|
||||||
|
# Fix TOTP format for keepass
|
||||||
|
sd '"//totp/.*?secret=(.*?)(&.*?)?"' '"$1"' "$HOME/passwords.csv"
|
||||||
0
scripts/playerctl-status
Normal file → Executable file
0
scripts/playerctl-status
Normal file → Executable file
79
scripts/powerplay-led-idle
Executable file
79
scripts/powerplay-led-idle
Executable file
|
|
@ -0,0 +1,79 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Constants
|
||||||
|
SECONDS_UNTIL_FADE=$(( 1 * 60))
|
||||||
|
SECONDS_UNTIL_OFF=$(( 6 * 60))
|
||||||
|
|
||||||
|
COLOR_ON=ff0000
|
||||||
|
COLOR_FADE=880000
|
||||||
|
COLOR_OFF=000000
|
||||||
|
|
||||||
|
# Logging
|
||||||
|
|
||||||
|
if [[ "$1" = "debug" ]]; then
|
||||||
|
echo "Running with debugging" >&2
|
||||||
|
DEBUG="true"
|
||||||
|
|
||||||
|
SECONDS_UNTIL_FADE=$(( 3 ))
|
||||||
|
SECONDS_UNTIL_OFF=$(( 5 ))
|
||||||
|
fi
|
||||||
|
|
||||||
|
log() {
|
||||||
|
if [[ "$DEBUG" = "true" ]]; then
|
||||||
|
echo "$@" >&2
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# Implementation
|
||||||
|
|
||||||
|
main() {
|
||||||
|
CURRENT_STATE="UNKNOWN"
|
||||||
|
LAST_POINTER_MOTION="$(date +%s)"
|
||||||
|
|
||||||
|
if [ "$(ratbagctl list | wc -l)" -ne 1 ]; then
|
||||||
|
echo "Not exactly one device found, exiting..."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
DEVICE="$(ratbagctl list | cut -d: -f1)"
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
while read line; do
|
||||||
|
LAST_POINTER_MOTION="$(date +%s)"
|
||||||
|
break
|
||||||
|
done < <(
|
||||||
|
timeout 5s \
|
||||||
|
libinput debug-events \
|
||||||
|
| grep POINTER_MOTION
|
||||||
|
)
|
||||||
|
TIME_SINCE_LAST=$(( "$(date +%s)" - "$LAST_POINTER_MOTION" ))
|
||||||
|
log "Last pointer motion was $TIME_SINCE_LAST seconds ago"
|
||||||
|
if [ "$TIME_SINCE_LAST" -gt "$SECONDS_UNTIL_OFF" ]; then
|
||||||
|
setState OFF "$COLOR_OFF"
|
||||||
|
elif [ "$TIME_SINCE_LAST" -gt "$SECONDS_UNTIL_FADE" ]; then
|
||||||
|
setState FADE "$COLOR_FADE"
|
||||||
|
else
|
||||||
|
setState ON "$COLOR_ON"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
setState() {
|
||||||
|
STATE="$1"
|
||||||
|
COLOR="$2"
|
||||||
|
MODE="$3"
|
||||||
|
|
||||||
|
if [[ "$STATE" = "$CURRENT_STATE" ]]; then
|
||||||
|
log "Already in $STATE state"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
log "Changing state to $STATE"
|
||||||
|
CURRENT_STATE="$STATE"
|
||||||
|
|
||||||
|
ratbagctl "$DEVICE" led 0 set mode on
|
||||||
|
ratbagctl "$DEVICE" led 0 set color "$COLOR"
|
||||||
|
}
|
||||||
|
|
||||||
|
main
|
||||||
0
scripts/pulse_sink
Normal file → Executable file
0
scripts/pulse_sink
Normal file → Executable file
0
scripts/screenshotsh
Normal file → Executable file
0
scripts/screenshotsh
Normal file → Executable file
0
scripts/showkeys
Normal file → Executable file
0
scripts/showkeys
Normal file → Executable file
0
scripts/terminal
Normal file → Executable file
0
scripts/terminal
Normal file → Executable file
|
|
@ -1,12 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) dmenu;
|
|
||||||
available_menus = {
|
|
||||||
bmenu = "bmenu";
|
|
||||||
rofi = "rofi -dmenu -sort";
|
|
||||||
};
|
|
||||||
menu_cmd = available_menus.${dmenu};
|
|
||||||
in
|
|
||||||
pkgs.writeShellScriptBin "wdmenu" ''
|
pkgs.writeShellScriptBin "wdmenu" ''
|
||||||
exec ${menu_cmd} "$@"
|
exec bmenu "$@"
|
||||||
''
|
''
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) dmenu;
|
inherit (config.my) dmenu;
|
||||||
available_menus = {
|
available_menus = {
|
||||||
bmenu = "bmenu run";
|
bmenu = "bmenu run";
|
||||||
rofi = "rofi -show drun -sort";
|
rofi = "rofi -show drun -sort";
|
||||||
|
|
|
||||||
0
scripts/wl-copy-file
Normal file → Executable file
0
scripts/wl-copy-file
Normal file → Executable file
|
|
@ -1,12 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
let
|
|
||||||
inherit (pkgs.uservars) dmenu;
|
|
||||||
available_menus = {
|
|
||||||
bmenu = "bmenu run";
|
|
||||||
rofi = "rofi -show drun -sort";
|
|
||||||
};
|
|
||||||
menu_cmd = available_menus.${dmenu};
|
|
||||||
in
|
|
||||||
pkgs.writeShellScriptBin "wlauncher" ''
|
pkgs.writeShellScriptBin "wlauncher" ''
|
||||||
exec ${menu_cmd} "$@"
|
exec bmenu run "$@"
|
||||||
''
|
''
|
||||||
|
|
|
||||||
4
scripts/wpass
Normal file → Executable file
4
scripts/wpass
Normal file → Executable file
|
|
@ -50,10 +50,6 @@ main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
autotype(){
|
autotype(){
|
||||||
if pgrep qutebrowser >/dev/null; then
|
|
||||||
qutebrowser ":mode-enter insert"
|
|
||||||
fi
|
|
||||||
|
|
||||||
env wtype -s 100 "$username"
|
env wtype -s 100 "$username"
|
||||||
env wtype -s 100 -k tab
|
env wtype -s 100 -k tab
|
||||||
env wtype -s 100 "$password"
|
env wtype -s 100 "$password"
|
||||||
|
|
|
||||||
BIN
secrets/monolith-forgejo-runner-token.age
Normal file
BIN
secrets/monolith-forgejo-runner-token.age
Normal file
Binary file not shown.
Binary file not shown.
BIN
secrets/phantom-forgejo-mailer-password.age
Normal file
BIN
secrets/phantom-forgejo-mailer-password.age
Normal file
Binary file not shown.
13
secrets/phantom-mastodon-mailer-password.age
Normal file
13
secrets/phantom-mastodon-mailer-password.age
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
age-encryption.org/v1
|
||||||
|
-> ssh-rsa BwwxHg
|
||||||
|
Mnc+/tJ0QqxHkg2nl9gEkz5Oj1RgxtOZnD5gRv66ISUOqZhNm1+F+xVEdKn843/q
|
||||||
|
/WzH0f1cTF9NXP8vIaEo//bMmp50obJAd+JNovJxV+0gb9L55Nu7ayvK+eyk6j5n
|
||||||
|
eb8TxUnwh5BPkEyc6akDh/O49GXzLlVoFD6Ik/0f3YCqUDNAYOl2bsssXtevCeK/
|
||||||
|
WEPoCFGhZfNUrOo/0eAhiujZZ5zVb0CWNqXi8VTe2eWOE20VJULcN13TEyO3ZePx
|
||||||
|
bAPBmDfS5GgGlV4INWxVLaIMDrzlm0tYozbBNNUbdLFFOhIOrgvay9RWxdk0u2hJ
|
||||||
|
MPKoKsJ96EFxrbZJdS0W7a+aZk/Q3A3Civ2rtPx+5UANhmlY8e1lUHa26e1vA4K7
|
||||||
|
ApoMtDyCbuZ9FbLurwl9zO64wWP68aKzuyKOIw+wpy41NQ/PcViSY8KNG9Pt7A2N
|
||||||
|
CcOkByx+rwz+JdNHbOF8O4FFG4fNSWn7SvVtu5ymGgVi1bOd8PdJpjDR+6Is0SX7
|
||||||
|
|
||||||
|
--- DHNyITb7ZseEV58MOD/zHeH5vff0hhlbKg27rlYECGk
|
||||||
|
ÆJ…¨Úãè·<hUs/¿ïš}ó´Zi`ˆ‘ 'ÂJŸ°z5ùÃgõãŸ%€ì‡`¤º%/˜‚±<01>ˆ„á-Î<x—íõÉ’|
|
||||||
Binary file not shown.
|
|
@ -2,12 +2,19 @@ let
|
||||||
main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15";
|
main_ssh_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
"rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
|
||||||
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
main_ssh_public_key
|
||||||
|
];
|
||||||
|
"monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age".publicKeys = [
|
||||||
|
main_ssh_public_key
|
||||||
|
];
|
||||||
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
"gitlab-runner-thoreb-telemetria-registrationConfigFile.age".publicKeys = [ main_ssh_public_key ];
|
||||||
|
"monolith-forgejo-runner-token.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
"lelgenio-cachix.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
|
"monolith-nix-serve-privkey.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-nextcloud.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-writefreely.age".publicKeys = [ main_ssh_public_key ];
|
||||||
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
|
"phantom-renawiki.age".publicKeys = [ main_ssh_public_key ];
|
||||||
|
"phantom-forgejo-mailer-password.age".publicKeys = [ main_ssh_public_key ];
|
||||||
|
"phantom-mastodon-mailer-password.age".publicKeys = [ main_ssh_public_key ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
6
settings/default.nix
Normal file
6
settings/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
my = lib.mkOption { };
|
||||||
|
};
|
||||||
|
}
|
||||||
2
switch
2
switch
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
nix fmt
|
nix fmt
|
||||||
|
|
||||||
git diff
|
git --no-pager diff
|
||||||
|
|
||||||
sudo nice ionice \
|
sudo nice ionice \
|
||||||
nixos-rebuild \
|
nixos-rebuild \
|
||||||
|
|
|
||||||
12
switch-phantom
Executable file
12
switch-phantom
Executable file
|
|
@ -0,0 +1,12 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
nix fmt
|
||||||
|
|
||||||
|
git --no-pager diff
|
||||||
|
|
||||||
|
nixos-rebuild switch --flake .#phantom \
|
||||||
|
--update-input nixpkgs \
|
||||||
|
--no-write-lock-file \
|
||||||
|
--build-host phantom \
|
||||||
|
--target-host phantom \
|
||||||
|
"$@"
|
||||||
17
system/bluetooth.nix
Normal file
17
system/bluetooth.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.blueman.enable = true;
|
||||||
|
hardware.bluetooth = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
General = {
|
||||||
|
DiscoverableTimeout = 0;
|
||||||
|
Discoverable = true;
|
||||||
|
AlwaysPairable = true;
|
||||||
|
};
|
||||||
|
Policy = {
|
||||||
|
AutoEnable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,11 @@
|
||||||
{ config, pkgs, lib, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
console = {
|
console = {
|
||||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz";
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-120n.psf.gz";
|
||||||
packages = [ pkgs.terminus_font ];
|
packages = [ pkgs.terminus_font ];
|
||||||
|
|
@ -36,11 +43,9 @@
|
||||||
};
|
};
|
||||||
plymouth = {
|
plymouth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = lib.mkIf (pkgs.uservars.desktop == "sway") "red_loader";
|
theme = lib.mkIf (config.my.desktop == "sway") "red_loader";
|
||||||
themePackages = with pkgs; [
|
themePackages = with pkgs; [
|
||||||
(adi1090x-plymouth-themes.override {
|
(adi1090x-plymouth-themes.override { selected_themes = [ "red_loader" ]; })
|
||||||
selected_themes = [ "red_loader" ];
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ pkgs, lib, config, ... }: {
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.cachix-watch-store = {
|
services.cachix-watch-store = {
|
||||||
enable = true;
|
enable = true;
|
||||||
cacheName = "lelgenio";
|
cacheName = "lelgenio";
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# Edit this configuration file to define what should be installed on
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./gamemode.nix
|
./gamemode.nix
|
||||||
./cachix.nix
|
./cachix.nix
|
||||||
|
|
@ -9,115 +15,26 @@
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./thunar.nix
|
./thunar.nix
|
||||||
./nix.nix
|
./nix.nix
|
||||||
|
./fonts.nix
|
||||||
|
./sound.nix
|
||||||
|
./bluetooth.nix
|
||||||
|
./mouse.nix
|
||||||
|
./locale.nix
|
||||||
|
./users.nix
|
||||||
|
./containers.nix
|
||||||
|
./network.nix
|
||||||
|
../settings
|
||||||
];
|
];
|
||||||
|
|
||||||
|
my = import ../user/variables.nix;
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
services.udev.packages = [ pkgs.android-udev-rules ];
|
services.udev.packages = [ pkgs.android-udev-rules ];
|
||||||
|
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
|
||||||
# Configure network proxy if necessary
|
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
# Open kde connect ports
|
|
||||||
programs.kdeconnect.enable = true;
|
|
||||||
networking.firewall.allowedTCPPorts = [ 55201 ];
|
|
||||||
|
|
||||||
# Set your time zone.
|
|
||||||
time.timeZone = "America/Sao_Paulo";
|
|
||||||
environment.variables.TZ = config.time.timeZone;
|
|
||||||
# Select internationalisation properties.
|
|
||||||
i18n.defaultLocale = "pt_BR.utf8";
|
|
||||||
|
|
||||||
# Enable the GNOME Desktop Environment.
|
|
||||||
# services.xserver.displayManager.gdm.enable = true;
|
|
||||||
# services.xserver.desktopManager.gnome.enable = true;
|
|
||||||
# services.xserver.displayManager.autologin.user = "lelgenio";
|
|
||||||
|
|
||||||
# Configure keymap in X11
|
|
||||||
services.xserver = {
|
|
||||||
layout = "us";
|
|
||||||
xkbVariant = "colemak";
|
|
||||||
};
|
|
||||||
console.keyMap = "colemak";
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
# services.printing.enable = true;
|
|
||||||
services.flatpak.enable = true;
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
virtualisation.docker.autoPrune.enable = true;
|
|
||||||
virtualisation.docker.autoPrune.dates = "monthly";
|
|
||||||
virtualisation.docker.autoPrune.flags = [ "--all --volumes" ];
|
|
||||||
|
|
||||||
programs.extra-container.enable = true;
|
|
||||||
|
|
||||||
programs.firejail.enable = true;
|
|
||||||
|
|
||||||
security.rtkit.enable = true;
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
ports = [ 9022 ];
|
|
||||||
settings = {
|
|
||||||
PermitRootLogin = "no";
|
|
||||||
PasswordAuthentication = false;
|
|
||||||
KbdInteractiveAuthentication = false;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
# programs.ssh = {
|
|
||||||
# startAgent = true;
|
|
||||||
# extraConfig = ''
|
|
||||||
# AddKeysToAgent yes
|
|
||||||
# '';
|
|
||||||
# };
|
|
||||||
|
|
||||||
## Enable sound with pipewire.
|
|
||||||
sound.enable = true;
|
|
||||||
hardware.pulseaudio.enable = false;
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
wireplumber.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.blueman.enable = true;
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
settings = {
|
|
||||||
General = {
|
|
||||||
DiscoverableTimeout = 0;
|
|
||||||
# Discoverable = true;
|
|
||||||
AlwaysPairable = true;
|
|
||||||
};
|
|
||||||
Policy = { AutoEnable = true; };
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
# Enable touchpad support (enabled default in most desktopManager).
|
||||||
services.xserver.libinput.enable = true;
|
services.libinput.enable = true;
|
||||||
|
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
|
||||||
users.mutableUsers = false;
|
|
||||||
users.users.lelgenio = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Leonardo Eugênio";
|
|
||||||
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" "adbusers" "bluetooth" "corectrl" "vboxusers" ];
|
|
||||||
shell = pkgs.fish;
|
|
||||||
openssh.authorizedKeys.keys = [
|
|
||||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
|
|
||||||
|
|
||||||
# services.getty.autologinUser = "lelgenio";
|
|
||||||
programs.fish.enable = true;
|
|
||||||
|
|
||||||
programs.dzgui.enable = true;
|
|
||||||
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
|
|
||||||
|
|
||||||
packages.media-packages.enable = true;
|
packages.media-packages.enable = true;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
|
@ -129,21 +46,7 @@
|
||||||
gnome3.adwaita-icon-theme # default gnome cursors
|
gnome3.adwaita-icon-theme # default gnome cursors
|
||||||
];
|
];
|
||||||
|
|
||||||
fonts.enableDefaultPackages = true;
|
|
||||||
fonts.packages = with pkgs; [
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk
|
|
||||||
noto-fonts-emoji
|
|
||||||
nerdfonts_fira_hack
|
|
||||||
];
|
|
||||||
|
|
||||||
services.geoclue2.enable = true;
|
services.geoclue2.enable = true;
|
||||||
# programs.qt5ct.enable = true;
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
|
||||||
# started in user sessions.
|
|
||||||
# programs.mtr.enable = true;
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
systemd.extraConfig = ''
|
systemd.extraConfig = ''
|
||||||
DefaultTimeoutStopSec=10s
|
DefaultTimeoutStopSec=10s
|
||||||
|
|
|
||||||
20
system/containers.nix
Normal file
20
system/containers.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
|
virtualisation.docker = {
|
||||||
|
enable = true;
|
||||||
|
autoPrune = {
|
||||||
|
enable = true;
|
||||||
|
dates = "monthly";
|
||||||
|
flags = [
|
||||||
|
"--all"
|
||||||
|
"--volumes"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.extra-container.enable = true;
|
||||||
|
|
||||||
|
programs.firejail.enable = true;
|
||||||
|
}
|
||||||
10
system/fonts.nix
Normal file
10
system/fonts.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
fonts.enableDefaultPackages = true;
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
noto-fonts
|
||||||
|
noto-fonts-cjk
|
||||||
|
noto-fonts-emoji
|
||||||
|
nerdfonts_fira_hack
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,16 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
programs.gamemode.enableRenice = true;
|
programs.gamemode.enableRenice = true;
|
||||||
programs.gamemode.settings = {
|
programs.gamemode.settings = {
|
||||||
general = { renice = 10; };
|
general = {
|
||||||
|
renice = 10;
|
||||||
|
};
|
||||||
|
|
||||||
# Warning: GPU optimisations have the potential to damage hardware
|
# Warning: GPU optimisations have the potential to damage hardware
|
||||||
gpu = {
|
gpu = {
|
||||||
|
|
|
||||||
|
|
@ -1,40 +1,51 @@
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, lib, ... }:
|
||||||
mkNixRunner = registrationConfigFile: with lib; rec {
|
{
|
||||||
# File should contain at least these two variables:
|
mkNixRunner =
|
||||||
# `CI_SERVER_URL`
|
authenticationTokenConfigFile: with lib; rec {
|
||||||
# `REGISTRATION_TOKEN`
|
# File should contain at least these two variables:
|
||||||
inherit registrationConfigFile; # 2
|
# `CI_SERVER_URL`
|
||||||
dockerImage = "alpine:3.18.2";
|
# `REGISTRATION_TOKEN`
|
||||||
dockerAllowedImages = [ dockerImage ];
|
inherit authenticationTokenConfigFile; # 2
|
||||||
dockerVolumes = [
|
dockerImage = "alpine:3.18.2";
|
||||||
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
|
dockerAllowedImages = [ dockerImage ];
|
||||||
"/nix/store:/nix/store:ro"
|
dockerVolumes = [
|
||||||
"/nix/var/nix/db:/nix/var/nix/db:ro"
|
"/etc/nix/nix.conf:/etc/nix/nix.conf:ro"
|
||||||
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
|
"/nix/store:/nix/store:ro"
|
||||||
];
|
"/nix/var/nix/db:/nix/var/nix/db:ro"
|
||||||
dockerDisableCache = true;
|
"/nix/var/nix/daemon-socket:/nix/var/nix/daemon-socket:ro"
|
||||||
preBuildScript = pkgs.writeScript "setup-container" ''
|
];
|
||||||
mkdir -p -m 0755 /nix/var/log/nix/drvs
|
dockerDisableCache = true;
|
||||||
mkdir -p -m 0755 /nix/var/nix/gcroots
|
preBuildScript = pkgs.writeScript "setup-container" ''
|
||||||
mkdir -p -m 0755 /nix/var/nix/profiles
|
mkdir -p -m 0755 /nix/var/log/nix/drvs
|
||||||
mkdir -p -m 0755 /nix/var/nix/temproots
|
mkdir -p -m 0755 /nix/var/nix/gcroots
|
||||||
mkdir -p -m 0755 /nix/var/nix/userpool
|
mkdir -p -m 0755 /nix/var/nix/profiles
|
||||||
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
|
mkdir -p -m 0755 /nix/var/nix/temproots
|
||||||
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
|
mkdir -p -m 0755 /nix/var/nix/userpool
|
||||||
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
|
mkdir -p -m 1777 /nix/var/nix/gcroots/per-user
|
||||||
mkdir -p -m 0700 "$HOME/.nix-defexpr"
|
mkdir -p -m 1777 /nix/var/nix/profiles/per-user
|
||||||
|
mkdir -p -m 0755 /nix/var/nix/profiles/per-user/root
|
||||||
|
mkdir -p -m 0700 "$HOME/.nix-defexpr"
|
||||||
|
|
||||||
. ${pkgs.nix}/etc/profile.d/nix.sh
|
. ${pkgs.nix}/etc/profile.d/nix.sh
|
||||||
|
|
||||||
${pkgs.nix}/bin/nix-env -i ${concatStringsSep " " (with pkgs; [ nix cacert git openssh ])}
|
${pkgs.nix}/bin/nix-env -i ${
|
||||||
'';
|
concatStringsSep " " (
|
||||||
environmentVariables = {
|
with pkgs;
|
||||||
ENV = "/etc/profile";
|
[
|
||||||
USER = "root";
|
nix
|
||||||
NIX_REMOTE = "daemon";
|
cacert
|
||||||
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
|
git
|
||||||
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
|
openssh
|
||||||
|
]
|
||||||
|
)
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
environmentVariables = {
|
||||||
|
ENV = "/etc/profile";
|
||||||
|
USER = "root";
|
||||||
|
NIX_REMOTE = "daemon";
|
||||||
|
PATH = "/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:/bin:/sbin:/usr/bin:/usr/sbin";
|
||||||
|
NIX_SSL_CERT_FILE = "/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
tagList = [ "nix" ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,47 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
{ pkgs, lib, ... }:
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
{
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
services.xserver = {
|
||||||
{ config, pkgs, ... }: {
|
enable = true;
|
||||||
# Enable the X11 windowing system.
|
desktopManager.gnome = {
|
||||||
services.xserver.enable = true;
|
enable = true;
|
||||||
# Enable the GNOME Desktop Environment.
|
# Enable VRR (Variable Refresh Rate)
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
extraGSettingsOverridePackages = with pkgs; [ gnome.mutter ];
|
||||||
services.xserver.desktopManager.gnome.enable = true;
|
extraGSettingsOverrides = ''
|
||||||
|
[org.gnome.mutter]
|
||||||
|
experimental-features=['variable-refresh-rate', 'scale-monitor-framebuffer']
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
services.xserver.displayManager.autoLogin = {
|
# Workaround for https://github.com/NixOS/nixpkgs/issues/103746
|
||||||
|
systemd.services."getty@tty1".enable = false;
|
||||||
|
systemd.services."autovt@tty1".enable = false;
|
||||||
|
|
||||||
|
services.displayManager.autoLogin = {
|
||||||
enable = true;
|
enable = true;
|
||||||
user = "lelgenio";
|
user = "lelgenio";
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.xserver.displayManager.autologin.user = "lelgenio";
|
programs.kdeconnect = {
|
||||||
environment.systemPackages = with pkgs; with gnome; [
|
enable = true;
|
||||||
gnome-tweaks
|
package = pkgs.gnomeExtensions.gsconnect;
|
||||||
dconf-editor
|
};
|
||||||
|
|
||||||
chrome-gnome-shell
|
hardware.opentabletdriver.enable = lib.mkForce false;
|
||||||
gnomeExtensions.gsconnect
|
|
||||||
gnomeExtensions.quick-settings-audio-devices-hider
|
programs.gpaste.enable = true;
|
||||||
];
|
|
||||||
|
# services.xserver.displayManager.autologin.user = "lelgenio";
|
||||||
|
environment.systemPackages =
|
||||||
|
with pkgs;
|
||||||
|
with gnome;
|
||||||
|
[
|
||||||
|
gnome-tweaks
|
||||||
|
dconf-editor
|
||||||
|
|
||||||
|
chrome-gnome-shell
|
||||||
|
gnomeExtensions.quick-settings-audio-devices-hider
|
||||||
|
gnome-pass-search-provider
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,17 @@
|
||||||
{ lib, pkgs, config, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key accent font theme desktop;
|
inherit (config.my)
|
||||||
|
key
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
theme
|
||||||
|
desktop
|
||||||
|
;
|
||||||
|
|
||||||
cfg = config.login-manager.greetd;
|
cfg = config.login-manager.greetd;
|
||||||
in
|
in
|
||||||
|
|
@ -17,6 +28,7 @@ in
|
||||||
# enable sway window manager
|
# enable sway window manager
|
||||||
programs.sway = {
|
programs.sway = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.mySway;
|
||||||
wrapperFeatures.gtk = true;
|
wrapperFeatures.gtk = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -33,7 +45,6 @@ in
|
||||||
services.greetd =
|
services.greetd =
|
||||||
let
|
let
|
||||||
greetd_main_script = pkgs.writeShellScriptBin "main" ''
|
greetd_main_script = pkgs.writeShellScriptBin "main" ''
|
||||||
${pkgs.dbus-sway-environment}/bin/dbus-sway-environment
|
|
||||||
export XDG_CURRENT_DESKTOP=sway GTK_THEME="${theme.gtk_theme}" XCURSOR_THEME="${theme.cursor_theme}"
|
export XDG_CURRENT_DESKTOP=sway GTK_THEME="${theme.gtk_theme}" XCURSOR_THEME="${theme.cursor_theme}"
|
||||||
${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -c ${desktop}
|
${pkgs.greetd.gtkgreet}/bin/gtkgreet -l -c ${desktop}
|
||||||
swaymsg exit
|
swaymsg exit
|
||||||
|
|
@ -59,7 +70,7 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
initial_session = {
|
initial_session = {
|
||||||
command = "${pkgs.sway}/bin/sway";
|
command = desktop;
|
||||||
user = "lelgenio";
|
user = "lelgenio";
|
||||||
};
|
};
|
||||||
default_session = {
|
default_session = {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }:
|
||||||
|
{
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
# Enable the KDE Desktop Environment.
|
# Enable the KDE Desktop Environment.
|
||||||
|
|
|
||||||
13
system/locale.nix
Normal file
13
system/locale.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
time.timeZone = "America/Sao_Paulo";
|
||||||
|
environment.variables.TZ = config.time.timeZone;
|
||||||
|
i18n.defaultLocale = "pt_BR.utf8";
|
||||||
|
|
||||||
|
# Configure keymap in X11
|
||||||
|
services.xserver.xkb = {
|
||||||
|
layout = "us";
|
||||||
|
variant = "colemak";
|
||||||
|
};
|
||||||
|
console.keyMap = "colemak";
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,13 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
let cfg = config.packages.media-packages;
|
config,
|
||||||
in {
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.packages.media-packages;
|
||||||
|
in
|
||||||
|
{
|
||||||
options.packages.media-packages = {
|
options.packages.media-packages = {
|
||||||
enable = lib.mkEnableOption "media packages";
|
enable = lib.mkEnableOption "media packages";
|
||||||
};
|
};
|
||||||
|
|
@ -16,7 +23,8 @@ in {
|
||||||
gimp
|
gimp
|
||||||
inkscape
|
inkscape
|
||||||
krita
|
krita
|
||||||
kdenlive
|
kdePackages.breeze
|
||||||
|
kdePackages.kdenlive
|
||||||
pitivi
|
pitivi
|
||||||
blender-hip
|
blender-hip
|
||||||
libreoffice
|
libreoffice
|
||||||
|
|
|
||||||
20
system/monolith-forgejo-runner.nix
Normal file
20
system/monolith-forgejo-runner.nix
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
{ pkgs, config, ... }:
|
||||||
|
{
|
||||||
|
services.gitea-actions-runner = {
|
||||||
|
package = pkgs.forgejo-actions-runner;
|
||||||
|
instances.default = {
|
||||||
|
enable = true;
|
||||||
|
name = "monolith";
|
||||||
|
url = "https://git.lelgenio.com";
|
||||||
|
tokenFile = config.age.secrets.monolith-forgejo-runner-token.path;
|
||||||
|
labels = [
|
||||||
|
# provide a debian base with nodejs for actions
|
||||||
|
"debian-latest:docker://node:18-bullseye"
|
||||||
|
# fake the ubuntu name, because node provides no ubuntu builds
|
||||||
|
"ubuntu-latest:docker://node:18-bullseye"
|
||||||
|
# provide native execution on the host
|
||||||
|
#"native:host"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
||||||
in
|
in
|
||||||
|
|
@ -9,17 +14,6 @@ in
|
||||||
enable = true;
|
enable = true;
|
||||||
settings.concurrent = 4;
|
settings.concurrent = 4;
|
||||||
services = {
|
services = {
|
||||||
# ci_test = {
|
|
||||||
# registrationConfigFile = "/srv/gitlab-runner/env/ci_test";
|
|
||||||
# dockerImage = "debian";
|
|
||||||
# dockerPrivileged = true;
|
|
||||||
# };
|
|
||||||
thoreb_builder = {
|
|
||||||
registrationConfigFile = config.age.secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
|
||||||
dockerImage = "debian";
|
|
||||||
dockerPrivileged = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# runner for building in docker via host's nix-daemon
|
# runner for building in docker via host's nix-daemon
|
||||||
# nix store will be readable in runner, might be insecure
|
# nix store will be readable in runner, might be insecure
|
||||||
thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path;
|
thoreb-telemetria-nix = mkNixRunner config.age.secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.path;
|
||||||
|
|
|
||||||
15
system/mouse.nix
Normal file
15
system/mouse.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
{
|
||||||
|
# Allow configuring Logitech Peripherals
|
||||||
|
services.ratbagd.enable = true;
|
||||||
|
|
||||||
|
# Sway does not undersand high resolution scroll wheels
|
||||||
|
# I don't need this, so I disable it
|
||||||
|
environment.etc."libinput/local-overrides.quirks".text = ''
|
||||||
|
[Logitech G502 X PLUS]
|
||||||
|
MatchUdevType=mouse
|
||||||
|
MatchBus=usb
|
||||||
|
MatchVendor=0x046D
|
||||||
|
MatchProduct=0x4099
|
||||||
|
AttrEventCode=-REL_WHEEL_HI_RES
|
||||||
|
'';
|
||||||
|
}
|
||||||
30
system/network.nix
Normal file
30
system/network.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
# Configure network proxy if necessary
|
||||||
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
# Enable networking
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
# Open kde connect ports
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
logRefusedConnections = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
# services.printing.enable = true;
|
||||||
|
|
||||||
|
security.rtkit.enable = true;
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
ports = [ 9022 ];
|
||||||
|
settings = {
|
||||||
|
PermitRootLogin = "no";
|
||||||
|
PasswordAuthentication = false;
|
||||||
|
KbdInteractiveAuthentication = false;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, lib, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
services.nix-serve = {
|
services.nix-serve = {
|
||||||
enable = true;
|
enable = true;
|
||||||
secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path;
|
secretKeyFile = config.age.secrets.monolith-nix-serve-privkey.path;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,13 @@
|
||||||
{ lib, config, pkgs, inputs, ... }:
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
collectFlakeInputs = input:
|
collectFlakeInputs =
|
||||||
[ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
|
input: [ input ] ++ lib.concatMap collectFlakeInputs (builtins.attrValues (input.inputs or { }));
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
system.extraDependencies = collectFlakeInputs inputs.self;
|
system.extraDependencies = collectFlakeInputs inputs.self;
|
||||||
|
|
@ -11,18 +17,19 @@ in
|
||||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||||
gc = {
|
gc = {
|
||||||
automatic = true;
|
automatic = true;
|
||||||
dates = "daily";
|
dates = "weekly";
|
||||||
options = "--delete-older-than 3d";
|
options = "--delete-older-than 7d";
|
||||||
};
|
};
|
||||||
optimise.automatic = true;
|
optimise.automatic = true;
|
||||||
settings = {
|
settings = {
|
||||||
auto-optimise-store = true;
|
trusted-users = [
|
||||||
trusted-users = [ "root" "@wheel" ];
|
"root"
|
||||||
|
"@wheel"
|
||||||
|
];
|
||||||
substituters = [
|
substituters = [
|
||||||
"https://cache.nixos.org"
|
"https://cache.nixos.org"
|
||||||
"https://nix-community.cachix.org"
|
"https://nix-community.cachix.org"
|
||||||
# "http://nixcache.lelgenio.1337.cx:5000"
|
# "http://nixcache.lelgenio.1337.cx:5000"
|
||||||
"https://hyprland.cachix.org"
|
|
||||||
"https://lelgenio.cachix.org"
|
"https://lelgenio.cachix.org"
|
||||||
"https://wegank.cachix.org"
|
"https://wegank.cachix.org"
|
||||||
"https://snowflakeos.cachix.org/"
|
"https://snowflakeos.cachix.org/"
|
||||||
|
|
@ -31,7 +38,6 @@ in
|
||||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
# "nixcache.lelgenio.1337.cx:zxCfx7S658llDgAUG0JVyNrlAdFVvPniSdDOkvfTPS8="
|
# "nixcache.lelgenio.1337.cx:zxCfx7S658llDgAUG0JVyNrlAdFVvPniSdDOkvfTPS8="
|
||||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
|
||||||
"lelgenio.cachix.org-1:W8tMlmDFLU/V+6DlChXjekxoHZpjgVHZpmusC4cueBc="
|
"lelgenio.cachix.org-1:W8tMlmDFLU/V+6DlChXjekxoHZpjgVHZpmusC4cueBc="
|
||||||
"wegank.cachix.org-1:xHignps7GtkPP/gYK5LvA/6UFyz98+sgaxBSy7qK0Vs="
|
"wegank.cachix.org-1:xHignps7GtkPP/gYK5LvA/6UFyz98+sgaxBSy7qK0Vs="
|
||||||
"snowflakeos.cachix.org-1:gXb32BL86r9bw1kBiw9AJuIkqN49xBvPd1ZW8YlqO70="
|
"snowflakeos.cachix.org-1:gXb32BL86r9bw1kBiw9AJuIkqN49xBvPd1ZW8YlqO70="
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,9 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
inherit (pkgs.callPackage ./gitlab-runner.nix { }) mkNixRunner;
|
||||||
in
|
in
|
||||||
|
|
@ -15,7 +20,8 @@ in
|
||||||
# dockerPrivileged = true;
|
# dockerPrivileged = true;
|
||||||
# };
|
# };
|
||||||
thoreb_builder = {
|
thoreb_builder = {
|
||||||
registrationConfigFile = config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
registrationConfigFile =
|
||||||
|
config.age.secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.path;
|
||||||
dockerImage = "debian";
|
dockerImage = "debian";
|
||||||
dockerPrivileged = true;
|
dockerPrivileged = true;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,14 +1,13 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
age = {
|
age = {
|
||||||
identityPaths = [ "/root/.ssh/id_rsa" ];
|
identityPaths = [ "/root/.ssh/id_rsa" ];
|
||||||
secrets.lelgenio-cachix.file = ../secrets/lelgenio-cachix.age;
|
secrets.lelgenio-cachix.file = ../secrets/lelgenio-cachix.age;
|
||||||
secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
|
secrets.monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
||||||
../secrets/monolith-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file = ../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
|
||||||
secrets.gitlab-runner-thoreb-telemetria-registrationConfigFile.file =
|
secrets.monolith-forgejo-runner-token.file = ../secrets/monolith-forgejo-runner-token.age;
|
||||||
../secrets/gitlab-runner-thoreb-telemetria-registrationConfigFile.age;
|
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file = ../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
||||||
secrets.rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.file =
|
secrets.monolith-nix-serve-privkey.file = ../secrets/monolith-nix-serve-privkey.age;
|
||||||
../secrets/rainbow-gitlab-runner-thoreb-itinerario-registrationConfigFile.age;
|
secrets.phantom-forgejo-mailer-password.file = ../secrets/phantom-forgejo-mailer-password.age;
|
||||||
secrets.monolith-nix-serve-privkey.file =
|
|
||||||
../secrets/monolith-nix-serve-privkey.age;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
system/sound.nix
Normal file
12
system/sound.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
sound.enable = true;
|
||||||
|
hardware.pulseaudio.enable = false;
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
wireplumber.enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
alsa.enable = true;
|
||||||
|
jack.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -1,24 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
specialisation.dark-theme.configuration = {
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
uservars = prev.uservars;
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
specialisation.light-theme.configuration = {
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
(final: prev: {
|
|
||||||
uservars = prev.uservars // rec {
|
|
||||||
theme = prev.uservars.themes.light;
|
|
||||||
color = theme.color;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
};
|
|
||||||
environment.systemPackages = [
|
|
||||||
(pkgs.writeShellScriptBin "theme" ''
|
|
||||||
sudo "/nix/var/nix/profiles/system/specialisation/$1-theme/bin/switch-to-configuration" test
|
|
||||||
'')
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +1,38 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
programs.steam.enable = true;
|
programs.steam.enable = true;
|
||||||
programs.steam.package = pkgs.steam.override {
|
programs.steam.extraPackages =
|
||||||
extraLibraries = pkgs: with config.hardware.opengl;
|
config.fonts.packages
|
||||||
if pkgs.hostPlatform.is64bit
|
++ (with pkgs; [
|
||||||
then [ package ] ++ extraPackages
|
|
||||||
else [ package32 ] ++ extraPackages32;
|
|
||||||
|
|
||||||
extraPkgs = pkgs: with pkgs; [
|
|
||||||
capitaine-cursors
|
capitaine-cursors
|
||||||
bibata-cursors
|
bibata-cursors
|
||||||
mangohud
|
mangohud
|
||||||
xdg-user-dirs
|
xdg-user-dirs
|
||||||
];
|
gamescope
|
||||||
};
|
|
||||||
|
# gamescope compatibility??
|
||||||
|
xorg.libXcursor
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXinerama
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
libpng
|
||||||
|
libpulseaudio
|
||||||
|
libvorbis
|
||||||
|
stdenv.cc.cc.lib
|
||||||
|
libkrb5
|
||||||
|
keyutils
|
||||||
|
]);
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
protontricks
|
protontricks
|
||||||
bottles
|
bottles
|
||||||
];
|
];
|
||||||
|
|
||||||
|
programs.dzgui.enable = true;
|
||||||
|
programs.dzgui.package = inputs.dzgui-nix.packages.${pkgs.system}.default;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,10 @@
|
||||||
{ config, pkgs, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
programs.thunar = {
|
programs.thunar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins = with pkgs.xfce; [
|
plugins = with pkgs.xfce; [
|
||||||
|
|
@ -12,17 +18,15 @@
|
||||||
services.tumbler.enable = true;
|
services.tumbler.enable = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
(
|
(pkgs.writeTextFile {
|
||||||
pkgs.writeTextFile {
|
name = "thumbs";
|
||||||
name = "thumbs";
|
text = ''
|
||||||
text = ''
|
[Thumbnailer Entry]
|
||||||
[Thumbnailer Entry]
|
TryExec=unzip
|
||||||
TryExec=unzip
|
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
|
||||||
Exec=sh -c "${pkgs.unzip}/bin/unzip -p %i preview.png > %o"
|
MimeType=application/x-krita;
|
||||||
MimeType=application/x-krita;
|
'';
|
||||||
'';
|
destination = "/share/thumbnailers/kra.thumbnailer";
|
||||||
destination = "/share/thumbnailers/kra.thumbnailer";
|
})
|
||||||
}
|
|
||||||
)
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
30
system/users.nix
Normal file
30
system/users.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
security.sudo.wheelNeedsPassword = false;
|
||||||
|
|
||||||
|
# services.getty.autologinUser = "lelgenio";
|
||||||
|
programs.fish.enable = true;
|
||||||
|
|
||||||
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
|
users.mutableUsers = false;
|
||||||
|
users.users.lelgenio = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "Leonardo Eugênio";
|
||||||
|
hashedPassword = "$y$j9T$0e/rczjOVCy7PuwC3pG0V/$gTHZhfO4wQSlFvbDyfghbCnGI2uDI0a52zSrQ/yOA5A";
|
||||||
|
extraGroups = [
|
||||||
|
"networkmanager"
|
||||||
|
"wheel"
|
||||||
|
"docker"
|
||||||
|
"adbusers"
|
||||||
|
"bluetooth"
|
||||||
|
"corectrl"
|
||||||
|
"vboxusers"
|
||||||
|
"input"
|
||||||
|
];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
openssh.authorizedKeys.keys = [
|
||||||
|
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCxR/w+38b2lX90yNBqhq3mUmkn1WGu6GAPhN1tVp2ZjYRJNV/+5gWCnTtOWYtDx35HmK/spQ2Qy8X9ttkzORa24fysNx1Iqn/TiXhD7eIJjbGPnrOpIKTkW5/uB3SD/P5NBSa06//BaqJU4sBlG79hoXRpod052hQtdpTVDiMCIV+iboWPKqopmJJfWdBtVnHXs9rep0htPRExxGslImFk7Z6xjcaHyCpIQZPlOGf+sGsmUU7jRqzvZFV8ucIdbnAlMHrU4pepNFhuraESyZVTa/bi9sw0iozXp5Q5+5thMebEslmT1Z771kI4sieDy+O4r8c0Sx2/VY1UAzcpq1faggc3YB01MTh+tiEC6xdMvZLrQGL1NBWjHleMyL53GU5ERluC0vXJF3Hv3BGGBDfXWbrEm5n06DHr2apRVJGC0LwiQ7Woud1X4V4X1pKSusxCVMjT2lmcOwV6YhKhB2sowJc1OdMx4+tL0UWE+YKSZgBHfolwk6ml0F4EO9nnUHc= lelgenio@i15"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
users.users.root.initialHashedPassword = "$y$j9T$E3aBBSSq0Gma8hZD9L7ov0$iCGDW4fqrXWfHO0qodBYYgMFA9CpIraoklHcPbJJrM3";
|
||||||
|
}
|
||||||
2
update
2
update
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
nix flake update --verbose --print-build-logs
|
nix flake update --verbose --print-build-logs
|
||||||
./switch
|
exec ./switch "$@"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,16 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key theme accent font;
|
inherit (config.my)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
@ -10,7 +20,9 @@ in
|
||||||
settings = {
|
settings = {
|
||||||
font = {
|
font = {
|
||||||
size = font.size.small;
|
size = font.size.small;
|
||||||
normal = { family = font.mono; };
|
normal = {
|
||||||
|
family = font.mono;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
colors = {
|
colors = {
|
||||||
primary = {
|
primary = {
|
||||||
|
|
@ -31,8 +43,8 @@ in
|
||||||
cyan = "${color.normal.cyan}";
|
cyan = "${color.normal.cyan}";
|
||||||
white = "${color.normal.white}";
|
white = "${color.normal.white}";
|
||||||
};
|
};
|
||||||
|
draw_bold_text_with_bright_colors = false;
|
||||||
};
|
};
|
||||||
draw_bold_text_with_bright_colors = false;
|
|
||||||
window = {
|
window = {
|
||||||
opacity = theme.opacity / 100.0;
|
opacity = theme.opacity / 100.0;
|
||||||
dynamic_padding = true;
|
dynamic_padding = true;
|
||||||
|
|
@ -40,32 +52,35 @@ in
|
||||||
|
|
||||||
hints = {
|
hints = {
|
||||||
alphabet = key.hints;
|
alphabet = key.hints;
|
||||||
enabled = [{
|
enabled = [
|
||||||
regex =
|
{
|
||||||
let
|
regex =
|
||||||
mimes =
|
let
|
||||||
"(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
|
mimes = "(mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)";
|
||||||
# I fucking hate regex, look at this bullshit
|
# I fucking hate regex, look at this bullshit
|
||||||
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`'';
|
delimiters = ''^\\u0000-\\u001F\\u007F-\\u009F<>"\\s{-}\\^⟨⟩`'';
|
||||||
# Kakoune uses these characters to represent whitespace,
|
# Kakoune uses these characters to represent whitespace,
|
||||||
# but alacritty doesn't know about them
|
# but alacritty doesn't know about them
|
||||||
whitespace_characters = ''¬·→'';
|
whitespace_characters = ''¬·→'';
|
||||||
in
|
in
|
||||||
"${mimes}[${delimiters}${whitespace_characters}]+";
|
"${mimes}[${delimiters}${whitespace_characters}]+";
|
||||||
command = "xdg-open";
|
command = "xdg-open";
|
||||||
post_processing = true;
|
post_processing = true;
|
||||||
mouse = {
|
mouse = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
mods = "None";
|
mods = "None";
|
||||||
};
|
};
|
||||||
binding = {
|
binding = {
|
||||||
key = "U";
|
key = "U";
|
||||||
mods = "Control|Shift";
|
mods = "Control|Shift";
|
||||||
};
|
};
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
mouse = { hide_when_typing = true; };
|
mouse = {
|
||||||
key_bindings = [
|
hide_when_typing = true;
|
||||||
|
};
|
||||||
|
keyboard.bindings = [
|
||||||
{
|
{
|
||||||
key = lib.toUpper key.up;
|
key = lib.toUpper key.up;
|
||||||
mode = "Vi|~Search";
|
mode = "Vi|~Search";
|
||||||
|
|
@ -101,6 +116,12 @@ in
|
||||||
mode = "Vi|~Search";
|
mode = "Vi|~Search";
|
||||||
action = "SearchNext";
|
action = "SearchNext";
|
||||||
}
|
}
|
||||||
|
{
|
||||||
|
key = lib.toUpper key.next;
|
||||||
|
mods = "Shift";
|
||||||
|
mode = "Vi|~Search";
|
||||||
|
action = "SearchPrevious";
|
||||||
|
}
|
||||||
{
|
{
|
||||||
key = "Up";
|
key = "Up";
|
||||||
mods = "Control|Shift";
|
mods = "Control|Shift";
|
||||||
|
|
@ -141,7 +162,9 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
home.sessionVariables = { TERMINAL = "alacritty"; };
|
home.sessionVariables = {
|
||||||
|
TERMINAL = "alacritty";
|
||||||
|
};
|
||||||
|
|
||||||
# Look at this fucking bullshit:
|
# Look at this fucking bullshit:
|
||||||
# https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702
|
# https://gitlab.gnome.org/GNOME/glib/-/blob/20c4fcb2a7246a2b205649eae3ebda4296217afc/gio/gdesktopappinfo.c#L2702
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,17 @@
|
||||||
{ config, pkgs, lib, inputs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
let
|
let
|
||||||
inherit (pkgs.uservars) key theme accent font;
|
inherit (config.my)
|
||||||
|
key
|
||||||
|
theme
|
||||||
|
accent
|
||||||
|
font
|
||||||
|
;
|
||||||
inherit (theme) color;
|
inherit (theme) color;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,22 @@
|
||||||
{ config, pkgs, lib, inputs, ... }: {
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
wayland.windowManager.sway = {
|
wayland.windowManager.sway = {
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
exec thunderbird
|
exec thunderbird
|
||||||
exec webcord
|
exec vesktop
|
||||||
exec telegram-desktop
|
exec telegram-desktop
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
tdesktop
|
tdesktop
|
||||||
webcord
|
vesktop
|
||||||
thunderbird
|
thunderbird
|
||||||
element-desktop-wayland
|
element-desktop-wayland
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue