Modularize teams sops yazi
This commit is contained in:
parent
7730cbef59
commit
c73cb37278
75 changed files with 3023 additions and 3573 deletions
|
|
@ -42,3 +42,6 @@ For package lists, please check the individual modules, as the lists can be long
|
|||
- nextcloud : Handles synchronization via nextcloud cmd. (requires config.sops.secrets.nextcloud)
|
||||
- firefox: Enables and configures firefox (extensions and settings)
|
||||
- Hyprland: Installs and configures Hyprland with various additional packages
|
||||
- yazi: Installs yazi and sets custom keybinds
|
||||
- teams: For the poor souls that have to use this....
|
||||
- sops: Enables sops-nix
|
||||
|
|
|
|||
|
|
@ -1,20 +1,20 @@
|
|||
{ pkgs, config, lib, modulesPath, ... }:
|
||||
let
|
||||
username = config.conf.username;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
let username = config.conf.username;
|
||||
in {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
boot = {
|
||||
extraModulePackages =
|
||||
[ pkgs.linuxKernel.packages.linux_xanmod_latest.v4l2loopback ];
|
||||
kernelModules = [ "v4l2loopback" ];
|
||||
};
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 5;
|
||||
};
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.plymouth = {
|
||||
enable = true;
|
||||
};
|
||||
boot.plymouth = { enable = true; };
|
||||
|
||||
# Enable networking
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
|
|
@ -40,9 +40,7 @@ in
|
|||
options = "--delete-older-than 7d --delete-generations +5";
|
||||
};
|
||||
settings = {
|
||||
trusted-users = [
|
||||
username
|
||||
];
|
||||
trusted-users = [ username ];
|
||||
auto-optimise-store = true;
|
||||
|
||||
experimental-features = "nix-command flakes";
|
||||
|
|
@ -51,7 +49,8 @@ in
|
|||
|
||||
# Enable sound with pipewire.
|
||||
hardware.pulseaudio.enable = false;
|
||||
hardware.cpu.${config.conf.cpu}.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.${config.conf.cpu}.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
|
||||
services.fstrim.enable = lib.mkDefault true;
|
||||
security.rtkit.enable = true;
|
||||
|
|
@ -68,55 +67,48 @@ in
|
|||
};
|
||||
|
||||
boot.kernelPackages = config.conf.kernel;
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.kernelParams = [
|
||||
"resume=\"PARTLABEL=SWAP\""
|
||||
] ++ config.conf.boot_params;
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.kernelParams = [ ''resume="PARTLABEL=SWAP"'' ]
|
||||
++ config.conf.boot_params;
|
||||
|
||||
# allows user change later on
|
||||
users.mutableUsers = true;
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = username;
|
||||
extraGroups = [ "networkmanager" "wheel" "gamemode" "docker" "vboxusers" ];
|
||||
packages = with pkgs; [
|
||||
home-manager
|
||||
xdg-desktop-portal-gtk
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"gamemode"
|
||||
"docker"
|
||||
"vboxusers"
|
||||
"video"
|
||||
"audio"
|
||||
];
|
||||
packages = with pkgs; [ home-manager xdg-desktop-portal-gtk ];
|
||||
# this password will only last for the first login
|
||||
# e.g. login, then change to whatever else, this also ensures no public hash is available
|
||||
password = "firstlogin";
|
||||
};
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/ROOT";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"discard"
|
||||
];
|
||||
options = [ "noatime" "nodiratime" "discard" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-label/HOME";
|
||||
fsType = "btrfs";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"discard"
|
||||
];
|
||||
options = [ "noatime" "nodiratime" "discard" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[{ device = "/dev/disk/by-label/SWAP"; }];
|
||||
swapDevices = [{ device = "/dev/disk/by-label/SWAP"; }];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1 @@
|
|||
{
|
||||
imports = [
|
||||
./env.nix
|
||||
./xkb_layout.nix
|
||||
./common_hardware.nix
|
||||
];
|
||||
}
|
||||
{ imports = [ ./env.nix ./xkb_layout.nix ./common_hardware.nix ]; }
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{ pkgs, config, ... }: {
|
||||
environment.variables = {
|
||||
GSETTINGS_SCHEMA_DIR = "${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}";
|
||||
GSETTINGS_SCHEMA_DIR =
|
||||
"${pkgs.glib.getSchemaPath pkgs.gsettings-desktop-schemas}";
|
||||
NEOVIDE_MAXIMIZED = "0";
|
||||
GPG_TTY = "$(tty)";
|
||||
EDITOR = "neovide --no-fork";
|
||||
|
|
|
|||
|
|
@ -10,8 +10,7 @@ let
|
|||
key <AD07> { [ u, U, udiaeresis, Udiaeresis ] };
|
||||
};
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
environment.systemPackages = [ pkgs.xorg.xkbcomp ];
|
||||
services.xserver.xkb.extraLayouts.dashie = {
|
||||
description = "US layout with 'umlaut'";
|
||||
|
|
|
|||
108
flake.lock
generated
108
flake.lock
generated
|
|
@ -40,11 +40,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723920171,
|
||||
"narHash": "sha256-dVCMrAe+D/5S91erhwQj2DSzHOVzAanWqoy+vPWB9DY=",
|
||||
"lastModified": 1724273991,
|
||||
"narHash": "sha256-+aUSOXKGpS5CRm1oTitgNAr05ThQNbKIXalZHl3nC6Y=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "aquamarine",
|
||||
"rev": "71d49670fe246cdaff4860b0effba0ab9f163b72",
|
||||
"rev": "9a3161ad4c78dc420d1cbb3aae638222608c7de4",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -218,11 +218,11 @@
|
|||
"nixvim": "nixvim"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1724091718,
|
||||
"narHash": "sha256-v5gx+y+cVEk1e0QsVVVhoINd3L+y2UW9XRr7/6jjORo=",
|
||||
"lastModified": 1724498597,
|
||||
"narHash": "sha256-rq3CS7CpkC5lLn/eDqmftyA2C7McUm+sYGUMpH2oJU4=",
|
||||
"owner": "DashieTM",
|
||||
"repo": "DashVim",
|
||||
"rev": "b319fb44c1095a42c50ec1297f051ce6311c21fa",
|
||||
"rev": "02e646467e4454633a7d248dfda7a7a7ecb4bf6b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -656,6 +656,27 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_9": {
|
||||
"inputs": {
|
||||
"systems": [
|
||||
"stylix",
|
||||
"systems"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fromYaml": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
|
@ -790,11 +811,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723986931,
|
||||
"narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=",
|
||||
"lastModified": 1724435763,
|
||||
"narHash": "sha256-UNky3lJNGQtUEXT2OY8gMxejakSWPTfWKvpFkpFlAfM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671",
|
||||
"rev": "c2cd2a52e02f1dfa1c88f95abeb89298d46023be",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -884,11 +905,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723969407,
|
||||
"narHash": "sha256-COChiv/1EsfN0aVQcDBPXqNR/T5sUXtalsuO1RGvwcY=",
|
||||
"lastModified": 1724442134,
|
||||
"narHash": "sha256-RpA3GmcBvd6DLssIWfYKdDfiumLv8w4KIhDaI+//6ls=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "1006663b6eaa55149e9a21aa8a34e41c85eb08ca",
|
||||
"revCount": 5103,
|
||||
"rev": "688fe5c14781c63a1db23d4d02bf239283068ff6",
|
||||
"revCount": 5131,
|
||||
"submodules": true,
|
||||
"type": "git",
|
||||
"url": "https://github.com/hyprwm/Hyprland"
|
||||
|
|
@ -942,11 +963,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1721324361,
|
||||
"narHash": "sha256-BiJKO0IIdnSwHQBSrEJlKlFr753urkLE48wtt0UhNG4=",
|
||||
"lastModified": 1724174162,
|
||||
"narHash": "sha256-fOOBLwil6M9QWMCiSULwjMQzrXhHXUnEqmjHX5ZHeVI=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprlang",
|
||||
"rev": "adbefbf49664a6c2c8bf36b6487fd31e3eb68086",
|
||||
"rev": "16e5c9465f04477d8a3dd48a0a26bf437986336c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1368,11 +1389,11 @@
|
|||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1723637854,
|
||||
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
|
||||
"lastModified": 1724224976,
|
||||
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
|
||||
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1414,11 +1435,11 @@
|
|||
},
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1723637854,
|
||||
"narHash": "sha256-med8+5DSWa2UnOqtdICndjDAEjxr5D7zaIiK4pn0Q7c=",
|
||||
"lastModified": 1724224976,
|
||||
"narHash": "sha256-Z/ELQhrSd7bMzTO8r7NZgi9g5emh+aRKoCdaAv5fiO0=",
|
||||
"owner": "NixOs",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3aa7b8938b17aebd2deecf7be0636000d62a2b9",
|
||||
"rev": "c374d94f1536013ca8e92341b540eba4c22f9c62",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1488,11 +1509,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1723992327,
|
||||
"narHash": "sha256-w0DhauBqGC7zBlsm0i0IXVvhBGqBvsJPGnc5b9jffvA=",
|
||||
"lastModified": 1724486206,
|
||||
"narHash": "sha256-AktI2GKW4DnVwj3WS+mTmYjtL2qug8H46IN0Rtf4O+Q=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nur",
|
||||
"rev": "adee26fc0c486560152c814b963ae27851eef658",
|
||||
"rev": "8feee883ff50c836e711bb7e08f91b34f31feb84",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1844,11 +1865,11 @@
|
|||
},
|
||||
"stable": {
|
||||
"locked": {
|
||||
"lastModified": 1723688146,
|
||||
"narHash": "sha256-sqLwJcHYeWLOeP/XoLwAtYjr01TISlkOfz+NG82pbdg=",
|
||||
"lastModified": 1724316499,
|
||||
"narHash": "sha256-Qb9MhKBUTCfWg/wqqaxt89Xfi6qTD3XpTzQ9eXi3JmE=",
|
||||
"owner": "NixOs",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c3d4ac725177c030b1e289015989da2ad9d56af0",
|
||||
"rev": "797f7dc49e0bc7fab4b57c021cdf68f595e47841",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1868,16 +1889,18 @@
|
|||
"base16-tmux": "base16-tmux",
|
||||
"base16-vim": "base16-vim",
|
||||
"flake-compat": "flake-compat_2",
|
||||
"flake-utils": "flake-utils_9",
|
||||
"gnome-shell": "gnome-shell",
|
||||
"home-manager": "home-manager_3",
|
||||
"nixpkgs": "nixpkgs_22"
|
||||
"nixpkgs": "nixpkgs_22",
|
||||
"systems": "systems_11"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723834469,
|
||||
"narHash": "sha256-PkJTr9DWBQcR5Ru1fJpG80dtw0MLSxAZlKnhHHFAGIA=",
|
||||
"lastModified": 1724444244,
|
||||
"narHash": "sha256-fH1lyJvJjUhZ8xMlmiI18EZNzodDSe74rFuwlZDL0aQ=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "6858d08ed012bc6491cc92c13142104e56badf31",
|
||||
"rev": "d042af478ce87e188139480922a3085218194106",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1916,6 +1939,21 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_11": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
|
|
@ -2075,11 +2113,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722365976,
|
||||
"narHash": "sha256-Khdm+mDzYA//XaU0M+hftod+rKr5q9SSHSEuiQ0/9ow=",
|
||||
"lastModified": 1724073926,
|
||||
"narHash": "sha256-nWlUL43jOFHf+KW6Hqrx+W/r1XdXuDyb0wC/SrHsOu4=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "xdg-desktop-portal-hyprland",
|
||||
"rev": "7f2a77ddf60390248e2a3de2261d7102a13e5341",
|
||||
"rev": "a08ecbbf33598924e93542f737fc6169a26b481e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
28
flake.nix
28
flake.nix
|
|
@ -1,14 +1,11 @@
|
|||
{
|
||||
description = "Dashie dots";
|
||||
|
||||
inputs =
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable";
|
||||
stable.url = "github:NixOs/nixpkgs/nixos-24.05";
|
||||
|
||||
nix-flatpak = {
|
||||
url = "github:gmodena/nix-flatpak";
|
||||
};
|
||||
nix-flatpak = { url = "github:gmodena/nix-flatpak"; };
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
|
|
@ -26,7 +23,8 @@
|
|||
hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
|
||||
|
||||
ironbar = {
|
||||
url = "github:JakeStanger/ironbar?ref=3a1c60442382f970cdb7669814b6ef3594d9f048";
|
||||
url =
|
||||
"github:JakeStanger/ironbar?ref=3a1c60442382f970cdb7669814b6ef3594d9f048";
|
||||
};
|
||||
|
||||
stylix.url = "github:danth/stylix";
|
||||
|
|
@ -53,26 +51,24 @@
|
|||
let
|
||||
stable = import inputs.stable {
|
||||
system = "x86_64-linux";
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
config = { allowUnfree = true; };
|
||||
};
|
||||
pkgs = import inputs.nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [
|
||||
inputs.nur.overlay
|
||||
];
|
||||
overlays = [ inputs.nur.overlay ];
|
||||
config = {
|
||||
permittedInsecurePackages = [ "olm-3.2.16" ];
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
dashielib = import ./lib { inherit inputs pkgs; };
|
||||
in
|
||||
{
|
||||
nixosConfigurations = (dashielib.build_systems [ "marmo" "overheating" "spaceship" ]) // {
|
||||
in {
|
||||
nixosConfigurations =
|
||||
(dashielib.build_systems [ "marmo" "overheating" "spaceship" ]) // {
|
||||
server = inputs.stable.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs; pkgs = stable;
|
||||
inherit inputs;
|
||||
pkgs = stable;
|
||||
};
|
||||
modules = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
{ config, ... }: {
|
||||
imports = [
|
||||
../../modules
|
||||
];
|
||||
imports = [ ../../modules ];
|
||||
# variables for system
|
||||
conf = {
|
||||
monitor = "DP-1";
|
||||
|
|
@ -22,17 +20,13 @@
|
|||
amdgpu.enable = true;
|
||||
kde_connect.enable = true;
|
||||
xone.enable = true;
|
||||
greetd = {
|
||||
resolution = "3440x1440@180";
|
||||
};
|
||||
greetd = { resolution = "3440x1440@180"; };
|
||||
nextcloud = {
|
||||
synclist = [
|
||||
{
|
||||
synclist = [{
|
||||
name = "pw_sync";
|
||||
remote = "/PWs";
|
||||
local = "/home/${config.conf.username}/Music";
|
||||
}
|
||||
];
|
||||
}];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,14 @@
|
|||
{ config, ... }: {
|
||||
imports = [
|
||||
../../modules
|
||||
];
|
||||
imports = [ ../../modules ];
|
||||
conf = {
|
||||
monitor = "eDP-1";
|
||||
scale = "2.0";
|
||||
hostname = "overheating";
|
||||
boot_params = [ "rtc_cmos.use_acpi_alarm=1" ];
|
||||
ironbar.modules = [
|
||||
{ type = "upower"; class = "memory-usage"; }
|
||||
];
|
||||
ironbar.modules = [{
|
||||
type = "upower";
|
||||
class = "memory-usage";
|
||||
}];
|
||||
};
|
||||
mods = {
|
||||
stylix.colorscheme = "catppuccin-mocha";
|
||||
|
|
@ -27,9 +26,7 @@
|
|||
kde_connect.enable = true;
|
||||
bluetooth.enable = true;
|
||||
acpid.enable = true;
|
||||
greetd = {
|
||||
resolution = "3440x1440@180";
|
||||
};
|
||||
greetd = { resolution = "3440x1440@180"; };
|
||||
nextcloud = {
|
||||
synclist = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -12,9 +12,8 @@ let
|
|||
echo kernel/firmware/acpi/ssdt6.aml | bsdcpio -v -o -H newc -R 0:0 > $out/lenotrolli-ssdt.img
|
||||
'';
|
||||
};
|
||||
in
|
||||
|
||||
{
|
||||
in {
|
||||
boot.kernelParams = [ "mem_sleep_default=deep" ];
|
||||
boot.initrd.prepend = [ "${patched_ssdt}/lenotrolli-ssdt.img" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{ pkgs, ... }: {
|
||||
hardware.firmware = [
|
||||
(
|
||||
# lenovo is such a good manufacturer!!1!11!
|
||||
|
|
@ -12,7 +11,6 @@
|
|||
cp ${./firmware/TAS2XXX38BB.bin} $out/lib/firmware/TAS2XXX38BB.bin
|
||||
cp ${./firmware/TIAS2781RCA4.bin} $out/lib/firmware/TIAS2781RCA4.bin
|
||||
'';
|
||||
}
|
||||
)
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,5 @@
|
|||
{
|
||||
# special hardware modules
|
||||
# mostly to fix firmare and dsts
|
||||
imports =
|
||||
[
|
||||
./dsdt.nix
|
||||
./firmware.nix
|
||||
];
|
||||
imports = [ ./dsdt.nix ./firmware.nix ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,8 +16,7 @@ let
|
|||
add_header Access-Control-Allow-Origin *;
|
||||
return 200 '${builtins.toJSON data}';
|
||||
'';
|
||||
in
|
||||
{
|
||||
in {
|
||||
networking.hostName = "server";
|
||||
networking.domain = "dashie.org";
|
||||
imports = [
|
||||
|
|
@ -45,9 +44,7 @@ in
|
|||
pkgs.ntfs3g
|
||||
pkgs.rsync
|
||||
];
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
/home/dashie/server.pub
|
||||
];
|
||||
openssh.authorizedKeys.keyFiles = [ /home/dashie/server.pub ];
|
||||
};
|
||||
|
||||
services.openssh = {
|
||||
|
|
@ -68,28 +65,25 @@ in
|
|||
enable_registration_without_verification = true;
|
||||
suppress_key_server_warning = true;
|
||||
max_upload_size = "1G";
|
||||
listeners = [
|
||||
{
|
||||
listeners = [{
|
||||
port = 8008;
|
||||
bind_addresses = [ "::1" ];
|
||||
type = "http";
|
||||
tls = false;
|
||||
x_forwarded = true;
|
||||
resources = [
|
||||
{
|
||||
resources = [{
|
||||
names = [ "client" "federation" ];
|
||||
compress = true;
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
}];
|
||||
}];
|
||||
};
|
||||
services.mautrix-whatsapp-dashie.settings = {
|
||||
appservice = {
|
||||
id = "whatsapp";
|
||||
database = {
|
||||
type = "postgres";
|
||||
uri = "postgresql:///mautrix_whatsapp?host=/run/postgresql&sslmode=disable&user=mautrix_whatsapp&password=${mautrix_whatsapp_pw}";
|
||||
uri =
|
||||
"postgresql:///mautrix_whatsapp?host=/run/postgresql&sslmode=disable&user=mautrix_whatsapp&password=${mautrix_whatsapp_pw}";
|
||||
};
|
||||
};
|
||||
bridge = {
|
||||
|
|
@ -98,7 +92,8 @@ in
|
|||
default = true;
|
||||
required = true;
|
||||
};
|
||||
displayname_template = "{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}}";
|
||||
displayname_template =
|
||||
"{{if .BusinessName}}{{.BusinessName}}{{else if .PushName}}{{.PushName}}{{else}}{{.JID}}{{end}}";
|
||||
permissions = {
|
||||
"@fabio.lenherr:matrix.org" = "admin";
|
||||
"@dashie:matrix.dashie.org" = "admin";
|
||||
|
|
@ -110,7 +105,8 @@ in
|
|||
id = "signal";
|
||||
database = {
|
||||
type = "postgres";
|
||||
uri = "postgresql:///mautrix_signal?host=/run/postgresql&sslmode=disable&user=mautrix_signal&password=${mautrix_signal_pw}";
|
||||
uri =
|
||||
"postgresql:///mautrix_signal?host=/run/postgresql&sslmode=disable&user=mautrix_signal&password=${mautrix_signal_pw}";
|
||||
};
|
||||
};
|
||||
bridge = {
|
||||
|
|
@ -119,7 +115,8 @@ in
|
|||
default = true;
|
||||
required = true;
|
||||
};
|
||||
displayname_template = "{{or .ProfileName .PhoneNumber \"Unknown user\"}}";
|
||||
displayname_template =
|
||||
''{{or .ProfileName .PhoneNumber "Unknown user"}}'';
|
||||
permissions = {
|
||||
"@fabio.lenherr:matrix.org" = "admin";
|
||||
"@dashie:matrix.dashie.org" = "admin";
|
||||
|
|
@ -131,11 +128,13 @@ in
|
|||
id = "discord";
|
||||
database = {
|
||||
type = "postgres";
|
||||
uri = "postgresql:///mautrix_discord?host=/run/postgresql&sslmode=disable&user=mautrix_discord&password=${mautrix_discord_pw}";
|
||||
uri =
|
||||
"postgresql:///mautrix_discord?host=/run/postgresql&sslmode=disable&user=mautrix_discord&password=${mautrix_discord_pw}";
|
||||
};
|
||||
};
|
||||
bridge = {
|
||||
displayname_template = "{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}";
|
||||
displayname_template =
|
||||
"{{or .GlobalName .Username}}{{if .Bot}} (bot){{end}}";
|
||||
permissions = {
|
||||
"@fabio.lenherr:matrix.org" = "admin";
|
||||
"@dashie:matrix.dashie.org" = "admin";
|
||||
|
|
@ -154,7 +153,12 @@ in
|
|||
enableACME = true;
|
||||
root = "/var/www/dashie.org/";
|
||||
};
|
||||
security.acme.certs."dashie.org".extraDomainNames = [ "cloud.dashie.org" "matrix.dashie.org" "git.dashie.org" "navi.dashie.org" ];
|
||||
security.acme.certs."dashie.org".extraDomainNames = [
|
||||
"cloud.dashie.org"
|
||||
"matrix.dashie.org"
|
||||
"git.dashie.org"
|
||||
"navi.dashie.org"
|
||||
];
|
||||
services.nginx.virtualHosts."cloud.dashie.org" = {
|
||||
addSSL = true;
|
||||
enableACME = true;
|
||||
|
|
@ -172,12 +176,10 @@ in
|
|||
};
|
||||
|
||||
services.nginx.virtualHosts."localhost" = {
|
||||
listen = [
|
||||
{
|
||||
listen = [{
|
||||
addr = "0.0.0.0";
|
||||
port = 8448;
|
||||
}
|
||||
];
|
||||
}];
|
||||
locations."/".proxyPass = "http://[::1]:8008";
|
||||
};
|
||||
|
||||
|
|
@ -187,19 +189,17 @@ in
|
|||
locations."/".extraConfig = ''
|
||||
return 404;
|
||||
'';
|
||||
locations."/_matrix" = {
|
||||
proxyPass = "http://[::1]:8008";
|
||||
};
|
||||
locations."/_matrix" = { proxyPass = "http://[::1]:8008"; };
|
||||
locations."/_synapse/client".proxyPass = "http://[::1]:8008";
|
||||
|
||||
locations."= /.well-known/matrix/server".extraConfig = mkWellKnown serverConfig;
|
||||
locations."= /.well-known/matrix/server".extraConfig =
|
||||
mkWellKnown serverConfig;
|
||||
# This is usually needed for homeserver discovery (from e.g. other Matrix clients).
|
||||
# Further reference can be found in the upstream docs at
|
||||
# https://spec.matrix.org/latest/client-server-api/#getwell-knownmatrixclient
|
||||
locations."= /.well-known/matrix/client".extraConfig = mkWellKnown clientConfig;
|
||||
extraConfig =
|
||||
"client_max_body_size 2G;"
|
||||
;
|
||||
locations."= /.well-known/matrix/client".extraConfig =
|
||||
mkWellKnown clientConfig;
|
||||
extraConfig = "client_max_body_size 2G;";
|
||||
};
|
||||
|
||||
services.nextcloud.enable = true;
|
||||
|
|
@ -325,9 +325,7 @@ in
|
|||
system.stateVersion = "24.05";
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = "nix-command flakes";
|
||||
};
|
||||
settings = { experimental-features = "nix-command flakes"; };
|
||||
extraOptions = ''
|
||||
!include ${config.sops.secrets.access.path}
|
||||
'';
|
||||
|
|
|
|||
|
|
@ -1,47 +1,40 @@
|
|||
{ config, lib, modulesPath, ... }: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/678ecbd1-a5ce-4530-a959-ffb48f76aa43";
|
||||
fsType = "btrfs";
|
||||
};
|
||||
|
||||
fileSystems."/var/lib/nextcloud" =
|
||||
{
|
||||
fileSystems."/var/lib/nextcloud" = {
|
||||
device = "/dev/disk/by-label/nextcloud";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/dump3" =
|
||||
{
|
||||
fileSystems."/mnt/dump3" = {
|
||||
device = "/dev/disk/by-label/backup";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/dump1" =
|
||||
{
|
||||
fileSystems."/mnt/dump1" = {
|
||||
device = "/dev/disk/by-uuid/CC60532860531912";
|
||||
fsType = "ntfs-3g";
|
||||
options = [ "rw" "uid=1000" ];
|
||||
};
|
||||
|
||||
fileSystems."/mnt/dump2" =
|
||||
{
|
||||
fileSystems."/mnt/dump2" = {
|
||||
device = "/dev/disk/by-uuid/F46896AE68966EDC";
|
||||
fsType = "ntfs-3g";
|
||||
options = [ "rw" "uid=1000" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/B7BE-AB1C";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
|
|
@ -58,5 +51,6 @@
|
|||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.intel.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
# derived from mautrix signal on nixpkgs -> https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/servers/mautrix-signal/default.nix#L27
|
||||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.mautrix-discord-dashie;
|
||||
dataDir = "/var/lib/mautrix-discord";
|
||||
registrationFile = "${dataDir}/discord-registration.yaml";
|
||||
settingsFile = "${dataDir}/config.yaml";
|
||||
settingsFileUnsubstituted = settingsFormat.generate "mautrix-discord-config-unsubstituted.json" cfg.settings;
|
||||
settingsFileUnsubstituted =
|
||||
settingsFormat.generate "mautrix-discord-config-unsubstituted.json"
|
||||
cfg.settings;
|
||||
settingsFormat = pkgs.formats.json { };
|
||||
appservicePort = 29334;
|
||||
|
||||
|
|
@ -33,7 +31,8 @@ let
|
|||
};
|
||||
bridge = {
|
||||
username_template = "discord_{{.}}";
|
||||
displayname_template = "{{or .ProfileName .PhoneNumber \"Unknown user\"}}";
|
||||
displayname_template =
|
||||
''{{or .ProfileName .PhoneNumber "Unknown user"}}'';
|
||||
double_puppet_server_map = { };
|
||||
login_shared_secret_map = { };
|
||||
command_prefix = "!discord";
|
||||
|
|
@ -50,10 +49,10 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.mautrix-discord-dashie = {
|
||||
enable = lib.mkEnableOption "mautrix-discord, a Matrix-Discord puppeting bridge.";
|
||||
enable =
|
||||
lib.mkEnableOption "mautrix-discord, a Matrix-Discord puppeting bridge.";
|
||||
|
||||
settings = lib.mkOption {
|
||||
apply = lib.recursiveUpdate defaultConfig;
|
||||
|
|
@ -76,9 +75,7 @@ in
|
|||
ephemeral_events = false;
|
||||
};
|
||||
bridge = {
|
||||
history_sync = {
|
||||
request_full_sync = true;
|
||||
};
|
||||
history_sync = { request_full_sync = true; };
|
||||
private_chat_portal_meta = true;
|
||||
mute_bridging = true;
|
||||
encryption = {
|
||||
|
|
@ -86,12 +83,8 @@ in
|
|||
default = true;
|
||||
require = true;
|
||||
};
|
||||
provisioning = {
|
||||
shared_secret = "disable";
|
||||
};
|
||||
permissions = {
|
||||
"example.com" = "user";
|
||||
};
|
||||
provisioning = { shared_secret = "disable"; };
|
||||
permissions = { "example.com" = "user"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -112,8 +105,10 @@ in
|
|||
|
||||
serviceDependencies = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = (lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
|
||||
++ (lib.optional config.services.matrix-conduit.enable "conduit.service");
|
||||
default = (lib.optional config.services.matrix-synapse.enable
|
||||
config.services.matrix-synapse.serviceUnit)
|
||||
++ (lib.optional config.services.matrix-conduit.enable
|
||||
"conduit.service");
|
||||
defaultText = lib.literalExpression ''
|
||||
(optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
|
||||
++ (optional config.services.matrix-conduit.enable "conduit.service")
|
||||
|
|
@ -155,13 +150,14 @@ in
|
|||
};
|
||||
|
||||
# Note: this is defined here to avoid the docs depending on `config`
|
||||
services.mautrix-discord-dashie.settings.homeserver = optOneOf (with config.services; [
|
||||
(lib.mkIf matrix-synapse.enable (mkDefaults {
|
||||
domain = matrix-synapse.settings.server_name;
|
||||
}))
|
||||
services.mautrix-discord-dashie.settings.homeserver = optOneOf
|
||||
(with config.services; [
|
||||
(lib.mkIf matrix-synapse.enable
|
||||
(mkDefaults { domain = matrix-synapse.settings.server_name; }))
|
||||
(lib.mkIf matrix-conduit.enable (mkDefaults {
|
||||
domain = matrix-conduit.settings.global.server_name;
|
||||
address = "http://localhost:${toString matrix-conduit.settings.global.port}";
|
||||
address =
|
||||
"http://localhost:${toString matrix-conduit.settings.global.port}";
|
||||
}))
|
||||
]);
|
||||
|
||||
|
|
@ -241,7 +237,7 @@ in
|
|||
SystemCallErrorNumber = "EPERM";
|
||||
SystemCallFilter = [ "@system-service" ];
|
||||
Type = "simple";
|
||||
UMask = 0027;
|
||||
UMask = 27;
|
||||
};
|
||||
restartTriggers = [ settingsFileUnsubstituted ];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,15 +1,13 @@
|
|||
# derived from mautrix signal on nixpkgs -> https://github.com/NixOS/nixpkgs/blob/nixos-24.05/pkgs/servers/mautrix-signal/default.nix#L27
|
||||
{ lib
|
||||
, config
|
||||
, pkgs
|
||||
, ...
|
||||
}:
|
||||
{ lib, config, pkgs, ... }:
|
||||
let
|
||||
cfg = config.services.mautrix-whatsapp-dashie;
|
||||
dataDir = "/var/lib/mautrix-whatsapp";
|
||||
registrationFile = "${dataDir}/whatsapp-registration.yaml";
|
||||
settingsFile = "${dataDir}/config.yaml";
|
||||
settingsFileUnsubstituted = settingsFormat.generate "mautrix-whatsapp-config-unsubstituted.json" cfg.settings;
|
||||
settingsFileUnsubstituted =
|
||||
settingsFormat.generate "mautrix-whatsapp-config-unsubstituted.json"
|
||||
cfg.settings;
|
||||
settingsFormat = pkgs.formats.json { };
|
||||
appservicePort = 29318;
|
||||
|
||||
|
|
@ -33,7 +31,8 @@ let
|
|||
};
|
||||
bridge = {
|
||||
username_template = "whatsapp_{{.}}";
|
||||
displayname_template = "{{or .ProfileName .PhoneNumber \"Unknown user\"}}";
|
||||
displayname_template =
|
||||
''{{or .ProfileName .PhoneNumber "Unknown user"}}'';
|
||||
double_puppet_server_map = { };
|
||||
login_shared_secret_map = { };
|
||||
command_prefix = "!whatsapp";
|
||||
|
|
@ -50,10 +49,10 @@ let
|
|||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.services.mautrix-whatsapp-dashie = {
|
||||
enable = lib.mkEnableOption "mautrix-whatsapp, a Matrix-Whatsapp puppeting bridge.";
|
||||
enable = lib.mkEnableOption
|
||||
"mautrix-whatsapp, a Matrix-Whatsapp puppeting bridge.";
|
||||
|
||||
settings = lib.mkOption {
|
||||
apply = lib.recursiveUpdate defaultConfig;
|
||||
|
|
@ -76,9 +75,7 @@ in
|
|||
ephemeral_events = false;
|
||||
};
|
||||
bridge = {
|
||||
history_sync = {
|
||||
request_full_sync = true;
|
||||
};
|
||||
history_sync = { request_full_sync = true; };
|
||||
private_chat_portal_meta = true;
|
||||
mute_bridging = true;
|
||||
encryption = {
|
||||
|
|
@ -86,12 +83,8 @@ in
|
|||
default = true;
|
||||
require = true;
|
||||
};
|
||||
provisioning = {
|
||||
shared_secret = "disable";
|
||||
};
|
||||
permissions = {
|
||||
"example.com" = "user";
|
||||
};
|
||||
provisioning = { shared_secret = "disable"; };
|
||||
permissions = { "example.com" = "user"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
@ -112,8 +105,10 @@ in
|
|||
|
||||
serviceDependencies = lib.mkOption {
|
||||
type = with lib.types; listOf str;
|
||||
default = (lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
|
||||
++ (lib.optional config.services.matrix-conduit.enable "conduit.service");
|
||||
default = (lib.optional config.services.matrix-synapse.enable
|
||||
config.services.matrix-synapse.serviceUnit)
|
||||
++ (lib.optional config.services.matrix-conduit.enable
|
||||
"conduit.service");
|
||||
defaultText = lib.literalExpression ''
|
||||
(optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit)
|
||||
++ (optional config.services.matrix-conduit.enable "conduit.service")
|
||||
|
|
@ -155,13 +150,14 @@ in
|
|||
};
|
||||
|
||||
# Note: this is defined here to avoid the docs depending on `config`
|
||||
services.mautrix-whatsapp-dashie.settings.homeserver = optOneOf (with config.services; [
|
||||
(lib.mkIf matrix-synapse.enable (mkDefaults {
|
||||
domain = matrix-synapse.settings.server_name;
|
||||
}))
|
||||
services.mautrix-whatsapp-dashie.settings.homeserver = optOneOf
|
||||
(with config.services; [
|
||||
(lib.mkIf matrix-synapse.enable
|
||||
(mkDefaults { domain = matrix-synapse.settings.server_name; }))
|
||||
(lib.mkIf matrix-conduit.enable (mkDefaults {
|
||||
domain = matrix-conduit.settings.global.server_name;
|
||||
address = "http://localhost:${toString matrix-conduit.settings.global.port}";
|
||||
address =
|
||||
"http://localhost:${toString matrix-conduit.settings.global.port}";
|
||||
}))
|
||||
]);
|
||||
|
||||
|
|
@ -241,7 +237,7 @@ in
|
|||
SystemCallErrorNumber = "EPERM";
|
||||
SystemCallFilter = [ "@system-service" ];
|
||||
Type = "simple";
|
||||
UMask = 0027;
|
||||
UMask = 27;
|
||||
};
|
||||
restartTriggers = [ settingsFileUnsubstituted ];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
username = config.conf.username;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
../../modules
|
||||
];
|
||||
let username = config.conf.username;
|
||||
in {
|
||||
imports = [ ../../modules ];
|
||||
|
||||
# config variables
|
||||
conf = {
|
||||
|
|
@ -14,10 +10,10 @@ in
|
|||
hostname = "spaceship";
|
||||
};
|
||||
mods = {
|
||||
# f to pay respect
|
||||
teams.enable = true;
|
||||
coding = { jetbrains = true; };
|
||||
gaming = {
|
||||
enable = true;
|
||||
};
|
||||
gaming = { enable = true; };
|
||||
stylix.colorscheme = "catppuccin-mocha";
|
||||
hyprland = {
|
||||
monitor = [
|
||||
|
|
@ -63,21 +59,14 @@ in
|
|||
'';
|
||||
extra_autostart = [ "flatpak run com.core447.StreamController -b" ];
|
||||
};
|
||||
extraDrives = [
|
||||
{
|
||||
extraDrives = [{
|
||||
name = "drive2";
|
||||
drive =
|
||||
{
|
||||
drive = {
|
||||
device = "/dev/disk/by-label/DRIVE2";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"discard"
|
||||
];
|
||||
options = [ "noatime" "nodiratime" "discard" ];
|
||||
};
|
||||
}
|
||||
];
|
||||
}];
|
||||
virtualbox.enable = true;
|
||||
kde_connect.enable = true;
|
||||
xone.enable = true;
|
||||
|
|
@ -88,9 +77,7 @@ in
|
|||
enable = true;
|
||||
rocm.enable = true;
|
||||
};
|
||||
greetd = {
|
||||
resolution = "3440x1440@180";
|
||||
};
|
||||
greetd = { resolution = "3440x1440@180"; };
|
||||
nextcloud = {
|
||||
synclist = [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,37 +0,0 @@
|
|||
self: { lib
|
||||
, config
|
||||
, pkgs
|
||||
, options
|
||||
, ...
|
||||
}:
|
||||
let
|
||||
cfg = config.programs.dashvim;
|
||||
system = pkgs.stdenv.hostPlatform.system;
|
||||
# dashvim = (import ../lib { inherit system pkgs; inputs = self.inputs; config' = cfg; });
|
||||
in
|
||||
{
|
||||
imports = [ ../modules ];
|
||||
meta.maintainers = with lib.maintainers; [ DashieTM ];
|
||||
options.programs.dashnix = with lib; {
|
||||
enable = mkEnableOption "dashvim";
|
||||
|
||||
package = mkOption {
|
||||
type = with types; nullOr package;
|
||||
default = dashvim.build_dashvim;
|
||||
defaultText = literalExpression ''
|
||||
ReSet.packages.''${pkgs.stdenv.hostPlatform.system}.default
|
||||
'';
|
||||
description = mdDoc ''
|
||||
Package to run
|
||||
'';
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable
|
||||
(lib.optionalAttrs (options?home.packages)
|
||||
{
|
||||
home.packages = lib.optional (cfg.package != null) cfg.package;
|
||||
} //
|
||||
lib.optionalAttrs (options?environment.systemPackages) {
|
||||
environment.systemPackages = lib.optional (cfg.package != null) cfg.package;
|
||||
});
|
||||
}
|
||||
|
|
@ -1,24 +1,20 @@
|
|||
{ inputs, pkgs, ... }: {
|
||||
build_systems = systems: builtins.listToAttrs (map
|
||||
(name: {
|
||||
build_systems = systems:
|
||||
builtins.listToAttrs (map (name: {
|
||||
name = name;
|
||||
value =
|
||||
let
|
||||
mod = ../hardware/${name}/configuration.nix;
|
||||
in
|
||||
inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs pkgs mod;
|
||||
};
|
||||
value = let mod = ../hardware/${name}/configuration.nix;
|
||||
in inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs pkgs mod; };
|
||||
modules = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.stylix.nixosModules.stylix
|
||||
../base
|
||||
../programs
|
||||
mod
|
||||
] ++ inputs.nixpkgs.lib.optional (builtins.pathExists ../hardware/${name}/${name}.nix) ../hardware/${name}/${name}.nix
|
||||
] ++ inputs.nixpkgs.lib.optional
|
||||
(builtins.pathExists ../hardware/${name}/${name}.nix)
|
||||
../hardware/${name}/${name}.nix
|
||||
++ inputs.nixpkgs.lib.optional (builtins.pathExists mod) mod;
|
||||
};
|
||||
})
|
||||
systems);
|
||||
}) systems);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
system = lib.mkOption {
|
||||
default = "x86_64-linux";
|
||||
# no fisherprice unix support
|
||||
type = with lib.types; (enum [ "x86_64-linux" "aarch64-linux" "aarch64-linux-android" ]);
|
||||
type = with lib.types;
|
||||
(enum [ "x86_64-linux" "aarch64-linux" "aarch64-linux-android" ]);
|
||||
example = "aarch64-linux";
|
||||
description = ''
|
||||
System architecture.
|
||||
|
|
@ -42,9 +43,10 @@
|
|||
ironbar = {
|
||||
modules = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [
|
||||
{ type = "upower"; class = "memory-usage"; }
|
||||
];
|
||||
example = [{
|
||||
type = "upower";
|
||||
class = "memory-usage";
|
||||
}];
|
||||
type = with lib.types; listOf attrs;
|
||||
description = ''
|
||||
Adds modules to ironbar.
|
||||
|
|
@ -138,10 +140,10 @@
|
|||
};
|
||||
|
||||
config = {
|
||||
conf.kernel = lib.mkIf (config.mods.gaming.enable && config.mods.gaming.kernel) pkgs.linuxPackages_xanmod_latest;
|
||||
} // (lib.optionalAttrs (options?system.stateVersion)
|
||||
{
|
||||
conf.kernel =
|
||||
lib.mkIf (config.mods.gaming.enable && config.mods.gaming.kernel)
|
||||
pkgs.linuxPackages_xanmod_latest;
|
||||
} // (lib.optionalAttrs (options ? system.stateVersion) {
|
||||
system.stateVersion = "unstable";
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1 @@
|
|||
{
|
||||
imports = [
|
||||
./programs
|
||||
./conf.nix
|
||||
];
|
||||
}
|
||||
{ imports = [ ./programs ./conf.nix ]; }
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.acpid.enable (lib.optionalAttrs (options?virtualisation.virtualbox.host) {
|
||||
config = lib.mkIf config.mods.acpid.enable
|
||||
(lib.optionalAttrs (options ? virtualisation.virtualbox.host) {
|
||||
services.acpid.enable = true;
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,16 +21,11 @@
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
config =
|
||||
(lib.optionalAttrs (options?environment.systemPackages)
|
||||
{
|
||||
environment.systemPackages = config.mods.default_base_packages.additional_packages;
|
||||
config = (lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
environment.systemPackages =
|
||||
config.mods.default_base_packages.additional_packages;
|
||||
} // (lib.mkIf config.mods.default_base_packages.enable
|
||||
(
|
||||
lib.optionalAttrs
|
||||
(options?environment.systemPackages)
|
||||
{
|
||||
(lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
environment.systemPackages = with pkgs; [
|
||||
openssl
|
||||
dbus
|
||||
|
|
@ -62,9 +57,7 @@
|
|||
|
||||
gtk.iconCache.enable = false;
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
cantarell-fonts
|
||||
];
|
||||
fonts.packages = with pkgs; [ cantarell-fonts ];
|
||||
|
||||
virtualisation = {
|
||||
containers.enable = true;
|
||||
|
|
@ -77,9 +70,7 @@
|
|||
|
||||
services.upower.enable = true;
|
||||
services.dbus.enable = true;
|
||||
services.dbus.packages = with pkgs; [
|
||||
gnome2.GConf
|
||||
];
|
||||
services.dbus.packages = with pkgs; [ gnome2.GConf ];
|
||||
services.avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
|
|
@ -91,10 +82,7 @@
|
|||
${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source
|
||||
'';
|
||||
programs.nix-ld.enable = true;
|
||||
programs.nix-ld.libraries = with pkgs; [
|
||||
jdk
|
||||
zlib
|
||||
];
|
||||
programs.nix-ld.libraries = with pkgs; [ jdk zlib ];
|
||||
programs.direnv = {
|
||||
package = pkgs.direnv;
|
||||
silent = false;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.bluetooth.enable (lib.optionalAttrs (options?hardware.bluetooth) {
|
||||
config = lib.mkIf config.mods.bluetooth.enable
|
||||
(lib.optionalAttrs (options ? hardware.bluetooth) {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.coding.enable (lib.optionalAttrs (options?home.packages) {
|
||||
config = lib.mkIf config.mods.coding.enable
|
||||
(lib.optionalAttrs (options ? home.packages) {
|
||||
programs.dashvim = lib.mkIf config.mods.coding.dashvim {
|
||||
enable = true;
|
||||
colorscheme = config.mods.stylix.colorscheme;
|
||||
|
|
@ -81,16 +82,14 @@
|
|||
haskellPackages.haskell-language-server
|
||||
|
||||
#html
|
||||
html-tidy
|
||||
# html-tidy
|
||||
|
||||
#json
|
||||
jq
|
||||
nodePackages.vscode-json-languageserver
|
||||
|
||||
#css
|
||||
tailwindcss
|
||||
tailwindcss-language-server
|
||||
vscode-langservers-extracted
|
||||
|
||||
#editors
|
||||
neovide
|
||||
|
|
@ -137,6 +136,9 @@
|
|||
#zig
|
||||
zig
|
||||
zls
|
||||
|
||||
tmux
|
||||
tmate
|
||||
];
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,29 +1,32 @@
|
|||
{
|
||||
imports = [
|
||||
./virtualbox.nix
|
||||
./kde_connect.nix
|
||||
./gpu.nix
|
||||
./xone.nix
|
||||
./drives.nix
|
||||
./bluetooth.nix
|
||||
./acpid.nix
|
||||
./piper.nix
|
||||
./greetd.nix
|
||||
./gnome_services.nix
|
||||
./printing.nix
|
||||
./layout.nix
|
||||
./base_packages.nix
|
||||
./home_packages.nix
|
||||
./media.nix
|
||||
./bluetooth.nix
|
||||
./coding.nix
|
||||
./flatpak.nix
|
||||
./nextcloud.nix
|
||||
./starship.nix
|
||||
./git.nix
|
||||
./keepassxc.nix
|
||||
./gaming.nix
|
||||
./stylix.nix
|
||||
./drives.nix
|
||||
./firefox.nix
|
||||
./flatpak.nix
|
||||
./gaming.nix
|
||||
./git.nix
|
||||
./gnome_services.nix
|
||||
./gpu.nix
|
||||
./greetd.nix
|
||||
./home_packages.nix
|
||||
./hyprland
|
||||
./kde_connect.nix
|
||||
./keepassxc.nix
|
||||
./layout.nix
|
||||
./media.nix
|
||||
./nextcloud.nix
|
||||
./piper.nix
|
||||
./printing.nix
|
||||
./sops.nix
|
||||
./starship.nix
|
||||
./stylix.nix
|
||||
./teams.nix
|
||||
./virtualbox.nix
|
||||
./yazi
|
||||
./xone.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,35 +19,23 @@ let
|
|||
example = {
|
||||
device = "/dev/disk/by-label/DRIVE2";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"discard"
|
||||
];
|
||||
options = [ "noatime" "nodiratime" "discard" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
options.mods = {
|
||||
extraDrives =
|
||||
lib.mkOption {
|
||||
extraDrives = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [
|
||||
{
|
||||
example = [{
|
||||
name = "drive2";
|
||||
drive = {
|
||||
device = "/dev/disk/by-label/DRIVE2";
|
||||
fsType = "ext4";
|
||||
options = [
|
||||
"noatime"
|
||||
"nodiratime"
|
||||
"discard"
|
||||
];
|
||||
options = [ "noatime" "nodiratime" "discard" ];
|
||||
};
|
||||
}
|
||||
];
|
||||
}];
|
||||
# TODO: how to make this work
|
||||
# type = with lib.types; listOf (attrsOf driveModule);
|
||||
type = with lib.types; listOf (attrsOf anything);
|
||||
|
|
@ -58,12 +46,9 @@ in
|
|||
};
|
||||
|
||||
config = (lib.optionalAttrs (options ? fileSystems) {
|
||||
fileSystems = builtins.listToAttrs
|
||||
(map
|
||||
({ name, drive }: {
|
||||
fileSystems = builtins.listToAttrs (map ({ name, drive }: {
|
||||
name = "/" + name;
|
||||
value = drive;
|
||||
})
|
||||
config.mods.extraDrives);
|
||||
}) config.mods.extraDrives);
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -62,6 +62,13 @@
|
|||
enable = true;
|
||||
policies = config.mods.firefox.configuration;
|
||||
profiles.${config.conf.username} = {
|
||||
isDefault = true;
|
||||
id = 0;
|
||||
extensions = config.mods.firefox.extensions;
|
||||
};
|
||||
profiles."special" = {
|
||||
isDefault = false;
|
||||
id = 1;
|
||||
extensions = config.mods.firefox.extensions;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,8 +14,7 @@
|
|||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.flatpak.enable
|
||||
(lib.optionalAttrs (options?services.flatpak.remote)
|
||||
{
|
||||
(lib.optionalAttrs (options ? services.flatpak.remote) {
|
||||
services.flatpak.remotes = lib.mkOptionDefault [{
|
||||
name = "flathub-stable";
|
||||
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
|
||||
|
|
|
|||
|
|
@ -7,14 +7,7 @@
|
|||
description = "Enabled gaming related features.";
|
||||
};
|
||||
tools = lib.mkOption {
|
||||
default = with pkgs; [
|
||||
gamemode
|
||||
steam
|
||||
lutris
|
||||
wine
|
||||
adwsteamgtk
|
||||
heroic
|
||||
];
|
||||
default = with pkgs; [ gamemode steam lutris wine adwsteamgtk heroic ];
|
||||
example = [ ];
|
||||
type = with lib.types; listOf package;
|
||||
description = "Install gaming related packages";
|
||||
|
|
@ -41,7 +34,8 @@
|
|||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Whether to use GPU performance setting. NOTE: this is at your own risk!";
|
||||
description =
|
||||
"Whether to use GPU performance setting. NOTE: this is at your own risk!";
|
||||
};
|
||||
gpu_device = lib.mkOption {
|
||||
default = 0;
|
||||
|
|
@ -59,9 +53,7 @@
|
|||
programs.gamemode = {
|
||||
enableRenice = true;
|
||||
settings = {
|
||||
general = {
|
||||
governor = "performance";
|
||||
};
|
||||
general = { governor = "performance"; };
|
||||
gpu = lib.mkIf config.mods.gaming.gpu_optimization {
|
||||
apply_gpu_optimisations = "accept-responsibility";
|
||||
gpu_device = config.mods.gaming.gpu_device;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ lib, config, options, pkgs, ... }:
|
||||
{
|
||||
{ lib, config, options, pkgs, ... }: {
|
||||
options.mods.git = {
|
||||
username = lib.mkOption {
|
||||
default = "DashieTM";
|
||||
|
|
@ -16,13 +15,28 @@
|
|||
ssh_config = lib.mkOption {
|
||||
default = ''
|
||||
Host github.com
|
||||
${if (config.sops.secrets?hub.path) then "IdentityFile ${config.sops.secrets.hub.path}" else ""}
|
||||
${
|
||||
if (config.sops.secrets ? hub.path) then
|
||||
"IdentityFile ${config.sops.secrets.hub.path}"
|
||||
else
|
||||
""
|
||||
}
|
||||
Host gitlab.com
|
||||
${if (config.sops.secrets?lab.path) then "IdentityFile ${config.sops.secrets.lab.path}" else ""}
|
||||
${
|
||||
if (config.sops.secrets ? lab.path) then
|
||||
"IdentityFile ${config.sops.secrets.lab.path}"
|
||||
else
|
||||
""
|
||||
}
|
||||
Host dashie.org
|
||||
${if (config.sops.secrets?dashie.path) then "IdentityFile ${config.sops.secrets.dashie.path}" else ""}
|
||||
${
|
||||
if (config.sops.secrets ? dashie.path) then
|
||||
"IdentityFile ${config.sops.secrets.dashie.path}"
|
||||
else
|
||||
""
|
||||
}
|
||||
'';
|
||||
example = '''';
|
||||
example = "";
|
||||
type = lib.types.lines;
|
||||
description = "ssh configuration (keys for git)";
|
||||
};
|
||||
|
|
@ -33,12 +47,8 @@
|
|||
userName = config.mods.git.username;
|
||||
userEmail = config.mods.git.email;
|
||||
extraConfig = {
|
||||
merge = {
|
||||
tool = "nvimdiff";
|
||||
};
|
||||
diff = {
|
||||
tool = "nvimdiff";
|
||||
};
|
||||
merge = { tool = "nvimdiff"; };
|
||||
diff = { tool = "nvimdiff"; };
|
||||
};
|
||||
};
|
||||
home.file.".ssh/config".text = config.mods.git.ssh_config;
|
||||
|
|
|
|||
|
|
@ -11,24 +11,17 @@
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.mods.gnome_services.enable (lib.optionalAttrs (options?services.gnome.gnome-keyring)
|
||||
{
|
||||
config = lib.mkIf config.mods.gnome_services.enable
|
||||
(lib.optionalAttrs (options ? services.gnome.gnome-keyring) {
|
||||
programs.dconf.enable = true;
|
||||
services = {
|
||||
# needed for GNOME services outside of GNOME Desktop
|
||||
dbus.packages = with pkgs; [
|
||||
gcr
|
||||
gnome.gnome-settings-daemon
|
||||
];
|
||||
dbus.packages = with pkgs; [ gcr gnome.gnome-settings-daemon ];
|
||||
|
||||
gnome.gnome-keyring.enable = true;
|
||||
gvfs.enable = true;
|
||||
};
|
||||
} // lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
nautilus
|
||||
sushi
|
||||
nautilus-python
|
||||
];
|
||||
home.packages = with pkgs; [ nautilus sushi nautilus-python ];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,38 +38,28 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.mods.vapi.enable
|
||||
(lib.optionalAttrs
|
||||
(options?hardware.graphics)
|
||||
{
|
||||
(lib.optionalAttrs (options ? hardware.graphics) {
|
||||
boot = lib.mkIf config.mods.amdgpu.enable {
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
initrd.kernelModules = [ "amdgpu" ];
|
||||
kernelParams = [
|
||||
"amdgpu.ppfeaturemask=0xffffffff"
|
||||
];
|
||||
kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ];
|
||||
};
|
||||
|
||||
hardware = {
|
||||
graphics =
|
||||
let
|
||||
base_packages = [
|
||||
pkgs.libvdpau-va-gl
|
||||
pkgs.vaapiVdpau
|
||||
pkgs.mesa.drivers
|
||||
];
|
||||
rocm_packages = [
|
||||
pkgs.rocmPackages.clr.icd
|
||||
pkgs.rocm-opencl-runtime
|
||||
];
|
||||
in
|
||||
{
|
||||
graphics = let
|
||||
base_packages =
|
||||
[ pkgs.libvdpau-va-gl pkgs.vaapiVdpau pkgs.mesa.drivers ];
|
||||
rocm_packages =
|
||||
[ pkgs.rocmPackages.clr.icd pkgs.rocm-opencl-runtime ];
|
||||
in {
|
||||
enable = true;
|
||||
enable32Bit = lib.mkDefault true;
|
||||
extraPackages = base_packages ++
|
||||
(lib.lists.optionals config.mods.vapi.rocm.enable rocm_packages);
|
||||
extraPackages = base_packages
|
||||
++ (lib.lists.optionals config.mods.vapi.rocm.enable rocm_packages);
|
||||
};
|
||||
};
|
||||
} // lib.optionalAttrs (options?hardware.graphics) (lib.mkIf config.mods.nvidia.enable {
|
||||
} // lib.optionalAttrs (options ? hardware.graphics)
|
||||
(lib.mkIf config.mods.nvidia.enable {
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
# powerManagement.enable = false;
|
||||
|
|
|
|||
|
|
@ -38,25 +38,23 @@
|
|||
};
|
||||
};
|
||||
|
||||
config =
|
||||
let
|
||||
config = let
|
||||
username = config.conf.username;
|
||||
session = {
|
||||
command = "${lib.getExe inputs.hyprland.packages.${config.conf.system}.hyprland} --config /etc/greetd/hyprgreet.conf";
|
||||
command = "${
|
||||
lib.getExe inputs.hyprland.packages.${config.conf.system}.hyprland
|
||||
} --config /etc/greetd/hyprgreet.conf";
|
||||
user = username;
|
||||
};
|
||||
in
|
||||
lib.mkIf config.mods.greetd.enable
|
||||
in lib.mkIf config.mods.greetd.enable
|
||||
(lib.optionalAttrs (options ? environment) {
|
||||
services.xserver.displayManager.session = [
|
||||
{
|
||||
services.xserver.displayManager.session = [{
|
||||
manage = "desktop";
|
||||
name = "Hyprland";
|
||||
start = ''
|
||||
${lib.getExe pkgs.hyprland} & waitPID=$!
|
||||
'';
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
# greetd display manager
|
||||
programs.hyprland.enable = true;
|
||||
|
|
|
|||
|
|
@ -16,14 +16,10 @@
|
|||
'';
|
||||
};
|
||||
};
|
||||
config =
|
||||
let
|
||||
callPackage = lib.callPackageWith pkgs;
|
||||
in
|
||||
(lib.optionalAttrs (options?home.packages)
|
||||
{
|
||||
config = (lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = config.mods.home_packages.additional_packages;
|
||||
} // (lib.mkIf config.mods.home_packages.enable (lib.optionalAttrs (options?home.packages) {
|
||||
} // (lib.mkIf config.mods.home_packages.enable
|
||||
(lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
nheko
|
||||
nextcloud-client
|
||||
|
|
@ -60,14 +56,10 @@
|
|||
poppler_utils
|
||||
brave
|
||||
greetd.regreet
|
||||
sops
|
||||
flake-checker
|
||||
ffmpeg
|
||||
system-config-printer
|
||||
brightnessctl
|
||||
(callPackage
|
||||
../../override/cambalache.nix
|
||||
{ })
|
||||
];
|
||||
|
||||
#my own programs
|
||||
|
|
|
|||
|
|
@ -15,9 +15,7 @@
|
|||
};
|
||||
monitor = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [
|
||||
"DP-1,3440x1440@180,2560x0,1,vrr,0"
|
||||
];
|
||||
example = [ "DP-1,3440x1440@180,2560x0,1,vrr,0" ];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
The monitor configuration for hyprland.
|
||||
|
|
@ -25,9 +23,7 @@
|
|||
};
|
||||
workspace = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [
|
||||
"2,monitor:DP-1, default:true"
|
||||
];
|
||||
example = [ "2,monitor:DP-1, default:true" ];
|
||||
type = with lib.types; listOf str;
|
||||
description = ''
|
||||
The workspace configuration for hyprland.
|
||||
|
|
@ -62,8 +58,7 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.enable
|
||||
(lib.optionalAttrs (options?wayland.windowManager.hyprland)
|
||||
{
|
||||
(lib.optionalAttrs (options ? wayland.windowManager.hyprland) {
|
||||
# install Hyprland related packages
|
||||
home.packages = with pkgs; [
|
||||
xorg.xprop
|
||||
|
|
@ -79,25 +74,27 @@
|
|||
];
|
||||
|
||||
wayland.windowManager.hyprland.enable = true;
|
||||
wayland.windowManager.hyprland.settings = lib.mkIf config.mods.hyprland.use_default_config
|
||||
{
|
||||
wayland.windowManager.hyprland.settings =
|
||||
lib.mkIf config.mods.hyprland.use_default_config {
|
||||
"$mod" = "SUPER";
|
||||
"source" = "/home/${config.conf.username}/.config/reset/keyboard.conf";
|
||||
"source" =
|
||||
"/home/${config.conf.username}/.config/reset/keyboard.conf";
|
||||
|
||||
bindm = [
|
||||
"$mod, mouse:272, movewindow"
|
||||
"$mod, mouse:273, resizewindow"
|
||||
];
|
||||
bindm =
|
||||
[ "$mod, mouse:272, movewindow" "$mod, mouse:273, resizewindow" ];
|
||||
|
||||
bind = [
|
||||
# screenshots
|
||||
"$mod SUPER,S,exec,grim -g \"$(slurp)\" - | wl-copy"
|
||||
"$mod SUPERSHIFTALT,S,exec, grim -g \"$(slurp)\" $HOME/gits/ost-5semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy"
|
||||
"$mod SUPERSHIFT,S,exec,grim -g \"$(slurp)\" - | satty -f -"
|
||||
"$mod SUPERCONTROLSHIFT,S,exec,grim -c -g \"2560,0 3440x1440\" - | wl-copy"
|
||||
''$mod SUPER,S,exec,grim -g "$(slurp)" - | wl-copy''
|
||||
''
|
||||
$mod SUPERSHIFTALT,S,exec, grim -g "$(slurp)" $HOME/gits/ost-5semester/Screenshots/$(date +'%Y_%m_%d_%I_%M_%S.png') && (date +'%Y_%m_%d_%I_%M_%S.png') | wl-copy''
|
||||
''$mod SUPERSHIFT,S,exec,grim -g "$(slurp)" - | satty -f -''
|
||||
''
|
||||
$mod SUPERCONTROLSHIFT,S,exec,grim -c -g "2560,0 3440x1440" - | wl-copy''
|
||||
|
||||
# regular programs
|
||||
"$mod SUPER,F,exec,firefox"
|
||||
"$mod SUPERSHIFT,F,exec,firefox -p special"
|
||||
"$mod SUPER,T,exec,kitty -1"
|
||||
"$mod SUPER,E,exec,nautilus -w"
|
||||
"$mod SUPER,N,exec,neovide"
|
||||
|
|
@ -159,7 +156,6 @@
|
|||
"$mod SUPERSHIFT,9,movetoworkspace,9"
|
||||
"$mod SUPERSHIFT,0,movetoworkspace,10"
|
||||
|
||||
|
||||
# move to workspace silent
|
||||
"$mod SUPERSHIFTALT,1,movetoworkspacesilent,1"
|
||||
"$mod SUPERSHIFTALT,2,movetoworkspacesilent,2"
|
||||
|
|
@ -198,14 +194,13 @@
|
|||
general = {
|
||||
gaps_out = "3,5,5,5";
|
||||
border_size = 3;
|
||||
"col.active_border" = lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
|
||||
"col.active_border" =
|
||||
lib.mkForce "0xFFFF0000 0xFF00FF00 0xFF0000FF 45deg";
|
||||
# "col.inactive_border" = "0x66333333";
|
||||
allow_tearing = true;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 4;
|
||||
};
|
||||
decoration = { rounding = 4; };
|
||||
|
||||
animations = {
|
||||
bezier = "penguin,0.05,0.9,0.1,1.0";
|
||||
|
|
@ -254,16 +249,14 @@
|
|||
# no_break_fs_vrr = true;
|
||||
};
|
||||
|
||||
gestures = {
|
||||
workspace_swipe = true;
|
||||
};
|
||||
gestures = { workspace_swipe = true; };
|
||||
|
||||
monitor = config.mods.hyprland.monitor;
|
||||
workspace = config.mods.hyprland.workspace;
|
||||
|
||||
env = [
|
||||
"GTK_CSD,0"
|
||||
"TERM,\"kitty /bin/fish\""
|
||||
''TERM,"kitty /bin/fish"''
|
||||
"XDG_CURRENT_DESKTOP=Hyprland"
|
||||
"XDG_SESSION_TYPE=wayland"
|
||||
"XDG_SESSION_DESKTOP=Hyprland"
|
||||
|
|
@ -277,7 +270,7 @@
|
|||
"QT_AUTO_SCREEN_SCALE_FACTOR,0"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_SCALE_FACTOR,1"
|
||||
"EDITOR,\"neovide --novsync --nofork\""
|
||||
''EDITOR,"neovide --novsync --nofork"''
|
||||
"WLR_DRM_NO_ATOMIC,1"
|
||||
"GTK_USE_PORTAL, 1"
|
||||
];
|
||||
|
|
|
|||
|
|
@ -16,32 +16,26 @@
|
|||
programs.hyprlock = lib.mkIf config.mods.hyprland.hyprlock.enable {
|
||||
enable = true;
|
||||
settings = {
|
||||
background = [
|
||||
{
|
||||
background = [{
|
||||
monitor = "";
|
||||
path = "";
|
||||
color = "rgba(26, 27, 38, 1.0)";
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
input-field = [
|
||||
{
|
||||
input-field = [{
|
||||
monitor = "${config.conf.monitor}";
|
||||
|
||||
placeholder_text = "password or something";
|
||||
}
|
||||
];
|
||||
}];
|
||||
|
||||
label = [
|
||||
{
|
||||
label = [{
|
||||
monitor = "${config.conf.monitor}";
|
||||
text = "$TIME";
|
||||
font_size = 50;
|
||||
position = "0, 200";
|
||||
valign = "center";
|
||||
halign = "center";
|
||||
}
|
||||
];
|
||||
}];
|
||||
};
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
description = "Enables Hyprpaper";
|
||||
};
|
||||
config = lib.mkOption {
|
||||
default = '''';
|
||||
default = "";
|
||||
example = ''
|
||||
Hyprpaper config
|
||||
'';
|
||||
|
|
@ -21,10 +21,10 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.mods.hyprland.hyprpaper.enable
|
||||
(lib.optionalAttrs (options?xdg.configFile)
|
||||
{
|
||||
(lib.optionalAttrs (options ? xdg.configFile) {
|
||||
home.packages = with pkgs; [ hyprpaper ];
|
||||
xdg.configFile."hypr/hyprpaper.conf" = lib.mkIf config.mods.hyprland.hyprpaper.enable {
|
||||
xdg.configFile."hypr/hyprpaper.conf" =
|
||||
lib.mkIf config.mods.hyprland.hyprpaper.enable {
|
||||
text = config.mods.hyprland.hyprpaper.config;
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
{ lib, config, pkgs, options, ... }:
|
||||
let
|
||||
username = config.conf.username;
|
||||
in
|
||||
{
|
||||
let username = config.conf.username;
|
||||
in {
|
||||
options.mods = {
|
||||
hyprland.ironbar = {
|
||||
enable = lib.mkOption {
|
||||
|
|
@ -14,8 +12,7 @@
|
|||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.hyprland.ironbar.enable
|
||||
(lib.optionalAttrs (options?programs.ironbar)
|
||||
{
|
||||
(lib.optionalAttrs (options ? programs.ironbar) {
|
||||
|
||||
programs.ironbar = {
|
||||
enable = true;
|
||||
|
|
@ -161,25 +158,20 @@
|
|||
end = config.conf.ironbar.modules ++ [
|
||||
{
|
||||
type = "sys_info";
|
||||
format = [
|
||||
" {memory_percent}"
|
||||
];
|
||||
format = [ " {memory_percent}" ];
|
||||
interval.memory = 30;
|
||||
class = "memory-usage";
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
bar = [
|
||||
{
|
||||
bar = [{
|
||||
type = "button";
|
||||
class = "popup-button";
|
||||
label = "";
|
||||
on_click = "popup:toggle";
|
||||
}
|
||||
];
|
||||
}];
|
||||
class = "popup-button-box";
|
||||
popup = [
|
||||
{
|
||||
popup = [{
|
||||
type = "box";
|
||||
orientation = "vertical";
|
||||
class = "audio-box";
|
||||
|
|
@ -192,13 +184,15 @@
|
|||
type = "button";
|
||||
class = "audio-button";
|
||||
label = "";
|
||||
on_click = "!/home/${username}/.config/eww/scripts/audio_control.sh bluetooth";
|
||||
on_click =
|
||||
"!/home/${username}/.config/eww/scripts/audio_control.sh bluetooth";
|
||||
}
|
||||
{
|
||||
type = "button";
|
||||
class = "audio-button";
|
||||
label = "";
|
||||
on_click = "!/home/${username}/.config/eww/scripts/audio_control.sh internal";
|
||||
on_click =
|
||||
"!/home/${username}/.config/eww/scripts/audio_control.sh internal";
|
||||
}
|
||||
];
|
||||
class = "audio-button-box";
|
||||
|
|
@ -212,7 +206,8 @@
|
|||
class = "audio-slider";
|
||||
step = 1.0;
|
||||
length = 200;
|
||||
value = "pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
|
||||
value =
|
||||
"pactl get-sink-volume @DEFAULT_SINK@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
|
||||
on_change = "!pactl set-sink-volume @DEFAULT_SINK@ $0%";
|
||||
}
|
||||
{
|
||||
|
|
@ -224,23 +219,23 @@
|
|||
class = "audio-slider";
|
||||
step = 1.0;
|
||||
length = 200;
|
||||
value = "pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
|
||||
on_change = "!pactl set-source-volume @DEFAULT_SOURCE@ $0%";
|
||||
}
|
||||
];
|
||||
value =
|
||||
"pactl get-source-volume @DEFAULT_SOURCE@ | awk -F'/' '{ print $2 }' | tr -d ' %'";
|
||||
on_change =
|
||||
"!pactl set-source-volume @DEFAULT_SOURCE@ $0%";
|
||||
}
|
||||
];
|
||||
}];
|
||||
}
|
||||
{
|
||||
type = "custom";
|
||||
bar = [
|
||||
{
|
||||
bar = [{
|
||||
type = "button";
|
||||
class = "popup-button";
|
||||
label = "";
|
||||
on_click = "!oxidash --css /home/${username}/gits/oxidash/style.css";
|
||||
}
|
||||
];
|
||||
on_click =
|
||||
"!oxidash --css /home/${username}/gits/oxidash/style.css";
|
||||
}];
|
||||
class = "popup-button-box";
|
||||
}
|
||||
{
|
||||
|
|
@ -258,15 +253,13 @@
|
|||
type = "workspaces";
|
||||
all_monitors = true;
|
||||
}];
|
||||
center = [
|
||||
{
|
||||
center = [{
|
||||
type = "focused";
|
||||
show_icon = true;
|
||||
show_title = true;
|
||||
icon_size = 20;
|
||||
truncate = "end";
|
||||
}
|
||||
];
|
||||
}];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -12,19 +12,20 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.mods.kde_connect.enable
|
||||
(lib.optionalAttrs (options?networking.firewall)
|
||||
{
|
||||
(lib.optionalAttrs (options ? networking.firewall) {
|
||||
networking.firewall = {
|
||||
allowedTCPPortRanges = [
|
||||
{ from = 1714; to = 1764; } # KDE Connect
|
||||
allowedTCPPortRanges = [{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
];
|
||||
allowedUDPPortRanges = [
|
||||
{ from = 1714; to = 1764; } # KDE Connect
|
||||
allowedUDPPortRanges = [{
|
||||
from = 1714;
|
||||
to = 1764;
|
||||
} # KDE Connect
|
||||
];
|
||||
};
|
||||
} // lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
kdeconnect
|
||||
];
|
||||
home.packages = with pkgs; [ kdeconnect ];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@
|
|||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
|
||||
description =
|
||||
"Whether to overwrite the cache config of keepassxc. Note, this means that changes can't be applied via the program anymore!";
|
||||
};
|
||||
cache_config = lib.mkOption {
|
||||
default = ''
|
||||
|
|
@ -20,7 +21,7 @@
|
|||
LastOpenedDatabases=/home/dashie/Music/Passwords.kdbx
|
||||
LastKeyFiles=@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0\x42\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0M\0u\0s\0i\0\x63\0/\0P\0\x61\0s\0s\0w\0o\0r\0\x64\0s\0.\0k\0\x64\0\x62\0x\0\0\0\n\0\0\0\x42\0/\0h\0o\0m\0\x65\0/\0\x64\0\x61\0s\0h\0i\0\x65\0/\0M\0u\0s\0i\0\x63\0/\0l\0o\0g\0i\0n\0_\0k\0\x65\0y\0.\0k\0\x65\0y\0x)
|
||||
'';
|
||||
example = '''';
|
||||
example = "";
|
||||
type = lib.types.lines;
|
||||
description = "Cache config to be used.";
|
||||
};
|
||||
|
|
@ -29,8 +30,7 @@
|
|||
(lib.optionalAttrs (options ? home.file) {
|
||||
home.packages = [ pkgs.keepassxc ];
|
||||
xdg.configFile."keepassxc/keepassxc.ini" = {
|
||||
text =
|
||||
''
|
||||
text = ''
|
||||
[General]
|
||||
ConfigVersion=2
|
||||
|
||||
|
|
@ -53,7 +53,8 @@
|
|||
'';
|
||||
};
|
||||
|
||||
home.file.".cache/keepassxc/keepassxc.ini" = lib.mkIf config.mods.keepassxc.use_cache_config {
|
||||
home.file.".cache/keepassxc/keepassxc.ini" =
|
||||
lib.mkIf config.mods.keepassxc.use_cache_config {
|
||||
text = config.mods.keepassxc.cache_config;
|
||||
};
|
||||
});
|
||||
|
|
|
|||
|
|
@ -16,11 +16,10 @@
|
|||
'';
|
||||
};
|
||||
};
|
||||
config =
|
||||
(lib.optionalAttrs (options?home.packages)
|
||||
{
|
||||
config = (lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = config.mods.media_packages.additional_packages;
|
||||
} // (lib.mkIf config.mods.media_packages.enable (lib.optionalAttrs (options?home.packages) {
|
||||
} // (lib.mkIf config.mods.media_packages.enable
|
||||
(lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
# base audio
|
||||
pipewire
|
||||
|
|
@ -49,8 +48,6 @@
|
|||
yt-dlp
|
||||
];
|
||||
programs.obs-studio.enable = true;
|
||||
programs.obs-studio.plugins = with pkgs; [
|
||||
obs-studio-plugins.obs-vaapi
|
||||
];
|
||||
programs.obs-studio.plugins = with pkgs; [ obs-studio-plugins.obs-vaapi ];
|
||||
})));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,13 +21,11 @@
|
|||
};
|
||||
synclist = lib.mkOption {
|
||||
default = [ ];
|
||||
example = [
|
||||
{
|
||||
example = [{
|
||||
name = "sync globi folder";
|
||||
remote = "globi";
|
||||
local = "/home/globi";
|
||||
}
|
||||
];
|
||||
}];
|
||||
description = ''
|
||||
A list of folders to synchronize.
|
||||
This has to be an attribute list with the name, remote and local field (all strings).
|
||||
|
|
|
|||
|
|
@ -8,12 +8,9 @@
|
|||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.piper.enable
|
||||
(lib.optionalAttrs (options?services.ratbagd)
|
||||
{
|
||||
(lib.optionalAttrs (options ? services.ratbagd) {
|
||||
services.ratbagd.enable = true;
|
||||
} // lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [
|
||||
piper
|
||||
];
|
||||
home.packages = with pkgs; [ piper ];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.printing.enable
|
||||
(lib.optionalAttrs (options?services.printing)
|
||||
{
|
||||
(lib.optionalAttrs (options ? services.printing) {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
services.printing.browsing = true;
|
||||
|
|
|
|||
30
modules/programs/sops.nix
Normal file
30
modules/programs/sops.nix
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
{ lib, pkgs, config, options, ... }: {
|
||||
options.mods.sops = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enable sops secrets";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.sops.enable
|
||||
(lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = with pkgs; [ sops ];
|
||||
sops = {
|
||||
gnupg = {
|
||||
home = "~/.gnupg";
|
||||
sshKeyPaths = [ ];
|
||||
};
|
||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
secrets = {
|
||||
hub = { };
|
||||
lab = { };
|
||||
${config.conf.username} = { };
|
||||
nextcloud = { };
|
||||
access = { };
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
||||
});
|
||||
}
|
||||
|
|
@ -30,22 +30,24 @@
|
|||
};
|
||||
|
||||
# environment.systemPackages needed in order to configure systemwide
|
||||
config = lib.mkIf config.mods.starship.enable (lib.optionalAttrs (options?environment.systemPackages) {
|
||||
programs.starship =
|
||||
let
|
||||
config = lib.mkIf config.mods.starship.enable
|
||||
(lib.optionalAttrs (options ? environment.systemPackages) {
|
||||
programs.starship = let
|
||||
base16 = pkgs.callPackage inputs.base16.lib { };
|
||||
scheme = (base16.mkSchemeAttrs config.stylix.base16Scheme);
|
||||
code_format = "[](bg:prev_bg fg:#5256c3)[ $symbol ($version)](bg:#5256c3)";
|
||||
in
|
||||
{
|
||||
code_format =
|
||||
"[](bg:prev_bg fg:#5256c3)[ $symbol ($version)](bg:#5256c3)";
|
||||
in {
|
||||
enable = true;
|
||||
interactiveOnly = true;
|
||||
presets = lib.mkIf config.mods.starship.use_default_prompt [ "pastel-powerline" ];
|
||||
settings = lib.mkIf config.mods.starship.use_default_prompt
|
||||
{
|
||||
presets = lib.mkIf config.mods.starship.use_default_prompt
|
||||
[ "pastel-powerline" ];
|
||||
settings = lib.mkIf config.mods.starship.use_default_prompt {
|
||||
# derived from https://starship.rs/presets/pastel-powerline
|
||||
format = ''$username$directory$git_branch$git_status$git_metrics[ ](bg:none fg:prev_bg)'';
|
||||
right_format = ''$c$elixir$elm$golang$gradle$haskell$java$julia$nodejs$nim$rust$scala$python$ocaml$opa$perl$zig$dart$dotnet$nix_shell$shell$solidity[](bg:prev_bg fg:#3465A4)$time$os'';
|
||||
format =
|
||||
"$username$directory$git_branch$git_status$git_metrics[ ](bg:none fg:prev_bg)";
|
||||
right_format =
|
||||
"$c$elixir$elm$golang$gradle$haskell$java$julia$nodejs$nim$rust$scala$python$ocaml$opa$perl$zig$dart$dotnet$nix_shell$shell$solidity[](bg:prev_bg fg:#3465A4)$time$os";
|
||||
username = {
|
||||
show_always = false;
|
||||
style_user = "bg:#5277C3 fg:#${scheme.base05}";
|
||||
|
|
@ -68,7 +70,8 @@
|
|||
always_show_remote = true;
|
||||
symbol = "";
|
||||
style = "bg:#5256c3 fg:#${scheme.base05}";
|
||||
format = "[ ](bg:#5256c3 fg:prev_bg)[$symbol ($remote_name )$branch ]($style)";
|
||||
format =
|
||||
"[ ](bg:#5256c3 fg:prev_bg)[$symbol ($remote_name )$branch ]($style)";
|
||||
};
|
||||
git_status = {
|
||||
staged = "+\${count} (fg:#C4A000)";
|
||||
|
|
@ -86,7 +89,8 @@
|
|||
};
|
||||
git_metrics = {
|
||||
disabled = false;
|
||||
format = "([| ](bg:#5256c3)[+$added]($added_style bg:#5256c3)[ -$deleted]($deleted_style bg:#5256c3))";
|
||||
format =
|
||||
"([| ](bg:#5256c3)[+$added]($added_style bg:#5256c3)[ -$deleted]($deleted_style bg:#5256c3))";
|
||||
};
|
||||
c = { format = code_format; };
|
||||
elixir = { format = code_format; };
|
||||
|
|
@ -98,7 +102,10 @@
|
|||
julia = { format = code_format; };
|
||||
nodejs = { format = code_format; };
|
||||
nim = { format = code_format; };
|
||||
nix_shell = { symbol = ""; format = code_format; };
|
||||
nix_shell = {
|
||||
symbol = "";
|
||||
format = code_format;
|
||||
};
|
||||
rust = { format = code_format; };
|
||||
scala = { format = code_format; };
|
||||
typst = { format = code_format; };
|
||||
|
|
|
|||
|
|
@ -75,8 +75,10 @@
|
|||
size = 24;
|
||||
};
|
||||
|
||||
base16Scheme =
|
||||
(if builtins.isAttrs config.mods.stylix.colorscheme then config.mods.stylix.colorscheme else "${pkgs.base16-schemes}/share/themes/${config.mods.stylix.colorscheme}.yaml");
|
||||
base16Scheme = (if builtins.isAttrs config.mods.stylix.colorscheme then
|
||||
config.mods.stylix.colorscheme
|
||||
else
|
||||
"${pkgs.base16-schemes}/share/themes/${config.mods.stylix.colorscheme}.yaml");
|
||||
};
|
||||
});
|
||||
}
|
||||
|
|
|
|||
17
modules/programs/teams.nix
Normal file
17
modules/programs/teams.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ lib, config, options, pkgs, ... }:
|
||||
let callPackage = lib.callPackageWith pkgs;
|
||||
in {
|
||||
options.mods.teams = {
|
||||
enable = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
type = lib.types.bool;
|
||||
description =
|
||||
"Enables teams via a chromium pwa (for the poor souls that have to use this for work)";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.teams.enable
|
||||
(lib.optionalAttrs (options ? home.packages) {
|
||||
home.packages = [ (callPackage ../../override/teams.nix { }) ];
|
||||
});
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@
|
|||
};
|
||||
|
||||
config = lib.optionalAttrs (options ? virtualisation.virtualbox.host) {
|
||||
virtualisation.virtualbox.host.enable = lib.mkIf config.mods.virtualbox.enable true;
|
||||
virtualisation.virtualbox.host.enable =
|
||||
lib.mkIf config.mods.virtualbox.enable true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
config = lib.optionalAttrs (options?hardware) {
|
||||
hardware.xone.enable = true;
|
||||
};
|
||||
config =
|
||||
lib.optionalAttrs (options ? hardware) { hardware.xone.enable = true; };
|
||||
}
|
||||
|
|
|
|||
14
modules/programs/yazi/default.nix
Normal file
14
modules/programs/yazi/default.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ lib, config, options, ... }: {
|
||||
options.mods.yazi = {
|
||||
enable = lib.mkOption {
|
||||
default = true;
|
||||
example = false;
|
||||
type = lib.types.bool;
|
||||
description = "Enables yazi";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.mods.yazi.enable
|
||||
(lib.optionalAttrs (options ? home.packages) {
|
||||
programs.yazi = import ./yazi.nix;
|
||||
});
|
||||
}
|
||||
1139
modules/programs/yazi/yazi.nix
Normal file
1139
modules/programs/yazi/yazi.nix
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1,92 +0,0 @@
|
|||
{ stdenv
|
||||
, lib
|
||||
, pkgs
|
||||
, fetchFromGitLab
|
||||
, nix-update-script
|
||||
}:
|
||||
|
||||
pkgs.python3.pkgs.buildPythonApplication rec {
|
||||
pname = "cambalache";
|
||||
version = "0.90.1";
|
||||
|
||||
format = "other";
|
||||
|
||||
# Did not fetch submodule since it is only for tests we don't run.
|
||||
src = fetchFromGitLab {
|
||||
domain = "gitlab.gnome.org";
|
||||
owner = "jpu";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-YuRxqrGJvhMMZApD/tQSWkUg/nZnp/xryBJSjXCXO4w=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
gobject-introspection # for setup hook
|
||||
desktop-file-utils # for update-desktop-database
|
||||
shared-mime-info # for update-mime-database
|
||||
wrapGAppsHook
|
||||
];
|
||||
|
||||
pythonPath = with pkgs.python3.pkgs; [
|
||||
pygobject3
|
||||
lxml
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
glib
|
||||
gtk3
|
||||
gtk4
|
||||
gtksourceview4
|
||||
gtksourceview5
|
||||
webkitgtk_4_1
|
||||
webkitgtk_6_0
|
||||
# For extra widgets support.
|
||||
libadwaita
|
||||
libhandy
|
||||
];
|
||||
|
||||
# Prevent double wrapping.
|
||||
dontWrapGApps = true;
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs postinstall.py
|
||||
# those programs are used at runtime not build time
|
||||
# https://gitlab.gnome.org/jpu/cambalache/-/blob/0.12.1/meson.build#L79-80
|
||||
substituteInPlace ./meson.build \
|
||||
--replace "find_program('broadwayd', required: true)" "" \
|
||||
--replace "find_program('gtk4-broadwayd', required: true)" ""
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
# Let python wrapper use GNOME flags.
|
||||
makeWrapperArgs+=(
|
||||
# For broadway daemons
|
||||
--prefix PATH : "${lib.makeBinPath [ pkgs.gtk3 pkgs.gtk4 ]}"
|
||||
"''${gappsWrapperArgs[@]}"
|
||||
)
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
# Wrap a helper script in an unusual location.
|
||||
wrapPythonProgramsIn "$out/${pkgs.python3.sitePackages}/cambalache/priv/merengue" "$out $pythonPath"
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
updateScript = nix-update-script { };
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://gitlab.gnome.org/jpu/cambalache";
|
||||
description = "RAD tool for GTK 4 and 3 with data model first philosophy";
|
||||
mainProgram = "cambalache";
|
||||
maintainers = teams.gnome.members;
|
||||
license = with licenses; [
|
||||
lgpl21Only # Cambalache
|
||||
gpl2Only # tools
|
||||
];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
||||
28
override/teams.nix
Normal file
28
override/teams.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ stdenv, lib, copyDesktopItems, makeDesktopItem, chromium, ... }:
|
||||
stdenv.mkDerivation (final: {
|
||||
pname = "teams-pwa";
|
||||
name = final.pname;
|
||||
nativeBuildInputs = [ copyDesktopItems ];
|
||||
dontUnpack = true;
|
||||
|
||||
desktopItems = [
|
||||
(makeDesktopItem {
|
||||
name = final.pname;
|
||||
icon = final.pname;
|
||||
exec = "${chromium}/bin/${
|
||||
chromium.meta.mainProgram or chromium.pname
|
||||
} --app=https://teams.microsoft.com";
|
||||
desktopName = "Microsoft Teams PWA";
|
||||
genericName = "Progressive Web App for Microsoft Teams";
|
||||
categories = [ "Network" ];
|
||||
mimeTypes = [ "x-scheme-handler/msteams" ];
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Microsoft Teams PWA";
|
||||
homepage = "https://teams.microsoft.com";
|
||||
maintainers = with maintainers; [ ners ];
|
||||
platforms = chromium.meta.platforms;
|
||||
};
|
||||
})
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
username = config.conf.username;
|
||||
in
|
||||
{
|
||||
{ config, lib, options, ... }:
|
||||
let username = config.conf.username;
|
||||
in {
|
||||
manual = {
|
||||
html.enable = false;
|
||||
json.enable = false;
|
||||
|
|
@ -12,24 +10,22 @@ in
|
|||
fonts.fontconfig.enable = true;
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
home.stateVersion = "24.05";
|
||||
home = {
|
||||
username = username;
|
||||
homeDirectory = "/home/${username}";
|
||||
stateVersion = "24.05";
|
||||
|
||||
home.sessionPath = [
|
||||
"$HOME/.cargo/bin"
|
||||
];
|
||||
sessionPath = [ "$HOME/.cargo/bin" ];
|
||||
|
||||
home.sessionVariables = {
|
||||
GOROOT = "$HOME/.go";
|
||||
};
|
||||
sessionVariables = { GOROOT = "$HOME/.go"; };
|
||||
|
||||
home.keyboard = null;
|
||||
keyboard = null;
|
||||
|
||||
home.file.".local/share/flatpak/overrides/global".text = ''
|
||||
file.".local/share/flatpak/overrides/global".text = ''
|
||||
[Context]
|
||||
filesystems=xdg-config/gtk-3.0;xdg-config/gtk-4.0
|
||||
'';
|
||||
};
|
||||
|
||||
programs.nix-index = {
|
||||
enable = true;
|
||||
|
|
@ -37,23 +33,8 @@ in
|
|||
};
|
||||
|
||||
nix = {
|
||||
extraOptions = ''
|
||||
extraOptions = lib.mkIf (options ? config.sops.secrets.access.path) ''
|
||||
!include ${config.sops.secrets.access.path}
|
||||
'';
|
||||
};
|
||||
|
||||
sops = {
|
||||
gnupg = {
|
||||
home = "~/.gnupg";
|
||||
sshKeyPaths = [ ];
|
||||
};
|
||||
defaultSopsFile = ../secrets/secrets.yaml;
|
||||
secrets.hub = { };
|
||||
secrets.lab = { };
|
||||
secrets.${username} = { };
|
||||
secrets.nextcloud = { };
|
||||
secrets.access = { };
|
||||
};
|
||||
|
||||
systemd.user.services.mbsync.Unit.After = [ "sops-nix.service" ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -15,23 +15,20 @@ let
|
|||
inputs.sops-nix.homeManagerModules.sops
|
||||
inputs.dashvim.homeManagerModules.dashvim
|
||||
];
|
||||
in
|
||||
{
|
||||
xdg.portal.config.common.default = "*";
|
||||
xdg.portal = {
|
||||
in {
|
||||
xdg = {
|
||||
portal.config.common.default = "*";
|
||||
portal = {
|
||||
enable = true;
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
];
|
||||
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
||||
};
|
||||
home-manager.useGlobalPkgs = true;
|
||||
# home-manager.backupFileExtension = "backup";
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
};
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
|
||||
home-manager.users.${config.conf.username} = {
|
||||
users.${config.conf.username} = {
|
||||
imports = [
|
||||
./common.nix
|
||||
./xdg.nix
|
||||
|
|
@ -39,7 +36,7 @@ in
|
|||
./themes/default.nix
|
||||
./individual_configs/default.nix
|
||||
./sync.nix
|
||||
] ++ base_imports
|
||||
++ lib.optional (builtins.pathExists mod) mod;
|
||||
] ++ base_imports ++ lib.optional (builtins.pathExists mod) mod;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1 @@
|
|||
{
|
||||
imports = [
|
||||
./kitty.nix
|
||||
./yazi.nix
|
||||
./fish.nix
|
||||
./direnv.nix
|
||||
./neovide.nix
|
||||
];
|
||||
}
|
||||
{ imports = [ ./kitty.nix ./fish.nix ./direnv.nix ./neovide.nix ]; }
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
xdg.configFile."direnv/direnv.toml".source = (pkgs.formats.toml { }).generate "direnv" {
|
||||
global = {
|
||||
warn_timeout = "-1s";
|
||||
};
|
||||
xdg.configFile."direnv/direnv.toml".source =
|
||||
(pkgs.formats.toml { }).generate "direnv" {
|
||||
global = { warn_timeout = "-1s"; };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{ config, ... }: {
|
||||
xdg.configFile."fish/config.fish" = {
|
||||
text =
|
||||
''
|
||||
text = ''
|
||||
if status is-interactive
|
||||
# Commands to run in interactive sessions can go here
|
||||
end
|
||||
|
|
|
|||
|
|
@ -20,13 +20,14 @@ let
|
|||
"e" = "d";
|
||||
"f" = "e";
|
||||
};
|
||||
base = "#" + lib.strings.concatStrings ((lib.lists.take 5 (lib.strings.stringToCharacters scheme.base00)) ++ [ hexTable."${(lib.lists.last (lib.strings.stringToCharacters scheme.base00))}" ]);
|
||||
in
|
||||
{
|
||||
base = "#" + lib.strings.concatStrings
|
||||
((lib.lists.take 5 (lib.strings.stringToCharacters scheme.base00)) ++ [
|
||||
hexTable."${(lib.lists.last
|
||||
(lib.strings.stringToCharacters scheme.base00))}"
|
||||
]);
|
||||
in {
|
||||
|
||||
stylix.targets.kitty = {
|
||||
enable = false;
|
||||
};
|
||||
stylix.targets.kitty = { enable = false; };
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{ pkgs, ... }: {
|
||||
xdg.configFile."ncspot/config.toml".source = (pkgs.formats.toml { }).generate "ncspot" {
|
||||
xdg.configFile."ncspot/config.toml".source =
|
||||
(pkgs.formats.toml { }).generate "ncspot" {
|
||||
notify = true;
|
||||
shuffle = true;
|
||||
cover_max_scale = 2;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
{ pkgs, ... }: {
|
||||
xdg.configFile."neovide/config.toml".source = (pkgs.formats.toml { }).generate "neovide" { };
|
||||
xdg.configFile."neovide/config.toml".source =
|
||||
(pkgs.formats.toml { }).generate "neovide" { };
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -1,9 +1,2 @@
|
|||
{
|
||||
imports = [
|
||||
./oxipaste.nix
|
||||
./oxinoti.nix
|
||||
./oxishut.nix
|
||||
./oxidash.nix
|
||||
];
|
||||
}
|
||||
{ imports = [ ./oxipaste.nix ./oxinoti.nix ./oxishut.nix ./oxidash.nix ]; }
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
xdg.configFile."oxidash/style.css" = {
|
||||
text =
|
||||
''
|
||||
text = ''
|
||||
#MainWindow {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{ config, ... }: {
|
||||
xdg.configFile."oxinoti/style.css" = {
|
||||
text = /*css*/
|
||||
text = # css
|
||||
''
|
||||
@import url("/home/${config.conf.username}/.config/gtk-3.0/gtk.css");
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
xdg.configFile."oxipaste/style.css" = {
|
||||
text =
|
||||
''
|
||||
text = ''
|
||||
.main-window {
|
||||
padding: 10px;
|
||||
border-radius: 10px;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
xdg.configFile."oxishut/style.css" = {
|
||||
text =
|
||||
''
|
||||
text = ''
|
||||
#mainwindow {
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,16 +2,15 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
username = config.mods.nextcloud.username;
|
||||
password = if (config.sops.secrets?nextcloud.path) then config.sops.secrets.nextcloud.path else "";
|
||||
password = if (config.sops.secrets ? nextcloud.path) then
|
||||
config.sops.secrets.nextcloud.path
|
||||
else
|
||||
"";
|
||||
url = config.mods.nextcloud.url;
|
||||
synclist = config.mods.nextcloud.synclist;
|
||||
in
|
||||
lib.mkIf config.mods.nextcloud.enable {
|
||||
in lib.mkIf config.mods.nextcloud.enable {
|
||||
systemd.user = {
|
||||
services =
|
||||
(builtins.listToAttrs
|
||||
(map
|
||||
(opts: {
|
||||
services = (builtins.listToAttrs (map (opts: {
|
||||
name = "${opts.name}";
|
||||
value = {
|
||||
Unit = {
|
||||
|
|
@ -20,30 +19,25 @@ lib.mkIf config.mods.nextcloud.enable {
|
|||
};
|
||||
Service = {
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.bash}/bin/bash -c '${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${opts.remote} ${opts.local} https://${username}:$(bat ${password})@${url}'";
|
||||
ExecStart =
|
||||
"${pkgs.bash}/bin/bash -c '${pkgs.nextcloud-client}/bin/nextcloudcmd -h --path ${opts.remote} ${opts.local} https://${username}:$(bat ${password})@${url}'";
|
||||
TimeoutStopSec = "180";
|
||||
KillMode = "process";
|
||||
KillSignal = "SIGINT";
|
||||
};
|
||||
Install.WantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
})
|
||||
synclist
|
||||
));
|
||||
timers =
|
||||
(builtins.listToAttrs
|
||||
(map
|
||||
(opts: {
|
||||
}) synclist));
|
||||
timers = (builtins.listToAttrs (map (opts: {
|
||||
name = "${opts.name}";
|
||||
value = {
|
||||
Unit.Description = "Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes";
|
||||
Unit.Description =
|
||||
"Automatic sync files with Nextcloud when booted up after 1 minute then rerun every 60 minutes";
|
||||
Timer.OnBootSec = "1min";
|
||||
Timer.OnUnitActiveSec = "60min";
|
||||
Install.WantedBy = [ "multi-user.target" "timers.target" ];
|
||||
};
|
||||
})
|
||||
synclist
|
||||
));
|
||||
}) synclist));
|
||||
startServices = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,2 @@
|
|||
{
|
||||
imports = [
|
||||
./qt.nix
|
||||
];
|
||||
}
|
||||
{ imports = [ ./qt.nix ]; }
|
||||
|
||||
|
|
|
|||
|
|
@ -22,20 +22,12 @@ let
|
|||
border: none;
|
||||
}
|
||||
'';
|
||||
in
|
||||
{
|
||||
xdg.configFile."qt5ct/colors/tokyonight.conf" = {
|
||||
text = "${color}";
|
||||
};
|
||||
xdg.configFile."qt6ct/colors/tokyonight.conf" = {
|
||||
text = "${color}";
|
||||
};
|
||||
xdg.configFile."qt5ct/qss/tab.qss" = {
|
||||
text = "${qss}";
|
||||
};
|
||||
in {
|
||||
xdg.configFile."qt5ct/colors/tokyonight.conf" = { text = "${color}"; };
|
||||
xdg.configFile."qt6ct/colors/tokyonight.conf" = { text = "${color}"; };
|
||||
xdg.configFile."qt5ct/qss/tab.qss" = { text = "${qss}"; };
|
||||
xdg.configFile."qt5ct/qt5ct.conf" = {
|
||||
text =
|
||||
''
|
||||
text = ''
|
||||
[Appearance]
|
||||
color_scheme_path=/home/${username}/.config/qt5ct/colors/tokyonight.conf
|
||||
custom_palette=true
|
||||
|
|
@ -71,8 +63,7 @@ in
|
|||
'';
|
||||
};
|
||||
xdg.configFile."qt6ct/qt6ct.conf" = {
|
||||
text =
|
||||
''
|
||||
text = ''
|
||||
[Appearance]
|
||||
color_scheme_path=/home/${username}/.config/qt6ct/colors/toykonight.conf
|
||||
custom_palette=true
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
# Copyright (c) 2020-2021 Mihai Fufezan
|
||||
# credits to fufexan https://github.com/fufexan/dotfiles/blob/main/home/terminal/programs/xdg.nix
|
||||
{ config
|
||||
, ...
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
browser = [ "firefox" ];
|
||||
imageViewer = [ "imv" ];
|
||||
|
|
@ -10,26 +8,22 @@ let
|
|||
audioPlayer = [ "io.bassi.Amberol" ];
|
||||
|
||||
xdgAssociations = type: program: list:
|
||||
builtins.listToAttrs (map
|
||||
(e: {
|
||||
builtins.listToAttrs (map (e: {
|
||||
name = "${type}/${e}";
|
||||
value = program;
|
||||
})
|
||||
list);
|
||||
}) list);
|
||||
|
||||
image = xdgAssociations "image" imageViewer [ "png" "svg" "jpeg" "gif" ];
|
||||
video = xdgAssociations "video" videoPlayer [ "mp4" "avi" "mkv" ];
|
||||
audio = xdgAssociations "audio" audioPlayer [ "mp3" "flac" "wav" "aac" ];
|
||||
browserTypes =
|
||||
(xdgAssociations "application" browser [
|
||||
browserTypes = (xdgAssociations "application" browser [
|
||||
"json"
|
||||
"x-extension-htm"
|
||||
"x-extension-html"
|
||||
"x-extension-shtml"
|
||||
"x-extension-xht"
|
||||
"x-extension-xhtml"
|
||||
])
|
||||
// (xdgAssociations "x-scheme-handler" browser [
|
||||
]) // (xdgAssociations "x-scheme-handler" browser [
|
||||
"about"
|
||||
"ftp"
|
||||
"http"
|
||||
|
|
@ -44,13 +38,8 @@ let
|
|||
"text/plain" = [ "neovide" ];
|
||||
"x-scheme-handler/chrome" = [ "com.brave.browser" ];
|
||||
"inode/directory" = [ "yazi" ];
|
||||
}
|
||||
// image
|
||||
// video
|
||||
// audio
|
||||
// browserTypes);
|
||||
in
|
||||
{
|
||||
} // image // video // audio // browserTypes);
|
||||
in {
|
||||
xdg = {
|
||||
enable = true;
|
||||
cacheHome = config.home.homeDirectory + "/.local/cache";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue