Compare commits
1 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
eaba3a8978 |
131
flake.lock
131
flake.lock
|
|
@ -2,19 +2,15 @@
|
|||
"nodes": {
|
||||
"ags": {
|
||||
"inputs": {
|
||||
"astal": [
|
||||
"astal"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
"astal": "astal",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1764289441,
|
||||
"narHash": "sha256-ak+lgFiYE5PHByN1/BRkO5JP498hno6Ix24C1Qf/vec=",
|
||||
"lastModified": 1744557573,
|
||||
"narHash": "sha256-XAyj0iDuI51BytJ1PwN53uLpzTDdznPDQFG4RwihlTQ=",
|
||||
"owner": "aylur",
|
||||
"repo": "ags",
|
||||
"rev": "e169694390548dfd38ff40f1ef2163d6c3ffe3ea",
|
||||
"rev": "3ed9737bdbc8fc7a7c7ceef2165c9109f336bff6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -26,15 +22,16 @@
|
|||
"astal": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"ags",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1769774308,
|
||||
"narHash": "sha256-8Ve6VdUpcYbl8bS5oyDwVnnNobyPxdPmUHGgSDyOazQ=",
|
||||
"lastModified": 1742571008,
|
||||
"narHash": "sha256-5WgfJAeBpxiKbTR/gJvxrGYfqQRge5aUDcGKmU1YZ1Q=",
|
||||
"owner": "aylur",
|
||||
"repo": "astal",
|
||||
"rev": "eb235f8813bdea2a4a38ac228f2efc4e2a8a90af",
|
||||
"rev": "dc0e5d37abe9424c53dcbd2506a4886ffee6296e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -109,7 +106,7 @@
|
|||
"fzgo": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737991358,
|
||||
|
|
@ -132,11 +129,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773093840,
|
||||
"narHash": "sha256-u/96NoAyN8BSRuM3ZimGf7vyYgXa3pLx4MYWjokuoH4=",
|
||||
"lastModified": 1750304462,
|
||||
"narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "bb014746edb2a98d975abde4dd40fa240de4cf86",
|
||||
"rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -167,6 +164,22 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1743583204,
|
||||
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1722421184,
|
||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||
|
|
@ -182,33 +195,17 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1772963539,
|
||||
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1772963539,
|
||||
"narHash": "sha256-9jVDGZnvCckTGdYT53d/EfznygLskyLQXYwJLKMPsZs=",
|
||||
"owner": "nixos",
|
||||
"lastModified": 1750134718,
|
||||
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9dcb002ca1690658be4a04645215baea8b95f31d",
|
||||
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
|
|
@ -216,15 +213,15 @@
|
|||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1772542754,
|
||||
"narHash": "sha256-WGV2hy+VIeQsYXpsLjdr4GvHv5eECMISX1zKLTedhdg=",
|
||||
"owner": "NixOS",
|
||||
"lastModified": 1750134718,
|
||||
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8c809a146a140c5c8806f13399592dbcb1bb5dc4",
|
||||
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
|
|
@ -249,14 +246,15 @@
|
|||
"nur": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773125003,
|
||||
"narHash": "sha256-EF89LT3zxm8dM2pgoAohUcdQoTVVv1v02Jq+z6j8u+0=",
|
||||
"lastModified": 1750323839,
|
||||
"narHash": "sha256-r2Izw07xe5JEWLjQLI4Y3C/Sw2VNBGNmnZTVWtOyzlg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "eb59c1e77102b9f836cdea9f12568f191a9aff57",
|
||||
"rev": "7f1902da6a047ccffbbb809b98205d08cd5df509",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -268,47 +266,32 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"ags": "ags",
|
||||
"astal": "astal",
|
||||
"fzgo": "fzgo",
|
||||
"home-manager": "home-manager",
|
||||
"nixos-06cb-009a-fingerprint-sensor": "nixos-06cb-009a-fingerprint-sensor",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nur": "nur",
|
||||
"vicinae": "vicinae",
|
||||
"worktimer": "worktimer"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"vicinae": {
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"systems": "systems"
|
||||
"nixpkgs": [
|
||||
"nur",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1773099334,
|
||||
"narHash": "sha256-ciiNQFZ2m2JOEDDg9ZZxOuxykl4Aw/2C1EQsOcq+F+E=",
|
||||
"owner": "vicinaehq",
|
||||
"repo": "vicinae",
|
||||
"rev": "2a427670116461a4ce0207db2c089aee9f40428e",
|
||||
"lastModified": 1733222881,
|
||||
"narHash": "sha256-JIPcz1PrpXUCbaccEnrcUS8jjEb/1vJbZz5KkobyFdM=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "49717b5af6f80172275d47a418c9719a31a78b53",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "vicinaehq",
|
||||
"repo": "vicinae",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
|
|
|
|||
231
flake.nix
231
flake.nix
|
|
@ -1,148 +1,95 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nur.url = "github:nix-community/NUR";
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
vicinae.url = "github:vicinaehq/vicinae";
|
||||
worktimer = {
|
||||
type = "git";
|
||||
url = "https://git.thomasave.be/thomasave/WorkTimer";
|
||||
ref = "cli";
|
||||
};
|
||||
astal = {
|
||||
url = "github:aylur/astal";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
ags = {
|
||||
url = "github:aylur/ags";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.astal.follows = "astal";
|
||||
};
|
||||
nixos-06cb-009a-fingerprint-sensor = {
|
||||
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor?ref=24.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
nur,
|
||||
nixos-06cb-009a-fingerprint-sensor,
|
||||
...
|
||||
} @ inputs: let
|
||||
supportedSystems = ["x86_64-linux" "aarch64-linux"];
|
||||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
|
||||
system = builtins.currentSystem;
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
commonModules = host: user: [
|
||||
./hosts/${host}/hardware-configuration.nix
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
nur.overlays.default
|
||||
(self: super: {utillinux = super.util-linux;})
|
||||
];
|
||||
}
|
||||
{
|
||||
networking.hostName = host;
|
||||
time.timeZone = "Asia/Bangkok";
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
"https://vicinae.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
"vicinae.cachix.org-1:1kDrfienkGHPYbkpNj1mWTr7Fm1+zcenzgTizIcI3oc="
|
||||
];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
trusted-users = ["root" user];
|
||||
keep-outputs = true;
|
||||
keep-derivations = true;
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
users.users.${user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "video"]; # Enable ‘sudo’ for the user.
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByLwLAdJbmoDV5sx4hg5NbzKbOh1GmWEhDOUJ1GQBhK user@Riva"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOAhFTJI49o+eS1kHs5XRrpCLLuhAE+JUCffusudyR88 user@Arendia"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Arch"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOetfiPyIQ8hbU4t87E0ZrgLqFW9YW09+MNNiusXwW0C user@Asturia"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.${user} = {imports = [./home/${host}.nix];};
|
||||
backupFileExtension = "bak";
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nur.url = "github:nix-community/NUR";
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
ags.url = "github:aylur/ags";
|
||||
worktimer = {
|
||||
type = "git";
|
||||
url = "https://git.thomasave.be/thomasave/WorkTimer";
|
||||
ref = "cli";
|
||||
};
|
||||
nixos-06cb-009a-fingerprint-sensor = {
|
||||
url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor?ref=24.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
}
|
||||
./hosts/${host}
|
||||
];
|
||||
mkSystem = host: cfg: let
|
||||
system = cfg.system or "x86_64-linux";
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
modules =
|
||||
(commonModules host cfg.user)
|
||||
++ (cfg.modules or [])
|
||||
++ [
|
||||
{nixpkgs.hostPlatform = system;}
|
||||
];
|
||||
specialArgs = inputs;
|
||||
};
|
||||
systems = {
|
||||
Riva = {user = "user";};
|
||||
Kell = {user = "user";};
|
||||
Aloria = {user = "user";};
|
||||
Arendia = {
|
||||
user = "user";
|
||||
modules = [
|
||||
nixos-06cb-009a-fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
|
||||
];
|
||||
};
|
||||
};
|
||||
mkHome = architecture: modulePath:
|
||||
home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.${architecture};
|
||||
modules = [modulePath];
|
||||
extraSpecialArgs = {inherit inputs;};
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems;
|
||||
# Automatically injects the correct pkgs and modules for each host
|
||||
homeConfigurations = {
|
||||
"user@Pi" = mkHome "aarch64-linux" ./home/Pi.nix;
|
||||
"ubuntu@Arm" = mkHome "aarch64-linux" ./home/Arm.nix;
|
||||
"user@Tolnedra" = mkHome "x86_64-linux" ./home/Tolnedra.nix;
|
||||
"server@Vault" = mkHome "x86_64-linux" ./home/Vault.nix;
|
||||
"user@Docker" = mkHome "x86_64-linux" ./home/Docker.nix;
|
||||
"server@Mallorea" = mkHome "x86_64-linux" ./home/Mallorea.nix;
|
||||
};
|
||||
|
||||
# Generic formatter across architectures
|
||||
formatter = forAllSystems (
|
||||
system:
|
||||
nixpkgs.legacyPackages.${system}.alejandra
|
||||
);
|
||||
};
|
||||
outputs = { nixpkgs, home-manager, nur, nixos-06cb-009a-fingerprint-sensor, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
commonModules = host: user: [
|
||||
./hosts/${host}/hardware-configuration.nix
|
||||
{ nixpkgs.overlays = [
|
||||
nur.overlays.default
|
||||
(self: super: { utillinux = super.util-linux; })
|
||||
]; }
|
||||
{
|
||||
networking.hostName = host;
|
||||
time.timeZone = "Europe/Brussels";
|
||||
nix.settings = {
|
||||
substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
trusted-users = [ "root" user ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
users.users.${user} = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKAa3tMzSCRuprEACrBsKI0F/o73o6J9L1qR3TaZn/N8 user@Kell"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIByLwLAdJbmoDV5sx4hg5NbzKbOh1GmWEhDOUJ1GQBhK user@Riva"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBxMq4kubz4wWr4S8xU3GRkPcn6XRS3y7IP+qylN5QAp user@Aloria"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOAhFTJI49o+eS1kHs5XRrpCLLuhAE+JUCffusudyR88 user@Arendia"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHtzTFdvLEvXpv69qAWLTipl4hgsKgRrRrWJRecsFthG user@Arch"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOxtJRtlAphl8euicVUR/6C7o+tyhpYmcbMBLHnldEIX server@mallorea"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILazQU/Y9I5PkMZoG/Lzc6mDR7s+aRHzqJoFUhYSse4P PocoF1"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOetfiPyIQ8hbU4t87E0ZrgLqFW9YW09+MNNiusXwW0C user@Asturia"
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFoUYcVMsDw6tmjfdOuQkwaXx8fohKJs/6/5HoLzTP6x Tablet"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
system.stateVersion = "23.11";
|
||||
}
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.${user} = { imports = [ ./home/${host}.nix ]; };
|
||||
backupFileExtension = "bak";
|
||||
};
|
||||
}
|
||||
./hosts/${host}
|
||||
];
|
||||
mkSystem = host: cfg:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
system = cfg.system or "x86_64-linux";
|
||||
modules = (commonModules host cfg.user) ++ (cfg.modules or [ ]);
|
||||
specialArgs = inputs;
|
||||
};
|
||||
systems = {
|
||||
Riva = { user = "user"; };
|
||||
Kell = { user = "user"; };
|
||||
Aloria = { user = "user"; };
|
||||
Arendia = { user = "user"; modules = [
|
||||
nixos-06cb-009a-fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"
|
||||
];};
|
||||
Asturia = { user = "user"; };
|
||||
};
|
||||
in
|
||||
{ nixosConfigurations = nixpkgs.lib.mapAttrs mkSystem systems; };
|
||||
}
|
||||
|
|
|
|||
108
home/Aloria.nix
108
home/Aloria.nix
|
|
@ -1,60 +1,62 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/f/|home|user|Workspace"
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|user|Workspace"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Thomas"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/.dotfiles"
|
||||
imports = [
|
||||
(import ./utils/desktop.nix { inherit inputs config pkgs; })
|
||||
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/.dotfiles"
|
||||
"/Storage/TrackBox"
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Aloria/id_ed25519";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
jetbrains.pycharm-professional
|
||||
distrobox
|
||||
gnome-disk-utility
|
||||
moonlight-qt
|
||||
vscode
|
||||
texliveFull
|
||||
gnome-power-manager
|
||||
discord
|
||||
smile
|
||||
];
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
(import ./utils/desktop.nix {inherit inputs config pkgs;})
|
||||
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
|
||||
];
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Aloria/id_ed25519";
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
|
||||
"DP-1,${./hyprland/files/wallpaper.png}"
|
||||
"eDP-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
jetbrains.pycharm
|
||||
rclone
|
||||
opencode
|
||||
# zed-editor
|
||||
uv
|
||||
google-cloud-sdk
|
||||
awscli2
|
||||
distrobox
|
||||
gnome-disk-utility
|
||||
moonlight-qt
|
||||
vscode
|
||||
texliveFull
|
||||
gnome-power-manager
|
||||
discord
|
||||
smile
|
||||
podman-compose
|
||||
];
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"eDP-1,2880x1800@120.00Hz,0x0,1.2"
|
||||
"DP-1,3840x2160@60.00Hz,0x-2160,1"
|
||||
"HDMI-A-1,3840x2160@60.00Hz,0x-2160,1"
|
||||
];
|
||||
bind = [
|
||||
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
|
||||
./hyprland/files/rofi-power-menu.sh
|
||||
}"
|
||||
];
|
||||
general.gaps_out = 1;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"eDP-1,2880x1800@120.00Hz,480x0,1.2,vrr,1"
|
||||
"HDMI-A-1,3840x2160@60.00Hz,0x-2160,1"
|
||||
"DP-3,1920x1080,3840x-540,1"
|
||||
"DP-1,1920x1080,3840x-540,1"
|
||||
];
|
||||
bind = [
|
||||
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
|
||||
./hyprland/files/rofi-power-menu.sh
|
||||
}"
|
||||
];
|
||||
general.gaps_out = 1;
|
||||
};
|
||||
|
||||
programs.alacritty.settings.font.size = 13;
|
||||
programs.kitty.font.size = 13;
|
||||
programs.alacritty.settings.font.size = 16;
|
||||
programs.kitty.font.size = 15;
|
||||
}
|
||||
|
|
|
|||
113
home/Arendia.nix
113
home/Arendia.nix
|
|
@ -1,61 +1,60 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/.dotfiles"
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/.dotfiles"
|
||||
"/Storage/TrackBox/"
|
||||
];
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
(import ./utils/desktop.nix {inherit inputs config pkgs;})
|
||||
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
|
||||
];
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Arendia/id_ed25519";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
distrobox
|
||||
gnome-disk-utility
|
||||
moonlight-qt
|
||||
vscode
|
||||
texliveFull
|
||||
gnome-power-manager
|
||||
# jetbrains.pycharm-professional
|
||||
discord
|
||||
smile
|
||||
];
|
||||
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
|
||||
"eDP-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/f/|home|user|Workspace"
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|user|Workspace"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Thomas"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"eDP-1,2560x1440@60.01,0x0,1"
|
||||
"HDMI-A-1,1920x1080@60,0x-1080,1"
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import ./utils/desktop.nix { inherit inputs config pkgs; })
|
||||
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
|
||||
];
|
||||
bind = [
|
||||
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
|
||||
./hyprland/files/rofi-power-menu.sh
|
||||
}"
|
||||
];
|
||||
general.gaps_out = 1;
|
||||
};
|
||||
|
||||
programs.alacritty.settings.font.size = 13;
|
||||
programs.kitty.font.size = 15;
|
||||
programs.foot.settings.main.font = pkgs.lib.mkForce "DejaVu Sans Mono:size=15";
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Arendia/id_ed25519";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
distrobox
|
||||
gnome-disk-utility
|
||||
moonlight-qt
|
||||
vscode
|
||||
texliveFull
|
||||
gnome-power-manager
|
||||
jetbrains.pycharm-professional
|
||||
discord
|
||||
smile
|
||||
];
|
||||
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
|
||||
"eDP-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"eDP-1,2560x1440@60.01,0x0,1"
|
||||
"HDMI-A-1,1920x1080@60,0x-1080,1"
|
||||
];
|
||||
bind = [
|
||||
", XF86PowerOff, exec, ${pkgs.rofi}/bin/rofi -show power-menu -modi power-menu:${
|
||||
./hyprland/files/rofi-power-menu.sh
|
||||
}"
|
||||
];
|
||||
general.gaps_out = 1;
|
||||
};
|
||||
|
||||
programs.alacritty.settings.font.size = 13;
|
||||
programs.kitty.font.size = 15;
|
||||
}
|
||||
|
|
|
|||
53
home/Arm.nix
53
home/Arm.nix
|
|
@ -1,33 +1,30 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
home.username = "ubuntu";
|
||||
home.homeDirectory = "/home/ubuntu";
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings.use-xdg-base-directories = true;
|
||||
};
|
||||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
in
|
||||
{
|
||||
home.username = "ubuntu";
|
||||
home.homeDirectory = "/home/ubuntu";
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings.use-xdg-base-directories = true;
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.enable = true;
|
||||
|
||||
imports = [
|
||||
(import ./utils/common.nix {inherit inputs config pkgs;})
|
||||
./ssh
|
||||
];
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/ubuntu/.secrets/SSH/Arm/id_ed25519";
|
||||
imports = [
|
||||
(import ./utils/common.nix { inherit inputs config pkgs; })
|
||||
./ssh
|
||||
];
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/ubuntu/.secrets/SSH/Arm/id_ed25519";
|
||||
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/ubuntu/$(id -u)";
|
||||
};
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/ubuntu/$(id -u)";
|
||||
};
|
||||
|
||||
programs.zsh.initContent = pkgs.lib.mkAfter ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
'';
|
||||
programs.zsh.initContent = pkgs.lib.mkAfter ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,40 +1,37 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import ./utils/desktop.nix {inherit inputs config pkgs;})
|
||||
];
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Asturia/id_ed25519";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
distrobox
|
||||
wl-clipboard
|
||||
jq
|
||||
evince
|
||||
];
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mainMod" = pkgs.lib.mkForce "ALT_L";
|
||||
"$altMod" = pkgs.lib.mkForce "SUPER";
|
||||
monitor = [
|
||||
"Virtual-1,1920x1080@60,0x0,1"
|
||||
"DP-1,1920x1080@60,0x0,1"
|
||||
"HDMI-A-1,1920x1080@60,0x0,1"
|
||||
imports = [
|
||||
(import ./utils/desktop.nix { inherit inputs config pkgs; })
|
||||
];
|
||||
general.gaps_out = 1;
|
||||
};
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"Virtual-1,${./hyprland/files/wallpaper.png}"
|
||||
"DP-1,${./hyprland/files/wallpaper.png}"
|
||||
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Asturia/id_ed25519";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
distrobox
|
||||
wl-clipboard
|
||||
jq
|
||||
evince
|
||||
];
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
"$mainMod" = pkgs.lib.mkForce "ALT_L";
|
||||
"$altMod" = pkgs.lib.mkForce "SUPER";
|
||||
monitor = [
|
||||
"Virtual-1,1920x1080@60,0x0,1"
|
||||
"DP-1,1920x1080@60,0x0,1"
|
||||
"HDMI-A-1,1920x1080@60,0x0,1"
|
||||
];
|
||||
general.gaps_out = 1;
|
||||
};
|
||||
};
|
||||
programs.alacritty.settings.font.size = 12;
|
||||
programs.kitty.font.size = 12;
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"Virtual-1,${./hyprland/files/wallpaper.png}"
|
||||
"DP-1,${./hyprland/files/wallpaper.png}"
|
||||
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
};
|
||||
};
|
||||
programs.alacritty.settings.font.size = 12;
|
||||
programs.kitty.font.size = 12;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,13 +1,9 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
|
||||
imports = [
|
||||
(import ./utils/common.nix {inherit inputs config pkgs;})
|
||||
];
|
||||
imports = [
|
||||
(import ./utils/common.nix { inherit inputs config pkgs; })
|
||||
];
|
||||
}
|
||||
|
|
|
|||
103
home/Kell.nix
103
home/Kell.nix
|
|
@ -1,60 +1,57 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/f/|home|user|Workspace"
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|user|Workspace"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Thomas"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
|
||||
];
|
||||
};
|
||||
in
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/f/|home|user|Workspace"
|
||||
imports = [
|
||||
(import ./utils/desktop.nix { inherit inputs config pkgs; })
|
||||
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|user|Workspace"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Thomas"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
|
||||
];
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
(import ./utils/desktop.nix {inherit inputs config pkgs;})
|
||||
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
|
||||
];
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Kell/id_ed25519";
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Kell/id_ed25519";
|
||||
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
dconf.settings = {
|
||||
"org/virt-manager/virt-manager/connections" = {
|
||||
autoconnect = ["qemu:///system"];
|
||||
uris = ["qemu:///system"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
distrobox
|
||||
gnome-disk-utility
|
||||
moonlight-qt
|
||||
vscode
|
||||
jetbrains.rider
|
||||
discord
|
||||
];
|
||||
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"DP-1,${./hyprland/files/wallpaper.png}"
|
||||
"DP-2,${./hyprland/files/wallpaper.png}"
|
||||
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"DP-2,preferred,0x550,1"
|
||||
"DP-1,preferred,1920x0,1"
|
||||
"HDMI-A-1,preferred,5760x550,1"
|
||||
home.packages = with pkgs; [
|
||||
distrobox
|
||||
gnome-disk-utility
|
||||
moonlight-qt
|
||||
vscode
|
||||
jetbrains.rider
|
||||
discord
|
||||
];
|
||||
input.kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
|
||||
# input.kb_options = "compose:rctrl, caps:super";
|
||||
};
|
||||
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"DP-1,${./hyprland/files/wallpaper.png}"
|
||||
"DP-2,${./hyprland/files/wallpaper.png}"
|
||||
"HDMI-A-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"DP-2,preferred,0x550,1"
|
||||
"DP-1,preferred,1920x0,1"
|
||||
"HDMI-A-1,preferred,5760x550,1"
|
||||
];
|
||||
input.kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
|
||||
# input.kb_options = "compose:rctrl, caps:super";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,101 +1,97 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
username = "server";
|
||||
home_dir = "/home/${username}";
|
||||
scripts = {
|
||||
disk_check = import ./utils/disk_check.nix {inherit pkgs;};
|
||||
# vdirsyncer = {
|
||||
# when = "*:0/15";
|
||||
# script = toString (pkgs.writeShellScript "script" '' ${pkgs.vdirsyncer}/bin/vdirsyncer sync imec/pair '');
|
||||
# };
|
||||
fzgo = {
|
||||
when = "*:0/5";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
${pkgs.zsh}/bin/zsh -c "source ${./zsh/files/fzgo.zsh} && fzgo_update_cache"
|
||||
'');
|
||||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
username = "server";
|
||||
home_dir = "/home/${username}";
|
||||
scripts = {
|
||||
disk_check = import ./utils/disk_check.nix { inherit pkgs; };
|
||||
# vdirsyncer = {
|
||||
# when = "*:0/15";
|
||||
# script = toString (pkgs.writeShellScript "script" '' ${pkgs.vdirsyncer}/bin/vdirsyncer sync imec/pair '');
|
||||
# };
|
||||
fzgo = {
|
||||
when = "*:0/5";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
${pkgs.zsh}/bin/zsh -c "source ${./zsh/files/fzgo.zsh} && fzgo_update_cache"
|
||||
'');
|
||||
};
|
||||
mbsync = {
|
||||
when = "*-*-* 00:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
BASEDIR=/home/server/Containers/mbsync
|
||||
# python3 $BASEDIR/config/oauth2/mutt_oauth2.py $BASEDIR/data/oauth2/credentials.json
|
||||
docker exec --user "1000:1000" mbsync-container /home/user/.config/mbsync/run.sh -a
|
||||
${pkgs.notmuch}/bin/notmuch new
|
||||
'');
|
||||
};
|
||||
sync_vault = {
|
||||
when = "*-*-* 02:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
source $HOME/.secrets/Backup/env.sh
|
||||
for _ in {1..2}; do
|
||||
OUTPUT=$(echo "$ZFS_PASSPHRASE" | ssh 10.4.0.1 zfs load-key Vault/Thomas/Encrypted 2>&1);
|
||||
if [ "$OUTPUT" == "Key load error: Key already loaded for 'Vault/Thomas/Encrypted'." ]; then
|
||||
echo "Key successfully loaded, starting syncoid"
|
||||
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas/Workspace 10.4.0.1:Vault/Thomas/Encrypted/Storage/Workspace
|
||||
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas 10.4.0.1:Vault/Thomas/Encrypted/Storage/T
|
||||
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Emily 10.4.0.1:Vault/Thomas/Encrypted/Storage/N
|
||||
syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Yolande 10.4.0.1:Vault/Thomas/Encrypted/Storage/Y
|
||||
syncoid --no-privilege-elevation --no-sync-snap tank/Containers 10.4.0.1:Vault/Thomas/Encrypted/Containers
|
||||
ssh 10.4.0.1 zfs unload-key Vault/Thomas/Encrypted
|
||||
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/s39pIIrB0R
|
||||
exit 0
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Found output instead: $OUTPUT"
|
||||
echo "Failed to load key: $OUTPUT" | sendmail
|
||||
exit 1
|
||||
'');
|
||||
};
|
||||
backup = {
|
||||
when = "*-*-* 04:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
${./scripts/files/backup.sh}
|
||||
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/R6iJcWqGp0
|
||||
'');
|
||||
};
|
||||
};
|
||||
mbsync = {
|
||||
when = "*-*-* 00:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
BASEDIR=/home/server/Containers/mbsync
|
||||
# python3 $BASEDIR/config/oauth2/mutt_oauth2.py $BASEDIR/data/oauth2/credentials.json
|
||||
docker exec --user "1000:1000" mbsync-container /home/user/.config/mbsync/run.sh -a
|
||||
${pkgs.notmuch}/bin/notmuch new
|
||||
'');
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/Workspace"
|
||||
"${home_dir}/.dotfiles"
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/Workspace"
|
||||
"${home_dir}/.dotfiles"
|
||||
"${home_dir}/Containers"
|
||||
"${home_dir}/Storage/Thomas"
|
||||
"${home_dir}/Storage/Shared"
|
||||
];
|
||||
};
|
||||
# sync_vault = {
|
||||
# when = "*-*-* 02:00:00";
|
||||
# script = toString (pkgs.writeShellScript "script" ''
|
||||
# source $HOME/.secrets/Backup/env.sh
|
||||
# for _ in {1..2}; do
|
||||
# OUTPUT=$(echo "$ZFS_PASSPHRASE" | ssh 10.4.0.1 zfs load-key Vault/Thomas/Encrypted 2>&1);
|
||||
# if [ "$OUTPUT" == "Key load error: Key already loaded for 'Vault/Thomas/Encrypted'." ]; then
|
||||
# echo "Key successfully loaded, starting syncoid"
|
||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas/Workspace 10.4.0.1:Vault/Thomas/Encrypted/Storage/Workspace
|
||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Thomas 10.4.0.1:Vault/Thomas/Encrypted/Storage/T
|
||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Emily 10.4.0.1:Vault/Thomas/Encrypted/Storage/N
|
||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Storage/Yolande 10.4.0.1:Vault/Thomas/Encrypted/Storage/Y
|
||||
# syncoid --no-privilege-elevation --no-sync-snap tank/Containers 10.4.0.1:Vault/Thomas/Encrypted/Containers
|
||||
# ssh 10.4.0.1 zfs unload-key Vault/Thomas/Encrypted
|
||||
# ${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/s39pIIrB0R
|
||||
# exit 0
|
||||
# fi
|
||||
# done
|
||||
#
|
||||
# echo "Found output instead: $OUTPUT"
|
||||
# echo "Failed to load key: $OUTPUT" | sendmail
|
||||
# exit 1
|
||||
# '');
|
||||
# };
|
||||
backup = {
|
||||
when = "*-*-* 04:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
${./scripts/files/backup.sh}
|
||||
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/R6iJcWqGp0
|
||||
'');
|
||||
};
|
||||
};
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/Workspace"
|
||||
"${home_dir}/.dotfiles"
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/Workspace"
|
||||
"${home_dir}/.dotfiles"
|
||||
"${home_dir}/Containers"
|
||||
"${home_dir}/Storage/Thomas"
|
||||
"${home_dir}/Storage/Shared"
|
||||
];
|
||||
};
|
||||
in {
|
||||
home.username = username;
|
||||
home.homeDirectory = home_dir;
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings = {
|
||||
trusted-users = [username];
|
||||
use-xdg-base-directories = true;
|
||||
home.username = username;
|
||||
home.homeDirectory = home_dir;
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings = {
|
||||
trusted-users = [ username ];
|
||||
use-xdg-base-directories = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.enable = true;
|
||||
|
||||
imports = [
|
||||
(import ./utils/common.nix {inherit inputs config pkgs;})
|
||||
(import ./utils/services.nix {inherit pkgs scripts;})
|
||||
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
|
||||
./ssh
|
||||
];
|
||||
programs.ssh.matchBlocks."*".identityFile = "${home_dir}/.secrets/SSH/Mallorea/id_ed25519";
|
||||
imports = [
|
||||
(import ./utils/common.nix { inherit inputs config pkgs; })
|
||||
(import ./utils/services.nix { inherit pkgs scripts; })
|
||||
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
|
||||
./ssh
|
||||
];
|
||||
programs.ssh.matchBlocks."*".identityFile = "${home_dir}/.secrets/SSH/Mallorea/id_ed25519";
|
||||
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
59
home/Pi.nix
59
home/Pi.nix
|
|
@ -1,36 +1,33 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
in {
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings.use-xdg-base-directories = true;
|
||||
};
|
||||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
in
|
||||
{
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings.use-xdg-base-directories = true;
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
xdg.enable = true;
|
||||
|
||||
imports = [
|
||||
(import ./utils/common.nix {inherit inputs config pkgs;})
|
||||
./ssh
|
||||
];
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Pi/id_ed25519";
|
||||
imports = [
|
||||
(import ./utils/common.nix { inherit inputs config pkgs; })
|
||||
./ssh
|
||||
];
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Pi/id_ed25519";
|
||||
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
|
||||
programs.zsh.initContent = pkgs.lib.mkAfter ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
|
||||
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
|
||||
fi
|
||||
'';
|
||||
programs.zsh.initContent = pkgs.lib.mkAfter ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
|
||||
. '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
|
||||
fi
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,46 +1,43 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/f/|home|user|Workspace"
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|user|Workspace"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Thomas"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
|
||||
];
|
||||
};
|
||||
in {
|
||||
imports = [
|
||||
(import ./utils/fzgo_links.nix {inherit config pkgs fzgo_paths;})
|
||||
(import ./utils/desktop.nix {inherit inputs config pkgs;})
|
||||
./ssh
|
||||
];
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Riva/id_ed25519";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
distrobox
|
||||
jq
|
||||
rclone
|
||||
];
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"Virtual-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
fzgo_paths = {
|
||||
files = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/f/|home|user|Workspace"
|
||||
];
|
||||
dirs = [
|
||||
"/home/user/.dotfiles"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|user|Workspace"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Thomas"
|
||||
"/home/server/.cache/fzgo/entries/d/|home|server|Storage|Shared"
|
||||
];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"Virtual-1,2560x1440,0x0,1"
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
(import ./utils/fzgo_links.nix { inherit config pkgs fzgo_paths; })
|
||||
(import ./utils/desktop.nix { inherit inputs config pkgs; })
|
||||
./ssh
|
||||
];
|
||||
input.kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
|
||||
};
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Riva/id_ed25519";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
distrobox
|
||||
jq
|
||||
rclone
|
||||
];
|
||||
services.hyprpaper = {
|
||||
settings = {
|
||||
wallpaper = [
|
||||
"Virtual-1,${./hyprland/files/wallpaper.png}"
|
||||
];
|
||||
};
|
||||
};
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
monitor = [
|
||||
"Virtual-1,2560x1440,0x0,1"
|
||||
];
|
||||
input.kb_options = "compose:rctrl, caps:super, altwin:swap_alt_win";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,43 +1,40 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings = {
|
||||
trusted-users = ["user"];
|
||||
use-xdg-base-directories = true;
|
||||
home.username = "user";
|
||||
home.homeDirectory = "/home/user";
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings = {
|
||||
trusted-users = [ "user" ];
|
||||
use-xdg-base-directories = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
imports = [
|
||||
(import ./utils/common.nix {inherit inputs config pkgs;})
|
||||
./alacritty
|
||||
./ssh
|
||||
];
|
||||
xdg.enable = true;
|
||||
imports = [
|
||||
(import ./utils/common.nix { inherit inputs config pkgs; })
|
||||
./alacritty
|
||||
./ssh
|
||||
];
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Tolnedra/id_ed25519";
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/user/.secrets/SSH/Tolnedra/id_ed25519";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
jq
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
wl-clipboard
|
||||
jq
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
|
||||
programs.zsh.initContent = pkgs.lib.mkAfter ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
'';
|
||||
programs.zsh.initContent = pkgs.lib.mkAfter ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
'';
|
||||
|
||||
programs.alacritty.settings.window.opacity = 0.8;
|
||||
programs.alacritty.settings.window.opacity = 0.8;
|
||||
}
|
||||
|
|
|
|||
110
home/Vault.nix
110
home/Vault.nix
|
|
@ -1,13 +1,9 @@
|
|||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
scripts = {
|
||||
disk_check = {
|
||||
when = "*-*-* *:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
{ inputs, config, pkgs, ... }:
|
||||
let
|
||||
scripts = {
|
||||
disk_check = {
|
||||
when = "*-*-* *:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
REPORT_EMAIL=email@thomasave.be
|
||||
ZPOOL_STATUS=$(zpool status -x)
|
||||
if [ "$ZPOOL_STATUS" = "all pools are healthy" ] || [ "$ZPOOL_STATUS" = "no pools available" ]
|
||||
|
|
@ -20,65 +16,63 @@
|
|||
printf 1 > /var/db/zpool.status
|
||||
fi
|
||||
fi
|
||||
'');
|
||||
};
|
||||
restic_etienne = {
|
||||
when = "*-*-* 01:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
'');
|
||||
};
|
||||
restic_etienne = {
|
||||
when = "*-*-* 01:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
/Backup/Restic/Etienne/run.sh
|
||||
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/zGPrOi0NsJ
|
||||
'');
|
||||
};
|
||||
restic_magda_and_etienne = {
|
||||
when = "*-*-* 03:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
'');
|
||||
};
|
||||
restic_magda_and_etienne = {
|
||||
when = "*-*-* 03:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
/Backup/Restic/Magda\ and\ Etienne/run.sh
|
||||
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/yvBuDgduDd
|
||||
'');
|
||||
};
|
||||
restic_backblaze = {
|
||||
when = "*-*-* 02:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
'');
|
||||
};
|
||||
restic_backblaze = {
|
||||
when = "*-*-* 02:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
/Backup/Restic/BackBlaze/run.sh
|
||||
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/LVruVYTwTn
|
||||
'');
|
||||
};
|
||||
mail_sync = {
|
||||
when = "*-*-* 04:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
'');
|
||||
};
|
||||
mail_sync = {
|
||||
when = "*-*-* 04:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
cd /home/server/Containers/Mails && docker compose up sync-etienne sync-magda
|
||||
${pkgs.curl}/bin/curl https://uptime.thomasave.be/api/push/eEIPVGyrAx
|
||||
'');
|
||||
'');
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
home.username = "server";
|
||||
home.homeDirectory = "/home/server";
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings.use-xdg-base-directories = true;
|
||||
};
|
||||
};
|
||||
in {
|
||||
home.username = "server";
|
||||
home.homeDirectory = "/home/server";
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
settings.use-xdg-base-directories = true;
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
imports = [
|
||||
(import ./utils/common.nix {inherit inputs config pkgs;})
|
||||
(import ./utils/services.nix {
|
||||
inherit pkgs;
|
||||
scripts = scripts;
|
||||
})
|
||||
./ssh
|
||||
];
|
||||
xdg.enable = true;
|
||||
imports = [
|
||||
(import ./utils/common.nix { inherit inputs config pkgs; })
|
||||
(import ./utils/services.nix { inherit pkgs; scripts = scripts; })
|
||||
./ssh
|
||||
];
|
||||
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/server/.secrets/SSH/Vault/id_ed25519";
|
||||
programs.ssh.matchBlocks."*".identityFile = "/home/server/.secrets/SSH/Vault/id_ed25519";
|
||||
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
home.sessionVariables = {
|
||||
NIX_PATH = "${config.xdg.stateHome}/nix/profiles/channels/";
|
||||
LANG = "en_US.UTF-8";
|
||||
XDG_RUNTIME_DIR = "/run/user/$(id -u)";
|
||||
};
|
||||
|
||||
programs.zsh.initContent = pkgs.lib.mkAfter ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Storage/Thomas/ ~/Storage/Etienne/ ~/Storage/Magda\ and\ Etienne/ ~/Containers/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
'';
|
||||
programs.zsh.initContent = pkgs.lib.mkAfter ''
|
||||
LOCAL_SEARCH_DIRS=(~/.dotfiles/ ~/Storage/Thomas/ ~/Storage/Etienne/ ~/Storage/Magda\ and\ Etienne/ ~/Containers/)
|
||||
REMOTE_SEARCH_DIRS=()
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,29 +1,26 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# add the home manager module
|
||||
imports = [inputs.ags.homeManagerModules.default];
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
# add the home manager module
|
||||
imports = [ inputs.ags.homeManagerModules.default ];
|
||||
|
||||
configDir = ./files;
|
||||
programs.ags = {
|
||||
enable = true;
|
||||
|
||||
extraPackages = with inputs.ags.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||
pkgs.gtksourceview
|
||||
pkgs.accountsservice
|
||||
pkgs.libadwaita
|
||||
configDir = ./files;
|
||||
|
||||
battery
|
||||
hyprland
|
||||
tray
|
||||
powerprofiles
|
||||
wireplumber
|
||||
mpris
|
||||
network
|
||||
apps
|
||||
notifd
|
||||
];
|
||||
};
|
||||
extraPackages = with inputs.ags.packages.${pkgs.system}; [
|
||||
pkgs.gtksourceview
|
||||
pkgs.accountsservice
|
||||
|
||||
battery
|
||||
hyprland
|
||||
tray
|
||||
powerprofiles
|
||||
wireplumber
|
||||
mpris
|
||||
network
|
||||
apps
|
||||
notifd
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,53 +1,37 @@
|
|||
import { Astal, Gdk, Gtk } from "ags/gtk4";
|
||||
import app from "ags/gtk4/app";
|
||||
import { createBinding, createState, For, With, Accessor } from "ags";
|
||||
import { createPoll } from "ags/time";
|
||||
import { Astal, Gdk } from "ags/gtk4";
|
||||
import app from "ags/gtk4/app"
|
||||
import Gtk from "gi://Gtk?version=4.0"
|
||||
import { createBinding, createState } from "ags"
|
||||
import Tray from "gi://AstalTray";
|
||||
import { execAsync } from "ags/process";
|
||||
import { execAsync } from "ags/process"
|
||||
import Hyprland from "gi://AstalHyprland";
|
||||
import { getIconName } from "./utils";
|
||||
import Wp from "gi://AstalWp";
|
||||
import Battery from "gi://AstalBattery";
|
||||
import GLib from "gi://GLib";
|
||||
import Wp from "gi://AstalWp"
|
||||
import Battery from "gi://AstalBattery"
|
||||
|
||||
const battery = Battery.get_default();
|
||||
const sensorsAvailable = await execAsync(["sensors"])
|
||||
.then(() => true)
|
||||
.catch(() => false);
|
||||
const battery = Battery.get_default()
|
||||
const sensorsAvailable = await execAsync(['sensors']).then(() => true).catch(() => false);
|
||||
const wirePlumber = Wp.get_default();
|
||||
|
||||
function SysTray(): JSX.Element {
|
||||
const tray = Tray.get_default();
|
||||
let items = createBinding(tray, "items");
|
||||
|
||||
const init = (btn: Gtk.MenuButton, item: Tray.TrayItem) => {
|
||||
btn.menuModel = item.menuModel;
|
||||
btn.insert_action_group("dbusmenu", item.actionGroup);
|
||||
item.connect("notify::action-group", () => {
|
||||
btn.insert_action_group("dbusmenu", item.actionGroup);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<box>
|
||||
<For each={items}>
|
||||
{(item: Tray.TrayItem) => {
|
||||
{createBinding(tray, "items").as((items) =>
|
||||
items.map((item) => {
|
||||
if (item.iconThemePath) app.add_icons(item.iconThemePath);
|
||||
return (
|
||||
<menubutton
|
||||
$={(self) => init(self, item)}
|
||||
class="systray"
|
||||
tooltipMarkup={createBinding(item, "tooltipMarkup")}
|
||||
menuModel={createBinding(item, "menuModel")}
|
||||
>
|
||||
<image
|
||||
gicon={createBinding(item, "gicon")}
|
||||
class="systray-item"
|
||||
/>
|
||||
usePopover={false}
|
||||
actionGroup={createBinding(item, "actionGroup").as(ag => ["dbusmenu", ag])}
|
||||
menuModel={createBinding(item, "menuModel")}>
|
||||
{/* <icon gicon={createBinding(item, "gicon")} class="systray-item" /> */}
|
||||
</menubutton>
|
||||
);
|
||||
}}
|
||||
</For>
|
||||
}),
|
||||
)}
|
||||
</box>
|
||||
);
|
||||
}
|
||||
|
|
@ -69,75 +53,83 @@ function Center(): JSX.Element {
|
|||
}
|
||||
|
||||
function Date({ format = "%Y-%m-%d" }): JSX.Element {
|
||||
const time = createPoll<string>(
|
||||
"",
|
||||
60000,
|
||||
() => GLib.DateTime.new_now_local().format(format)!,
|
||||
);
|
||||
return (
|
||||
<button
|
||||
class="item"
|
||||
label={time}
|
||||
onClicked={() => execAsync(["gnome-calendar"])}
|
||||
/>
|
||||
);
|
||||
const time = createState<string>("").poll(60000, () =>
|
||||
GLib.DateTime.new_now_local().format(format)!)
|
||||
return <button
|
||||
class="item"
|
||||
onDestroy={() => time.drop()}
|
||||
label={time()}
|
||||
onClicked={() => execAsync(['gnome-calendar'])}
|
||||
/>
|
||||
}
|
||||
|
||||
function Time({ format = "%H:%M:%S" }): JSX.Element {
|
||||
const time = createPoll<string>(
|
||||
"",
|
||||
1000,
|
||||
() => GLib.DateTime.new_now_local().format(format)!,
|
||||
);
|
||||
return <label class="item blue" label={time} />;
|
||||
const time = createState<string>("").poll(1000, () =>
|
||||
GLib.DateTime.new_now_local().format(format)!)
|
||||
return <label
|
||||
class="item blue"
|
||||
onDestroy={() => time.drop()}
|
||||
label={time()}
|
||||
/>
|
||||
}
|
||||
|
||||
function Temp(): JSX.Element {
|
||||
let [label, _setlabel] = createState<string>("N/A");
|
||||
let label = createState<string>("N/A");
|
||||
if (sensorsAvailable) {
|
||||
label = createPoll<string>("", 3000, "sensors", (out) => {
|
||||
const match = out
|
||||
.split("\n")
|
||||
.find((line) => line.includes("Tctl") || line.includes("Package"))
|
||||
?.match(/[0-9.]*°C/);
|
||||
label = createState<string>("").poll(5000, 'sensors', out => {
|
||||
const match = out.split('\n').find(line => line.includes('Tctl') || line.includes('Package'))?.match(/[0-9.]*°C/);
|
||||
return match ? match[0] : "N/A";
|
||||
});
|
||||
})
|
||||
}
|
||||
return <label class="item blue" label={label} />;
|
||||
return <label
|
||||
class="item blue"
|
||||
onDestroy={() => label.drop()}
|
||||
label={label()}
|
||||
/>
|
||||
}
|
||||
|
||||
function Memory(): JSX.Element {
|
||||
const memory = createPoll<string>("", 2000, "free", (out) => {
|
||||
const line = out.split("\n").find((line) => line.includes("Mem:"));
|
||||
const memory = createState<string>("").poll(2000, "free", out => {
|
||||
const line = out.split('\n').find(line => line.includes('Mem:'));
|
||||
if (!line) return "N/A";
|
||||
const split = line.split(/\s+/).map(Number);
|
||||
return (split[2] / 1000000).toFixed(2) + "GB";
|
||||
});
|
||||
return <label class="item blue" label={memory} />;
|
||||
return <label
|
||||
class="item blue"
|
||||
onDestroy={() => memory.drop()}
|
||||
label={memory()}
|
||||
/>
|
||||
}
|
||||
|
||||
function ClockSpeed(): JSX.Element {
|
||||
const command =
|
||||
'bash -c "cat /proc/cpuinfo | grep \\"MHz\\" | awk \'{print \\$4}\' | sort -n | tail -1 | awk \'{printf \\"%.2fGHz\\", \\$1/1000}\'"';
|
||||
const speed = createPoll<string>("", 1000, command, (out) => out);
|
||||
return <label class="item" label={speed} />;
|
||||
const command = 'bash -c "cat /proc/cpuinfo | grep \\"MHz\\" | awk \'{print \\$4}\' | sort -n | tail -1 | awk \'{printf \\"%.2fGHz\\", \\$1/1000}\'"';
|
||||
const speed = createState<string>("").poll(5000, command)
|
||||
return <label
|
||||
class="item"
|
||||
onDestroy={() => speed.drop()}
|
||||
label={speed()}
|
||||
/>
|
||||
}
|
||||
|
||||
function CPU(): JSX.Element {
|
||||
const usage = createPoll<string>("", 2000, "top -b -n 1", (out) => {
|
||||
const line = out.split("\n").find((line) => line.includes("Cpu(s)"));
|
||||
const usage = createState<string>("").poll(2000, "top -b -n 1", out => {
|
||||
const line = out.split("\n").find(line => line.includes('Cpu(s)'));
|
||||
if (!line) return "N/A";
|
||||
return line.split(/\s+/)[1].replace(",", ".").toString() + "%";
|
||||
return line.split(/\s+/)[1].replace(',', '.').toString() + "%";
|
||||
});
|
||||
return (
|
||||
<box class="item">
|
||||
<image iconName="speedometer" css="margin-right: 0.7em;" />
|
||||
<label label={usage} />
|
||||
</box>
|
||||
);
|
||||
return <box class="item">
|
||||
{/* <icon icon="speedometer" css="margin-right: 0.7em;" /> */}
|
||||
<label
|
||||
onDestroy={() => usage.drop()}
|
||||
label={usage()}
|
||||
/>
|
||||
</box>
|
||||
}
|
||||
|
||||
function Right() {
|
||||
|
||||
|
||||
function Right(): JSX.Element {
|
||||
return (
|
||||
<box class="right" hexpand halign={Gtk.Align.END} spacing={6}>
|
||||
<Icons />
|
||||
|
|
@ -152,46 +144,31 @@ function Right() {
|
|||
);
|
||||
}
|
||||
|
||||
function BatteryIcon(): JSX.Element {
|
||||
if (battery.get_state() == 0) return <box />;
|
||||
let batteryPercentage = createBinding(battery, "percentage");
|
||||
return (
|
||||
<button
|
||||
class="battery-item"
|
||||
onClicked={() => execAsync(["gnome-power-statistics"])}
|
||||
>
|
||||
<box>
|
||||
<With value={batteryPercentage}>
|
||||
{(percentage) => {
|
||||
const thresholds = [...Array(11).keys()].map((i) => i * 10);
|
||||
const icon = thresholds.find(
|
||||
(threshold) => threshold >= percentage * 100,
|
||||
);
|
||||
const charging_name =
|
||||
battery.percentage >= 0.99 ? "charged" : "charging";
|
||||
return (
|
||||
<image
|
||||
iconName={
|
||||
battery.charging
|
||||
? `battery-level-${icon}-${charging_name}-symbolic`
|
||||
: `battery-level-${icon}-symbolic`
|
||||
}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</With>
|
||||
</box>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
// function BatteryIcon(): JSX.Element {
|
||||
// if (battery.get_state() == 0) return <box />;
|
||||
// return <button class="battery-item" onClicked={() => execAsync(['gnome-power-statistics'])}>
|
||||
// <box>
|
||||
// {
|
||||
// createBinding(battery, "percentage").as((percentage) => {
|
||||
// const thresholds = [...Array(11).keys()].map(i => i * 10);
|
||||
// const icon = thresholds.find(threshold => threshold >= percentage * 100)
|
||||
// const charging_name = battery.percentage >= 0.99 ? "charged" : "charging"
|
||||
// return <icon
|
||||
// icon={battery.charging ? `battery-level-${icon}-${charging_name}-symbolic` : `battery-level-${icon}-symbolic`}
|
||||
// />
|
||||
// })
|
||||
// }
|
||||
// </box>
|
||||
// </button>
|
||||
// }
|
||||
|
||||
function Icons() {
|
||||
return (
|
||||
<box class="item icon-group">
|
||||
<SysTray />
|
||||
<BatteryIcon />
|
||||
{/* <BatteryIcon /> */}
|
||||
</box>
|
||||
);
|
||||
)
|
||||
}
|
||||
|
||||
function Volume(): JSX.Element {
|
||||
|
|
@ -199,173 +176,120 @@ function Volume(): JSX.Element {
|
|||
|
||||
const audio = wirePlumber.audio;
|
||||
const icon = createBinding(audio.default_speaker, "volume").as((volume) => {
|
||||
const vol = volume * 100;
|
||||
const vol = volume * 100
|
||||
const icon = [
|
||||
[101, "overamplified"],
|
||||
[67, "high"],
|
||||
[34, "medium"],
|
||||
[1, "low"],
|
||||
[0, "muted"],
|
||||
].find(([threshold]) => Number(threshold) <= vol)?.[1];
|
||||
return `audio-volume-${icon}-symbolic`;
|
||||
[101, 'overamplified'],
|
||||
[67, 'high'],
|
||||
[34, 'medium'],
|
||||
[1, 'low'],
|
||||
[0, 'muted'],
|
||||
].find(([threshold]) => Number(threshold) <= vol)?.[1]
|
||||
return `audio-volume-${icon}-symbolic`
|
||||
});
|
||||
const css = createBinding(audio.default_speaker, "mute").as((mute) => {
|
||||
return mute ? "margin-left:0;" : "margin-left: 0.7em;";
|
||||
return mute ? "margin-left:0;" : "margin-left: 0.7em;"
|
||||
});
|
||||
let volume = createBinding(audio.default_speaker, "volume");
|
||||
let mute = createBinding(audio.default_speaker, "mute");
|
||||
return (
|
||||
<button
|
||||
class="item blue"
|
||||
onClicked={() =>
|
||||
(audio.default_speaker.mute = !audio.default_speaker.mute)
|
||||
}
|
||||
>
|
||||
<button class="item blue" onClicked={() => audio.default_speaker.mute = !audio.default_speaker.mute}>
|
||||
<box>
|
||||
<image iconName={icon} />
|
||||
<With value={volume}>
|
||||
{(vol) => (
|
||||
<box>
|
||||
<With value={mute}>
|
||||
{(muted) => {
|
||||
return (
|
||||
<label
|
||||
label={muted ? "" : `${Math.floor(vol * 100)}%`}
|
||||
css={css}
|
||||
/>
|
||||
);
|
||||
}}
|
||||
</With>
|
||||
</box>
|
||||
)}
|
||||
</With>
|
||||
{/* <icon icon={icon} /> */}
|
||||
{
|
||||
createBinding(audio.default_speaker, "volume").as((volume) => <box>
|
||||
{
|
||||
createBinding(audio.default_speaker, "mute").as((mute) => <box>
|
||||
{
|
||||
<label label={mute ? "" : `${Math.floor(volume * 100)}%`} css={css} />
|
||||
}
|
||||
</box>)
|
||||
}
|
||||
</box>)
|
||||
}
|
||||
</box>
|
||||
</button>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
function Workspaces(): JSX.Element {
|
||||
const hyprland = Hyprland.get_default();
|
||||
let workspaces = createBinding(hyprland, "workspaces");
|
||||
return (
|
||||
<box class="workspaces">
|
||||
<With value={workspaces}>
|
||||
{(wss: Array<Hyprland.Workspace>) => (
|
||||
<box>
|
||||
<With value={createBinding(hyprland, "focusedMonitor")}>
|
||||
{(fm: Hyprland.Monitor) => {
|
||||
let filtered_wss = new Accessor(() =>
|
||||
wss
|
||||
.sort((a, b) => a.id - b.id)
|
||||
.filter(
|
||||
(ws) =>
|
||||
ws &&
|
||||
ws.get_monitor() &&
|
||||
ws.get_monitor().get_id() === fm.get_id(),
|
||||
),
|
||||
);
|
||||
return (
|
||||
<box>
|
||||
<For each={filtered_wss}>
|
||||
{(ws: Hyprland.Workspace, _index) => (
|
||||
<button
|
||||
class={createBinding(hyprland, "focusedWorkspace").as(
|
||||
(fw) => (ws === fw ? "focused" : ""),
|
||||
)}
|
||||
onClicked={() => ws.focus()}
|
||||
>
|
||||
{`${ws.id}`.slice(-1)}
|
||||
</button>
|
||||
)}
|
||||
</For>
|
||||
</box>
|
||||
);
|
||||
}}
|
||||
</With>
|
||||
</box>
|
||||
)}
|
||||
</With>
|
||||
{createBinding(hyprland, "workspaces").as((wss) =>
|
||||
<box>
|
||||
{createBinding(hyprland, "focusedMonitor").as((fm) =>
|
||||
wss.sort((a, b) => a.id - b.id)
|
||||
.filter(ws => ws && ws.get_monitor() && ws.get_monitor().get_id() === fm.get_id())
|
||||
.map((ws) => (
|
||||
<button
|
||||
class={createBinding(hyprland, "focusedWorkspace").as((fw) => ws === fw ? "focused" : "",)}
|
||||
onClicked={() => ws.focus()}
|
||||
>
|
||||
{`${ws.id}`.slice(-1)}
|
||||
</button>
|
||||
)))}
|
||||
</box>
|
||||
)}
|
||||
</box>
|
||||
);
|
||||
}
|
||||
|
||||
function shorten(title: string) {
|
||||
return title.length > 40 ? title.slice(0, 20) + "..." : title;
|
||||
return title.length > 40 ? title.slice(0, 20) + "..." : title
|
||||
}
|
||||
|
||||
function Clients(): JSX.Element {
|
||||
const hyprland = Hyprland.get_default();
|
||||
let clients = createBinding(hyprland, "clients");
|
||||
return (
|
||||
<box>
|
||||
<With value={createBinding(hyprland, "focusedWorkspace")}>
|
||||
{(fw: Hyprland.Workspace) => (
|
||||
{
|
||||
createBinding(hyprland, "focusedWorkspace").as(fw => (
|
||||
<box class="clients">
|
||||
<With value={clients}>
|
||||
{(cls: Array<Hyprland.Client>) => {
|
||||
let filtered_clients = new Accessor(() =>
|
||||
cls
|
||||
.sort((a, b) => a.pid - b.pid)
|
||||
.filter((cl) => !cl.title.includes("rofi"))
|
||||
.filter(
|
||||
(cl) => fw && cl.get_workspace().get_id() === fw.get_id(),
|
||||
),
|
||||
);
|
||||
{
|
||||
createBinding(hyprland, "clients").as(cls =>
|
||||
cls
|
||||
.sort((a, b) => a.pid - b.pid)
|
||||
.filter(cl => !cl.title.includes("rofi"))
|
||||
.filter(cl => fw && cl.get_workspace().get_id() === fw.get_id())
|
||||
.map(cl => (
|
||||
<box
|
||||
class={createBinding(hyprland, "focusedClient").as(a => a && a.address === cl.address ? "focused" : "unfocused")}
|
||||
>
|
||||
{/* <icon */}
|
||||
{/* icon={getIconName(cl)} */}
|
||||
{/* class="app-icon" */}
|
||||
{/* /> */}
|
||||
<label label={createBinding(cl, 'title').as(title => shorten(title))} />
|
||||
</box>
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
return (
|
||||
<box>
|
||||
<For each={filtered_clients}>
|
||||
{(cl: Hyprland.Client, _index) => (
|
||||
<box
|
||||
class={createBinding(hyprland, "focusedClient").as(
|
||||
(a) =>
|
||||
a && a.address === cl.address
|
||||
? "focused"
|
||||
: "unfocused",
|
||||
)}
|
||||
>
|
||||
<image iconName={getIconName(cl)} class="app-icon" />
|
||||
<label
|
||||
label={createBinding(cl, "title").as((title) =>
|
||||
shorten(title),
|
||||
)}
|
||||
/>
|
||||
</box>
|
||||
)}
|
||||
</For>
|
||||
</box>
|
||||
);
|
||||
}}
|
||||
</With>
|
||||
}
|
||||
</box>
|
||||
)}
|
||||
</With>
|
||||
)
|
||||
)
|
||||
}
|
||||
</box>
|
||||
);
|
||||
}
|
||||
|
||||
export default function Bar(gdkmonitor: Gdk.Monitor, scaleFactor: number = 1) {
|
||||
console.log("Creating Bar on monitor:", gdkmonitor);
|
||||
return (
|
||||
<window
|
||||
visible
|
||||
gdkmonitor={gdkmonitor}
|
||||
css={"font-size: " + scaleFactor + "em;"}
|
||||
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
||||
anchor={
|
||||
Astal.WindowAnchor.TOP |
|
||||
Astal.WindowAnchor.LEFT |
|
||||
Astal.WindowAnchor.RIGHT
|
||||
}
|
||||
application={app}
|
||||
class="Bar"
|
||||
name="top-bar"
|
||||
>
|
||||
<centerbox class="window-box">
|
||||
<Left $type="start" />
|
||||
<Center $type="center" />
|
||||
<Right $type="end" />
|
||||
</centerbox>
|
||||
</window>
|
||||
);
|
||||
export default function Bar(gdkmonitor: Gdk.Monitor, scaleFactor: number = 1): Gtk.Window {
|
||||
return new Gtk.Window({
|
||||
gdkmonitor,
|
||||
css: "font-size: " + scaleFactor + "em;",
|
||||
exclusivity: Astal.Exclusivity.EXCLUSIVE,
|
||||
anchor: Astal.WindowAnchor.TOP | Astal.WindowAnchor.LEFT | Astal.WindowAnchor.RIGHT,
|
||||
application: app,
|
||||
class: "Bar",
|
||||
name: "top-bar",
|
||||
s: self => self.connect("destroy", () => {
|
||||
print("Detroying bar");
|
||||
app.remove_window(self);
|
||||
}),
|
||||
child: <centerbox class="window-box">
|
||||
<Left />
|
||||
<Center />
|
||||
<Right />
|
||||
</centerbox>
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,40 +1,42 @@
|
|||
import app from "ags/gtk4/app";
|
||||
import style from "./style.scss";
|
||||
import Bar from "./Bar";
|
||||
import app from "ags/gtk4/app"
|
||||
import style from "./style.scss"
|
||||
import Bar from "./Bar"
|
||||
import Hyprland from "gi://AstalHyprland";
|
||||
import NotificationPopups from "./notifications/NotificationPopups";
|
||||
import NotificationPopups from "./notifications/NotificationPopups"
|
||||
import Gtk from "gi://Gtk?version=4.0";
|
||||
import { Gdk } from "ags/gtk4";
|
||||
|
||||
const hyprland = Hyprland.get_default();
|
||||
|
||||
function find_main_monitor(): Hyprland.Monitor {
|
||||
let monitors = hyprland.get_monitors();
|
||||
let monitors = hyprland.get_monitors()
|
||||
for (let j = 0; j < monitors.length; j++) {
|
||||
for (const monitor of ["eDP", "DP", "HDMI-A"]) {
|
||||
for (let i = 0; i < monitors.length; i++) {
|
||||
console.log(
|
||||
"Checking monitor:",
|
||||
monitors[i].get_name(),
|
||||
"against",
|
||||
monitor + "-" + j,
|
||||
);
|
||||
console.log("Checking monitor:", monitors[i].get_name(), "against", monitor + "-" + j)
|
||||
if (monitors[i].get_name() == monitor + "-" + j) {
|
||||
return monitors[i];
|
||||
return monitors[i]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return monitors[0];
|
||||
return monitors[0]
|
||||
}
|
||||
|
||||
function register_windows(monitor: Hyprland.Monitor) {
|
||||
let gtkMonitor = app.get_monitors()[0];
|
||||
let scale = monitor.get_width() >= 3000 ? 1.2 : 1;
|
||||
Bar(gtkMonitor, scale);
|
||||
NotificationPopups();
|
||||
let gtkMonitors = app.get_monitors()[0].get_display().get_monitors()
|
||||
let gtkMonitor = gtkMonitors.get_item(0)
|
||||
if (!gtkMonitor) {
|
||||
console.error("No GTK monitor found for the Hyprland monitor:", monitor.get_name());
|
||||
return;
|
||||
}
|
||||
let scale = (monitor.get_width() >= 3000) ? 1.2 : 1
|
||||
Bar(gtkMonitor, scale)
|
||||
NotificationPopups(gtkMonitor)
|
||||
}
|
||||
|
||||
function switch_to_best_monitor() {
|
||||
let mainMonitor = find_main_monitor();
|
||||
let mainMonitor = find_main_monitor()
|
||||
for (var wd of app.get_windows()) {
|
||||
wd.destroy();
|
||||
}
|
||||
|
|
@ -42,19 +44,17 @@ function switch_to_best_monitor() {
|
|||
}
|
||||
|
||||
hyprland.connect("monitor-added", (_, _monitor: Hyprland.Monitor) => {
|
||||
switch_to_best_monitor();
|
||||
});
|
||||
switch_to_best_monitor()
|
||||
})
|
||||
|
||||
hyprland.connect("monitor-removed", () => {
|
||||
switch_to_best_monitor();
|
||||
});
|
||||
|
||||
console.log("Trying to find the best monitor");
|
||||
switch_to_best_monitor()
|
||||
})
|
||||
|
||||
app.start({
|
||||
css: style,
|
||||
iconTheme: "Papirus",
|
||||
main() {
|
||||
switch_to_best_monitor();
|
||||
switch_to_best_monitor()
|
||||
},
|
||||
});
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,21 +1,21 @@
|
|||
declare const SRC: string
|
||||
|
||||
declare module "inline:*" {
|
||||
const content: string
|
||||
export default content
|
||||
const content: string
|
||||
export default content
|
||||
}
|
||||
|
||||
declare module "*.scss" {
|
||||
const content: string
|
||||
export default content
|
||||
const content: string
|
||||
export default content
|
||||
}
|
||||
|
||||
declare module "*.blp" {
|
||||
const content: string
|
||||
export default content
|
||||
const content: string
|
||||
export default content
|
||||
}
|
||||
|
||||
declare module "*.css" {
|
||||
const content: string
|
||||
export default content
|
||||
const content: string
|
||||
export default content
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,110 +1,125 @@
|
|||
@use "sass:string";
|
||||
|
||||
@function gtkalpha($c, $a) {
|
||||
@return string.unquote("alpha(#{$c},#{$a})");
|
||||
@return string.unquote("alpha(#{$c},#{$a})");
|
||||
}
|
||||
|
||||
// https://gitlab.gnome.org/GNOME/gtk/-/blob/gtk-3-24/gtk/theme/Adwaita/_colors-public.scss
|
||||
$fg-color: #{"@theme_bg_color"};
|
||||
$fg-color: #{"@theme_fg_color"};
|
||||
$bg-color: #1f2430;
|
||||
$error: red;
|
||||
|
||||
window.NotificationPopups {
|
||||
all: unset;
|
||||
all: unset;
|
||||
}
|
||||
|
||||
.Notification {
|
||||
border-radius: 13px;
|
||||
background-color: $bg-color;
|
||||
margin: 0.5rem 1rem 0.5rem 1rem;
|
||||
box-shadow: 2px 3px 8px 0 gtkalpha(black, 0.4);
|
||||
border: 1pt solid gtkalpha($fg-color, 0.03);
|
||||
eventbox.Notification {
|
||||
|
||||
&.critical {
|
||||
border: 1pt solid gtkalpha($error, 0.4);
|
||||
&:first-child>box {
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
&:last-child>box {
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
// eventboxes can not take margins so we style its inner box instead
|
||||
>box {
|
||||
min-width: 400px;
|
||||
border-radius: 13px;
|
||||
background-color: #1f2430;
|
||||
margin: .5rem 1rem .5rem 1rem;
|
||||
box-shadow: 2px 3px 8px 0 gtkalpha(black, .4);
|
||||
border: 1pt solid gtkalpha($fg-color, .03);
|
||||
}
|
||||
|
||||
&.critical>box {
|
||||
border: 1pt solid gtkalpha($error, .4);
|
||||
|
||||
.header {
|
||||
|
||||
.app-name {
|
||||
color: gtkalpha($error, .8);
|
||||
|
||||
}
|
||||
|
||||
.app-icon {
|
||||
color: gtkalpha($error, .6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.header {
|
||||
.app-name {
|
||||
color: gtkalpha($error, 0.8);
|
||||
}
|
||||
padding: .5rem;
|
||||
color: gtkalpha($fg-color, 0.5);
|
||||
|
||||
.app-icon {
|
||||
color: gtkalpha($error, 0.6);
|
||||
}
|
||||
}
|
||||
}
|
||||
.app-icon {
|
||||
margin: 0 .4rem;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 0.5rem;
|
||||
color: gtkalpha($fg-color, 0.5);
|
||||
.app-name {
|
||||
margin-right: .3rem;
|
||||
font-weight: bold;
|
||||
|
||||
.app-icon {
|
||||
margin: 0 0.4rem;
|
||||
&:first-child {
|
||||
margin-left: .4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.time {
|
||||
margin: 0 .4rem;
|
||||
}
|
||||
|
||||
button {
|
||||
padding: .2rem;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.app-name {
|
||||
margin-right: 0.3rem;
|
||||
font-weight: bold;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0.4rem;
|
||||
}
|
||||
separator {
|
||||
margin: 0 .4rem;
|
||||
background-color: gtkalpha($fg-color, .1);
|
||||
}
|
||||
|
||||
.time {
|
||||
margin: 0 0.4rem;
|
||||
.content {
|
||||
margin: 1rem;
|
||||
margin-top: .5rem;
|
||||
|
||||
.summary {
|
||||
font-size: 1.2em;
|
||||
color: $fg-color;
|
||||
}
|
||||
|
||||
.body {
|
||||
color: gtkalpha($fg-color, 0.8);
|
||||
}
|
||||
|
||||
.image {
|
||||
border: 1px solid gtkalpha($fg-color, .02);
|
||||
margin-right: .5rem;
|
||||
border-radius: 9px;
|
||||
min-width: 100px;
|
||||
min-height: 100px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
padding: 0.2rem;
|
||||
min-width: 0;
|
||||
min-height: 0;
|
||||
.actions {
|
||||
margin: 1rem;
|
||||
margin-top: 0;
|
||||
|
||||
button {
|
||||
margin: 0 .3rem;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
separator {
|
||||
margin: 0 0.4rem;
|
||||
background-color: gtkalpha($fg-color, 0.1);
|
||||
}
|
||||
|
||||
.content {
|
||||
margin: 1rem;
|
||||
margin-top: 0.5rem;
|
||||
|
||||
.summary {
|
||||
font-size: 1.2em;
|
||||
color: $fg-color;
|
||||
}
|
||||
|
||||
.body {
|
||||
color: gtkalpha($fg-color, 0.8);
|
||||
}
|
||||
|
||||
.image {
|
||||
border: 1px solid gtkalpha($fg-color, 0.02);
|
||||
margin-right: 0.5rem;
|
||||
border-radius: 9px;
|
||||
min-width: 100px;
|
||||
min-height: 100px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
margin: 1rem;
|
||||
margin-top: 0;
|
||||
|
||||
button {
|
||||
margin: 0 0.3rem;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,156 +1,107 @@
|
|||
import { Gtk, Gdk } from "ags/gtk4";
|
||||
import Adw from "gi://Adw";
|
||||
import GLib from "gi://GLib";
|
||||
import AstalNotifd from "gi://AstalNotifd";
|
||||
import Pango from "gi://Pango";
|
||||
import { timeout } from "ags/time";
|
||||
import { Gtk, Astal } from "ags/gtk4"
|
||||
import { EventBox } from "ags"
|
||||
import Notifd from "gi://AstalNotifd"
|
||||
import GLib from "gi://GLib"
|
||||
|
||||
function isIcon(icon?: string | null) {
|
||||
const iconTheme = Gtk.IconTheme.get_for_display(Gdk.Display.get_default()!);
|
||||
return icon && iconTheme.has_icon(icon);
|
||||
}
|
||||
const isIcon = (icon: string) =>
|
||||
!!Astal.Icon.lookup_icon(icon)
|
||||
|
||||
function fileExists(path: string) {
|
||||
return GLib.file_test(path, GLib.FileTest.EXISTS);
|
||||
}
|
||||
const fileExists = (path: string) =>
|
||||
GLib.file_test(path, GLib.FileTest.EXISTS)
|
||||
|
||||
function time(time: number, format = "%H:%M") {
|
||||
return GLib.DateTime.new_from_unix_local(time).format(format)!;
|
||||
}
|
||||
const time = (time: number, format = "%H:%M") => GLib.DateTime
|
||||
.new_from_unix_local(time)
|
||||
.format(format)!
|
||||
|
||||
function urgency(n: AstalNotifd.Notification) {
|
||||
const { LOW, NORMAL, CRITICAL } = AstalNotifd.Urgency;
|
||||
const urgency = (n: Notifd.Notification) => {
|
||||
const { LOW, NORMAL, CRITICAL } = Notifd.Urgency
|
||||
// match operator when?
|
||||
switch (n.urgency) {
|
||||
case LOW:
|
||||
return "low";
|
||||
case CRITICAL:
|
||||
return "critical";
|
||||
case LOW: return "low"
|
||||
case CRITICAL: return "critical"
|
||||
case NORMAL:
|
||||
default:
|
||||
return "normal";
|
||||
default: return "normal"
|
||||
}
|
||||
}
|
||||
|
||||
export default function Notification({
|
||||
notification: n,
|
||||
onHoverLost,
|
||||
}: {
|
||||
notification: AstalNotifd.Notification;
|
||||
onHoverLost: () => void;
|
||||
}) {
|
||||
const timer = timeout(3000, () => {
|
||||
try {
|
||||
onHoverLost();
|
||||
} catch (error) {
|
||||
console.error("Failed to handle onHoverLost:", error);
|
||||
}
|
||||
});
|
||||
|
||||
const handleDismiss = () => {
|
||||
try {
|
||||
n.dismiss();
|
||||
} catch (error) {
|
||||
console.error("Failed to dismiss notification:", error);
|
||||
}
|
||||
};
|
||||
|
||||
const handleInvoke = (id: string) => {
|
||||
try {
|
||||
n.invoke(id);
|
||||
} catch (error) {
|
||||
console.error(`Failed to invoke action ${id}:`, error);
|
||||
}
|
||||
};
|
||||
|
||||
const handleTime = (timeValue: number) => {
|
||||
try {
|
||||
return time(timeValue);
|
||||
} catch (error) {
|
||||
console.error("Failed to format time:", error);
|
||||
return "Invalid time";
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<Adw.Clamp maximumSize={400}>
|
||||
<box
|
||||
widthRequest={400}
|
||||
class={`Notification ${urgency(n)}`}
|
||||
orientation={Gtk.Orientation.VERTICAL}
|
||||
>
|
||||
<Gtk.EventControllerMotion
|
||||
onEnter={() => timer.cancel()}
|
||||
onLeave={onHoverLost}
|
||||
/>
|
||||
<box class="header">
|
||||
{(n.appIcon || isIcon(n.desktopEntry)) && (
|
||||
<image
|
||||
class="app-icon"
|
||||
visible={Boolean(n.appIcon || n.desktopEntry)}
|
||||
iconName={n.appIcon || n.desktopEntry}
|
||||
/>
|
||||
)}
|
||||
<label
|
||||
class="app-name"
|
||||
halign={Gtk.Align.START}
|
||||
ellipsize={Pango.EllipsizeMode.END}
|
||||
label={n.appName || "Unknown"}
|
||||
/>
|
||||
<label
|
||||
class="time"
|
||||
hexpand
|
||||
halign={Gtk.Align.END}
|
||||
label={handleTime(n.time)}
|
||||
/>
|
||||
<button onClicked={handleDismiss}>
|
||||
<image iconName="window-close-symbolic" />
|
||||
</button>
|
||||
</box>
|
||||
<Gtk.Separator visible />
|
||||
<box class="content">
|
||||
{n.image && fileExists(n.image) && (
|
||||
<image valign={Gtk.Align.START} class="image" file={n.image} />
|
||||
)}
|
||||
{n.image && isIcon(n.image) && (
|
||||
<box valign={Gtk.Align.START} class="icon-image">
|
||||
<image
|
||||
iconName={n.image}
|
||||
halign={Gtk.Align.CENTER}
|
||||
valign={Gtk.Align.CENTER}
|
||||
/>
|
||||
</box>
|
||||
)}
|
||||
<box orientation={Gtk.Orientation.VERTICAL}>
|
||||
<label
|
||||
class="summary"
|
||||
halign={Gtk.Align.START}
|
||||
xalign={0}
|
||||
label={n.summary}
|
||||
ellipsize={Pango.EllipsizeMode.END}
|
||||
/>
|
||||
{n.body && (
|
||||
<label
|
||||
class="body"
|
||||
wrap
|
||||
useMarkup
|
||||
halign={Gtk.Align.START}
|
||||
xalign={0}
|
||||
justify={Gtk.Justification.FILL}
|
||||
label={n.body}
|
||||
/>
|
||||
)}
|
||||
</box>
|
||||
</box>
|
||||
{n.actions.length > 0 && (
|
||||
<box class="actions">
|
||||
{n.actions.map(({ label, id }) => (
|
||||
<button hexpand onClicked={() => handleInvoke(id)}>
|
||||
<label label={label} halign={Gtk.Align.CENTER} hexpand />
|
||||
</button>
|
||||
))}
|
||||
</box>
|
||||
)}
|
||||
</box>
|
||||
</Adw.Clamp>
|
||||
);
|
||||
type Props = {
|
||||
setup(self: EventBox): void
|
||||
onHoverLost(self: EventBox): void
|
||||
notification: Notifd.Notification
|
||||
}
|
||||
|
||||
export default function Notification(props: Props) {
|
||||
const { notification: n, onHoverLost, setup } = props
|
||||
const { START, CENTER, END } = Gtk.Align
|
||||
|
||||
return <eventbox
|
||||
class={`Notification ${urgency(n)}`}
|
||||
setup={setup}
|
||||
onHoverLost={onHoverLost}>
|
||||
<box vertical>
|
||||
<box class="header">
|
||||
{(n.appIcon || n.desktopEntry) && <icon
|
||||
class="app-icon"
|
||||
visible={Boolean(n.appIcon || n.desktopEntry)}
|
||||
icon={n.appIcon || n.desktopEntry}
|
||||
/>}
|
||||
<label
|
||||
class="app-name"
|
||||
halign={START}
|
||||
truncate
|
||||
label={n.appName || "Unknown"}
|
||||
/>
|
||||
<label
|
||||
class="time"
|
||||
hexpand
|
||||
halign={END}
|
||||
label={time(n.time)}
|
||||
/>
|
||||
<button onClicked={() => n.dismiss()}>
|
||||
<icon icon="window-close-symbolic" />
|
||||
</button>
|
||||
</box>
|
||||
<Gtk.Separator visible />
|
||||
<box class="content">
|
||||
{n.image && fileExists(n.image) && <box
|
||||
valign={START}
|
||||
class="image"
|
||||
css={`background-image: url('${n.image}')`}
|
||||
/>}
|
||||
{n.image && isIcon(n.image) && <box
|
||||
expand={false}
|
||||
valign={START}
|
||||
class="icon-image">
|
||||
<icon icon={n.image} expand halign={CENTER} valign={CENTER} />
|
||||
</box>}
|
||||
<box vertical>
|
||||
<label
|
||||
class="summary"
|
||||
halign={START}
|
||||
xalign={0}
|
||||
label={n.summary}
|
||||
truncate
|
||||
/>
|
||||
{n.body && <label
|
||||
class="body"
|
||||
wrap
|
||||
useMarkup
|
||||
halign={START}
|
||||
xalign={0}
|
||||
justifyFill
|
||||
label={n.body}
|
||||
/>}
|
||||
</box>
|
||||
</box>
|
||||
{n.get_actions().length > 0 && <box class="actions">
|
||||
{n.get_actions().map(({ label, id }) => (
|
||||
<button
|
||||
hexpand
|
||||
onClicked={() => n.invoke(id)}>
|
||||
<label label={label} halign={CENTER} hexpand />
|
||||
</button>
|
||||
))}
|
||||
</box>}
|
||||
</box>
|
||||
</eventbox>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,79 +1,107 @@
|
|||
import app from "ags/gtk4/app";
|
||||
import { Astal, Gtk } from "ags/gtk4";
|
||||
import AstalNotifd from "gi://AstalNotifd";
|
||||
import Notification from "./Notification";
|
||||
import { createBinding, For, createState, onCleanup } from "ags";
|
||||
import { Astal, Gtk, Gdk } from "ags/gtk4"
|
||||
import Notifd from "gi://AstalNotifd"
|
||||
import Notification from "./Notification"
|
||||
import { type Subscribable } from "astal/binding"
|
||||
import { timeout } from "ags/time"
|
||||
import { createBinding, createState } from "ags"
|
||||
import GLib from "gi://GLib"
|
||||
|
||||
export default function NotificationPopups() {
|
||||
const monitors = createBinding(app, "monitors");
|
||||
// see comment below in constructor
|
||||
const TIMEOUT_DELAY = 5000
|
||||
|
||||
const notifd = AstalNotifd.get_default();
|
||||
// The purpose if this class is to replace Variable<Array<Widget>>
|
||||
// with a Map<number, Widget> type in order to track notification widgets
|
||||
// by their id, while making it conviniently bindable as an array
|
||||
class NotifiationMap implements Subscribable {
|
||||
// the underlying map to keep track of id widget pairs
|
||||
private map: Map<number, Gtk.Widget> = new Map()
|
||||
|
||||
const [notifications, setNotifications] = createState(
|
||||
new Array<AstalNotifd.Notification>(),
|
||||
);
|
||||
// it makes sense to use a Variable under the hood and use its
|
||||
// reactivity implementation instead of keeping track of subscribers ourselves
|
||||
private var: Array<Gtk.Widget> = createState([])
|
||||
|
||||
const notifiedHandler = notifd.connect("notified", (_, id, replaced) => {
|
||||
try {
|
||||
const notification = notifd.get_notification(id);
|
||||
if (!notification) {
|
||||
console.error(`Failed to get notification with id: ${id}`);
|
||||
return;
|
||||
}
|
||||
// notify subscribers to rerender when state changes
|
||||
private notifiy() {
|
||||
this.var.set([...this.map.values()].reverse())
|
||||
}
|
||||
|
||||
if (replaced && notifications.get().some((n) => n.id === id)) {
|
||||
setNotifications((ns) =>
|
||||
ns.map((n) => (n.id === id ? notification : n)),
|
||||
);
|
||||
} else {
|
||||
setNotifications((ns) => [notification, ...ns]);
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Failed to handle notification:", error);
|
||||
}
|
||||
});
|
||||
private constructor() {
|
||||
const notifd = Notifd.get_default()
|
||||
|
||||
const resolvedHandler = notifd.connect("resolved", (_, id) => {
|
||||
try {
|
||||
setNotifications((ns) => ns.filter((n) => n.id !== id));
|
||||
} catch (error) {
|
||||
console.error("Failed to resolve notification:", error);
|
||||
}
|
||||
});
|
||||
/**
|
||||
* uncomment this if you want to
|
||||
* ignore timeout by senders and enforce our own timeout
|
||||
* note that if the notification has any actions
|
||||
* they might not work, since the sender already treats them as resolved
|
||||
*/
|
||||
// notifd.ignoreTimeout = true
|
||||
|
||||
// technically, we don't need to cleanup because in this example this is a root component
|
||||
// and this cleanup function is only called when the program exits, but exiting will cleanup either way
|
||||
// but it's here to remind you that you should not forget to cleanup signal connections
|
||||
onCleanup(() => {
|
||||
notifd.disconnect(notifiedHandler);
|
||||
notifd.disconnect(resolvedHandler);
|
||||
});
|
||||
notifd.connect("notified", (_, id) => {
|
||||
this.set(id, Notification({
|
||||
notification: notifd.get_notification(id)!,
|
||||
|
||||
return (
|
||||
<For each={monitors} cleanup={(win) => (win as Gtk.Window).destroy()}>
|
||||
{(monitor) => (
|
||||
<window
|
||||
class="NotificationPopups"
|
||||
gdkmonitor={monitor}
|
||||
visible={notifications((ns) => ns.length > 0)}
|
||||
anchor={Astal.WindowAnchor.TOP | Astal.WindowAnchor.RIGHT}
|
||||
>
|
||||
<box orientation={Gtk.Orientation.VERTICAL}>
|
||||
<For each={notifications}>
|
||||
{(notification) => (
|
||||
<Notification
|
||||
notification={notification}
|
||||
onHoverLost={() =>
|
||||
setNotifications((ns) =>
|
||||
ns.filter((n) => n.id !== notification.id),
|
||||
)
|
||||
}
|
||||
/>
|
||||
)}
|
||||
</For>
|
||||
</box>
|
||||
</window>
|
||||
)}
|
||||
</For>
|
||||
);
|
||||
// once hovering over the notification is done
|
||||
// destroy the widget without calling notification.dismiss()
|
||||
// so that it acts as a "popup" and we can still display it
|
||||
// in a notification center like widget
|
||||
// but clicking on the close button will close it
|
||||
onHoverLost: () => this.delete(id),
|
||||
|
||||
// notifd by default does not close notifications
|
||||
// until user input or the timeout specified by sender
|
||||
// which we set to ignore above
|
||||
setup: () => timeout(TIMEOUT_DELAY, () => {
|
||||
/**
|
||||
* uncomment this if you want to "hide" the notifications
|
||||
* after TIMEOUT_DELAY
|
||||
*/
|
||||
this.delete(id)
|
||||
})
|
||||
}))
|
||||
})
|
||||
|
||||
// notifications can be closed by the outside before
|
||||
// any user input, which have to be handled too
|
||||
notifd.connect("resolved", (_, id) => {
|
||||
this.delete(id)
|
||||
})
|
||||
}
|
||||
|
||||
private set(key: number, value: Gtk.Widget) {
|
||||
// in case of replacecment destroy previous widget
|
||||
this.map.get(key)?.destroy()
|
||||
this.map.set(key, value)
|
||||
this.notifiy()
|
||||
}
|
||||
|
||||
private delete(key: number) {
|
||||
this.map.get(key)?.destroy()
|
||||
this.map.delete(key)
|
||||
this.notifiy()
|
||||
}
|
||||
|
||||
// needed by the Subscribable interface
|
||||
get() {
|
||||
return this.var.get()
|
||||
}
|
||||
|
||||
// needed by the Subscribable interface
|
||||
subscribe(callback: (list: Array<Gtk.Widget>) => void) {
|
||||
return this.var.subscribe(callback)
|
||||
}
|
||||
}
|
||||
|
||||
export default function NotificationPopups(gdkmonitor: Gdk.Monitor) {
|
||||
const { TOP, RIGHT } = Astal.WindowAnchor
|
||||
const notifs = new NotifiationMap()
|
||||
|
||||
return <window
|
||||
className="NotificationPopups"
|
||||
gdkmonitor={gdkmonitor}
|
||||
exclusivity={Astal.Exclusivity.EXCLUSIVE}
|
||||
anchor={TOP | RIGHT}>
|
||||
<box vertical>
|
||||
{createBinding(notifs)}
|
||||
</box>
|
||||
</window>
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"ags": "*"
|
||||
}
|
||||
"dependencies": {
|
||||
"ags": "*"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ window.Bar {
|
|||
margin-top: 0.2em;
|
||||
}
|
||||
|
||||
.clients box box {
|
||||
.clients box {
|
||||
margin-right: 0.3em;
|
||||
}
|
||||
|
||||
|
|
@ -27,13 +27,11 @@ window.Bar {
|
|||
border-radius: 0.3em;
|
||||
background: #1f2430;
|
||||
}
|
||||
|
||||
.battery-item:hover {
|
||||
background: #023269;
|
||||
}
|
||||
|
||||
.item,
|
||||
.clients box box {
|
||||
.item, .clients box {
|
||||
background: #1f2430;
|
||||
padding-left: 0.7em;
|
||||
padding-right: 0.7em;
|
||||
|
|
@ -51,14 +49,12 @@ window.Bar {
|
|||
|
||||
button {
|
||||
background: #1f2430;
|
||||
border: none;
|
||||
border:none;
|
||||
padding: 0.2em;
|
||||
border-radius: 0.3em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.focused,
|
||||
.clients box.focused {
|
||||
.focused, .clients box.focused {
|
||||
background: #023269;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,72 +1,40 @@
|
|||
import Apps from "gi://AstalApps";
|
||||
import Apps from "gi://AstalApps"
|
||||
import AstalHyprland from "gi://AstalHyprland";
|
||||
|
||||
const app_icons = new Apps.Apps().list.reduce(
|
||||
(acc, app) => {
|
||||
// keys from AstalApps entries are typically wm_class (snake_case) or name
|
||||
const key = app.wm_class ?? app.name;
|
||||
if (key) {
|
||||
acc.classOrNames[key] = app.icon_name;
|
||||
}
|
||||
if (app.executable) {
|
||||
if (app.icon_name) {
|
||||
acc.classOrNames[app.wm_class ?? app.name] = app.icon_name;
|
||||
acc.executables[app.executable] = app.icon_name;
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{ classOrNames: {} as Record<string, string>, executables: {} as Record<string, string> },
|
||||
{ classOrNames: {}, executables: {} },
|
||||
);
|
||||
|
||||
export function getIconName(client: AstalHyprland.Client | null | undefined) {
|
||||
if (!client) return "";
|
||||
export function getIconName(client: AstalHyprland.Client) {
|
||||
if (!client) {
|
||||
return "";
|
||||
}
|
||||
|
||||
// try a bunch of fields (snake_case and camelCase variants)
|
||||
const possibleKeys = [
|
||||
// common client properties (snake_case)
|
||||
(client as any).wm_class,
|
||||
(client as any).initial_class,
|
||||
(client as any).executable,
|
||||
// camelCase variants (some bindings expose these)
|
||||
(client as any).class,
|
||||
(client as any).initialClass,
|
||||
(client as any).initialTitle,
|
||||
(client as any).title,
|
||||
(client as any).name,
|
||||
].filter(Boolean) as string[];
|
||||
|
||||
// 1) direct exact match
|
||||
for (const k of possibleKeys) {
|
||||
const icon = app_icons.classOrNames[k] ?? app_icons.executables[k];
|
||||
if (icon) {
|
||||
// cache the mapping for this client's canonical class (prefer wm_class or class)
|
||||
const cacheKey = (client as any).wm_class ?? (client as any).class ?? (client as any).name ?? k;
|
||||
app_icons.classOrNames[cacheKey] = icon;
|
||||
return icon;
|
||||
let icon = app_icons.classOrNames[client.class];
|
||||
if (!icon) {
|
||||
const icon_key = Object.keys(app_icons.classOrNames).find(
|
||||
(key) =>
|
||||
key.includes(client.title) ||
|
||||
key.includes(client.initialTitle) ||
|
||||
key.includes(client.initialClass) ||
|
||||
key.includes(client.class),
|
||||
);
|
||||
if (icon_key) {
|
||||
icon = app_icons.classOrNames[icon_key];
|
||||
app_icons.classOrNames[client.class] = icon;
|
||||
}
|
||||
}
|
||||
|
||||
// 2) fuzzy match: see if any stored key includes any of the client strings (title, name, etc.)
|
||||
const searchStrings = [
|
||||
(client as any).title,
|
||||
(client as any).initialTitle,
|
||||
(client as any).initial_class,
|
||||
(client as any).initialClass,
|
||||
(client as any).wm_class,
|
||||
(client as any).class,
|
||||
(client as any).name,
|
||||
].filter(Boolean) as string[];
|
||||
|
||||
for (const s of searchStrings) {
|
||||
const matchKey = Object.keys(app_icons.classOrNames).find((key) => key.includes(s));
|
||||
if (matchKey) {
|
||||
const icon = app_icons.classOrNames[matchKey];
|
||||
const cacheKey = (client as any).wm_class ?? (client as any).class ?? (client as any).name ?? s;
|
||||
app_icons.classOrNames[cacheKey] = icon;
|
||||
return icon;
|
||||
}
|
||||
if (!icon) {
|
||||
app_icons.classOrNames[client.class] = "";
|
||||
}
|
||||
|
||||
// nothing found — cache empty string so we don't repeat work
|
||||
const cacheKey = (client as any).wm_class ?? (client as any).class ?? (client as any).name ?? "";
|
||||
if (cacheKey) app_icons.classOrNames[cacheKey] = "";
|
||||
return "";
|
||||
return icon;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,55 +1,55 @@
|
|||
{
|
||||
description = "AGS Config";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
description = "AGS Config";
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||
|
||||
ags = {
|
||||
url = "github:aylur/ags";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
ags,
|
||||
}: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraPackages = with ags.packages.${pkgs.stdenv.hostPlatform.system}; [
|
||||
pkgs.gtksourceview
|
||||
pkgs.accountsservice
|
||||
|
||||
battery
|
||||
hyprland
|
||||
tray
|
||||
powerprofiles
|
||||
wireplumber
|
||||
mpris
|
||||
network
|
||||
apps
|
||||
notifd
|
||||
];
|
||||
in {
|
||||
packages.${system} = {
|
||||
default = ags.lib.bundle {
|
||||
inherit pkgs;
|
||||
src = ./files;
|
||||
name = "ags-bar";
|
||||
entry = "app.ts";
|
||||
extraPackages = extraPackages;
|
||||
};
|
||||
ags = {
|
||||
url = "github:aylur/ags";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system} = {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
# ags.packages.${system}.agsFull
|
||||
(ags.packages.${system}.default.override {
|
||||
extraPackages = extraPackages;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
ags,
|
||||
}: let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
extraPackages = with ags.packages.${pkgs.system}; [
|
||||
pkgs.gtksourceview
|
||||
pkgs.accountsservice
|
||||
|
||||
battery
|
||||
hyprland
|
||||
tray
|
||||
powerprofiles
|
||||
wireplumber
|
||||
mpris
|
||||
network
|
||||
apps
|
||||
notifd
|
||||
];
|
||||
in {
|
||||
packages.${system} = {
|
||||
default = ags.lib.bundle {
|
||||
inherit pkgs;
|
||||
src = ./files;
|
||||
name = "ags-bar";
|
||||
entry = "app.ts";
|
||||
extraPackages = extraPackages;
|
||||
};
|
||||
};
|
||||
|
||||
devShells.${system} = {
|
||||
default = pkgs.mkShell {
|
||||
buildInputs = [
|
||||
# ags.packages.${system}.agsFull
|
||||
(ags.packages.${system}.default.override {
|
||||
extraPackages = extraPackages;
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,113 +1,134 @@
|
|||
{pkgs, ...}: {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scrolling.history = 10000;
|
||||
window = {
|
||||
dynamic_padding = true;
|
||||
dynamic_title = true;
|
||||
opacity = 0.3;
|
||||
};
|
||||
env = {
|
||||
TERM = "xterm-256color";
|
||||
};
|
||||
colors = {
|
||||
bright = {
|
||||
black = "#555556";
|
||||
blue = "#00afff";
|
||||
cyan = "#50cdfe";
|
||||
green = "#b0e05e";
|
||||
magenta = "#af87ff";
|
||||
red = "#f5669c";
|
||||
white = "#ffffff";
|
||||
yellow = "#fef26c";
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
scrolling.history = 10000;
|
||||
window = {
|
||||
dynamic_padding = true;
|
||||
dynamic_title = true;
|
||||
opacity = 0.3;
|
||||
};
|
||||
env = {
|
||||
TERM = "xterm-256color";
|
||||
};
|
||||
colors = {
|
||||
bright = {
|
||||
black = "#555556";
|
||||
blue = "#00afff";
|
||||
cyan = "#50cdfe";
|
||||
green = "#b0e05e";
|
||||
magenta = "#af87ff";
|
||||
red = "#f5669c";
|
||||
white = "#ffffff";
|
||||
yellow = "#fef26c";
|
||||
};
|
||||
normal = {
|
||||
black = "#121213";
|
||||
blue = "#0f7fcf";
|
||||
cyan = "#42a7cf";
|
||||
green = "#97e123";
|
||||
magenta = "#8700ff";
|
||||
red = "#fa2573";
|
||||
white = "#bbbbbb";
|
||||
yellow = "#dfd460";
|
||||
};
|
||||
primary = {
|
||||
background = "#000011";
|
||||
foreground = "#F8F8F2";
|
||||
};
|
||||
};
|
||||
font = {
|
||||
size = pkgs.lib.mkDefault 15;
|
||||
bold = {
|
||||
family = "ZedMono Nerd Font";
|
||||
style = "Extended Bold";
|
||||
features = "+ss05";
|
||||
};
|
||||
bold_italic = {
|
||||
family = "ZedMono Nerd Font";
|
||||
style = "Extended Bold Italic";
|
||||
features = "+ss05";
|
||||
};
|
||||
italic = {
|
||||
family = "ZedMono Nerd Font";
|
||||
style = "Extended Italic";
|
||||
features = "+ss05";
|
||||
};
|
||||
normal = {
|
||||
family = "ZedMono Nerd Font";
|
||||
style = "Extended Light";
|
||||
features = "+ss05";
|
||||
};
|
||||
};
|
||||
keyboard.bindings = [
|
||||
{
|
||||
action = "ToggleFullscreen";
|
||||
key = "F11";
|
||||
}
|
||||
{
|
||||
action = "ToggleViMode";
|
||||
key = "Escape";
|
||||
mode = "Vi";
|
||||
}
|
||||
{
|
||||
action = "ScrollHalfPageUp";
|
||||
key = "E";
|
||||
mode = "Vi";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
key = "F";
|
||||
mods = "Control|Shift";
|
||||
action = "ReceiveChar";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[72;6u";
|
||||
key = "H";
|
||||
mods = "Control|Shift";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[74;6u";
|
||||
key = "J";
|
||||
mods = "Control|Shift";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[75;6u";
|
||||
key = "K";
|
||||
mods = "Control|Shift";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[76;6u";
|
||||
key = "L";
|
||||
mods = "Control|Shift";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[105;5u";
|
||||
key = "I";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[46;5u";
|
||||
key = "Period";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[44;5u";
|
||||
key = "Comma";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[59;5u";
|
||||
key = "Semicolon";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[13;2u";
|
||||
key = "Return";
|
||||
mods = "Shift";
|
||||
}
|
||||
];
|
||||
};
|
||||
normal = {
|
||||
black = "#121213";
|
||||
blue = "#0f7fcf";
|
||||
cyan = "#42a7cf";
|
||||
green = "#97e123";
|
||||
magenta = "#8700ff";
|
||||
red = "#fa2573";
|
||||
white = "#bbbbbb";
|
||||
yellow = "#dfd460";
|
||||
};
|
||||
primary = {
|
||||
background = "#000011";
|
||||
foreground = "#F8F8F2";
|
||||
};
|
||||
};
|
||||
font = {
|
||||
size = pkgs.lib.mkDefault 13;
|
||||
normal.family = "DejaVu Sans Mono";
|
||||
};
|
||||
keyboard.bindings = [
|
||||
{
|
||||
action = "ToggleFullscreen";
|
||||
key = "F11";
|
||||
}
|
||||
{
|
||||
action = "ToggleViMode";
|
||||
key = "Escape";
|
||||
mode = "Vi";
|
||||
}
|
||||
{
|
||||
action = "ScrollHalfPageUp";
|
||||
key = "E";
|
||||
mode = "Vi";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
key = "F";
|
||||
mods = "Control|Shift";
|
||||
action = "ReceiveChar";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[72;6u";
|
||||
key = "H";
|
||||
mods = "Control|Shift";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[74;6u";
|
||||
key = "J";
|
||||
mods = "Control|Shift";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[75;6u";
|
||||
key = "K";
|
||||
mods = "Control|Shift";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[76;6u";
|
||||
key = "L";
|
||||
mods = "Control|Shift";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[105;5u";
|
||||
key = "I";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[46;5u";
|
||||
key = "Period";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[44;5u";
|
||||
key = "Comma";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[59;5u";
|
||||
key = "Semicolon";
|
||||
mods = "Control";
|
||||
}
|
||||
{
|
||||
chars = "\\u001B[13;2u";
|
||||
key = "Return";
|
||||
mods = "Shift";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,80 +1,77 @@
|
|||
{ config, inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = false;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = "$nix_shell$username$hostname[](bg:#0F7FCF fg:prev_bg)$directory$git_branch$git_status[](fg:prev_bg) ";
|
||||
right_format = "";
|
||||
username = {
|
||||
show_always = true;
|
||||
style_user = "bg:#121213";
|
||||
style_root = "bg:#EA2C38";
|
||||
format = "[ $user]($style)";
|
||||
disabled = false;
|
||||
};
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
enableZshIntegration = false;
|
||||
settings = {
|
||||
add_newline = false;
|
||||
format = "$nix_shell$username$hostname[](bg:#0F7FCF fg:prev_bg)$directory$git_branch$git_status[](fg:prev_bg) ";
|
||||
right_format = "";
|
||||
username = {
|
||||
show_always = true;
|
||||
style_user = "bg:#121213";
|
||||
style_root = "bg:#EA2C38";
|
||||
format = "[ $user]($style)";
|
||||
disabled = false;
|
||||
};
|
||||
|
||||
hostname = {
|
||||
disabled = false;
|
||||
ssh_only = false;
|
||||
format = "[@$hostname ]($style)";
|
||||
style = "bg:#121213";
|
||||
};
|
||||
hostname = {
|
||||
disabled = false;
|
||||
ssh_only = false;
|
||||
format = "[@$hostname ]($style)";
|
||||
style = "bg:#121213";
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "bg:#0F7FCF fg:#080808";
|
||||
format = "[ $path ]($style)";
|
||||
truncation_length = 3;
|
||||
truncation_symbol = ".../";
|
||||
};
|
||||
directory = {
|
||||
style = "bg:#0F7FCF fg:#080808";
|
||||
format = "[ $path ]($style)";
|
||||
truncation_length = 3;
|
||||
truncation_symbol = ".../";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
symbol = "";
|
||||
style = "bg:#DFD460 fg:#080808";
|
||||
format = "[](fg:prev_bg bg:#DFD460)[ $symbol $branch ]($style)";
|
||||
};
|
||||
git_branch = {
|
||||
symbol = "";
|
||||
style = "bg:#DFD460 fg:#080808";
|
||||
format = "[](fg:prev_bg bg:#DFD460)[ $symbol $branch ]($style)";
|
||||
};
|
||||
|
||||
git_status = {
|
||||
style = "bg:#DFD460 fg:#080808";
|
||||
format = "[$all_status$ahead_behind ]($style)";
|
||||
};
|
||||
git_status = {
|
||||
style = "bg:#DFD460 fg:#080808";
|
||||
format = "[$all_status$ahead_behind ]($style)";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
symbol = "";
|
||||
style = "bg:#0F7FCF fg:#080808";
|
||||
format = "[ $symbol ]($style)[](fg:#0F7FCF bg:#121213)";
|
||||
disabled = false;
|
||||
};
|
||||
nix_shell = {
|
||||
symbol = "";
|
||||
style = "bg:#0F7FCF fg:#080808";
|
||||
format = "[ $symbol ]($style)[](fg:#0F7FCF bg:#121213)";
|
||||
disabled = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
historySize = 10000000;
|
||||
historyFile = "${config.xdg.dataHome}/bash/history";
|
||||
initExtra = pkgs.lib.mkAfter ''
|
||||
bind 'set show-all-if-ambiguous on'
|
||||
bind 'set completion-ignore-case on'
|
||||
bind 'TAB:menu-complete'
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
||||
'';
|
||||
shellAliases = {
|
||||
ll = "ls -lhat";
|
||||
ls = "ls --color=auto";
|
||||
lf = ''cd "$(${pkgs.lf}/bin/lf -print-last-dir)"'';
|
||||
wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"'';
|
||||
python = "python3";
|
||||
vim = "nvim";
|
||||
v = ''nvim -c ':lua require("oil").open()' && cd "$(cat /tmp/oil_dir 2> /dev/null || pwd)"'';
|
||||
rg = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
|
||||
reset = "tput reset";
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
historySize = 10000000;
|
||||
historyFile = "${config.xdg.dataHome}/bash/history";
|
||||
initExtra = pkgs.lib.mkAfter ''
|
||||
bind 'set show-all-if-ambiguous on'
|
||||
bind 'set completion-ignore-case on'
|
||||
bind 'TAB:menu-complete'
|
||||
bind '"\e[A": history-search-backward'
|
||||
bind '"\e[B": history-search-forward'
|
||||
'';
|
||||
shellAliases = {
|
||||
ll = "ls -lhat";
|
||||
ls = "ls --color=auto";
|
||||
lf = ''cd "$(${pkgs.lf}/bin/lf -print-last-dir)"'';
|
||||
wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"'';
|
||||
python = "python3";
|
||||
vim = "nvim";
|
||||
v = ''nvim -c ':lua require("oil").open()' && cd "$(cat /tmp/oil_dir 2> /dev/null || pwd)"'';
|
||||
rg = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
|
||||
reset = "tput reset";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,242 +1,252 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.file = {
|
||||
".mailcap".text = "text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
|
||||
};
|
||||
home.packages = with pkgs; [mailcap];
|
||||
home.file = {
|
||||
".mailcap".text =
|
||||
"text/html; w3m -dump -o -document_charset=%{charset} %s; nametemplate=%s.html; copiousoutput";
|
||||
};
|
||||
home.packages = with pkgs; [ mailcap ];
|
||||
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
database = {path = "/home/server/Storage/Thomas/Mail";};
|
||||
user = {
|
||||
name = "Thomas Avé";
|
||||
primary_email = "email@thomasave.be";
|
||||
other_email = "Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;";
|
||||
};
|
||||
maildir = {synchronize_flags = "true";};
|
||||
programs.notmuch = {
|
||||
enable = true;
|
||||
extraConfig = {
|
||||
database = { path = "/home/server/Storage/Thomas/Mail"; };
|
||||
user = {
|
||||
name = "Thomas Avé";
|
||||
primary_email = "email@thomasave.be";
|
||||
other_email = "Thomas.Ave@uantwerpen.be;Thomas.Ave@imec.be;";
|
||||
};
|
||||
maildir = { synchronize_flags = "true"; };
|
||||
};
|
||||
};
|
||||
};
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
extraBinds = {
|
||||
global = {
|
||||
"<C-p>" = ":menu -adc 'fzy -l 30' :cf -a<Enter>";
|
||||
"<tab>" = ":next-tab<Enter>";
|
||||
"?" = ":help keys<Enter>";
|
||||
"<F5>" = ":check-mail<Enter>";
|
||||
};
|
||||
messages = {
|
||||
"q" = ":q<Enter>";
|
||||
"<Backspace>" = ":q<Enter>";
|
||||
"j" = ":next<Enter>";
|
||||
"k" = ":prev<Enter>";
|
||||
"<Up>" = ":prev<Enter>";
|
||||
"g" = ":select 0<Enter>";
|
||||
"G" = ":select -1<Enter>";
|
||||
"J" = ":next-folder<Enter>";
|
||||
"K" = ":prev-folder<Enter>";
|
||||
"v" = ":mark -t<Enter>";
|
||||
"V" = ":mark -v<Enter>";
|
||||
"<Space>" = ":read -t<Enter>";
|
||||
"T" = ":toggle-threads<Enter>";
|
||||
"<Enter>" = ":view<Enter>";
|
||||
"d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
|
||||
"D" = ":delete<Enter>";
|
||||
"a" = ":archive flat<Enter>";
|
||||
"A" = ":unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>";
|
||||
"f" = ":flag -t<Enter>";
|
||||
"m" = ":compose<Enter>";
|
||||
"rr" = ":reply -a<Enter>";
|
||||
"rq" = ":reply -aq<Enter>";
|
||||
"Rr" = ":reply<Enter>";
|
||||
"Rq" = ":reply -q<Enter>";
|
||||
"c" = ":cf<space>";
|
||||
"$" = ":term<space>";
|
||||
"!" = ":term<space>";
|
||||
"|" = ":pipe<space>";
|
||||
"/" = ":search -a<space>";
|
||||
"\\" = ":filter -a <space>";
|
||||
"n" = ":next-result<Enter>";
|
||||
"N" = ":prev-result<Enter>";
|
||||
"<Esc>" = ":clear<Enter>";
|
||||
"s" = ":split<Enter>";
|
||||
"S" = ":vsplit<Enter>";
|
||||
"pl" = ":patch list<Enter>";
|
||||
"pa" = ":patch apply <Tab>";
|
||||
"pd" = ":patch drop <Tab>";
|
||||
"pb" = ":patch rebase<Enter>";
|
||||
"pt" = ":patch term<Enter>";
|
||||
"ps" = ":patch switch <Tab>";
|
||||
};
|
||||
view = {
|
||||
"/" = ":toggle-key-passthrough<Enter>/";
|
||||
"q" = ":close<Enter>";
|
||||
"O" = ":open<Enter>";
|
||||
"o" = ":open<Enter>";
|
||||
"S" = ":save<space>";
|
||||
"|" = ":pipe<space>";
|
||||
"D" = ":delete<Enter>";
|
||||
"A" = ":archive flat<Enter>";
|
||||
"<C-l>" = ":open-link <space>";
|
||||
"f" = ":flag -t<Enter>";
|
||||
"rr" = ":reply -a<Enter>";
|
||||
"rq" = ":reply -aq<Enter>";
|
||||
"Rr" = ":reply<Enter>";
|
||||
"Rq" = ":reply -q<Enter>";
|
||||
"H" = ":toggle-headers<Enter>";
|
||||
"<C-k>" = ":prev-part<Enter>";
|
||||
"<C-Up>" = ":prev-part<Enter>";
|
||||
"<C-j>" = ":next-part<Enter>";
|
||||
"<C-Down>" = ":next-part<Enter>";
|
||||
"J" = ":next<Enter>";
|
||||
"<C-Right>" = ":next<Enter>";
|
||||
"K" = ":prev<Enter>";
|
||||
"<C-Left>" = ":prev<Enter>";
|
||||
};
|
||||
"view::passthrough" = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"<Esc>" = ":toggle-key-passthrough<Enter>";
|
||||
};
|
||||
compose = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"$complete" = "<C-o>";
|
||||
"<C-k>" = ":prev-field<Enter>";
|
||||
"<C-Up>" = ":prev-field<Enter>";
|
||||
"<C-j>" = ":next-field<Enter>";
|
||||
"<C-Down>" = ":next-field<Enter>";
|
||||
"<A-p>" = ":switch-account -p<Enter>";
|
||||
"<C-Left>" = ":switch-account -p<Enter>";
|
||||
"<A-n>" = ":switch-account -n<Enter>";
|
||||
"<C-Right>" = ":switch-account -n<Enter>";
|
||||
"<tab>" = ":next-field<Enter>";
|
||||
"<backtab>" = ":prev-field<Enter>";
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-PgUp>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
"<C-PgDn>" = ":next-tab<Enter>";
|
||||
};
|
||||
"compose::editor" = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"<C-k>" = ":prev-field<Enter>";
|
||||
"<C-Up>" = ":prev-field<Enter>";
|
||||
"<C-j>" = ":next-field<Enter>";
|
||||
"<C-Down>" = ":next-field<Enter>";
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-PgUp>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
"<C-PgDn>" = ":next-tab<Enter>";
|
||||
};
|
||||
"compose::review" = {
|
||||
"y" = ":send<Enter>";
|
||||
"n" = ":abort<Enter>";
|
||||
"v" = ":preview<Enter>";
|
||||
"p" = ":postpone<Enter>";
|
||||
"q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
|
||||
"e" = ":edit<Enter>";
|
||||
"a" = ":attach<space>";
|
||||
"d" = ":detach<space>";
|
||||
};
|
||||
terminal = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
"<C-PgUp>" = ":prev-tab<Enter>";
|
||||
"<C-PgDn>" = ":next-tab<Enter>";
|
||||
};
|
||||
programs.aerc = {
|
||||
enable = true;
|
||||
extraBinds = {
|
||||
global = {
|
||||
"<C-p>" = ":menu -adc 'fzy -l 30' :cf -a<Enter>";
|
||||
"<tab>" = ":next-tab<Enter>";
|
||||
"?" = ":help keys<Enter>";
|
||||
"<F5>" = ":check-mail<Enter>";
|
||||
};
|
||||
messages = {
|
||||
"q" = ":q<Enter>";
|
||||
"<Backspace>" = ":q<Enter>";
|
||||
"j" = ":next<Enter>";
|
||||
"k" = ":prev<Enter>";
|
||||
"<Up>" = ":prev<Enter>";
|
||||
"g" = ":select 0<Enter>";
|
||||
"G" = ":select -1<Enter>";
|
||||
"J" = ":next-folder<Enter>";
|
||||
"K" = ":prev-folder<Enter>";
|
||||
"v" = ":mark -t<Enter>";
|
||||
"V" = ":mark -v<Enter>";
|
||||
"<Space>" = ":read -t<Enter>";
|
||||
"T" = ":toggle-threads<Enter>";
|
||||
"<Enter>" = ":view<Enter>";
|
||||
"d" = ":prompt 'Really delete this message?' 'delete-message'<Enter>";
|
||||
"D" = ":delete<Enter>";
|
||||
"a" = ":archive flat<Enter>";
|
||||
"A" = ":unmark -a<Enter>:mark -T<Enter>:archive flat<Enter>";
|
||||
"f" = ":flag -t<Enter>";
|
||||
"m" = ":compose<Enter>";
|
||||
"rr" = ":reply -a<Enter>";
|
||||
"rq" = ":reply -aq<Enter>";
|
||||
"Rr" = ":reply<Enter>";
|
||||
"Rq" = ":reply -q<Enter>";
|
||||
"c" = ":cf<space>";
|
||||
"$" = ":term<space>";
|
||||
"!" = ":term<space>";
|
||||
"|" = ":pipe<space>";
|
||||
"/" = ":search -a<space>";
|
||||
"\\" = ":filter -a <space>";
|
||||
"n" = ":next-result<Enter>";
|
||||
"N" = ":prev-result<Enter>";
|
||||
"<Esc>" = ":clear<Enter>";
|
||||
"s" = ":split<Enter>";
|
||||
"S" = ":vsplit<Enter>";
|
||||
"pl" = ":patch list<Enter>";
|
||||
"pa" = ":patch apply <Tab>";
|
||||
"pd" = ":patch drop <Tab>";
|
||||
"pb" = ":patch rebase<Enter>";
|
||||
"pt" = ":patch term<Enter>";
|
||||
"ps" = ":patch switch <Tab>";
|
||||
};
|
||||
view = {
|
||||
"/" = ":toggle-key-passthrough<Enter>/";
|
||||
"q" = ":close<Enter>";
|
||||
"O" = ":open<Enter>";
|
||||
"o" = ":open<Enter>";
|
||||
"S" = ":save<space>";
|
||||
"|" = ":pipe<space>";
|
||||
"D" = ":delete<Enter>";
|
||||
"A" = ":archive flat<Enter>";
|
||||
"<C-l>" = ":open-link <space>";
|
||||
"f" = ":flag -t<Enter>";
|
||||
"rr" = ":reply -a<Enter>";
|
||||
"rq" = ":reply -aq<Enter>";
|
||||
"Rr" = ":reply<Enter>";
|
||||
"Rq" = ":reply -q<Enter>";
|
||||
"H" = ":toggle-headers<Enter>";
|
||||
"<C-k>" = ":prev-part<Enter>";
|
||||
"<C-Up>" = ":prev-part<Enter>";
|
||||
"<C-j>" = ":next-part<Enter>";
|
||||
"<C-Down>" = ":next-part<Enter>";
|
||||
"J" = ":next<Enter>";
|
||||
"<C-Right>" = ":next<Enter>";
|
||||
"K" = ":prev<Enter>";
|
||||
"<C-Left>" = ":prev<Enter>";
|
||||
};
|
||||
"view::passthrough" = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"<Esc>" = ":toggle-key-passthrough<Enter>";
|
||||
};
|
||||
compose = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"$complete" = "<C-o>";
|
||||
"<C-k>" = ":prev-field<Enter>";
|
||||
"<C-Up>" = ":prev-field<Enter>";
|
||||
"<C-j>" = ":next-field<Enter>";
|
||||
"<C-Down>" = ":next-field<Enter>";
|
||||
"<A-p>" = ":switch-account -p<Enter>";
|
||||
"<C-Left>" = ":switch-account -p<Enter>";
|
||||
"<A-n>" = ":switch-account -n<Enter>";
|
||||
"<C-Right>" = ":switch-account -n<Enter>";
|
||||
"<tab>" = ":next-field<Enter>";
|
||||
"<backtab>" = ":prev-field<Enter>";
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-PgUp>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
"<C-PgDn>" = ":next-tab<Enter>";
|
||||
};
|
||||
"compose::editor" = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"<C-k>" = ":prev-field<Enter>";
|
||||
"<C-Up>" = ":prev-field<Enter>";
|
||||
"<C-j>" = ":next-field<Enter>";
|
||||
"<C-Down>" = ":next-field<Enter>";
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-PgUp>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
"<C-PgDn>" = ":next-tab<Enter>";
|
||||
};
|
||||
"compose::review" = {
|
||||
"y" = ":send<Enter>";
|
||||
"n" = ":abort<Enter>";
|
||||
"v" = ":preview<Enter>";
|
||||
"p" = ":postpone<Enter>";
|
||||
"q" = ":choose -o d discard abort -o p postpone postpone<Enter>";
|
||||
"e" = ":edit<Enter>";
|
||||
"a" = ":attach<space>";
|
||||
"d" = ":detach<space>";
|
||||
};
|
||||
terminal = {
|
||||
"$noinherit" = "true";
|
||||
"$ex" = "<C-x>";
|
||||
"<C-p>" = ":prev-tab<Enter>";
|
||||
"<C-n>" = ":next-tab<Enter>";
|
||||
"<C-PgUp>" = ":prev-tab<Enter>";
|
||||
"<C-PgDn>" = ":next-tab<Enter>";
|
||||
};
|
||||
};
|
||||
templates = {
|
||||
quoted_reply = ''
|
||||
{{(index .OriginalFrom 0).Name}}, {{dateFormat (.OriginalDate | toLocal) "Jan 02, 2006 at 15:04"}}:
|
||||
{{ if eq .OriginalMIMEType "text/html" -}}
|
||||
{{- exec `${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html` .OriginalText | quote -}}
|
||||
{{- else -}}
|
||||
{{- .OriginalText | quote -}}
|
||||
{{- end}}
|
||||
'';
|
||||
};
|
||||
extraConfig = {
|
||||
general = {
|
||||
term = "xterm-256color";
|
||||
unsafe-accounts-conf = true;
|
||||
};
|
||||
ui = {
|
||||
border-char-vertical = "│";
|
||||
border-char-horizontal = "─";
|
||||
styleset-name = "catppuccin-mocha";
|
||||
timestamp-format = "2006-01-02 15:04";
|
||||
sidebar-width = 30;
|
||||
mouse-enabled = true;
|
||||
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
|
||||
dirlist-tree = true;
|
||||
};
|
||||
viewer = {
|
||||
pager =
|
||||
"${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua";
|
||||
};
|
||||
compose = { address-book-cmd = ''notmuch address "%s"''; };
|
||||
multipart-converters = {
|
||||
"text/html" =
|
||||
"${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
|
||||
};
|
||||
filters = {
|
||||
"text/plain" = "cat";
|
||||
"text/calendar" = "${pkgs.gnome-calendar}/bin/gnome-calendar";
|
||||
"message/delivery-status" = "cat";
|
||||
"message/rfc822" = "cat";
|
||||
"text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
|
||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||
};
|
||||
};
|
||||
extraAccounts = {
|
||||
Zoho = {
|
||||
outgoing = "smtps://email%40thomasave.be@smtp.zoho.com";
|
||||
outgoing-cred-cmd = "cat ~/.secrets/Aerc/Zoho.key";
|
||||
source =
|
||||
"maildir:///home/server/Storage/Thomas/Mail/email@thomasave.be/";
|
||||
check-mail-cmd =
|
||||
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
check-mail-timeout = "60s";
|
||||
default = "Inbox";
|
||||
from = ''"Thomas Avé" <email@thomasave.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
UAntwerpen = {
|
||||
outgoing =
|
||||
"ssh server@192.168.1.2 /home/server/Containers/mbsync/send.sh";
|
||||
source =
|
||||
"maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@uantwerpen.be";
|
||||
check-mail-cmd =
|
||||
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
check-mail-timeout = "60s";
|
||||
default = "Inbox";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
IMEC = {
|
||||
outgoing = "smtp+insecure://ave57%40imec.be@smtp.thomasave.be:1025";
|
||||
outgoing-cred-cmd = "cat ~/.secrets/Aerc/IMEC.key";
|
||||
source =
|
||||
"maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@imec.be/";
|
||||
check-mail-cmd =
|
||||
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
check-mail-timeout = "60s";
|
||||
default = "Inbox";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@imec.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
NotMuch = {
|
||||
source = "notmuch:///home/server/Storage/Thomas/Mail/";
|
||||
check-mail-cmd =
|
||||
"ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
check-mail-timeout = "60s";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
|
||||
query-map = "${config.xdg.configHome}/aerc/map.conf";
|
||||
default = "INBOX";
|
||||
cache-headers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
templates = {
|
||||
quoted_reply = ''
|
||||
{{(index .OriginalFrom 0).Name}}, {{dateFormat (.OriginalDate | toLocal) "Jan 02, 2006 at 15:04"}}:
|
||||
{{ if eq .OriginalMIMEType "text/html" -}}
|
||||
{{- exec `${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html` .OriginalText | quote -}}
|
||||
{{- else -}}
|
||||
{{- .OriginalText | quote -}}
|
||||
{{- end}}
|
||||
'';
|
||||
};
|
||||
extraConfig = {
|
||||
general = {
|
||||
term = "xterm-256color";
|
||||
unsafe-accounts-conf = true;
|
||||
};
|
||||
ui = {
|
||||
border-char-vertical = "│";
|
||||
border-char-horizontal = "─";
|
||||
styleset-name = "catppuccin-mocha";
|
||||
timestamp-format = "2006-01-02 15:04";
|
||||
sidebar-width = 30;
|
||||
mouse-enabled = true;
|
||||
dirlist-right = "{{if .Unread}}{{humanReadable .Unread}}{{end}}";
|
||||
dirlist-tree = true;
|
||||
};
|
||||
viewer = {
|
||||
pager = "${pkgs.neovim}/bin/nvim -u ${config.xdg.configHome}/nvim/aerc.lua";
|
||||
};
|
||||
compose = {address-book-cmd = ''notmuch address "%s"'';};
|
||||
multipart-converters = {
|
||||
"text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
|
||||
};
|
||||
filters = {
|
||||
"text/plain" = "cat";
|
||||
"text/calendar" = "${pkgs.gnome-calendar}/bin/gnome-calendar";
|
||||
"message/delivery-status" = "cat";
|
||||
"message/rfc822" = "cat";
|
||||
"text/html" = "${pkgs.w3m}/bin/w3m -dump -o display_link_number=1 -T text/html";
|
||||
"application/x-sh" = "${pkgs.bat}/bin/bat -fP -l sh";
|
||||
};
|
||||
};
|
||||
extraAccounts = {
|
||||
Zoho = {
|
||||
outgoing = "smtps://email%40thomasave.be@smtp.zoho.com";
|
||||
outgoing-cred-cmd = "cat ~/.secrets/Aerc/Zoho.key";
|
||||
source = "maildir:///home/server/Storage/Thomas/Mail/email@thomasave.be/";
|
||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
check-mail-timeout = "60s";
|
||||
default = "Inbox";
|
||||
from = ''"Thomas Avé" <email@thomasave.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
UAntwerpen = {
|
||||
outgoing = "ssh server@192.168.1.2 /home/server/Containers/mbsync/send.sh";
|
||||
source = "maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@uantwerpen.be";
|
||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
check-mail-timeout = "60s";
|
||||
default = "Inbox";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
IMEC = {
|
||||
outgoing = "smtp+insecure://ave57%40imec.be@smtp.thomasave.be:1025";
|
||||
outgoing-cred-cmd = "cat ~/.secrets/Aerc/IMEC.key";
|
||||
source = "maildir:///home/server/Storage/Thomas/Mail/Thomas.Ave@imec.be/";
|
||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
check-mail-timeout = "60s";
|
||||
default = "Inbox";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@imec.be>'';
|
||||
cache-headers = true;
|
||||
};
|
||||
NotMuch = {
|
||||
source = "notmuch:///home/server/Storage/Thomas/Mail/";
|
||||
check-mail-cmd = "ssh server@10.1 /home/server/Containers/mbsync/sync.sh";
|
||||
check-mail-timeout = "60s";
|
||||
from = ''"Thomas Avé" <Thomas.Ave@uantwerpen.be>'';
|
||||
query-map = "${config.xdg.configHome}/aerc/map.conf";
|
||||
default = "INBOX";
|
||||
cache-headers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
home.file."${config.xdg.configHome}/aerc/map.conf".text = "Inbox=tag:inbox and not tag:archived and not tag:deleted";
|
||||
home.file."${config.xdg.configHome}/aerc/stylesets/catppuccin-mocha".text = ''
|
||||
home.file."${config.xdg.configHome}/aerc/map.conf".text =
|
||||
"Inbox=tag:inbox and not tag:archived and not tag:deleted";
|
||||
home.file."${config.xdg.configHome}/aerc/stylesets/catppuccin-mocha".text = ''
|
||||
*.default=true
|
||||
*.normal=true
|
||||
|
||||
|
|
@ -295,5 +305,5 @@
|
|||
diff_del.fg=#f38ba8
|
||||
quote_*.fg=#6c7086
|
||||
quote_1.fg=#9399b2
|
||||
'';
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,100 +1,102 @@
|
|||
{pkgs, ...}: let
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
in {
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
pkcs11Modules = [
|
||||
pkgs.eid-mw
|
||||
];
|
||||
extraPolicies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
ExtensionSettings = {
|
||||
"{3e4d2037-d300-4e95-859d-3cba866f46d3}" = {
|
||||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/private-internet-access-ext/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"{c7c120ff-2878-4e59-a5a3-cd4d1655bc13}" = {
|
||||
install_url = "file://${./files/signed.xpi}";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
Preferences = {
|
||||
"browser.disableResetPrompt" = true;
|
||||
"browser.download.panel.shown" = true;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
"browser.shell.defaultBrowserCheckCount" = 1;
|
||||
"browser.startup.homepage" = "https://start.duckduckgo.com";
|
||||
"browser.compactmode.show" = true;
|
||||
"browser.uidensity" = 1;
|
||||
"extensions.update.enabled" = false;
|
||||
"extensions.pocket.enabled" = lock-false;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"browser.contentblocking.category" = {
|
||||
Value = "strict";
|
||||
Status = "locked";
|
||||
};
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
"media.webrtc.camera.allow-pipewire" = true;
|
||||
};
|
||||
};
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
};
|
||||
profiles = {
|
||||
default = {
|
||||
id = 0;
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
search = {
|
||||
force = true;
|
||||
default = "ddg";
|
||||
order = ["ddg" "google"];
|
||||
in
|
||||
{
|
||||
programs.firefox = {
|
||||
enable = true;
|
||||
package = pkgs.wrapFirefox pkgs.firefox-unwrapped {
|
||||
pkcs11Modules = [
|
||||
pkgs.eid-mw
|
||||
];
|
||||
extraPolicies = {
|
||||
DisableTelemetry = true;
|
||||
DisableFirefoxStudies = true;
|
||||
DisplayBookmarksToolbar = "never"; # alternatives: "always" or "newtab"
|
||||
EnableTrackingProtection = {
|
||||
Value = true;
|
||||
Locked = true;
|
||||
Cryptomining = true;
|
||||
Fingerprinting = true;
|
||||
};
|
||||
ExtensionSettings = {
|
||||
"{3e4d2037-d300-4e95-859d-3cba866f46d3}" = {
|
||||
install_url =
|
||||
"https://addons.mozilla.org/firefox/downloads/latest/private-internet-access-ext/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
"{c7c120ff-2878-4e59-a5a3-cd4d1655bc13}" = {
|
||||
install_url = "file://${./files/signed.xpi}";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
};
|
||||
Preferences = {
|
||||
"browser.disableResetPrompt" = true;
|
||||
"browser.download.panel.shown" = true;
|
||||
"browser.shell.checkDefaultBrowser" = false;
|
||||
"browser.tabs.inTitlebar" = 0;
|
||||
"browser.shell.defaultBrowserCheckCount" = 1;
|
||||
"browser.startup.homepage" = "https://start.duckduckgo.com";
|
||||
"browser.compactmode.show" = true;
|
||||
"browser.uidensity" = 1;
|
||||
"extensions.update.enabled" = false;
|
||||
"extensions.pocket.enabled" = lock-false;
|
||||
"extensions.autoDisableScopes" = 0;
|
||||
"browser.contentblocking.category" = {
|
||||
Value = "strict";
|
||||
Status = "locked";
|
||||
};
|
||||
"privacy.trackingprotection.enabled" = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
profiles = {
|
||||
default = {
|
||||
id = 0;
|
||||
name = "default";
|
||||
isDefault = true;
|
||||
search = {
|
||||
force = true;
|
||||
default = "ddg";
|
||||
order = [ "ddg" "google" ];
|
||||
};
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
bitwarden
|
||||
privacy-badger
|
||||
beyond-20
|
||||
display-_anchors
|
||||
facebook-container
|
||||
multi-account-containers
|
||||
istilldontcareaboutcookies
|
||||
return-youtube-dislikes
|
||||
sponsorblock
|
||||
unpaywall
|
||||
vimium
|
||||
google-container
|
||||
duckduckgo-privacy-essentials
|
||||
];
|
||||
};
|
||||
};
|
||||
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
||||
ublock-origin
|
||||
bitwarden
|
||||
privacy-badger
|
||||
beyond-20
|
||||
display-_anchors
|
||||
facebook-container
|
||||
multi-account-containers
|
||||
istilldontcareaboutcookies
|
||||
return-youtube-dislikes
|
||||
sponsorblock
|
||||
unpaywall
|
||||
vimium
|
||||
google-container
|
||||
duckduckgo-privacy-essentials
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# xdg.mimeApps.defaultApplications = {
|
||||
# "application/json" = [ "firefox.desktop" ];
|
||||
# "application/x-extension-htm" = [ "firefox.desktop" ];
|
||||
# "application/x-extension-html" = [ "firefox.desktop" ];
|
||||
# "application/x-extension-shtml" = [ "firefox.desktop" ];
|
||||
# "application/x-extension-xhtml" = [ "firefox.desktop" ];
|
||||
# "application/x-extension-xht" = [ "firefox.desktop" ];
|
||||
# "application/xhtml+xml" = [ "firefox.desktop" ];
|
||||
# "text/html" = [ "firefox.desktop" ];
|
||||
# "text/xml" = [ "firefox.desktop" ];
|
||||
# "x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||
# "x-scheme-handler/ftp" = [ "firefox.desktop" ];
|
||||
# "x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
# "x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||
# "x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
# };
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"application/json" = [ "firefox.desktop" ];
|
||||
"application/x-extension-htm" = [ "firefox.desktop" ];
|
||||
"application/x-extension-html" = [ "firefox.desktop" ];
|
||||
"application/x-extension-shtml" = [ "firefox.desktop" ];
|
||||
"application/x-extension-xhtml" = [ "firefox.desktop" ];
|
||||
"application/x-extension-xht" = [ "firefox.desktop" ];
|
||||
"application/xhtml+xml" = [ "firefox.desktop" ];
|
||||
"text/html" = [ "firefox.desktop" ];
|
||||
"text/xml" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/about" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/ftp" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/http" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/unknown" = [ "firefox.desktop" ];
|
||||
"x-scheme-handler/https" = [ "firefox.desktop" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,38 +1,37 @@
|
|||
{...}: {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "DejaVu Sans Mono:size=13";
|
||||
term = "xterm-256color";
|
||||
line-height = "18";
|
||||
};
|
||||
tweak = {
|
||||
sixel = "yes";
|
||||
};
|
||||
scrollback.lines = 100000;
|
||||
colors-dark = {
|
||||
background = "000010";
|
||||
foreground = "F8F8F2";
|
||||
regular0 = "121212";
|
||||
regular1 = "fa2573";
|
||||
regular2 = "97e123";
|
||||
regular3 = "dfd460";
|
||||
regular4 = "0f7fcf";
|
||||
regular5 = "8700ff";
|
||||
regular6 = "42a7cf";
|
||||
regular7 = "bbbbbb";
|
||||
bright0 = "555556";
|
||||
bright1 = "f5669c";
|
||||
bright2 = "b0e05e";
|
||||
bright3 = "fef26c";
|
||||
bright4 = "00afff";
|
||||
bright5 = "af87ff";
|
||||
bright6 = "50cdfe";
|
||||
bright7 = "ffffff";
|
||||
alpha = "0.3";
|
||||
};
|
||||
{ ... }:
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "Iosevka:size=14:style=Extended:fontfeatures=+ss05";
|
||||
term = "xterm-256color";
|
||||
};
|
||||
tweak = {
|
||||
sixel = "yes";
|
||||
};
|
||||
colors = {
|
||||
background = "000010";
|
||||
foreground = "F8F8F2";
|
||||
regular0 = "121212";
|
||||
regular1 = "fa2573";
|
||||
regular2 = "97e123";
|
||||
regular3 = "dfd460";
|
||||
regular4 = "0f7fcf";
|
||||
regular5 = "8700ff";
|
||||
regular6 = "42a7cf";
|
||||
regular7 = "bbbbbb";
|
||||
bright0 = "555556";
|
||||
bright1 = "f5669c";
|
||||
bright2 = "b0e05e";
|
||||
bright3 = "fef26c";
|
||||
bright4 = "00afff";
|
||||
bright5 = "af87ff";
|
||||
bright6 = "50cdfe";
|
||||
bright7 = "ffffff";
|
||||
alpha = "0.3";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,43 +1,45 @@
|
|||
{...}: {
|
||||
programs.ghostty = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
installVimSyntax = true;
|
||||
themes = {
|
||||
personal = {
|
||||
background-opacity = 0.3;
|
||||
foreground = "#F8F8F2";
|
||||
background = "#000010";
|
||||
selection-foreground = "#121212";
|
||||
selection-background = "#b4d5ff";
|
||||
cursor-color = "#bbbbbb";
|
||||
palette = [
|
||||
"0=#121212"
|
||||
"8=#545454"
|
||||
"1=#fa2573"
|
||||
"9=#f5669c"
|
||||
"2=#97e123"
|
||||
"10=#b0e05e"
|
||||
"3=#dfd460"
|
||||
"11=#fef26c"
|
||||
"4=#0f7fcf"
|
||||
"12=#00afff"
|
||||
"5=#8700ff"
|
||||
"13=#af87ff"
|
||||
"6=#42a7cf"
|
||||
"14=#50cdfe"
|
||||
"7=#bbbbbb"
|
||||
"15=#ffffff"
|
||||
];
|
||||
};
|
||||
{ ... }:
|
||||
{
|
||||
programs.ghostty= {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
installVimSyntax = true;
|
||||
themes = {
|
||||
personal = {
|
||||
background-opacity = 0.3;
|
||||
foreground = "#F8F8F2";
|
||||
background = "#000010";
|
||||
selection-foreground = "#121212";
|
||||
selection-background = "#b4d5ff";
|
||||
cursor-color = "#bbbbbb";
|
||||
palette = [
|
||||
"0=#121212"
|
||||
"8=#545454"
|
||||
"1=#fa2573"
|
||||
"9=#f5669c"
|
||||
"2=#97e123"
|
||||
"10=#b0e05e"
|
||||
"3=#dfd460"
|
||||
"11=#fef26c"
|
||||
"4=#0f7fcf"
|
||||
"12=#00afff"
|
||||
"5=#8700ff"
|
||||
"13=#af87ff"
|
||||
"6=#42a7cf"
|
||||
"14=#50cdfe"
|
||||
"7=#bbbbbb"
|
||||
"15=#ffffff"
|
||||
];
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
resize-overlay = "never";
|
||||
theme = "personal";
|
||||
font-size = 13;
|
||||
font-family = "JetBrains Mono";
|
||||
window-decoration = false;
|
||||
# adjust-cell-height = "10%";
|
||||
|
||||
};
|
||||
};
|
||||
settings = {
|
||||
resize-overlay = "never";
|
||||
theme = "personal";
|
||||
font-size = 13;
|
||||
font-family = "JetBrains Mono";
|
||||
window-decoration = false;
|
||||
# adjust-cell-height = "10%";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,41 +1,40 @@
|
|||
{pkgs, ...}: {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
settings = {
|
||||
alias = {
|
||||
s = "status";
|
||||
a = "add";
|
||||
};
|
||||
user = {
|
||||
name = "Thomas Avé";
|
||||
email = "email@thomasave.be";
|
||||
};
|
||||
credentials.helper = "store";
|
||||
pull.rebase = false;
|
||||
push.autoSetupRemove = true;
|
||||
branch.autoSetupMerge = true;
|
||||
init.defaultBranch = "master";
|
||||
diff.noprefix = true;
|
||||
color.ui = "auto";
|
||||
core = {
|
||||
excludesfile = "~/.gitignore";
|
||||
editor = "${pkgs.neovim}/bin/nvim";
|
||||
};
|
||||
rerere.enabled = true;
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Thomas Avé";
|
||||
userEmail = "email@thomasave.be";
|
||||
lfs.enable = true;
|
||||
aliases = {
|
||||
s = "status";
|
||||
a = "add";
|
||||
};
|
||||
ignores = [
|
||||
"*.direnv/"
|
||||
".dmypy.json"
|
||||
];
|
||||
extraConfig = {
|
||||
credentials.helper = "store";
|
||||
pull.rebase = false;
|
||||
push.autoSetupRemove = true;
|
||||
branch.autoSetupMerge = "simple";
|
||||
init.defaultBranch = "master";
|
||||
diff.noprefix = true;
|
||||
color.ui = "auto";
|
||||
core = {
|
||||
excludesfile = "~/.gitignore";
|
||||
editor = "${pkgs.neovim}/bin/nvim";
|
||||
};
|
||||
rerere.enabled = true;
|
||||
};
|
||||
};
|
||||
ignores = [
|
||||
"*.direnv/"
|
||||
".dmypy.json"
|
||||
];
|
||||
};
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
os = {
|
||||
editPreset = "nvim";
|
||||
autoStageResolvedConflicts = false;
|
||||
};
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
os = {
|
||||
editPreset = "nvim";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
home.packages = [
|
||||
(pkgs.appimageTools.wrapType2 {
|
||||
pname = "Helium";
|
||||
version = "0.4.7.1";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://github.com/imputnet/helium-linux/releases/download/0.9.4.1/helium-0.9.4.1-x86_64.AppImage";
|
||||
sha256 = "sha256-N5gdWuxOrIudJx/4nYo4/SKSxakpTFvL4zzByv6Cnug=";
|
||||
};
|
||||
})
|
||||
];
|
||||
xdg.desktopEntries = {
|
||||
helium = {
|
||||
name = "Helium";
|
||||
genericName = "Web Browser";
|
||||
comment = "Access the Internet";
|
||||
exec = "Helium --enable-features=TouchpadOverscrollHistoryNavigation %U";
|
||||
startupNotify = true;
|
||||
terminal = false;
|
||||
icon = "chromium";
|
||||
type = "Application";
|
||||
categories = ["Network" "WebBrowser"];
|
||||
mimeType = [
|
||||
"x-scheme-handler/webcal"
|
||||
"application/pdf"
|
||||
"application/rdf+xml"
|
||||
"application/rss+xml"
|
||||
"application/xhtml+xml"
|
||||
"application/xhtml_xml"
|
||||
"application/xml"
|
||||
"image/gif"
|
||||
"image/jpeg"
|
||||
"image/png"
|
||||
"image/webp"
|
||||
"text/html"
|
||||
"text/xml"
|
||||
"x-scheme-handler/http"
|
||||
"x-scheme-handler/https"
|
||||
];
|
||||
};
|
||||
};
|
||||
xdg.mimeApps.defaultApplications = {
|
||||
"application/json" = ["helium.desktop"];
|
||||
"application/x-extension-htm" = ["helium.desktop"];
|
||||
"application/x-extension-html" = ["helium.desktop"];
|
||||
"application/x-extension-shtml" = ["helium.desktop"];
|
||||
"application/x-extension-xhtml" = ["helium.desktop"];
|
||||
"application/x-extension-xht" = ["helium.desktop"];
|
||||
"application/xhtml+xml" = ["helium.desktop"];
|
||||
"text/html" = ["helium.desktop"];
|
||||
"text/xml" = ["helium.desktop"];
|
||||
"x-scheme-handler/about" = ["helium.desktop"];
|
||||
"x-scheme-handler/ftp" = ["helium.desktop"];
|
||||
"x-scheme-handler/http" = ["helium.desktop"];
|
||||
"x-scheme-handler/unknown" = ["helium.desktop"];
|
||||
"x-scheme-handler/https" = ["helium.desktop"];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,298 +1,297 @@
|
|||
{pkgs, ...}: let
|
||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
||||
gnome-calendar = "${pkgs.gnome-calendar}/bin/gnome-calendar";
|
||||
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
||||
terminal-name = "foot";
|
||||
terminal = "${pkgs.foot}/bin/footclient";
|
||||
jq = "${pkgs.jq}/bin/jq";
|
||||
{ inputs, pkgs, ... }:
|
||||
let
|
||||
playerctl = "${pkgs.playerctl}/bin/playerctl";
|
||||
wl-paste = "${pkgs.wl-clipboard}/bin/wl-paste";
|
||||
nautilus = "${pkgs.nautilus}/bin/nautilus";
|
||||
gnome-calendar = "${pkgs.gnome-calendar}/bin/gnome-calendar";
|
||||
wpctl = "${pkgs.wireplumber}/bin/wpctl";
|
||||
terminal-name = ".kitty-wrapped";
|
||||
terminal = "${pkgs.kitty}/bin/kitty -1";
|
||||
rofi = "${pkgs.rofi-wayland}/bin/rofi";
|
||||
jq = "${pkgs.jq}/bin/jq";
|
||||
rofi-ykman = pkgs.writeShellScriptBin "rofi-ykman" ''
|
||||
accounts=$(${pkgs.yubikey-manager}/bin/ykman oath accounts list)
|
||||
prompt="YubiKey OATH"
|
||||
account=$(echo "''${accounts/, TOTP/\n}" | awk '{ print $0 "\0icon\x1fyubioath"; }' | ${rofi} -dmenu -i -p "$prompt" ''${shortcuts[@]})
|
||||
code=$(${pkgs.yubikey-manager}/bin/ykman oath accounts code "$account")
|
||||
IFS=', ' read -r -a code <<< "$code"
|
||||
echo -n "''${code[-1]}" | ${pkgs.wl-clipboard}/bin/wl-copy;
|
||||
'';
|
||||
|
||||
# Disable split-monitor-workspaces
|
||||
workspace_command_prefix = "";
|
||||
hyprland_plugins = [];
|
||||
# workspace_command_prefix = "split-";
|
||||
# hyprland_plugins = [ inputs.split-monitor-workspaces.packages.${pkgs.system}.split-monitor-workspaces ];
|
||||
|
||||
launch_terminal = pkgs.writeShellScriptBin "launch_terminal" ''
|
||||
function find_leaf_pid(){
|
||||
local PID
|
||||
local RET
|
||||
local NAME
|
||||
PID=$1
|
||||
for CHILD_PID in $(pgrep -P "$PID"); do
|
||||
RET=$(find_leaf_pid "$CHILD_PID")
|
||||
if [ "$RET" != "" ]; then
|
||||
PID="$RET"
|
||||
workspace_command_prefix = "split:";
|
||||
hyprland_plugins = [ pkgs.hyprlandPlugins.hyprsplit ];
|
||||
|
||||
# Disable split-monitor-workspaces
|
||||
# workspace_command_prefix = "";
|
||||
# hyprland_plugins = [];
|
||||
|
||||
launch_terminal = pkgs.writeShellScriptBin "launch_terminal" ''
|
||||
function find_leaf_pid(){
|
||||
local PID
|
||||
local RET
|
||||
local NAME
|
||||
PID=$1
|
||||
for CHILD_PID in $(pgrep -P "$PID"); do
|
||||
RET=$(find_leaf_pid "$CHILD_PID")
|
||||
if [ "$RET" != "" ]; then
|
||||
PID="$RET"
|
||||
fi
|
||||
done
|
||||
NAME=$(ps -p "$PID" -o comm=)
|
||||
if [ "$NAME" == "zsh" ]; then
|
||||
echo "$PID"
|
||||
elif [ "$NAME" == "ssh" ]; then
|
||||
echo "$PID"
|
||||
fi
|
||||
done
|
||||
NAME=$(ps -p "$PID" -o comm=)
|
||||
if [ "$NAME" == "zsh" ]; then
|
||||
echo "$PID"
|
||||
elif [ "$NAME" == "ssh" ]; then
|
||||
echo "$PID"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
LEAF_PID=$(find_leaf_pid "$1")
|
||||
if [ "$(ps -p "$LEAF_PID" -o comm=)" == "ssh" ]; then
|
||||
SSH_COMMAND=$(ps -p "$LEAF_PID" -o args --no-headers)
|
||||
if [[ "$SSH_COMMAND" == *"waypipe"* ]]; then
|
||||
CLIENT=$(echo "$SSH_COMMAND" | awk '{ print $5 }')
|
||||
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$LEAF_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
|
||||
SSH_SESSION_ID=$RANDOM
|
||||
${terminal} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
|
||||
else
|
||||
${terminal} -e zsh -c "ssh -t \"$(echo "$SSH_COMMAND" | awk '{ print $2 }')\""
|
||||
fi
|
||||
LEAF_PID=$(find_leaf_pid "$1")
|
||||
if [ "$(ps -p "$LEAF_PID" -o comm=)" == "ssh" ]; then
|
||||
SSH_COMMAND=$(ps -p "$LEAF_PID" -o args --no-headers)
|
||||
if [[ "$SSH_COMMAND" == *"waypipe"* ]]; then
|
||||
CLIENT=$(echo "$SSH_COMMAND" | awk '{ print $5 }')
|
||||
PREVIOUS_SESSION_ID=$(grep -z "SSH_SESSION_ID" "/proc/$LEAF_PID/environ" | xargs -0 -n 1 | grep -oP "[0-9]*")
|
||||
SSH_SESSION_ID=$RANDOM
|
||||
${terminal} -e zsh -c "SSH_SESSION_ID=$SSH_SESSION_ID waypipe ssh -t \"$CLIENT\" env SSH_SESSION_ID=\"$SSH_SESSION_ID\" PREVIOUS_SESSION_ID=\"$PREVIOUS_SESSION_ID\" \"zsh --login\""
|
||||
else
|
||||
${terminal} -e zsh -c "ssh -t \"$(echo "$SSH_COMMAND" | awk '{ print $2 }')\""
|
||||
fi
|
||||
|
||||
else # Not an ssh session
|
||||
if [ "$(ps -p "$1" -o comm=)" == "${terminal-name}" ]; then
|
||||
CWD=$(readlink -e /proc/"$LEAF_PID"/cwd)
|
||||
if [ "$CWD" != "" ]; then
|
||||
${terminal} --working-directory "$CWD"
|
||||
else # Not an ssh session
|
||||
if [ "$(ps -p "$1" -o comm=)" == "${terminal-name}" ]; then
|
||||
CWD=$(readlink -e /proc/"$LEAF_PID"/cwd)
|
||||
if [ "$CWD" != "" ]; then
|
||||
${terminal} --working-directory "$CWD"
|
||||
else
|
||||
${terminal}
|
||||
fi
|
||||
else
|
||||
${terminal}
|
||||
fi
|
||||
else
|
||||
${terminal}
|
||||
fi
|
||||
fi
|
||||
'';
|
||||
'';
|
||||
in {
|
||||
home.packages = [
|
||||
pkgs.wl-clipboard
|
||||
pkgs.jq
|
||||
];
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "on";
|
||||
splash = false;
|
||||
wallpaper = {
|
||||
path = "${./files/wallpaper.png}";
|
||||
monitor = "";
|
||||
};
|
||||
home.packages = [
|
||||
pkgs.wl-clipboard
|
||||
pkgs.jq
|
||||
];
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ipc = "off";
|
||||
splash = false;
|
||||
preload = [ "${./files/wallpaper.png}" ];
|
||||
wallpaper = [
|
||||
# Fill in by host-specific config!
|
||||
# "Display,${./files/wallpaper.png}"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = true;
|
||||
font_color = "rgb(202, 211, 245)";
|
||||
inner_color = "rgb(91, 96, 120)";
|
||||
outer_color = "rgb(24, 25, 38)";
|
||||
outline_thickness = 3;
|
||||
placeholder_text = "<span foreground=\"##cad3f5\">Password...</span>";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
general = {
|
||||
no_fade_in = false;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
input-field = [
|
||||
{
|
||||
size = "200, 50";
|
||||
position = "0, -80";
|
||||
monitor = "";
|
||||
dots_center = true;
|
||||
fade_on_empty = true;
|
||||
font_color = "rgb(202, 211, 245)";
|
||||
inner_color = "rgb(91, 96, 120)";
|
||||
outer_color = "rgb(24, 25, 38)";
|
||||
outline_thickness = 3;
|
||||
placeholder_text = "<span foreground=\"##cad3f5\">Password...</span>";
|
||||
shadow_passes = 2;
|
||||
}
|
||||
];
|
||||
general = {
|
||||
no_fade_in = false;
|
||||
};
|
||||
background = [
|
||||
{
|
||||
path = "screenshot";
|
||||
blur_passes = 3;
|
||||
blur_size = 8;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.enable = false;
|
||||
xwayland.enable = true;
|
||||
plugins = [] ++ hyprland_plugins;
|
||||
settings = {
|
||||
"$mainMod" = pkgs.lib.mkDefault "SUPER_L";
|
||||
"$altMod" = pkgs.lib.mkDefault "ALT_L";
|
||||
exec-once = [
|
||||
"uwsm app -- hyprpaper"
|
||||
"uwsm app -- foot --server"
|
||||
"uwsm app -- hyprctl dispatch exec ags run"
|
||||
"uwsm app -- ${pkgs.mate-polkit}/bin/polkit-mate"
|
||||
];
|
||||
env = [
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
"TERMINAL,${terminal}"
|
||||
"WLR_RENDERER_ALLOW_SOFTWARE,1"
|
||||
];
|
||||
debug = {disable_logs = false;};
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
systemd.variables = [ "--all" ];
|
||||
systemd.enable = true;
|
||||
systemd.enableXdgAutostart = true;
|
||||
xwayland.enable = true;
|
||||
plugins = [ ] ++ hyprland_plugins;
|
||||
settings = {
|
||||
"$mainMod" = pkgs.lib.mkDefault "SUPER_L";
|
||||
"$altMod" = pkgs.lib.mkDefault "ALT_L";
|
||||
exec-once = [
|
||||
"hyprpaper"
|
||||
"hyprctl dispatch exec ags run"
|
||||
"${wl-paste} --type text --watch cliphist store"
|
||||
"${wl-paste} --type image --watch cliphist store"
|
||||
"${pkgs.mate.mate-polkit}/bin/polkit-mate"
|
||||
];
|
||||
env = [
|
||||
"WLR_NO_HARDWARE_CURSORS,1"
|
||||
"TERMINAL,${terminal}"
|
||||
"WLR_RENDERER_ALLOW_SOFTWARE,1"
|
||||
];
|
||||
debug = { disable_logs = false; };
|
||||
windowrulev2 = [
|
||||
"float, title:^(rofi)(.*)$"
|
||||
"center, title:^(rofi)(.*)$"
|
||||
"noborder, title:^(rofi)(.*)$"
|
||||
"stayfocused, title:^()$,class:^(steam)$"
|
||||
"minsize 1 1, title:^()$,class:^(steam)$"
|
||||
"stayfocused, title:^()$,class:^(steam)$"
|
||||
"bordersize 0, floating:0, onworkspace:w[tv1]"
|
||||
"rounding 0, floating:0, onworkspace:w[tv1]"
|
||||
"bordersize 0, floating:0, onworkspace:f[1]"
|
||||
"rounding 0, floating:0, onworkspace:f[1]"
|
||||
];
|
||||
layerrule = [ "noanim,ags_bar_0" "noanim,selection" ];
|
||||
general = {
|
||||
gaps_in = 1;
|
||||
gaps_out = pkgs.lib.mkDefault 5;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(002f5fee)";
|
||||
"col.inactive_border" = "rgba(ffffff00)";
|
||||
layout = "dwindle";
|
||||
};
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
kb_options = pkgs.lib.mkDefault "compose:rctrl, shift:both_capslock, caps:ctrl_modifier";
|
||||
numlock_by_default = true;
|
||||
};
|
||||
binds = { scroll_event_delay = 1; };
|
||||
xwayland = { force_zero_scaling = true; };
|
||||
misc = {
|
||||
disable_hyprland_logo = 1;
|
||||
enable_anr_dialog = false;
|
||||
};
|
||||
decoration = {
|
||||
rounding = 1;
|
||||
blur = { enabled = false; };
|
||||
};
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 2, myBezier"
|
||||
"windowsOut, 1, 2, default, popin 80%"
|
||||
"border, 1, 2, default"
|
||||
"borderangle, 1, 2, default"
|
||||
"fade, 1, 2, default"
|
||||
"workspaces, 1, 1, default"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
preserve_split = "yes";
|
||||
force_split = 2;
|
||||
};
|
||||
gestures = {
|
||||
workspace_swipe = "on";
|
||||
workspace_swipe_invert = false;
|
||||
};
|
||||
device = [
|
||||
{
|
||||
name = "tpps/2-ibm-trackpoint";
|
||||
sensitivity = "+0.5";
|
||||
}
|
||||
{
|
||||
name = "synaptics-tm3276-022";
|
||||
sensitivity = "+0.5";
|
||||
}
|
||||
];
|
||||
workspace = [
|
||||
"w[tv1], gapsout:0, gapsin:0"
|
||||
"f[1], gapsout:0, gapsin:0"
|
||||
];
|
||||
bindr = [
|
||||
"$mainMod, $mainMod, exec, pkill rofi || ${rofi} -show drun"
|
||||
];
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
binde = [
|
||||
"$mainMod $altMod, L, resizeactive, 20 0"
|
||||
"$mainMod $altMod, H, resizeactive, -20 0"
|
||||
"$mainMod $altMod, K, resizeactive, 0 -20"
|
||||
"$mainMod $altMod, J, resizeactive, 0 20"
|
||||
];
|
||||
bind = [
|
||||
"$mainMod, return, exec, ${launch_terminal}/bin/launch_terminal $(hyprctl activewindow -j | ${jq} .pid)"
|
||||
"$mainMod SHIFT, return, exec, ${terminal}"
|
||||
"$mainMod, Q, killactive,"
|
||||
"$mainMod, A, exec, ${nautilus}"
|
||||
"$mainMod, S, exec, LC_TIME=\"en_GB.UTF-8\" ${gnome-calendar}"
|
||||
"$mainMod, B, exec, MOZ_ENABLE_WAYLAND=1 firefox"
|
||||
"$mainMod, M, fullscreen, 1"
|
||||
"$mainMod, F11, fullscreen"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod, SPACE, togglesplit, # dwindle"
|
||||
"CONTROL_L ALT_L, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
''$mainMod, C, exec, cliphist list | awk '{print $0, "\0icon\x1fcom.github.davidmhewitt.clipped"; }' | ${rofi} -dmenu -display-columns 2 | cliphist decode | wl-copy''
|
||||
"$mainMod, Y, exec, ${rofi-ykman}/bin/rofi-ykman"
|
||||
"$mainMod, N, exec, ${./files/rofi-ssh.sh}"
|
||||
"$mainMod, Escape, exec, ${rofi} -show power-menu -modi power-menu:${ ./files/rofi-power-menu.sh }"
|
||||
|
||||
# UPDATED: New Window Rule Syntax (0.53.0)
|
||||
windowrule = [
|
||||
"float on, match:title ^(rofi)(.*)$"
|
||||
"center on, match:title ^(rofi)(.*)$"
|
||||
"border_size 0, match:title ^(rofi)(.*)$" # 'noborder' is replaced by border_size 0
|
||||
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +10%"
|
||||
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 10%-"
|
||||
",XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0"
|
||||
",XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-"
|
||||
",XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
",mouse_right, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0"
|
||||
",mouse_left, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-"
|
||||
",XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioNext, exec, ${playerctl} next"
|
||||
",XF86AudioPrev, exec, ${playerctl} previous"
|
||||
"$mainMod,XF86AudioMute, exec, ${playerctl} play-pause"
|
||||
"$mainMod,XF86AudioRaiseVolume, exec, ${playerctl} next"
|
||||
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
|
||||
'', Print, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp -d)" - | wl-copy''
|
||||
'', Pause, exec, systemctl suspend''
|
||||
'', XF86Calculator, exec, systemctl suspend''
|
||||
|
||||
# Combined matches (replaces old multi-rule logic)
|
||||
"stay_focused on, match:title ^()$, match:class ^(steam)$"
|
||||
"min_size 1 1, match:title ^()$, match:class ^(steam)$"
|
||||
"stay_focused on, match:title ^()$, match:class ^(steam)$"
|
||||
|
||||
"workspace 8, match:class thunderbird"
|
||||
"workspace 9, match:class spotify"
|
||||
"workspace 10, match:class Slack"
|
||||
|
||||
# Windowrulev2-style logic updated to new prop syntax
|
||||
"border_size 0, match:float 0, match:workspace w[tv1]"
|
||||
"rounding 0, match:float 0, match:workspace w[tv1]"
|
||||
"border_size 0, match:float 0, match:workspace f[1]"
|
||||
"rounding 0, match:float 0, match:workspace f[1]"
|
||||
];
|
||||
|
||||
# UPDATED: New Layer Rule Syntax (0.53.0)
|
||||
# Syntax: effect value, match:namespace regex
|
||||
layerrule = [
|
||||
"no_anim on, match:namespace ags_bar_0"
|
||||
"no_anim on, match:namespace selection"
|
||||
"blur on, match:namespace vicinae"
|
||||
"ignore_alpha 0, match:namespace vicinae"
|
||||
"no_anim on, match:namespace vicinae"
|
||||
];
|
||||
|
||||
general = {
|
||||
gaps_in = 1;
|
||||
gaps_out = pkgs.lib.mkDefault 5;
|
||||
border_size = 2;
|
||||
"col.active_border" = "rgba(002f5fee)";
|
||||
"col.inactive_border" = "rgba(ffffff00)";
|
||||
layout = "dwindle";
|
||||
};
|
||||
input = {
|
||||
kb_layout = "us";
|
||||
follow_mouse = 1;
|
||||
kb_options = pkgs.lib.mkDefault "compose:rctrl, caps:ctrl_modifier";
|
||||
numlock_by_default = true;
|
||||
};
|
||||
binds = {scroll_event_delay = 1;};
|
||||
xwayland = {force_zero_scaling = true;};
|
||||
misc = {
|
||||
disable_hyprland_logo = 1;
|
||||
# Removed 'enable_anr_dialog' (deprecated/removed in recent versions)
|
||||
};
|
||||
decoration = {
|
||||
rounding = 1;
|
||||
blur = {enabled = false;};
|
||||
};
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 2, myBezier"
|
||||
"windowsOut, 1, 2, default, popin 80%"
|
||||
"border, 1, 2, default"
|
||||
"borderangle, 1, 2, default"
|
||||
"fade, 1, 2, default"
|
||||
"workspaces, 1, 1, default"
|
||||
];
|
||||
};
|
||||
dwindle = {
|
||||
preserve_split = "yes";
|
||||
force_split = 2;
|
||||
};
|
||||
|
||||
gesture = [
|
||||
"3, horizontal, workspace"
|
||||
];
|
||||
gestures = {
|
||||
workspace_swipe_invert = false;
|
||||
};
|
||||
device = [
|
||||
{
|
||||
name = "tpps/2-ibm-trackpoint";
|
||||
sensitivity = "+0.5";
|
||||
}
|
||||
{
|
||||
name = "synaptics-tm3276-022";
|
||||
sensitivity = "+0.5";
|
||||
}
|
||||
];
|
||||
workspace = [
|
||||
"w[tv1], gapsout:0, gapsin:0"
|
||||
"f[1], gapsout:0, gapsin:0"
|
||||
];
|
||||
bindr = [
|
||||
"$mainMod, $mainMod, exec, vicinae toggle"
|
||||
];
|
||||
bindm = [
|
||||
"$mainMod, mouse:272, movewindow"
|
||||
"$mainMod, mouse:273, resizewindow"
|
||||
];
|
||||
binde = [
|
||||
"$mainMod $altMod, L, resizeactive, 20 0"
|
||||
"$mainMod $altMod, H, resizeactive, -20 0"
|
||||
"$mainMod $altMod, K, resizeactive, 0 -20"
|
||||
"$mainMod $altMod, J, resizeactive, 0 20"
|
||||
];
|
||||
bind =
|
||||
[
|
||||
"$mainMod, return, exec, ${launch_terminal}/bin/launch_terminal $(hyprctl activewindow -j | ${jq} .pid)"
|
||||
"$mainMod SHIFT, return, exec, ${terminal}"
|
||||
"$mainMod, Q, killactive,"
|
||||
"$mainMod, A, exec, ${nautilus}"
|
||||
"$mainMod, S, exec, LC_TIME=\"en_GB.UTF-8\" ${gnome-calendar}"
|
||||
"$mainMod, B, exec, Helium"
|
||||
"$mainMod, M, fullscreen, 1"
|
||||
"$mainMod, F11, fullscreen"
|
||||
"$mainMod, F, togglefloating,"
|
||||
"$mainMod, SPACE, layoutmsg, togglesplit"
|
||||
"CONTROL_L ALT_L, L, exec, ${pkgs.hyprlock}/bin/hyprlock"
|
||||
"$mainMod, C, exec, vicinae vicinae://extensions/vicinae/clipboard/history"
|
||||
"$mainMod, N, exec, vicinae vicinae://extensions/vicinae/wm/switch-windows"
|
||||
"$mainMod, Escape, exec, vicinae open -q \"Power Management \""
|
||||
",XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +10%"
|
||||
",XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 10%-"
|
||||
",XF86AudioRaiseVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%+ --limit 1.0"
|
||||
",XF86AudioLowerVolume, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 10%-"
|
||||
",XF86AudioMicMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
|
||||
# ",mouse:273, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%+ --limit 1.0"
|
||||
# ",mouse:272, exec, ${wpctl} set-volume @DEFAULT_AUDIO_SINK@ 1%-"
|
||||
",XF86AudioMute, exec, ${wpctl} set-mute @DEFAULT_AUDIO_SINK@ toggle"
|
||||
",XF86AudioNext, exec, ${playerctl} next"
|
||||
",XF86AudioPrev, exec, ${playerctl} previous"
|
||||
"$mainMod,XF86AudioMute, exec, ${playerctl} play-pause"
|
||||
"$mainMod,XF86AudioRaiseVolume, exec, ${playerctl} next"
|
||||
"$mainMod,XF86AudioLowerVolume, exec, ${playerctl} previous"
|
||||
'', Print, exec, ${pkgs.grim}/bin/grim -g "$(${pkgs.slurp}/bin/slurp -d)" - | wl-copy''
|
||||
'', Pause, exec, systemctl suspend''
|
||||
'', XF86Calculator, exec, systemctl suspend''
|
||||
|
||||
"$mainMod, H, exec, ${./files/vim-hypr-nav.sh} l"
|
||||
"$mainMod, L, exec, ${./files/vim-hypr-nav.sh} r"
|
||||
"$mainMod, K, exec, ${./files/vim-hypr-nav.sh} u"
|
||||
"$mainMod, J, exec, ${./files/vim-hypr-nav.sh} d"
|
||||
"$mainMod CONTROL_L, H, swapwindow, l"
|
||||
"$mainMod CONTROL_L, L, swapwindow, r"
|
||||
"$mainMod CONTROL_L, K, swapwindow, u"
|
||||
"$mainMod CONTROL_L, J, swapwindow, d"
|
||||
"$mainMod SHIFT, H, movewindow, l"
|
||||
"$mainMod SHIFT, L, movewindow, r"
|
||||
"$mainMod SHIFT, K, movewindow, u"
|
||||
"$mainMod SHIFT, J, movewindow, d"
|
||||
"$mainMod SHIFT, T, ${workspace_command_prefix}movetoworkspace, empty"
|
||||
"$mainMod, T, ${workspace_command_prefix}workspace, empty"
|
||||
"$mainMod, TAB, ${workspace_command_prefix}workspace, m+1"
|
||||
"$mainMod SHIFT, TAB, ${workspace_command_prefix}workspace, m-1"
|
||||
"$mainMod, Caps_Lock, ${workspace_command_prefix}workspace, m+1"
|
||||
"$mainMod SHIFT, Caps_Lock, ${workspace_command_prefix}workspace, m-1"
|
||||
]
|
||||
++ (
|
||||
# workspaces
|
||||
builtins.concatLists (builtins.genList (x: let
|
||||
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
||||
in [
|
||||
"$mainMod, ${ws}, ${workspace_command_prefix}workspace, ${toString (x + 1)}"
|
||||
"$mainMod SHIFT, ${ws}, ${workspace_command_prefix}movetoworkspace, ${toString (x + 1)}"
|
||||
])
|
||||
10)
|
||||
);
|
||||
"$mainMod, H, exec, ${./files/vim-hypr-nav.sh} l"
|
||||
"$mainMod, L, exec, ${./files/vim-hypr-nav.sh} r"
|
||||
"$mainMod, K, exec, ${./files/vim-hypr-nav.sh} u"
|
||||
"$mainMod, J, exec, ${./files/vim-hypr-nav.sh} d"
|
||||
"$mainMod CONTROL_L, H, swapwindow, l"
|
||||
"$mainMod CONTROL_L, L, swapwindow, r"
|
||||
"$mainMod CONTROL_L, K, swapwindow, u"
|
||||
"$mainMod CONTROL_L, J, swapwindow, d"
|
||||
"$mainMod SHIFT, H, movewindow, l"
|
||||
"$mainMod SHIFT, L, movewindow, r"
|
||||
"$mainMod SHIFT, K, movewindow, u"
|
||||
"$mainMod SHIFT, J, movewindow, d"
|
||||
"$mainMod SHIFT, T, ${workspace_command_prefix}movetoworkspace, empty"
|
||||
"$mainMod, T, ${workspace_command_prefix}workspace, empty"
|
||||
"$mainMod, TAB, ${workspace_command_prefix}workspace, m+1"
|
||||
"$mainMod SHIFT, TAB, ${workspace_command_prefix}workspace, m-1"
|
||||
"$mainMod, Caps_Lock, ${workspace_command_prefix}workspace, m+1"
|
||||
"$mainMod SHIFT, Caps_Lock, ${workspace_command_prefix}workspace, m-1"
|
||||
] ++ (
|
||||
# workspaces
|
||||
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
||||
builtins.concatLists (builtins.genList (x:
|
||||
let
|
||||
ws = let c = (x + 1) / 10; in builtins.toString (x + 1 - (c * 10));
|
||||
in
|
||||
[
|
||||
"$mainMod, ${ws}, ${workspace_command_prefix}workspace, ${toString (x + 1)}"
|
||||
"$mainMod SHIFT, ${ws}, ${workspace_command_prefix}movetoworkspace, ${toString (x + 1)}"
|
||||
]) 10));
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,58 +1,58 @@
|
|||
{lib, ...}: {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
font = {
|
||||
name = "'ZedMono Nerd Font' style='Extended Light' features=+ss05";
|
||||
size = lib.mkDefault 13;
|
||||
};
|
||||
keybindings = {
|
||||
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||
"kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||
"kitty_mod+enter" = "nop";
|
||||
"kitty_mod+equal" = "change_font_size current +1.0";
|
||||
"kitty_mod+minus" = "change_font_size current -1.0";
|
||||
"ctrl+shift+c" = "copy_to_clipboard";
|
||||
"ctrl+shift+v" = "paste_from_clipboard";
|
||||
};
|
||||
settings = {
|
||||
kitty_mod = "ctrl+alt";
|
||||
cursor_shape = "block";
|
||||
cursor_beam_thickness = 1;
|
||||
scrollback_lines = 100000;
|
||||
scrollback_fill_enlarged_window = "yes";
|
||||
enable_audio_bell = "no";
|
||||
confirm_os_window_close = 0;
|
||||
modify_font = "cell_height 115%";
|
||||
allow_remote_control = "socket-only";
|
||||
listen_on = "unix:/tmp/kitty";
|
||||
shell_integration = "enabled";
|
||||
action_alias = "kitty_scrollback_nvim kitten /home/user/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
|
||||
mouse_map = "ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output";
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
# Theme
|
||||
background = "#000010";
|
||||
foreground = "#F8F8F2";
|
||||
cursor = "#bbbbbb";
|
||||
selection_background = "#b4d5ff";
|
||||
color0 = "#121212";
|
||||
color8 = "#545454";
|
||||
color1 = "#fa2573";
|
||||
color9 = "#f5669c";
|
||||
color2 = "#97e123";
|
||||
color10 = "#b0e05e";
|
||||
color3 = "#dfd460";
|
||||
color11 = "#fef26c";
|
||||
color4 = "#0f7fcf";
|
||||
color12 = "#00afff";
|
||||
color5 = "#8700ff";
|
||||
color13 = "#af87ff";
|
||||
color6 = "#42a7cf";
|
||||
color14 = "#50cdfe";
|
||||
color7 = "#bbbbbb";
|
||||
color15 = "#ffffff";
|
||||
selection_foreground = "#121212";
|
||||
background_opacity = "0.3";
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
shellIntegration.enableZshIntegration = true;
|
||||
font = {
|
||||
name = "'ZedMono Nerd Font' style='Extended Light' features=+ss05";
|
||||
size = lib.mkDefault 14;
|
||||
|
||||
};
|
||||
keybindings = {
|
||||
"kitty_mod+h" = "kitty_scrollback_nvim";
|
||||
"kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output";
|
||||
"kitty_mod+enter" = "nop";
|
||||
"kitty_mod+equal" = "change_font_size current +1.0";
|
||||
"kitty_mod+minus" = "change_font_size current -1.0";
|
||||
};
|
||||
settings = {
|
||||
cursor_shape = "block";
|
||||
cursor_beam_thickness = 1;
|
||||
scrollback_lines = 100000;
|
||||
scrollback_fill_enlarged_window = "yes";
|
||||
enable_audio_bell = "no";
|
||||
confirm_os_window_close = 0;
|
||||
modify_font = "cell_height 115%";
|
||||
allow_remote_control = "socket-only";
|
||||
listen_on = "unix:/tmp/kitty";
|
||||
shell_integration = "enabled";
|
||||
action_alias = "kitty_scrollback_nvim kitten /home/user/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
|
||||
mouse_map = "ctrl+shift+right press ungrabbed combine : mouse_select_command_output : kitty_scrollback_nvim --config ksb_builtin_last_visited_cmd_output";
|
||||
|
||||
# Theme
|
||||
background = "#000010";
|
||||
foreground = "#F8F8F2";
|
||||
cursor = "#bbbbbb";
|
||||
selection_background = "#b4d5ff";
|
||||
color0 = "#121212";
|
||||
color8 = "#545454";
|
||||
color1 = "#fa2573";
|
||||
color9 = "#f5669c";
|
||||
color2 = "#97e123";
|
||||
color10 = "#b0e05e";
|
||||
color3 = "#dfd460";
|
||||
color11 = "#fef26c";
|
||||
color4 = "#0f7fcf";
|
||||
color12 = "#00afff";
|
||||
color5 = "#8700ff";
|
||||
color13 = "#af87ff";
|
||||
color6 = "#42a7cf";
|
||||
color14 = "#50cdfe";
|
||||
color7 = "#bbbbbb";
|
||||
color15 = "#ffffff";
|
||||
selection_foreground = "#121212";
|
||||
background_opacity = "0.3";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,49 +1,47 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.file."${config.xdg.configHome}/lf" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
icons = true;
|
||||
autoquit = true;
|
||||
mouse = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
cursorpreviewfmt = "";
|
||||
previewer = toString (pkgs.writeShellScript "script" ''
|
||||
home.file."${config.xdg.configHome}/lf" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
programs.lf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
icons = true;
|
||||
autoquit = true;
|
||||
mouse = true;
|
||||
number = true;
|
||||
relativenumber = true;
|
||||
cursorpreviewfmt = "";
|
||||
previewer = toString (pkgs.writeShellScript "script" ''
|
||||
case "''$1" in
|
||||
*.tar*) tar tf "''$1";;
|
||||
*.zip) unzip -l "''$1";;
|
||||
*.rar) unrar l "''$1";;
|
||||
*.7z) 7z l "''$1";;
|
||||
*.pdf) ${pkgs.poppler-utils}/bin/pdftotext "''$1" -;;
|
||||
*.pdf) ${pkgs.poppler_utils}/bin/pdftotext "''$1" -;;
|
||||
*) ${pkgs.highlight}/bin/highlight -O ansi "''$1";;
|
||||
esac
|
||||
'');
|
||||
};
|
||||
keybindings = {
|
||||
"<backspace2>" = "quit";
|
||||
"<c-e>" = "half-up";
|
||||
"." = "set hidden!";
|
||||
"o" = ''$nvim -c "lua require(\"oil\").open(\"$PWD\")"'';
|
||||
"-" = ''$nvim -c "lua require(\"oil\").open(\"$PWD\")"'';
|
||||
"<enter>" = "open";
|
||||
"<c-t>" = ":jump <enter>";
|
||||
};
|
||||
commands = {
|
||||
jump = ''
|
||||
'');
|
||||
};
|
||||
keybindings = {
|
||||
"<backspace2>" = "quit";
|
||||
"<c-e>" = "half-up";
|
||||
"." = "set hidden!";
|
||||
"o" = ''$nvim -c "lua require(\"oil\").open(\"$PWD\")"'';
|
||||
"-" = ''$nvim -c "lua require(\"oil\").open(\"$PWD\")"'';
|
||||
"<enter>" = "open";
|
||||
"<c-t>" = ":jump <enter>";
|
||||
};
|
||||
commands = {
|
||||
jump = ''
|
||||
''${{
|
||||
res=$(zsh -c "source ${../zsh/files/functions.zsh} && find_global d")
|
||||
lf -remote "send $id cd \"$res\""
|
||||
}}
|
||||
'';
|
||||
'';
|
||||
};
|
||||
cmdKeybindings = { q = "quit"; };
|
||||
};
|
||||
cmdKeybindings = {q = "quit";};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.file."${config.xdg.configHome}/mpv" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
programs.mpv = {enable = true;};
|
||||
home.file."${config.xdg.configHome}/mpv" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
programs.mpv = { enable = true; };
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@ cscale=ewa_lanczossharp
|
|||
video-sync=display-resample
|
||||
interpolation
|
||||
tscale=oversample
|
||||
vo=gpu
|
||||
hwdec=auto
|
||||
vo=gpu-next
|
||||
gpu-api=opengl
|
||||
force-window=yes
|
||||
keep-open=yes
|
||||
|
||||
|
|
|
|||
|
|
@ -1,180 +0,0 @@
|
|||
-- frame-seek.lua
|
||||
-- Allows seeking to a specific frame number or timestamp
|
||||
|
||||
local input = require("mp.input")
|
||||
|
||||
local jump_mode = nil -- "frame" or "time"
|
||||
local relative = false
|
||||
local minus = false
|
||||
local fps = 0
|
||||
|
||||
function parse_timestamp(input_str)
|
||||
-- Formats:
|
||||
-- HH:MM:SS.ms
|
||||
-- MM:SS.ms
|
||||
-- SS.ms
|
||||
-- .ms
|
||||
|
||||
-- More than 60 minutes or seconds can be entered - it will seek any amount accurately
|
||||
|
||||
-- First try to match HH:MM:SS.ms
|
||||
local hours, minutes, seconds = input_str:match("^(%d+):(%d+):(%d+%.?%d*)$")
|
||||
if hours and minutes and seconds then
|
||||
return tonumber(hours) * 3600 + tonumber(minutes) * 60 + tonumber(seconds)
|
||||
end
|
||||
|
||||
-- Try to match MM:SS.ms
|
||||
local minutes, seconds = input_str:match("^(%d+):(%d+%.?%d*)$")
|
||||
if minutes and seconds then
|
||||
return tonumber(minutes) * 60 + tonumber(seconds)
|
||||
end
|
||||
|
||||
-- Try to match just seconds (with or without decimal)
|
||||
local seconds = input_str:match("^(%d+%.?%d*)$")
|
||||
if seconds then
|
||||
return tonumber(seconds)
|
||||
end
|
||||
|
||||
local milliseconds = input_str:match("^%.(%d+)$")
|
||||
if milliseconds ~= nil then
|
||||
return tonumber("0." .. milliseconds)
|
||||
end
|
||||
|
||||
return nil
|
||||
end
|
||||
|
||||
function seek_to_frame(frame_num)
|
||||
fps = mp.get_property_number("estimated-vf-fps")
|
||||
if not fps or fps <= 0 then
|
||||
mp.osd_message("Error: Cannot determine framerate")
|
||||
return
|
||||
end
|
||||
|
||||
local timestamp = frame_num / fps
|
||||
|
||||
seek_to_timestamp(timestamp)
|
||||
end
|
||||
|
||||
function seek_to_timestamp(timestamp)
|
||||
if minus then timestamp = -timestamp end
|
||||
|
||||
local cur_time = mp.get_property_number("time-pos")
|
||||
if not cur_time then return end
|
||||
|
||||
if relative then
|
||||
if timestamp == 0 then return end
|
||||
|
||||
if math.abs(timestamp) < 10 then
|
||||
mp.commandv("seek", timestamp, "exact")
|
||||
else
|
||||
-- Only show OSD if seek >10s
|
||||
mp.command("seek " .. timestamp .. " exact")
|
||||
end
|
||||
else
|
||||
-- Handle imprecise float
|
||||
if math.abs(timestamp - cur_time) < 1e-7 then return end
|
||||
mp.command("seek " .. timestamp .. " absolute+exact")
|
||||
end
|
||||
|
||||
mp.observe_property("time-pos", "number", display_osd_message)
|
||||
end
|
||||
|
||||
function display_osd_message(_, timestamp)
|
||||
if timestamp == nil then return end
|
||||
mp.unobserve_property(display_osd_message)
|
||||
|
||||
-- Format the display nicely
|
||||
local hours = math.floor(timestamp / 3600)
|
||||
local minutes = math.floor((timestamp % 3600) / 60)
|
||||
local seconds = math.floor(timestamp % 60)
|
||||
local milliseconds = math.floor((timestamp % 1) * 1000 + 0.5)
|
||||
|
||||
local display_time = string.format("%02d:%02d", minutes, seconds)
|
||||
|
||||
if hours ~= 0 then
|
||||
display_time = string.format("%d:", hours) .. display_time
|
||||
end
|
||||
|
||||
if milliseconds ~= 0 or jump_mode == "frame" then
|
||||
display_time = display_time .. string.format(".%03d", milliseconds)
|
||||
end
|
||||
|
||||
if jump_mode == "frame" and fps and fps > 0 then
|
||||
local frame_num = math.floor(timestamp * fps + 0.5)
|
||||
mp.osd_message(string.format("Seeking to frame %d (%s)", frame_num, display_time))
|
||||
else
|
||||
mp.osd_message(string.format("Seeking to %s", display_time))
|
||||
end
|
||||
end
|
||||
|
||||
function jump_submit(input)
|
||||
if not input or input == "" then
|
||||
reset()
|
||||
return
|
||||
end
|
||||
|
||||
-- Handle relative marker
|
||||
if input:sub(1, 1) == "r" then
|
||||
relative = true
|
||||
input = input:sub(2)
|
||||
end
|
||||
|
||||
-- Handle negative input
|
||||
minus = false
|
||||
if input:sub(1, 1) == "-" then
|
||||
minus = true
|
||||
input = input:sub(2)
|
||||
end
|
||||
|
||||
if jump_mode == "frame" then
|
||||
local frame_num = tonumber(input)
|
||||
if frame_num then
|
||||
seek_to_frame(math.floor(frame_num))
|
||||
else
|
||||
mp.osd_message("Invalid frame number")
|
||||
end
|
||||
elseif jump_mode == "time" then
|
||||
local timestamp = parse_timestamp(input)
|
||||
if timestamp then
|
||||
seek_to_timestamp(timestamp)
|
||||
else
|
||||
mp.osd_message("Invalid timestamp format")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function reset()
|
||||
jump_mode = nil
|
||||
relative = false
|
||||
minus = false
|
||||
end
|
||||
|
||||
function run_script(mode, prompt, relative_flag)
|
||||
if mp.get_property("path") == nil then return end
|
||||
|
||||
reset()
|
||||
jump_mode = mode
|
||||
relative = relative_flag
|
||||
|
||||
input.get({
|
||||
prompt = prompt,
|
||||
submit = jump_submit,
|
||||
})
|
||||
end
|
||||
|
||||
-- Register key bindings
|
||||
mp.add_key_binding("ctrl+t", "seek-timestamp", function()
|
||||
run_script("time", "Seek to time:", false)
|
||||
end)
|
||||
|
||||
mp.add_key_binding("ctrl+T", "seek-frame", function()
|
||||
run_script("frame", "Seek to frame:", false)
|
||||
end)
|
||||
|
||||
mp.add_key_binding(nil, "seek-timestamp-relative", function()
|
||||
run_script("time", "Seek forward by time:", true)
|
||||
end)
|
||||
|
||||
mp.add_key_binding(nil, "seek-frame-relative", function()
|
||||
run_script("frame", "Seek forward by frame:", true)
|
||||
end)
|
||||
|
|
@ -1,55 +1,52 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [
|
||||
# codeium
|
||||
nixd
|
||||
alejandra
|
||||
clang-tools
|
||||
llvmPackages.libcxxClang
|
||||
go
|
||||
nodejs
|
||||
luarocks
|
||||
jre
|
||||
python313Packages.pip
|
||||
python313Packages.debugpy
|
||||
unzip
|
||||
dotnet-sdk_8
|
||||
cargo
|
||||
neovim-unwrapped
|
||||
tree-sitter
|
||||
home.packages = with pkgs; [
|
||||
# codeium
|
||||
nixd
|
||||
clang-tools
|
||||
llvmPackages.libcxxClang
|
||||
go
|
||||
nodejs
|
||||
luarocks
|
||||
jre
|
||||
python313Packages.pip
|
||||
python313Packages.debugpy
|
||||
unzip
|
||||
dotnet-sdk_8
|
||||
cargo
|
||||
neovim-unwrapped
|
||||
tree-sitter
|
||||
|
||||
# LSPs
|
||||
texlab
|
||||
ltex-ls
|
||||
basedpyright
|
||||
# mypy
|
||||
cmake-language-server
|
||||
vscode-langservers-extracted
|
||||
yaml-language-server
|
||||
bash-language-server
|
||||
docker-compose-language-service
|
||||
dockerfile-language-server
|
||||
lua-language-server
|
||||
rust-analyzer
|
||||
gopls
|
||||
# deno
|
||||
typescript-language-server
|
||||
jdt-language-server
|
||||
emmet-ls
|
||||
ruff
|
||||
csharp-ls
|
||||
tinymist
|
||||
];
|
||||
# LSPs
|
||||
texlab
|
||||
ltex-ls
|
||||
basedpyright
|
||||
# mypy
|
||||
cmake-language-server
|
||||
vscode-langservers-extracted
|
||||
yaml-language-server
|
||||
bash-language-server
|
||||
docker-compose-language-service
|
||||
dockerfile-language-server-nodejs
|
||||
lua-language-server
|
||||
rust-analyzer
|
||||
gopls
|
||||
# deno
|
||||
typescript-language-server
|
||||
jdt-language-server
|
||||
emmet-ls
|
||||
ruff
|
||||
csharp-ls
|
||||
tinymist
|
||||
];
|
||||
|
||||
home.file."${config.xdg.configHome}/nvim" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
home.file."${config.xdg.configHome}/nvim" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".clang-tidy".text = ''
|
||||
home.file.".clang-tidy".text = ''
|
||||
Checks: "*,
|
||||
-abseil-*,
|
||||
-altera-*,
|
||||
|
|
@ -81,8 +78,8 @@
|
|||
WarningsAsErrors: '''
|
||||
HeaderFilterRegex: '''
|
||||
FormatStyle: none
|
||||
'';
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
'';
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
vim.keymap.set("i", "jj", "<Esc>", {})
|
||||
vim.keymap.set({ "n", "v" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true })
|
||||
vim.keymap.set({ "n", "v" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true })
|
||||
vim.keymap.set({ "n", "v" }, "k", "v:count == 0 ? 'gk' : 'k'", { expr = true })
|
||||
vim.keymap.set({ "n", "v" }, "j", "v:count == 0 ? 'gj' : 'j'", { expr = true })
|
||||
vim.keymap.set("n", "<S-k>", "<Nop>", {})
|
||||
vim.keymap.set("t", "jj", "<C-\\><C-n>", { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "<Backspace>", ":q<cr>", { noremap = true, silent = true })
|
||||
|
|
@ -15,16 +15,15 @@ vim.keymap.set("n", "<C-I>", "<C-I>", { noremap = true, silent = true })
|
|||
vim.keymap.set("n", "n", "nzz", { noremap = true })
|
||||
vim.keymap.set("n", "N", "Nzz", { noremap = true })
|
||||
vim.keymap.set("x", "<leader>p", [["_dP]], { noremap = true })
|
||||
vim.keymap.set({ "n", "v" }, "<leader>y", [["+y]])
|
||||
vim.keymap.set({ "n", "v" }, "<leader>Y", [["+Y]])
|
||||
vim.keymap.set({"n", "v"}, "<leader>y", [["+y]])
|
||||
vim.keymap.set({"n", "v"}, "<leader>Y", [["+Y]])
|
||||
vim.keymap.set("n", "<Tab>", "<Nop>", { noremap = true })
|
||||
vim.keymap.set("n", "<leader><space>", ":noh<cr>", { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "gn", ":n<cr>", { noremap = true, silent = true })
|
||||
-- vim.keymap.set("n", "gi", ":ClangdSwitchSourceHeader<cr>", { noremap = true, silent = true })
|
||||
vim.keymap.set("n", "-", function() require("oil").open() end, { desc = "Open parent directory" })
|
||||
vim.keymap.set("n", "<leader>-", function() require("oil").open() end, { desc = "Open parent directory" })
|
||||
vim.keymap.set("n", "<leader>g", function() require("neogit").open({ kind = "replace" }) end,
|
||||
{ noremap = true, silent = true })
|
||||
vim.keymap.set("n", "-", function () require("oil").open() end, { desc = "Open parent directory" })
|
||||
vim.keymap.set("n", "<leader>-", function () require("oil").open() end, { desc = "Open parent directory" })
|
||||
vim.keymap.set("n", "<leader>g", function () require("neogit").open({kind="replace"}) end, { noremap = true, silent = true })
|
||||
vim.keymap.set("x", "<leader>a", "<C-A>", { noremap = true, silent = true })
|
||||
vim.keymap.set("x", "<leader>x", "<C-X>", { noremap = true, silent = true })
|
||||
vim.keymap.set("x", "<leader>ga", "g<C-A>", { noremap = true, silent = true })
|
||||
|
|
|
|||
|
|
@ -12,14 +12,8 @@ return {
|
|||
},
|
||||
},
|
||||
filetypes = {
|
||||
["*"] = true, -- Enable for all filetypes by default
|
||||
["dap-repl"] = false,
|
||||
["dapui_scopes"] = false,
|
||||
["dapui_stacks"] = false,
|
||||
["dapui_watches"] = false,
|
||||
["dapui_breakpoints"] = false,
|
||||
["TelescopePrompt"] = false,
|
||||
["Trouble"] = false,
|
||||
markdown = true,
|
||||
tex = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,60 @@
|
|||
return {
|
||||
"yetone/avante.nvim",
|
||||
event = "VeryLazy",
|
||||
version = false, -- Set this to "*" to always pull the latest release version, or set it to false to update to the latest code changes.
|
||||
opts = {
|
||||
providers = {
|
||||
copilot = {
|
||||
model = "claude-3.5-sonnet"
|
||||
},
|
||||
ollama = {
|
||||
model = "llama3.2:1b"
|
||||
},
|
||||
copilot_claude_new = {
|
||||
__inherited_from = "copilot",
|
||||
model = "claude-3.7-sonnet",
|
||||
},
|
||||
copilot_claude_old = {
|
||||
__inherited_from = "copilot",
|
||||
model = "claude-3.5-sonnet",
|
||||
},
|
||||
copilot_claude_thinking = {
|
||||
__inherited_from = "copilot",
|
||||
model = "claude-3.7-sonnet-thought",
|
||||
},
|
||||
copilot_o3_mini = {
|
||||
__inherited_from = "copilot",
|
||||
model = "o3-mini",
|
||||
},
|
||||
copilot_gemini = {
|
||||
__inherited_from = "copilot",
|
||||
model = "gemini-2.0-flash-001",
|
||||
},
|
||||
},
|
||||
provider = "copilot",
|
||||
-- cursor_applying_provider = 'ollama',
|
||||
behaviour = {
|
||||
enable_cursor_planning_mode = false, -- enable cursor planning mode!
|
||||
},
|
||||
hints = { enabled = false },
|
||||
},
|
||||
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
|
||||
build = "nix-shell -p cmake --command make",
|
||||
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
|
||||
dependencies = {
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
"stevearc/dressing.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"MunifTanjim/nui.nvim",
|
||||
--- The below dependencies are optional,
|
||||
"zbirenbaum/copilot.lua", -- for providers='copilot'
|
||||
{
|
||||
-- Make sure to set this up properly if you have lazy=true
|
||||
'MeanderingProgrammer/render-markdown.nvim',
|
||||
opts = {
|
||||
file_types = { "Avante" },
|
||||
},
|
||||
ft = { "Avante" },
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -88,6 +88,7 @@ return {
|
|||
lazy = false,
|
||||
config = function(_, opts)
|
||||
require('blink.cmp').setup(opts)
|
||||
local lspconfig = require('lspconfig')
|
||||
local filetypes = { "bibtex", "gitcommit", "markdown", "org", "tex", "restructuredtext", "rsweave", "latex",
|
||||
"quarto", "rmd", "context", "html", "xhtml", "typst", "mail" }
|
||||
local lsp_opts = {
|
||||
|
|
@ -195,8 +196,7 @@ return {
|
|||
}
|
||||
for server, config in pairs(lsp_opts.servers) do
|
||||
config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
|
||||
vim.lsp.enable(server)
|
||||
vim.lsp.config(server, config)
|
||||
lspconfig[server].setup(config)
|
||||
end
|
||||
vim.diagnostic.config({
|
||||
virtual_text = false
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ return {
|
|||
opts = {
|
||||
formatters_by_ft = {
|
||||
python = { 'ruff_format' },
|
||||
nix = { 'alejandra' },
|
||||
},
|
||||
format_on_save = {
|
||||
-- These options will be passed to conform.format()
|
||||
|
|
|
|||
|
|
@ -9,7 +9,9 @@ return {
|
|||
},
|
||||
config = function()
|
||||
local dap = require "dap"
|
||||
require('dap.ext.vscode').load_launchjs("launch.json")
|
||||
-- dap.defaults.fallback.exception_breakpoints = {'raised'}
|
||||
|
||||
local ui = require "dapui"
|
||||
|
||||
require("dapui").setup({
|
||||
|
|
@ -82,7 +84,7 @@ return {
|
|||
require('dap').set_breakpoint(vim.fn.input('Breakpoint condition: '))
|
||||
end, {})
|
||||
vim.api.nvim_create_user_command("DapToggleScopes", function()
|
||||
require("dapui").float_element("scopes", { enter = true, width = 250, height = 50, position = "center" })
|
||||
require("dapui").float_element("scopes", {enter = true, width=250, height=50, position="center"})
|
||||
end, {})
|
||||
-- dap.listeners.before.event_terminated.dapui_config = function()
|
||||
-- ui.close()
|
||||
|
|
|
|||
|
|
@ -1,37 +1,68 @@
|
|||
return {
|
||||
'nvim-treesitter/nvim-treesitter',
|
||||
branch = 'main',
|
||||
lazy = false,
|
||||
config = function()
|
||||
-- 1. Install Parsers
|
||||
require('nvim-treesitter').install({
|
||||
"typst", "cpp", "c", "lua", "vim", "dockerfile", "python", "java",
|
||||
"cmake", "diff", "gitcommit", "html", "css", "javascript", "json",
|
||||
"rust", "sql", "yaml", "markdown", "markdown_inline", "nix", "bibtex"
|
||||
})
|
||||
|
||||
-- 2. Safe Autocmd for Highlighting & Indent
|
||||
vim.api.nvim_create_autocmd('FileType', {
|
||||
callback = function(args)
|
||||
-- Get the language associated with the filetype
|
||||
local lang = vim.treesitter.language.get_lang(vim.bo[args.buf].filetype)
|
||||
if not lang then return end
|
||||
|
||||
-- IGNORE specific filetypes or large files
|
||||
if lang == "ini" then return end
|
||||
|
||||
local max_filesize = 2000 * 1024 -- 2MB
|
||||
local ok, stats = pcall(vim.uv.fs_stat, vim.api.nvim_buf_get_name(args.buf))
|
||||
if ok and stats and stats.size > max_filesize then return end
|
||||
|
||||
-- SAFEGUARD: Try to start. If it fails (e.g., 'snacks_layout_box'), 'success' will be false.
|
||||
local success, _ = pcall(vim.treesitter.start, args.buf, lang)
|
||||
|
||||
-- Only enable indentation if Treesitter actually started successfully
|
||||
if success then
|
||||
vim.bo[args.buf].indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
|
||||
end
|
||||
end,
|
||||
dependencies = {
|
||||
"luckasRanarison/tree-sitter-hyprlang",
|
||||
"nvim-treesitter/nvim-treesitter-textobjects",
|
||||
},
|
||||
build = ":TSUpdate",
|
||||
config = function ()
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "typst", "cpp", "c", "lua", "vim", "dockerfile", "python", "java", "cmake", "diff", "gitcommit", "html", "css", "javascript", "json", "rust", "sql", "yaml", "markdown", "markdown_inline", "nix", "bibtex" },
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
sync_install = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
disable = function(lang, buf) -- Disable if file size is too big
|
||||
if lang == "ini" or lang == "markdown" then
|
||||
return true
|
||||
end
|
||||
local max_filesize = 2000 * 1024 -- 2MB
|
||||
local ok, stats = pcall(vim.loop.fs_stat, vim.api.nvim_buf_get_name(buf))
|
||||
if ok and stats and stats.size > max_filesize then
|
||||
return true
|
||||
end
|
||||
end,
|
||||
},
|
||||
indent = {
|
||||
enable = true
|
||||
},
|
||||
textobjects = {
|
||||
select = {
|
||||
enable = true,
|
||||
lookahead = true,
|
||||
keymaps = {
|
||||
-- You can use the capture groups defined in textobjects.scm
|
||||
["af"] = "@function.outer",
|
||||
["if"] = "@function.inner",
|
||||
["ac"] = "@class.outer",
|
||||
["ic"] = { query = "@class.inner", desc = "Select inner part of a class region" },
|
||||
["as"] = { query = "@local.scope", query_group = "locals", desc = "Select language scope" },
|
||||
},
|
||||
-- You can choose the select mode (default is charwise 'v')
|
||||
--
|
||||
-- Can also be a function which gets passed a table with the keys
|
||||
-- * query_string: eg '@function.inner'
|
||||
-- * method: eg 'v' or 'o'
|
||||
-- and should return the mode ('v', 'V', or '<c-v>') or a table
|
||||
-- mapping query_strings to modes.
|
||||
selection_modes = {
|
||||
['@parameter.outer'] = 'v', -- charwise
|
||||
['@function.outer'] = 'V', -- linewise
|
||||
['@class.outer'] = '<c-v>', -- blockwise
|
||||
},
|
||||
-- If you set this to `true` (default is `false`) then any textobject is
|
||||
-- extended to include preceding or succeeding whitespace. Succeeding
|
||||
-- whitespace has priority in order to act similarly to eg the built-in
|
||||
-- `ap`.
|
||||
--
|
||||
-- Can also be a function which gets passed a table with the keys
|
||||
-- * query_string: eg '@function.inner'
|
||||
-- * selection_mode: eg 'v'
|
||||
-- and should return true or false
|
||||
include_surrounding_whitespace = false,
|
||||
},
|
||||
},
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,130 +1,128 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = with pkgs; [papirus-icon-theme];
|
||||
home.packages = with pkgs; [ papirus-icon-theme ];
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi;
|
||||
font = "SF Pro Rounded 13";
|
||||
extraConfig = {
|
||||
show-icons = true;
|
||||
icon-theme = "Papirus";
|
||||
kb-cancel = "Super_L+XF86Launch5,Escape";
|
||||
combi-hide-mode-prefix = true;
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
font = "SF Pro Rounded 13";
|
||||
extraConfig = {
|
||||
show-icons = true;
|
||||
icon-theme = "Papirus";
|
||||
kb-cancel = "Super_L+XF86Launch5,Escape";
|
||||
combi-hide-mode-prefix = true;
|
||||
};
|
||||
theme =
|
||||
let inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
background = mkLiteral "#0f111a";
|
||||
foreground = mkLiteral "#f1f1f1";
|
||||
selected = mkLiteral "#0033a1";
|
||||
selected-text = mkLiteral "#ffffff";
|
||||
};
|
||||
|
||||
"window" = {
|
||||
transparency = "real";
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
width = mkLiteral "800px";
|
||||
border-radius = mkLiteral "5px";
|
||||
};
|
||||
|
||||
"textbox-prompt-colon" = {
|
||||
expand = mkLiteral "false";
|
||||
background-color = mkLiteral "@background";
|
||||
padding = mkLiteral "4px 0px 0px 6px";
|
||||
};
|
||||
|
||||
"inputbar" = {
|
||||
children = mkLiteral "[ textbox-prompt-colon, entry ]";
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
expand = mkLiteral "false";
|
||||
border = mkLiteral "0px 0px 0px 0px";
|
||||
border-radius = mkLiteral "0px";
|
||||
border-color = mkLiteral "@selected";
|
||||
margin = mkLiteral "0px 0px 0px 0px";
|
||||
padding = mkLiteral "0px 0px 4px 0px";
|
||||
position = mkLiteral "center";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
placeholder-color = mkLiteral "@foreground";
|
||||
expand = mkLiteral "true";
|
||||
horizontal-align = mkLiteral "0";
|
||||
blink = mkLiteral "true";
|
||||
padding = mkLiteral "4px 0px 0px 4px";
|
||||
font = "SF Pro Rounded 25";
|
||||
};
|
||||
|
||||
"case-indicator" = {
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
spacing = mkLiteral "0";
|
||||
};
|
||||
|
||||
"listview" = {
|
||||
background-color = mkLiteral "@background";
|
||||
columns = mkLiteral "1";
|
||||
spacing = mkLiteral "5px";
|
||||
cycle = mkLiteral "true";
|
||||
dynamic = mkLiteral "true";
|
||||
layout = mkLiteral "vertical";
|
||||
fixed-height = "true";
|
||||
lines = mkLiteral "5";
|
||||
};
|
||||
|
||||
"mainbox" = {
|
||||
background-color = mkLiteral "@background";
|
||||
children = mkLiteral "[ inputbar, message, listview ]";
|
||||
spacing = mkLiteral "20px";
|
||||
padding = mkLiteral "20px 15px 15px 15px";
|
||||
};
|
||||
|
||||
"message" = {
|
||||
children = mkLiteral "[ textbox ]";
|
||||
border-radius = mkLiteral "5px";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
padding = mkLiteral "20px 6px 20px 80px";
|
||||
};
|
||||
|
||||
"element" = {
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
orientation = mkLiteral "horizontal";
|
||||
border-radius = mkLiteral "4px";
|
||||
padding = mkLiteral "2px 2px 2px 2px";
|
||||
};
|
||||
|
||||
"element-text, element-icon" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
"element-icon" = {
|
||||
size = mkLiteral "40px";
|
||||
padding = mkLiteral "10px 10px 10px 10px";
|
||||
};
|
||||
|
||||
"element-text" = { padding = mkLiteral "20px 0px 0px 10px"; };
|
||||
|
||||
"element selected" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@selected-text";
|
||||
border = mkLiteral "0px";
|
||||
border-radius = mkLiteral "3px";
|
||||
border-color = mkLiteral "@selected";
|
||||
};
|
||||
};
|
||||
};
|
||||
theme = let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
in {
|
||||
"*" = {
|
||||
background = mkLiteral "#0f111a";
|
||||
foreground = mkLiteral "#f1f1f1";
|
||||
selected = mkLiteral "#0033a1";
|
||||
selected-text = mkLiteral "#ffffff";
|
||||
};
|
||||
|
||||
"window" = {
|
||||
transparency = "real";
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
width = mkLiteral "800px";
|
||||
border-radius = mkLiteral "5px";
|
||||
};
|
||||
|
||||
"textbox-prompt-colon" = {
|
||||
expand = mkLiteral "false";
|
||||
background-color = mkLiteral "@background";
|
||||
padding = mkLiteral "4px 0px 0px 6px";
|
||||
};
|
||||
|
||||
"inputbar" = {
|
||||
children = mkLiteral "[ textbox-prompt-colon, entry ]";
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
expand = mkLiteral "false";
|
||||
border = mkLiteral "0px 0px 0px 0px";
|
||||
border-radius = mkLiteral "0px";
|
||||
border-color = mkLiteral "@selected";
|
||||
margin = mkLiteral "0px 0px 0px 0px";
|
||||
padding = mkLiteral "0px 0px 4px 0px";
|
||||
position = mkLiteral "center";
|
||||
};
|
||||
|
||||
"entry" = {
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
placeholder-color = mkLiteral "@foreground";
|
||||
expand = mkLiteral "true";
|
||||
horizontal-align = mkLiteral "0";
|
||||
blink = mkLiteral "true";
|
||||
padding = mkLiteral "4px 0px 0px 4px";
|
||||
font = "SF Pro Rounded 25";
|
||||
};
|
||||
|
||||
"case-indicator" = {
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
spacing = mkLiteral "0";
|
||||
};
|
||||
|
||||
"listview" = {
|
||||
background-color = mkLiteral "@background";
|
||||
columns = mkLiteral "1";
|
||||
spacing = mkLiteral "5px";
|
||||
cycle = mkLiteral "true";
|
||||
dynamic = mkLiteral "true";
|
||||
layout = mkLiteral "vertical";
|
||||
fixed-height = "true";
|
||||
lines = mkLiteral "5";
|
||||
};
|
||||
|
||||
"mainbox" = {
|
||||
background-color = mkLiteral "@background";
|
||||
children = mkLiteral "[ inputbar, message, listview ]";
|
||||
spacing = mkLiteral "20px";
|
||||
padding = mkLiteral "20px 15px 15px 15px";
|
||||
};
|
||||
|
||||
"message" = {
|
||||
children = mkLiteral "[ textbox ]";
|
||||
border-radius = mkLiteral "5px";
|
||||
};
|
||||
|
||||
"textbox" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@foreground";
|
||||
padding = mkLiteral "20px 6px 20px 80px";
|
||||
};
|
||||
|
||||
"element" = {
|
||||
background-color = mkLiteral "@background";
|
||||
text-color = mkLiteral "@foreground";
|
||||
orientation = mkLiteral "horizontal";
|
||||
border-radius = mkLiteral "4px";
|
||||
padding = mkLiteral "2px 2px 2px 2px";
|
||||
};
|
||||
|
||||
"element-text, element-icon" = {
|
||||
background-color = mkLiteral "inherit";
|
||||
text-color = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
"element-icon" = {
|
||||
size = mkLiteral "40px";
|
||||
padding = mkLiteral "10px 10px 10px 10px";
|
||||
};
|
||||
|
||||
"element-text" = {padding = mkLiteral "20px 0px 0px 10px";};
|
||||
|
||||
"element selected" = {
|
||||
background-color = mkLiteral "@selected";
|
||||
text-color = mkLiteral "@selected-text";
|
||||
border = mkLiteral "0px";
|
||||
border-radius = mkLiteral "3px";
|
||||
border-color = mkLiteral "@selected";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,6 @@ echo -e '\n\n\n'
|
|||
echo "Running git.thomasave.be Backups"
|
||||
borg create -s --progress \
|
||||
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/sessions \
|
||||
--exclude /home/server/Containers/git.thomasave.be/runner-data/.cache \
|
||||
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/jwt \
|
||||
--exclude /home/server/Containers/git.thomasave.be/gitea/ssh \
|
||||
10.4.0.1:Storage/Thomas/Borg/Containers/git.thomasave.be::'{hostname}-{now}' \
|
||||
|
|
@ -93,7 +92,6 @@ borg create -s --progress \
|
|||
echo -e '\n\n\n'
|
||||
echo "Running Workspace Backups"
|
||||
borg create -s --progress \
|
||||
--exclude /home/server/Workspace/TrackBox/Resources \
|
||||
10.4.0.1:Storage/Thomas/Borg/Workspace::'{hostname}-{now}' \
|
||||
/home/server/Workspace/
|
||||
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly -1 --save-space 10.4.0.1:Storage/Thomas/Borg/Workspace
|
||||
|
|
@ -135,6 +133,23 @@ borg create -s --progress \
|
|||
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly -1 --save-space 10.4.0.1:Storage/Thomas/Borg/Thomas
|
||||
borg compact 10.4.0.1:Storage/Thomas/Borg/Thomas
|
||||
|
||||
|
||||
echo -e '\n\n\n'
|
||||
echo "Running Niels Backups"
|
||||
borg create -s --progress \
|
||||
--exclude /home/server/Storage/Niels/Backups \
|
||||
10.4.0.1:Storage/Thomas/Borg/Niels::'{now:%Y-%m-%d}' \
|
||||
/home/server/Storage/Niels/
|
||||
borg prune --keep-daily 7 --keep-weekly 4 --keep-monthly 12 --save-space 10.4.0.1:Storage/Thomas/Borg/Niels
|
||||
borg compact 10.4.0.1:Storage/Thomas/Borg/Niels
|
||||
|
||||
|
||||
# echo -e '\n\n\n'
|
||||
# echo "Running Experiment Backups"
|
||||
# borg create -s --progress \
|
||||
# 10.4.0.1:Storage/Thomas/Borg/Containers/exp.thomasave.be::'{hostname}-{now}' \
|
||||
# /home/server/Workspace/Experiments/Backend/data/
|
||||
|
||||
##########################################
|
||||
# Perpare Cloud Backup #
|
||||
##########################################
|
||||
|
|
@ -172,7 +187,7 @@ ssh vault /home/server/Storage/Thomas/Scripts/Mount/borg_lock.sh
|
|||
# Backups to Oracle Cloud #
|
||||
##########################################
|
||||
|
||||
echo "Running Oracle Cloud Backup, containing Vaultwarden, robbertave.com, git.thomasave.be, Boaty, Stats, and Caddy."
|
||||
echo "Running Oracle Cloud Backup, containing Vaultwarden, robbertave.com, git.thomasave.be, Boaty, Stats, Caddy, and Niels."
|
||||
|
||||
borg create -s --progress \
|
||||
--exclude /home/server/Containers/pw.thomasave.be/data/icon_cache \
|
||||
|
|
@ -182,6 +197,7 @@ borg create -s --progress \
|
|||
--exclude /home/server/Containers/git.thomasave.be/gitea/gitea/jwt \
|
||||
--exclude /home/server/Containers/stats.thomasave.be/logs \
|
||||
--exclude /home/server/Containers/Caddy/Data\
|
||||
--exclude /home/server/Storage/Niels/Backups \
|
||||
ubuntu@10.0.0.6:~/Backups/Borg::'{hostname}-{now}' \
|
||||
/home/server/Containers/pw.thomasave.be\
|
||||
/home/server/Containers/robbertave.com\
|
||||
|
|
@ -191,3 +207,4 @@ borg create -s --progress \
|
|||
/home/server/Containers/Caddy \
|
||||
/home/server/Containers/cal.thomasave.be\
|
||||
/home/server/Containers/stats.thomasave.be \
|
||||
/home/server/Storage/Niels \
|
||||
|
|
|
|||
|
|
@ -1,93 +1,83 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
host = "*";
|
||||
};
|
||||
mallorea = {
|
||||
host = "mallorea";
|
||||
hostname = "server.thomasave.be";
|
||||
port = 22;
|
||||
user = "server";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Mallorea = {
|
||||
host = "Mallorea";
|
||||
hostname = "server.thomasave.be";
|
||||
port = 22;
|
||||
user = "server";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Kell = {
|
||||
host = "Kell";
|
||||
hostname = "kell.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
kell = {
|
||||
host = "kell";
|
||||
hostname = "kell.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Riva = {
|
||||
host = "Riva";
|
||||
hostname = "riva.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
riva = {
|
||||
host = "riva";
|
||||
hostname = "riva.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Arch = {
|
||||
host = "Arch";
|
||||
hostname = "arch.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
arch = {
|
||||
host = "arch";
|
||||
hostname = "arch.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Vault = {
|
||||
host = "Vault";
|
||||
hostname = "etienne.thomasave.be";
|
||||
port = 22;
|
||||
user = "server";
|
||||
forwardAgent = true;
|
||||
};
|
||||
vault = {
|
||||
host = "vault";
|
||||
hostname = "etienne.thomasave.be";
|
||||
port = 22;
|
||||
user = "server";
|
||||
forwardAgent = true;
|
||||
};
|
||||
gcp = {
|
||||
host = "gcp";
|
||||
hostname = "34.126.140.76";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
includes = [ "gpulab_hosts_config" ];
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
host = "*";
|
||||
};
|
||||
mallorea = {
|
||||
host = "mallorea";
|
||||
hostname = "server.thomasave.be";
|
||||
port = 22;
|
||||
user = "server";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Mallorea = {
|
||||
host = "Mallorea";
|
||||
hostname = "server.thomasave.be";
|
||||
port = 22;
|
||||
user = "server";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Kell = {
|
||||
host = "Kell";
|
||||
hostname = "kell.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
kell = {
|
||||
host = "kell";
|
||||
hostname = "kell.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Riva = {
|
||||
host = "Riva";
|
||||
hostname = "riva.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
riva = {
|
||||
host = "riva";
|
||||
hostname = "riva.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Arch = {
|
||||
host = "Arch";
|
||||
hostname = "arch.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
arch = {
|
||||
host = "arch";
|
||||
hostname = "arch.thomasave.be";
|
||||
port = 22;
|
||||
user = "user";
|
||||
forwardAgent = true;
|
||||
};
|
||||
Vault = {
|
||||
host = "Vault";
|
||||
hostname = "etienne.thomasave.be";
|
||||
port = 22;
|
||||
user = "server";
|
||||
forwardAgent = true;
|
||||
};
|
||||
vault = {
|
||||
host = "vault";
|
||||
hostname = "etienne.thomasave.be";
|
||||
port = 22;
|
||||
user = "server";
|
||||
forwardAgent = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,62 +1,63 @@
|
|||
{pkgs, ...}: {
|
||||
programs.tmux = {
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
terminal = "screen-256color";
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
shortcut = "a";
|
||||
escapeTime = 0;
|
||||
newSession = true;
|
||||
mouse = true;
|
||||
keyMode = "vi";
|
||||
plugins = [
|
||||
pkgs.tmuxPlugins.vim-tmux-navigator
|
||||
pkgs.tmuxPlugins.better-mouse-mode
|
||||
pkgs.tmuxPlugins.yank
|
||||
{
|
||||
plugin = pkgs.tmuxPlugins.catppuccin;
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.tmux = {
|
||||
shell = "${pkgs.zsh}/bin/zsh";
|
||||
terminal = "screen-256color";
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
shortcut = "a";
|
||||
escapeTime = 0;
|
||||
newSession = true;
|
||||
mouse = true;
|
||||
keyMode = "vi";
|
||||
plugins = [
|
||||
pkgs.tmuxPlugins.vim-tmux-navigator
|
||||
pkgs.tmuxPlugins.better-mouse-mode
|
||||
pkgs.tmuxPlugins.yank
|
||||
{
|
||||
plugin = pkgs.tmuxPlugins.catppuccin;
|
||||
extraConfig = ''
|
||||
set -ogq @catppuccin_flavor "mocha"
|
||||
set -ogq @catppuccin_window_status_style "rounded"
|
||||
set -ogq @catppuccin_pane_border_style "fg=#181825"
|
||||
set -ogq @catppuccin_pane_active_border_style "fg=#023269"
|
||||
set -ogq @catppuccin_menu_selected_style "fg=#{@thm_gray},bg=#0F7FCF"
|
||||
set -g @catppuccin_window_current_number_color "#0F7FCF"
|
||||
set -g @catppuccin_window_current_text_color "#1F2430"
|
||||
set -g @catppuccin_window_text_color "#1F2430"
|
||||
set -g @catppuccin_window_number_color "#707072"
|
||||
set -ogq status-right "#{E:@catppuccin_status_directory}"
|
||||
|
||||
# Make the status line pretty and add some modules
|
||||
set -g status-right-length 100
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
set -g status-right "#{E:@catppuccin_status_application}"
|
||||
set -ag status-right "#{E:@catppuccin_status_session}"
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
set -ogq @catppuccin_flavor "mocha"
|
||||
set -ogq @catppuccin_window_status_style "rounded"
|
||||
set -ogq @catppuccin_pane_border_style "fg=#181825"
|
||||
set -ogq @catppuccin_pane_active_border_style "fg=#023269"
|
||||
set -ogq @catppuccin_menu_selected_style "fg=#{@thm_gray},bg=#0F7FCF"
|
||||
set -g @catppuccin_window_current_number_color "#0F7FCF"
|
||||
set -g @catppuccin_window_current_text_color "#1F2430"
|
||||
set -g @catppuccin_window_text_color "#1F2430"
|
||||
set -g @catppuccin_window_number_color "#707072"
|
||||
set -ogq status-right "#{E:@catppuccin_status_directory}"
|
||||
set -ag terminal-overrides ",screen-256color:Tc"
|
||||
set-window-option -g mode-keys vi
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||||
|
||||
# Make the status line pretty and add some modules
|
||||
set -g status-right-length 100
|
||||
set -g status-left-length 100
|
||||
set -g status-left ""
|
||||
set -g status-right "#{E:@catppuccin_status_application}"
|
||||
set -ag status-right "#{E:@catppuccin_status_session}"
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# Renumber windows starting from 1
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
# Transparent bar
|
||||
set -g status-bg default
|
||||
set -g status-style "bg=default"
|
||||
'';
|
||||
}
|
||||
];
|
||||
|
||||
extraConfig = ''
|
||||
set -ag terminal-overrides ",screen-256color:Tc"
|
||||
set-window-option -g mode-keys vi
|
||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||
bind-key -T copy-mode-vi 'y' send -X copy-selection
|
||||
|
||||
bind | split-window -h -c "#{pane_current_path}"
|
||||
bind - split-window -v -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
||||
unbind '"'
|
||||
unbind %
|
||||
|
||||
# Renumber windows starting from 1
|
||||
set -g base-index 1
|
||||
setw -g pane-base-index 1
|
||||
set-option -g renumber-windows on
|
||||
|
||||
# Transparent bar
|
||||
set -g status-bg default
|
||||
set -g status-style "bg=default"
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,54 +1,53 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import ../zsh {inherit inputs config pkgs;})
|
||||
(import ../bash {inherit inputs config pkgs;})
|
||||
../git
|
||||
../nvim
|
||||
../email
|
||||
../lf
|
||||
../tmux
|
||||
../yazi
|
||||
../zellij
|
||||
];
|
||||
imports = [
|
||||
(import ../zsh { inherit inputs config pkgs; })
|
||||
(import ../bash { inherit inputs config pkgs; })
|
||||
../git
|
||||
../nvim
|
||||
../email
|
||||
../lf
|
||||
../tmux
|
||||
../yazi
|
||||
];
|
||||
|
||||
home.stateVersion = "24.11";
|
||||
targets.genericLinux.enable = true;
|
||||
programs.home-manager.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
htop
|
||||
ghostscript
|
||||
waypipe
|
||||
inputs.worktimer.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
usbutils
|
||||
gocryptfs
|
||||
sshfs
|
||||
ncdu
|
||||
];
|
||||
home.sessionVariables = {
|
||||
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
||||
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
|
||||
XDG_DATA_HOME = "${config.xdg.dataHome}";
|
||||
XDG_STATE_HOME = "${config.xdg.stateHome}";
|
||||
home.stateVersion = "24.11";
|
||||
targets.genericLinux.enable = true;
|
||||
programs.home-manager.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
htop
|
||||
waypipe
|
||||
inputs.worktimer.packages.${pkgs.system}.default
|
||||
usbutils
|
||||
];
|
||||
programs.nh = {
|
||||
enable = true;
|
||||
clean.enable = true;
|
||||
flake = "/home/user/.dotfiles";
|
||||
};
|
||||
|
||||
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
|
||||
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
||||
LESSHISTFILE = "${config.xdg.cacheHome}/less/history";
|
||||
PARALLEL_HOME = "${config.xdg.configHome}/parallel";
|
||||
PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc";
|
||||
SQLITE_HISTORY = "${config.xdg.cacheHome}/sqlite_history";
|
||||
WINEPREFIX = "${config.xdg.dataHome}/wine";
|
||||
# XDG_CURRENT_DESKTOP = "GNOME";
|
||||
OPENCV_LOG_LEVEL = "ERROR";
|
||||
COLORTERM = "truecolor";
|
||||
};
|
||||
home.sessionVariables = {
|
||||
XDG_CONFIG_HOME = "${config.xdg.configHome}";
|
||||
XDG_CACHE_HOME = "${config.xdg.cacheHome}";
|
||||
XDG_DATA_HOME = "${config.xdg.dataHome}";
|
||||
XDG_STATE_HOME = "${config.xdg.stateHome}";
|
||||
|
||||
CUDA_CACHE_PATH = "${config.xdg.cacheHome}/nv";
|
||||
DOCKER_CONFIG = "${config.xdg.configHome}/docker";
|
||||
LESSHISTFILE = "${config.xdg.cacheHome}/less/history";
|
||||
PARALLEL_HOME = "${config.xdg.configHome}/parallel";
|
||||
PYTHONSTARTUP = "${config.xdg.configHome}/python/pythonrc";
|
||||
SQLITE_HISTORY = "${config.xdg.cacheHome}/sqlite_history";
|
||||
WINEPREFIX = "${config.xdg.dataHome}/wine";
|
||||
# XDG_CURRENT_DESKTOP = "GNOME";
|
||||
OPENCV_LOG_LEVEL = "ERROR";
|
||||
COLORTERM = "truecolor";
|
||||
};
|
||||
|
||||
home.file.".latexmkrc".text = ''
|
||||
$pdf_mode = 1;
|
||||
$pdf_previewer = 'evince %O %S';
|
||||
'';
|
||||
|
||||
home.file.".latexmkrc".text = ''
|
||||
$pdf_mode = 1;
|
||||
$pdf_previewer = 'evince %O %S';
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,121 +1,107 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import ./common.nix {inherit inputs config pkgs;})
|
||||
(import ./python.nix {inherit inputs config pkgs;})
|
||||
(import ../hyprland {inherit inputs pkgs;})
|
||||
(import ../ags {inherit inputs pkgs;})
|
||||
../rofi
|
||||
../vicinae
|
||||
../alacritty
|
||||
../foot
|
||||
../kitty
|
||||
../firefox
|
||||
../helium
|
||||
../ssh
|
||||
../mpv
|
||||
];
|
||||
imports = [
|
||||
(import ./common.nix { inherit inputs config pkgs; })
|
||||
(import ./python.nix { inherit inputs config pkgs; })
|
||||
(import ../hyprland { inherit inputs pkgs; })
|
||||
(import ../ags { inherit inputs pkgs; })
|
||||
../rofi
|
||||
../alacritty
|
||||
../foot
|
||||
../kitty
|
||||
../ghostty
|
||||
../firefox
|
||||
../ssh
|
||||
../mpv
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
(pkgs.symlinkJoin {
|
||||
name = "slack-pipewire";
|
||||
paths = [pkgs.slack];
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
wrapProgram $out/bin/slack \
|
||||
--add-flags "--enable-features=WebRTCPipeWireCamera"
|
||||
'';
|
||||
})
|
||||
eid-mw
|
||||
onlyoffice-desktopeditors
|
||||
libreoffice
|
||||
telegram-desktop
|
||||
signal-desktop
|
||||
iwgtk
|
||||
element-desktop
|
||||
evince
|
||||
loupe
|
||||
gimp3
|
||||
obs-studio
|
||||
inkscape
|
||||
gnome-calendar
|
||||
file-roller
|
||||
zip
|
||||
heroic
|
||||
cmake
|
||||
nmap
|
||||
arp-scan
|
||||
virt-manager
|
||||
wol
|
||||
dig
|
||||
file
|
||||
zip
|
||||
yubioath-flutter
|
||||
obsidian
|
||||
nautilus
|
||||
appimage-run
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
slack
|
||||
eid-mw
|
||||
onlyoffice-bin
|
||||
libreoffice
|
||||
telegram-desktop
|
||||
signal-desktop
|
||||
iwgtk
|
||||
element-desktop
|
||||
evince
|
||||
loupe
|
||||
gimp3
|
||||
obs-studio
|
||||
inkscape
|
||||
gnome-calendar
|
||||
file-roller
|
||||
zip
|
||||
heroic
|
||||
cmake
|
||||
jellyfin-media-player
|
||||
chromium
|
||||
nmap
|
||||
arp-scan
|
||||
virt-manager
|
||||
wol
|
||||
dig
|
||||
file
|
||||
zip
|
||||
yubioath-flutter
|
||||
obsidian
|
||||
nautilus
|
||||
];
|
||||
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.kdePackages.kdeconnect-kde;
|
||||
indicator = true;
|
||||
};
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default.isDefault = true;
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.gnome-themes-extra;
|
||||
name = "Adwaita-dark";
|
||||
services.kdeconnect = {
|
||||
enable = true;
|
||||
package = pkgs.kdePackages.kdeconnect-kde;
|
||||
indicator = true;
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
|
||||
programs.thunderbird = {
|
||||
enable = true;
|
||||
profiles.default.isDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
name = "Adwaita";
|
||||
size = 28;
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
|
||||
services.mpris-proxy.enable = true; # Bluetooth media control
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"x-scheme-handler/mid" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"x-scheme-handler/tonsite" = "org.telegram.desktop.desktop";
|
||||
"message/rfc822" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"application/pdf" = "org.gnome.Evince.desktop";
|
||||
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||
"video/*" = "mpv.desktop";
|
||||
"audio/*" = "mpv.desktop";
|
||||
"image/jpeg" = "org.gnome.Loupe.desktop";
|
||||
"image/png" = "org.gnome.Loupe.desktop";
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme = {
|
||||
package = pkgs.gnome-themes-extra;
|
||||
name = "Adwaita-dark";
|
||||
};
|
||||
iconTheme = {
|
||||
name = "Papirus";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
};
|
||||
associations.added = {
|
||||
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"x-scheme-handler/mid" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"x-scheme-handler/tonsite" = "org.telegram.desktop.desktop";
|
||||
"image/jpeg" = "org.gnome.Loupe.desktop";
|
||||
"image/png" = "org.gnome.Loupe.desktop";
|
||||
};
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
name = "Adwaita";
|
||||
size = 28;
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
};
|
||||
|
||||
services.cliphist = { enable = true; };
|
||||
|
||||
services.mpris-proxy.enable = true; # Bluetooth media control
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = {
|
||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"x-scheme-handler/mid" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"message/rfc822" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"application/pdf" = "org.gnome.Evince.desktop";
|
||||
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||
"video/*" = "mpv.desktop";
|
||||
"audio/*" = "mpv.desktop";
|
||||
"image/jpeg" = "org.gnome.Loupe.desktop";
|
||||
"image/png" = "org.gnome.Loupe.desktop";
|
||||
};
|
||||
associations.added = {
|
||||
"x-scheme-handler/tg" = "org.telegram.desktop.desktop";
|
||||
"x-scheme-handler/mailto" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"x-scheme-handler/mid" = "userapp-Thunderbird-7GETV2.desktop";
|
||||
"image/jpeg" = "org.gnome.Loupe.desktop";
|
||||
"image/png" = "org.gnome.Loupe.desktop";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
{pkgs}: {
|
||||
when = "*-*-* *:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
{ pkgs }:
|
||||
{
|
||||
when = "*-*-* *:00:00";
|
||||
script = toString (pkgs.writeShellScript "script" ''
|
||||
REPORT_EMAIL=email@thomasave.be
|
||||
ZPOOL_STATUS=$(zpool status -x)
|
||||
if [ "$ZPOOL_STATUS" = "all pools are healthy" ] || [ "$ZPOOL_STATUS" = "no pools available" ]
|
||||
|
|
@ -13,5 +14,5 @@
|
|||
printf 1 > /var/db/zpool.status
|
||||
fi
|
||||
fi
|
||||
'');
|
||||
'');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
fzgo_paths,
|
||||
}: let
|
||||
mkLink = source_path: file_type: {
|
||||
"${source_path}-${file_type}" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink source_path;
|
||||
target = ".config/fzgo/entries/${file_type}/${pkgs.lib.strings.replaceStrings ["/"] ["|"] source_path}";
|
||||
{ config, pkgs, fzgo_paths }:
|
||||
let
|
||||
mkLink = source_path: file_type: {
|
||||
"${source_path}-${file_type}" = {
|
||||
source = config.lib.file.mkOutOfStoreSymlink source_path;
|
||||
target = ".config/fzgo/entries/${file_type}/${pkgs.lib.strings.replaceStrings [ "/" ] [ "|" ] source_path}";
|
||||
};
|
||||
};
|
||||
};
|
||||
links = (map (source_path: mkLink source_path "f") fzgo_paths.files) ++ (map (source_path: mkLink source_path "d") fzgo_paths.dirs);
|
||||
links = (map (source_path: mkLink source_path "f") fzgo_paths.files) ++ (map (source_path: mkLink source_path "d") fzgo_paths.dirs);
|
||||
in {
|
||||
home.file = pkgs.lib.mkMerge links;
|
||||
home.file = pkgs.lib.mkMerge links;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,42 +1,39 @@
|
|||
{pkgs, ...}: let
|
||||
pythonldlibpath = pkgs.lib.makeLibraryPath (with pkgs; [
|
||||
libGL
|
||||
glib
|
||||
zlib
|
||||
zstd
|
||||
stdenv.cc.cc
|
||||
stdenv.cc.cc.lib
|
||||
curl
|
||||
openssl
|
||||
attr
|
||||
libssh
|
||||
bzip2
|
||||
libxml2
|
||||
acl
|
||||
libsodium
|
||||
util-linux
|
||||
xz
|
||||
systemd
|
||||
]);
|
||||
# Darwin requires a different library path prefix
|
||||
wrapPrefix =
|
||||
if (!pkgs.stdenv.isDarwin)
|
||||
then "LD_LIBRARY_PATH"
|
||||
else "DYLD_LIBRARY_PATH";
|
||||
# pythonOverlay = (pkgs.python313.withPackages (ps: [
|
||||
# (ps.torch.override { rocmSupport = true; })
|
||||
# ]));
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
pythonldlibpath = pkgs.lib.makeLibraryPath (with pkgs; [
|
||||
libGL
|
||||
glib
|
||||
zlib
|
||||
zstd
|
||||
stdenv.cc.cc
|
||||
curl
|
||||
openssl
|
||||
attr
|
||||
libssh
|
||||
bzip2
|
||||
libxml2
|
||||
acl
|
||||
libsodium
|
||||
util-linux
|
||||
xz
|
||||
systemd
|
||||
]);
|
||||
# Darwin requires a different library path prefix
|
||||
wrapPrefix = if (!pkgs.stdenv.isDarwin) then "LD_LIBRARY_PATH" else "DYLD_LIBRARY_PATH";
|
||||
# pythonOverlay = (pkgs.python313.withPackages (ps: [
|
||||
# (ps.torch.override { rocmSupport = true; })
|
||||
# ]));
|
||||
|
||||
patchedpython = pkgs.symlinkJoin {
|
||||
name = "python";
|
||||
paths = [pkgs.python313];
|
||||
buildInputs = [pkgs.makeWrapper];
|
||||
postBuild = ''
|
||||
patchedpython = (pkgs.symlinkJoin {
|
||||
name = "python";
|
||||
paths = [ pkgs.python313 ];
|
||||
buildInputs = [ pkgs.makeWrapper ];
|
||||
postBuild = ''
|
||||
wrapProgram "$out/bin/python3.13" --prefix ${wrapPrefix} : "${pythonldlibpath}"
|
||||
'';
|
||||
};
|
||||
'';
|
||||
});
|
||||
in {
|
||||
home.packages = [
|
||||
patchedpython
|
||||
];
|
||||
home.packages = [
|
||||
patchedpython
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,85 +1,82 @@
|
|||
{
|
||||
pkgs,
|
||||
scripts,
|
||||
}: let
|
||||
notify_script =
|
||||
pkgs.writers.writePython3Bin "telegram-notify.py"
|
||||
{
|
||||
libraries = [pkgs.python3Packages.python-telegram-bot];
|
||||
} ''
|
||||
import telegram
|
||||
import asyncio
|
||||
import sys
|
||||
import socket
|
||||
import json
|
||||
import subprocess
|
||||
import tempfile
|
||||
{ pkgs, scripts }:
|
||||
let
|
||||
notify_script = (pkgs.writers.writePython3Bin "telegram-notify.py"
|
||||
{
|
||||
libraries = [ pkgs.python3Packages.python-telegram-bot ];
|
||||
} ''
|
||||
import telegram
|
||||
import asyncio
|
||||
import sys
|
||||
import socket
|
||||
import json
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
|
||||
async def run():
|
||||
text = subprocess.check_output(
|
||||
[
|
||||
"journalctl",
|
||||
"--user",
|
||||
"-u",
|
||||
sys.argv[1],
|
||||
"--since",
|
||||
"-1h",
|
||||
"--no-pager"
|
||||
]
|
||||
).decode("utf-8")
|
||||
async def run():
|
||||
text = subprocess.check_output(
|
||||
[
|
||||
"journalctl",
|
||||
"--user",
|
||||
"-u",
|
||||
sys.argv[1],
|
||||
"--since",
|
||||
"-1h",
|
||||
"--no-pager"
|
||||
]
|
||||
).decode("utf-8")
|
||||
|
||||
with open("/home/server/.secrets/Telegram/token.json") as f:
|
||||
credentials = json.load(f)
|
||||
token = credentials["token"]
|
||||
chat_id = credentials["chat_id"]
|
||||
with open("/home/server/.secrets/Telegram/token.json") as f:
|
||||
credentials = json.load(f)
|
||||
token = credentials["token"]
|
||||
chat_id = credentials["chat_id"]
|
||||
|
||||
with open("/home/server/mail.log", "a") as f:
|
||||
f.write(text)
|
||||
f.write("\n===========================================\n")
|
||||
with open("/home/server/mail.log", "a") as f:
|
||||
f.write(text)
|
||||
f.write("\n===========================================\n")
|
||||
|
||||
bot = telegram.Bot(token=token)
|
||||
hostname = socket.gethostname()
|
||||
await bot.send_message(
|
||||
chat_id,
|
||||
f"{hostname} encountered an error in the service: {sys.argv[1]}"
|
||||
)
|
||||
bot = telegram.Bot(token=token)
|
||||
hostname = socket.gethostname()
|
||||
await bot.send_message(
|
||||
chat_id,
|
||||
f"{hostname} encountered an error in the service: {sys.argv[1]}"
|
||||
)
|
||||
|
||||
with tempfile.NamedTemporaryFile(suffix=".txt") as tmp_file:
|
||||
tmp_file.write(text.encode("utf-8"))
|
||||
tmp_file.seek(0)
|
||||
await bot.send_document(chat_id, document=tmp_file)
|
||||
with tempfile.NamedTemporaryFile(suffix=".txt") as tmp_file:
|
||||
tmp_file.write(text.encode("utf-8"))
|
||||
tmp_file.seek(0)
|
||||
await bot.send_document(chat_id, document=tmp_file)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(asyncio.wait([loop.create_task(run())]))
|
||||
loop.close()
|
||||
'';
|
||||
if __name__ == "__main__":
|
||||
loop = asyncio.get_event_loop()
|
||||
loop.run_until_complete(asyncio.wait([loop.create_task(run())]))
|
||||
loop.close()
|
||||
'');
|
||||
|
||||
mkTimer = name: cfg: {
|
||||
Install.WantedBy = ["timers.target"];
|
||||
Timer = {
|
||||
Persistent = true;
|
||||
OnCalendar = cfg.when;
|
||||
Unit = "${name}.service";
|
||||
mkTimer = name: cfg: {
|
||||
Install.WantedBy = [ "timers.target" ];
|
||||
Timer = {
|
||||
Persistent = true;
|
||||
OnCalendar = cfg.when;
|
||||
Unit = "${name}.service";
|
||||
};
|
||||
};
|
||||
};
|
||||
mkService = name: cfg: {
|
||||
Unit.Description = name;
|
||||
Unit.OnFailure = "status_notify@${name}.service";
|
||||
# Install = { WantedBy = [ "default.target" ]; };
|
||||
Service = {ExecStart = cfg.script;};
|
||||
};
|
||||
in {
|
||||
systemd.user.services =
|
||||
pkgs.lib.mapAttrs mkService scripts
|
||||
// (pkgs.lib.mapAttrs mkService {
|
||||
"status_notify@" = {
|
||||
script = "${notify_script}/bin/telegram-notify.py %i";
|
||||
};
|
||||
});
|
||||
systemd.user.timers = pkgs.lib.mapAttrs mkTimer scripts;
|
||||
# Don't forget to enable these timers! Or reboot, after which it should also be activated automatically
|
||||
# systemctl --user enable --now <script>.timer
|
||||
mkService = name: cfg: {
|
||||
Unit.Description = name;
|
||||
Unit.OnFailure = "status_notify@${name}.service";
|
||||
# Install = { WantedBy = [ "default.target" ]; };
|
||||
Service = { ExecStart = cfg.script; };
|
||||
};
|
||||
in
|
||||
{
|
||||
systemd.user.services = pkgs.lib.mapAttrs mkService scripts
|
||||
// (pkgs.lib.mapAttrs mkService {
|
||||
"status_notify@" = {
|
||||
script = "${notify_script}/bin/telegram-notify.py %i";
|
||||
};
|
||||
});
|
||||
systemd.user.timers = pkgs.lib.mapAttrs mkTimer scripts;
|
||||
# Don't forget to enable these timers! Or reboot, after which it should also be activated automatically
|
||||
# systemctl --user enable --now <script>.timer
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
{inputs, ...}:
|
||||
# Add inputs here
|
||||
{
|
||||
# Import the module definition here
|
||||
imports = [inputs.vicinae.homeManagerModules.default];
|
||||
|
||||
services.vicinae = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
environment = {
|
||||
QT_SCALE_FACTOR = "1.5";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,16 +1,12 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [inputs.walker.homeManagerModules.walker];
|
||||
programs.walker = {
|
||||
enable = true;
|
||||
runAsService = true;
|
||||
};
|
||||
home.file."${config.xdg.configHome}/walker" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
imports = [inputs.walker.homeManagerModules.walker];
|
||||
programs.walker = {
|
||||
enable = true;
|
||||
runAsService = true;
|
||||
};
|
||||
home.file."${config.xdg.configHome}/walker" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,93 +1,91 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = inputs.waybar.packages.${pkgs.stdenv.hostPlatform.system}.waybar;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
height = pkgs.lib.mkDefault 35;
|
||||
spacing = 4;
|
||||
# output = "DP-2"; # Fill in with host-specific config!
|
||||
modules-left = ["wlr/taskbar"];
|
||||
modules-center = ["hyprland/workspaces"];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"wireplumber"
|
||||
"battery"
|
||||
"cpu#cpu2"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/temperature"
|
||||
"clock"
|
||||
"clock#clock2"
|
||||
];
|
||||
"wlr/taskbar" = {
|
||||
on-click = "activate";
|
||||
on-click-right = "close";
|
||||
format = "{icon} {title:.20}";
|
||||
all-outputs = true;
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
package = inputs.waybar.packages.${pkgs.system}.waybar;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
height = pkgs.lib.mkDefault 35;
|
||||
spacing = 4;
|
||||
# output = "DP-2"; # Fill in with host-specific config!
|
||||
modules-left = [ "wlr/taskbar" ];
|
||||
modules-center = [ "hyprland/workspaces" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"wireplumber"
|
||||
"battery"
|
||||
"cpu#cpu2"
|
||||
"cpu"
|
||||
"memory"
|
||||
"custom/temperature"
|
||||
"clock"
|
||||
"clock#clock2"
|
||||
];
|
||||
"wlr/taskbar" = {
|
||||
on-click = "activate";
|
||||
on-click-right = "close";
|
||||
format = "{icon} {title:.20}";
|
||||
all-outputs = true;
|
||||
};
|
||||
"wireplumber" = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = "";
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
format-icons = [ "" "" "" ];
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
warp-on-scroll = false;
|
||||
format = "{name}";
|
||||
};
|
||||
"hyprland/window" = { max-length = 50; };
|
||||
tray = { spacing = 10; };
|
||||
"clock#clock2" = {
|
||||
timezone = "Europe/Brussels";
|
||||
format = "{:%H:%M:%S}";
|
||||
interval = 1;
|
||||
};
|
||||
clock = {
|
||||
timezone = "Europe/Brussels";
|
||||
format = "{:%Y-%m-%d}";
|
||||
interval = 3600;
|
||||
};
|
||||
cpu = {
|
||||
format = "{max_frequency}GHz";
|
||||
tooltip = false;
|
||||
interval = 5;
|
||||
};
|
||||
"cpu#cpu2" = {
|
||||
format = "CPU {usage}%";
|
||||
tooltip = false;
|
||||
interval = 5;
|
||||
};
|
||||
memory = {
|
||||
interval = 5;
|
||||
format = "{used:0.2f}G";
|
||||
};
|
||||
"custom/temperature" = {
|
||||
interval = 5;
|
||||
exec = pkgs.lib.mkDefault "echo TODO";
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon}";
|
||||
tooltip-format = "{capacity}% ({time})";
|
||||
format-icons = [ " " " " " " " " " " ];
|
||||
format-charging = "{capacity}% ";
|
||||
format-full = "{capacity}% ";
|
||||
format-alt = "{capacity}% {time} [{power:.2} W]";
|
||||
};
|
||||
};
|
||||
};
|
||||
"wireplumber" = {
|
||||
format = "{icon} {volume}%";
|
||||
format-muted = "";
|
||||
on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
format-icons = ["" "" ""];
|
||||
};
|
||||
"hyprland/workspaces" = {
|
||||
disable-scroll = true;
|
||||
all-outputs = true;
|
||||
warp-on-scroll = false;
|
||||
format = "{name}";
|
||||
};
|
||||
"hyprland/window" = {max-length = 50;};
|
||||
tray = {spacing = 10;};
|
||||
"clock#clock2" = {
|
||||
timezone = "Asia/Bangkok";
|
||||
format = "{:%H:%M:%S}";
|
||||
interval = 1;
|
||||
};
|
||||
clock = {
|
||||
timezone = "Asia/Bangkok";
|
||||
format = "{:%Y-%m-%d}";
|
||||
interval = 3600;
|
||||
};
|
||||
cpu = {
|
||||
format = "{max_frequency}GHz";
|
||||
tooltip = false;
|
||||
interval = 5;
|
||||
};
|
||||
"cpu#cpu2" = {
|
||||
format = "CPU {usage}%";
|
||||
tooltip = false;
|
||||
interval = 5;
|
||||
};
|
||||
memory = {
|
||||
interval = 5;
|
||||
format = "{used:0.2f}G";
|
||||
};
|
||||
"custom/temperature" = {
|
||||
interval = 5;
|
||||
exec = pkgs.lib.mkDefault "echo TODO";
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
warning = 30;
|
||||
critical = 15;
|
||||
};
|
||||
format = "{icon}";
|
||||
tooltip-format = "{capacity}% ({time})";
|
||||
format-icons = [" " " " " " " " " "];
|
||||
format-charging = "{capacity}% ";
|
||||
format-full = "{capacity}% ";
|
||||
format-alt = "{capacity}% {time} [{power:.2} W]";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
style = ''
|
||||
* {
|
||||
/* `otf-font-awesome` is required to be installed for icons */
|
||||
font-size: 14px;
|
||||
|
|
@ -229,6 +227,6 @@
|
|||
-gtk-icon-effect: highlight;
|
||||
background-color: #eb4d4b;
|
||||
}
|
||||
'';
|
||||
};
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,67 +1,13 @@
|
|||
{...}: {
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
shellWrapperName = "y";
|
||||
settings = {
|
||||
mgr = {
|
||||
sort_by = "natural";
|
||||
};
|
||||
};
|
||||
{ inputs, config, pkgs, ... }:
|
||||
|
||||
keymap = {
|
||||
mgr.normal = [
|
||||
{
|
||||
on = ["j"];
|
||||
run = "down";
|
||||
desc = "Move cursor down";
|
||||
}
|
||||
{
|
||||
on = ["k"];
|
||||
run = "up";
|
||||
desc = "Move cursor up";
|
||||
}
|
||||
{
|
||||
on = ["h"];
|
||||
run = "back";
|
||||
desc = "Go back to parent directory";
|
||||
}
|
||||
{
|
||||
on = ["l"];
|
||||
run = "forward";
|
||||
desc = "Enter directory / open file";
|
||||
}
|
||||
{
|
||||
on = ["q"];
|
||||
run = "quit";
|
||||
desc = "Quit yazi";
|
||||
}
|
||||
{
|
||||
on = [" "];
|
||||
run = "select";
|
||||
desc = "Select the current file";
|
||||
}
|
||||
{
|
||||
on = ["v"];
|
||||
run = "visual_mode";
|
||||
desc = "Enter visual mode";
|
||||
}
|
||||
{
|
||||
on = ["y"];
|
||||
run = "yank";
|
||||
desc = "Yank selection";
|
||||
}
|
||||
{
|
||||
on = ["p"];
|
||||
run = "paste";
|
||||
desc = "Paste files";
|
||||
}
|
||||
{
|
||||
on = ["d"];
|
||||
run = "remove --permanently";
|
||||
desc = "Delete permanently";
|
||||
}
|
||||
];
|
||||
{
|
||||
programs.yazi = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
settings = {
|
||||
mgr = {
|
||||
sort_by = "natural";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +0,0 @@
|
|||
{config, ...}: {
|
||||
programs.zellij = {
|
||||
enable = true;
|
||||
};
|
||||
home.file."${config.xdg.configHome}/zellij" = {
|
||||
source = ./files;
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
|
|
@ -1,451 +0,0 @@
|
|||
ui {
|
||||
pane_frames {
|
||||
hide_session_name true
|
||||
}
|
||||
}
|
||||
|
||||
keybinds clear-defaults=true {
|
||||
locked {
|
||||
bind "Ctrl a" { SwitchToMode "normal"; }
|
||||
bind "Ctrl H" { MoveFocus "left"; }
|
||||
bind "Ctrl J" { MoveFocus "down"; }
|
||||
bind "Ctrl K" { MoveFocus "up"; }
|
||||
bind "Ctrl L" { MoveFocus "right"; }
|
||||
}
|
||||
normal {
|
||||
bind "-" { NewPane "down"; SwitchToMode "locked"; }
|
||||
bind "|" { NewPane "right"; SwitchToMode "locked"; }
|
||||
bind "c" { NewTab; SwitchToMode "locked"; }
|
||||
bind "d" { Detach; }
|
||||
bind "n" { GoToNextTab; SwitchToMode "locked"; }
|
||||
}
|
||||
pane {
|
||||
bind "left" { MoveFocus "left"; }
|
||||
bind "down" { MoveFocus "down"; }
|
||||
bind "up" { MoveFocus "up"; }
|
||||
bind "right" { MoveFocus "right"; }
|
||||
bind "c" { SwitchToMode "renamepane"; PaneNameInput 0; }
|
||||
bind "d" { NewPane "down"; SwitchToMode "locked"; }
|
||||
bind "e" { TogglePaneEmbedOrFloating; SwitchToMode "locked"; }
|
||||
bind "f" { ToggleFocusFullscreen; SwitchToMode "locked"; }
|
||||
bind "h" { MoveFocus "left"; }
|
||||
bind "i" { TogglePanePinned; SwitchToMode "locked"; }
|
||||
bind "j" { MoveFocus "down"; }
|
||||
bind "k" { MoveFocus "up"; }
|
||||
bind "l" { MoveFocus "right"; }
|
||||
bind "n" { NewPane; SwitchToMode "locked"; }
|
||||
bind "p" { SwitchToMode "normal"; }
|
||||
bind "r" { NewPane "right"; SwitchToMode "locked"; }
|
||||
bind "w" { ToggleFloatingPanes; SwitchToMode "locked"; }
|
||||
bind "x" { CloseFocus; SwitchToMode "locked"; }
|
||||
bind "z" { TogglePaneFrames; SwitchToMode "locked"; }
|
||||
bind "tab" { SwitchFocus; }
|
||||
}
|
||||
tab {
|
||||
bind "left" { GoToPreviousTab; }
|
||||
bind "down" { GoToNextTab; }
|
||||
bind "up" { GoToPreviousTab; }
|
||||
bind "right" { GoToNextTab; }
|
||||
bind "1" { GoToTab 1; SwitchToMode "locked"; }
|
||||
bind "2" { GoToTab 2; SwitchToMode "locked"; }
|
||||
bind "3" { GoToTab 3; SwitchToMode "locked"; }
|
||||
bind "4" { GoToTab 4; SwitchToMode "locked"; }
|
||||
bind "5" { GoToTab 5; SwitchToMode "locked"; }
|
||||
bind "6" { GoToTab 6; SwitchToMode "locked"; }
|
||||
bind "7" { GoToTab 7; SwitchToMode "locked"; }
|
||||
bind "8" { GoToTab 8; SwitchToMode "locked"; }
|
||||
bind "9" { GoToTab 9; SwitchToMode "locked"; }
|
||||
bind "[" { BreakPaneLeft; SwitchToMode "locked"; }
|
||||
bind "]" { BreakPaneRight; SwitchToMode "locked"; }
|
||||
bind "b" { BreakPane; SwitchToMode "locked"; }
|
||||
bind "h" { GoToPreviousTab; }
|
||||
bind "j" { GoToNextTab; }
|
||||
bind "k" { GoToPreviousTab; }
|
||||
bind "l" { GoToNextTab; }
|
||||
bind "n" { NewTab; SwitchToMode "locked"; }
|
||||
bind "r" { SwitchToMode "renametab"; TabNameInput 0; }
|
||||
bind "s" { ToggleActiveSyncTab; SwitchToMode "locked"; }
|
||||
bind "t" { SwitchToMode "normal"; }
|
||||
bind "x" { CloseTab; SwitchToMode "locked"; }
|
||||
bind "tab" { ToggleTab; }
|
||||
}
|
||||
resize {
|
||||
bind "left" { Resize "Increase left"; }
|
||||
bind "down" { Resize "Increase down"; }
|
||||
bind "up" { Resize "Increase up"; }
|
||||
bind "right" { Resize "Increase right"; }
|
||||
bind "+" { Resize "Increase"; }
|
||||
bind "-" { Resize "Decrease"; }
|
||||
bind "=" { Resize "Increase"; }
|
||||
bind "H" { Resize "Decrease left"; }
|
||||
bind "J" { Resize "Decrease down"; }
|
||||
bind "K" { Resize "Decrease up"; }
|
||||
bind "L" { Resize "Decrease right"; }
|
||||
bind "h" { Resize "Increase left"; }
|
||||
bind "j" { Resize "Increase down"; }
|
||||
bind "k" { Resize "Increase up"; }
|
||||
bind "l" { Resize "Increase right"; }
|
||||
bind "r" { SwitchToMode "normal"; }
|
||||
}
|
||||
move {
|
||||
bind "left" { MovePane "left"; }
|
||||
bind "down" { MovePane "down"; }
|
||||
bind "up" { MovePane "up"; }
|
||||
bind "right" { MovePane "right"; }
|
||||
bind "h" { MovePane "left"; }
|
||||
bind "j" { MovePane "down"; }
|
||||
bind "k" { MovePane "up"; }
|
||||
bind "l" { MovePane "right"; }
|
||||
bind "m" { SwitchToMode "normal"; }
|
||||
bind "n" { MovePane; }
|
||||
bind "p" { MovePaneBackwards; }
|
||||
bind "tab" { MovePane; }
|
||||
}
|
||||
scroll {
|
||||
bind "Alt left" { MoveFocusOrTab "left"; SwitchToMode "locked"; }
|
||||
bind "Alt down" { MoveFocus "down"; SwitchToMode "locked"; }
|
||||
bind "Alt up" { MoveFocus "up"; SwitchToMode "locked"; }
|
||||
bind "Alt right" { MoveFocusOrTab "right"; SwitchToMode "locked"; }
|
||||
bind "e" { EditScrollback; SwitchToMode "locked"; }
|
||||
bind "f" { SwitchToMode "entersearch"; SearchInput 0; }
|
||||
bind "Alt h" { MoveFocusOrTab "left"; SwitchToMode "locked"; }
|
||||
bind "Alt j" { MoveFocus "down"; SwitchToMode "locked"; }
|
||||
bind "Alt k" { MoveFocus "up"; SwitchToMode "locked"; }
|
||||
bind "Alt l" { MoveFocusOrTab "right"; SwitchToMode "locked"; }
|
||||
bind "s" { SwitchToMode "normal"; }
|
||||
}
|
||||
search {
|
||||
bind "c" { SearchToggleOption "CaseSensitivity"; }
|
||||
bind "n" { Search "down"; }
|
||||
bind "o" { SearchToggleOption "WholeWord"; }
|
||||
bind "p" { Search "up"; }
|
||||
bind "w" { SearchToggleOption "Wrap"; }
|
||||
}
|
||||
session {
|
||||
bind "a" {
|
||||
LaunchOrFocusPlugin "zellij:about" {
|
||||
floating true
|
||||
move_to_focused_tab true
|
||||
}
|
||||
SwitchToMode "locked"
|
||||
}
|
||||
bind "c" {
|
||||
LaunchOrFocusPlugin "configuration" {
|
||||
floating true
|
||||
move_to_focused_tab true
|
||||
}
|
||||
SwitchToMode "locked"
|
||||
}
|
||||
bind "d" { Detach; }
|
||||
bind "o" { SwitchToMode "normal"; }
|
||||
bind "p" {
|
||||
LaunchOrFocusPlugin "plugin-manager" {
|
||||
floating true
|
||||
move_to_focused_tab true
|
||||
}
|
||||
SwitchToMode "locked"
|
||||
}
|
||||
bind "w" {
|
||||
LaunchOrFocusPlugin "session-manager" {
|
||||
floating true
|
||||
move_to_focused_tab true
|
||||
}
|
||||
SwitchToMode "locked"
|
||||
}
|
||||
}
|
||||
shared_among "normal" "locked" {
|
||||
bind "Alt left" { MoveFocusOrTab "left"; }
|
||||
bind "Alt down" { MoveFocus "down"; }
|
||||
bind "Alt up" { MoveFocus "up"; }
|
||||
bind "Alt right" { MoveFocusOrTab "right"; }
|
||||
bind "Alt +" { Resize "Increase"; }
|
||||
bind "Alt -" { Resize "Decrease"; }
|
||||
bind "Alt =" { Resize "Increase"; }
|
||||
bind "Alt [" { PreviousSwapLayout; }
|
||||
bind "Alt ]" { NextSwapLayout; }
|
||||
bind "Alt f" { ToggleFloatingPanes; }
|
||||
bind "Alt h" { MoveFocusOrTab "left"; }
|
||||
bind "Alt i" { MoveTab "left"; }
|
||||
bind "Alt j" { MoveFocus "down"; }
|
||||
bind "Alt k" { MoveFocus "up"; }
|
||||
bind "Alt l" { MoveFocusOrTab "right"; }
|
||||
bind "Alt n" { NewPane; }
|
||||
bind "Alt o" { MoveTab "right"; }
|
||||
}
|
||||
shared_except "locked" "renametab" "renamepane" {
|
||||
bind "Ctrl g" { SwitchToMode "locked"; }
|
||||
bind "Ctrl q" { Quit; }
|
||||
}
|
||||
shared_except "locked" "entersearch" {
|
||||
bind "enter" { SwitchToMode "locked"; }
|
||||
}
|
||||
shared_except "locked" "entersearch" "renametab" "renamepane" {
|
||||
bind "esc" { SwitchToMode "locked"; }
|
||||
}
|
||||
shared_except "locked" "entersearch" "renametab" "renamepane" "move" {
|
||||
bind "m" { SwitchToMode "move"; }
|
||||
}
|
||||
shared_except "locked" "entersearch" "search" "renametab" "renamepane" "session" {
|
||||
bind "o" { SwitchToMode "session"; }
|
||||
}
|
||||
shared_except "locked" "tab" "entersearch" "renametab" "renamepane" {
|
||||
bind "t" { SwitchToMode "tab"; }
|
||||
}
|
||||
shared_except "locked" "tab" "scroll" "entersearch" "renametab" "renamepane" {
|
||||
bind "s" { SwitchToMode "scroll"; }
|
||||
}
|
||||
shared_among "normal" "resize" "tab" "scroll" "prompt" "tmux" {
|
||||
bind "p" { SwitchToMode "pane"; }
|
||||
}
|
||||
shared_except "locked" "resize" "pane" "tab" "entersearch" "renametab" "renamepane" {
|
||||
bind "r" { SwitchToMode "resize"; }
|
||||
}
|
||||
shared_among "scroll" "search" {
|
||||
bind "PageDown" { PageScrollDown; }
|
||||
bind "PageUp" { PageScrollUp; }
|
||||
bind "left" { PageScrollUp; }
|
||||
bind "down" { ScrollDown; }
|
||||
bind "up" { ScrollUp; }
|
||||
bind "right" { PageScrollDown; }
|
||||
bind "Ctrl b" { PageScrollUp; }
|
||||
bind "Ctrl c" { ScrollToBottom; SwitchToMode "locked"; }
|
||||
bind "d" { HalfPageScrollDown; }
|
||||
bind "Ctrl f" { PageScrollDown; }
|
||||
bind "h" { PageScrollUp; }
|
||||
bind "j" { ScrollDown; }
|
||||
bind "k" { ScrollUp; }
|
||||
bind "l" { PageScrollDown; }
|
||||
bind "u" { HalfPageScrollUp; }
|
||||
}
|
||||
entersearch {
|
||||
bind "Ctrl c" { SwitchToMode "scroll"; }
|
||||
bind "esc" { SwitchToMode "scroll"; }
|
||||
bind "enter" { SwitchToMode "search"; }
|
||||
}
|
||||
renametab {
|
||||
bind "esc" { UndoRenameTab; SwitchToMode "tab"; }
|
||||
}
|
||||
shared_among "renametab" "renamepane" {
|
||||
bind "Ctrl c" { SwitchToMode "locked"; }
|
||||
}
|
||||
renamepane {
|
||||
bind "esc" { UndoRenamePane; SwitchToMode "pane"; }
|
||||
}
|
||||
}
|
||||
|
||||
// Plugin aliases - can be used to change the implementation of Zellij
|
||||
// changing these requires a restart to take effect
|
||||
plugins {
|
||||
about location="zellij:about"
|
||||
compact-bar location="zellij:compact-bar"
|
||||
configuration location="zellij:configuration"
|
||||
filepicker location="zellij:strider" {
|
||||
cwd "/"
|
||||
}
|
||||
plugin-manager location="zellij:plugin-manager"
|
||||
session-manager location="zellij:session-manager"
|
||||
status-bar location="zellij:status-bar"
|
||||
strider location="zellij:strider"
|
||||
tab-bar location="zellij:tab-bar"
|
||||
welcome-screen location="zellij:session-manager" {
|
||||
welcome_screen true
|
||||
}
|
||||
}
|
||||
|
||||
// Plugins to load in the background when a new session starts
|
||||
// eg. "file:/path/to/my-plugin.wasm"
|
||||
// eg. "https://example.com/my-plugin.wasm"
|
||||
load_plugins {
|
||||
}
|
||||
|
||||
// Use a simplified UI without special fonts (arrow glyphs)
|
||||
// Options:
|
||||
// - true
|
||||
// - false (Default)
|
||||
//
|
||||
// simplified_ui true
|
||||
|
||||
// Choose the theme that is specified in the themes section.
|
||||
// Default: default
|
||||
//
|
||||
theme "tokyo-night-dark"
|
||||
|
||||
// Choose the base input mode of zellij.
|
||||
// Default: normal
|
||||
//
|
||||
default_mode "locked"
|
||||
|
||||
// Choose the path to the default shell that zellij will use for opening new panes
|
||||
// Default: $SHELL
|
||||
//
|
||||
// default_shell "fish"
|
||||
|
||||
// Choose the path to override cwd that zellij will use for opening new panes
|
||||
//
|
||||
// default_cwd "/tmp"
|
||||
|
||||
// The name of the default layout to load on startup
|
||||
// Default: "default"
|
||||
//
|
||||
default_layout "compact"
|
||||
|
||||
// The folder in which Zellij will look for layouts
|
||||
// (Requires restart)
|
||||
//
|
||||
// layout_dir "/tmp"
|
||||
|
||||
// The folder in which Zellij will look for themes
|
||||
// (Requires restart)
|
||||
//
|
||||
// theme_dir "/tmp"
|
||||
|
||||
// Toggle enabling the mouse mode.
|
||||
// On certain configurations, or terminals this could
|
||||
// potentially interfere with copying text.
|
||||
// Options:
|
||||
// - true (default)
|
||||
// - false
|
||||
//
|
||||
mouse_mode true
|
||||
|
||||
// Toggle having pane frames around the panes
|
||||
// Options:
|
||||
// - true (default, enabled)
|
||||
// - false
|
||||
//
|
||||
pane_frames false
|
||||
|
||||
// When attaching to an existing session with other users,
|
||||
// should the session be mirrored (true)
|
||||
// or should each user have their own cursor (false)
|
||||
// (Requires restart)
|
||||
// Default: false
|
||||
//
|
||||
// mirror_session true
|
||||
|
||||
// Choose what to do when zellij receives SIGTERM, SIGINT, SIGQUIT or SIGHUP
|
||||
// eg. when terminal window with an active zellij session is closed
|
||||
// (Requires restart)
|
||||
// Options:
|
||||
// - detach (Default)
|
||||
// - quit
|
||||
//
|
||||
// on_force_close "quit"
|
||||
|
||||
// Configure the scroll back buffer size
|
||||
// This is the number of lines zellij stores for each pane in the scroll back
|
||||
// buffer. Excess number of lines are discarded in a FIFO fashion.
|
||||
// (Requires restart)
|
||||
// Valid values: positive integers
|
||||
// Default value: 10000
|
||||
//
|
||||
// scroll_buffer_size 10000
|
||||
|
||||
// Provide a command to execute when copying text. The text will be piped to
|
||||
// the stdin of the program to perform the copy. This can be used with
|
||||
// terminal emulators which do not support the OSC 52 ANSI control sequence
|
||||
// that will be used by default if this option is not set.
|
||||
// Examples:
|
||||
//
|
||||
// copy_command "xclip -selection clipboard" // x11
|
||||
copy_command "wl-copy" // wayland
|
||||
// copy_command "pbcopy" // osx
|
||||
//
|
||||
// copy_command "pbcopy"
|
||||
|
||||
// Choose the destination for copied text
|
||||
// Allows using the primary selection buffer (on x11/wayland) instead of the system clipboard.
|
||||
// Does not apply when using copy_command.
|
||||
// Options:
|
||||
// - system (default)
|
||||
// - primary
|
||||
//
|
||||
// copy_clipboard "primary"
|
||||
|
||||
// Enable automatic copying (and clearing) of selection when releasing mouse
|
||||
// Default: true
|
||||
//
|
||||
// copy_on_select true
|
||||
|
||||
// Path to the default editor to use to edit pane scrollbuffer
|
||||
// Default: $EDITOR or $VISUAL
|
||||
// scrollback_editor "/usr/bin/vim"
|
||||
|
||||
// A fixed name to always give the Zellij session.
|
||||
// Consider also setting `attach_to_session true,`
|
||||
// otherwise this will error if such a session exists.
|
||||
// Default: <RANDOM>
|
||||
//
|
||||
// session_name "My singleton session"
|
||||
|
||||
// When `session_name` is provided, attaches to that session
|
||||
// if it is already running or creates it otherwise.
|
||||
// Default: false
|
||||
//
|
||||
// attach_to_session true
|
||||
|
||||
// Toggle between having Zellij lay out panes according to a predefined set of layouts whenever possible
|
||||
// Options:
|
||||
// - true (default)
|
||||
// - false
|
||||
//
|
||||
// auto_layout false
|
||||
|
||||
// Whether sessions should be serialized to the cache folder (including their tabs/panes, cwds and running commands) so that they can later be resurrected
|
||||
// Options:
|
||||
// - true (default)
|
||||
// - false
|
||||
//
|
||||
// session_serialization false
|
||||
|
||||
// Whether pane viewports are serialized along with the session, default is false
|
||||
// Options:
|
||||
// - true
|
||||
// - false (default)
|
||||
//
|
||||
// serialize_pane_viewport false
|
||||
|
||||
// Scrollback lines to serialize along with the pane viewport when serializing sessions, 0
|
||||
// defaults to the scrollback size. If this number is higher than the scrollback size, it will
|
||||
// also default to the scrollback size. This does nothing if `serialize_pane_viewport` is not true.
|
||||
//
|
||||
// scrollback_lines_to_serialize 10000
|
||||
|
||||
// Enable or disable the rendering of styled and colored underlines (undercurl).
|
||||
// May need to be disabled for certain unsupported terminals
|
||||
// (Requires restart)
|
||||
// Default: true
|
||||
//
|
||||
// styled_underlines false
|
||||
|
||||
// How often in seconds sessions are serialized
|
||||
//
|
||||
// serialization_interval 10000
|
||||
|
||||
// Enable or disable writing of session metadata to disk (if disabled, other sessions might not know
|
||||
// metadata info on this session)
|
||||
// (Requires restart)
|
||||
// Default: false
|
||||
//
|
||||
// disable_session_metadata false
|
||||
|
||||
// Enable or disable support for the enhanced Kitty Keyboard Protocol (the host terminal must also support it)
|
||||
// (Requires restart)
|
||||
// Default: true (if the host terminal supports it)
|
||||
//
|
||||
support_kitty_keyboard_protocol true
|
||||
|
||||
// Whether to stack panes when resizing beyond a certain size
|
||||
// Default: true
|
||||
//
|
||||
// stacked_resize false
|
||||
|
||||
// Whether to show tips on startup
|
||||
// Default: true
|
||||
//
|
||||
show_startup_tips false
|
||||
|
||||
// Whether to show release notes on first version run
|
||||
// Default: true
|
||||
//
|
||||
// show_release_notes false
|
||||
|
|
@ -1,117 +1,111 @@
|
|||
{ config, inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
home.packages = [
|
||||
pkgs.fzy
|
||||
pkgs.lf
|
||||
pkgs.curl
|
||||
pkgs.fd
|
||||
pkgs.zsh-powerlevel10k
|
||||
pkgs.zsh-autocomplete
|
||||
pkgs.zsh-vi-mode
|
||||
pkgs.ripgrep
|
||||
pkgs.rsync
|
||||
pkgs.moreutils
|
||||
inputs.fzgo.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||
];
|
||||
home.sessionVariables = {
|
||||
BROWSER = "Helium";
|
||||
PDF_VIEWER = "evince";
|
||||
GPULAB_CERT = "${config.xdg.configHome}/../.secrets/GPULab/certificate.pem";
|
||||
GPULAB_DEV = "False";
|
||||
GCC_COLORS = "error = '01;31:warning = '01;35:note = '01;36:caret = '01;32:locus = '01:quote = '01'";
|
||||
ARCHFLAGS = "-arch x86_64";
|
||||
TERM = "screen-256color";
|
||||
PYTHONDONTWRITEBYTECODE = "1";
|
||||
GOPATH = "${config.xdg.dataHome}/go";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
OPENER = "${pkgs.handlr-regex}/bin/handlr open";
|
||||
};
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
config = {
|
||||
global = {
|
||||
hiden_env_diff = true;
|
||||
warn_timeout = 0;
|
||||
};
|
||||
home.packages = [
|
||||
pkgs.fzy
|
||||
pkgs.lf
|
||||
pkgs.curl
|
||||
pkgs.fd
|
||||
pkgs.zsh-powerlevel10k
|
||||
pkgs.zsh-autocomplete
|
||||
pkgs.zsh-vi-mode
|
||||
pkgs.ripgrep
|
||||
pkgs.rsync
|
||||
pkgs.moreutils
|
||||
inputs.fzgo.packages.${pkgs.system}.default
|
||||
];
|
||||
home.sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
PDF_VIEWER = "evince";
|
||||
GPULAB_CERT = "${config.xdg.configHome}/../.secrets/GPULab/certificate.pem";
|
||||
GPULAB_DEV = "False";
|
||||
GCC_COLORS = "error = '01;31:warning = '01;35:note = '01;36:caret = '01;32:locus = '01:quote = '01'";
|
||||
ARCHFLAGS = "-arch x86_64";
|
||||
TERM = "screen-256color";
|
||||
PYTHONDONTWRITEBYTECODE = "1";
|
||||
GOPATH = "${config.xdg.dataHome}/go";
|
||||
DIRENV_LOG_FORMAT = "";
|
||||
OPENER = "${pkgs.handlr-regex}/bin/handlr open";
|
||||
};
|
||||
};
|
||||
home.file."${config.xdg.configHome}/direnv/direnvrc".text = ''
|
||||
: "''${XDG_CACHE_HOME:="''${HOME}/.cache"}"
|
||||
declare -A direnv_layout_dirs
|
||||
direnv_layout_dir() {
|
||||
local hash path
|
||||
echo "''${direnv_layout_dirs[$PWD]:=$(
|
||||
hash="$(sha1sum - <<< "$PWD" | head -c40)"
|
||||
path="''${PWD//[^a-zA-Z0-9]/-}"
|
||||
echo "''${XDG_CACHE_HOME}/direnv/layouts/''${hash}''${path}"
|
||||
)}"
|
||||
}
|
||||
'';
|
||||
programs.fzf = {enable = true;};
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = false;
|
||||
autosuggestion.enable = true;
|
||||
initContent = pkgs.lib.mkBefore ''
|
||||
ZVM_VI_INSERT_ESCAPE_BINDKEY=jj
|
||||
export LD_LIBRARY_PATH=${pkgs.sqlite.out}/lib:$LD_LIBRARY_PATH
|
||||
source ${./files/waypipe.zsh}
|
||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||
source ${./files/p10k.zsh}
|
||||
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
||||
source ${./files/functions.zsh}
|
||||
source ${./files/fzgo.zsh}
|
||||
function zvm_after_init() {
|
||||
source ${./files/term.zsh}
|
||||
source ${./files/completion.zsh}
|
||||
if [ -n "\$\{commands[fzf-share]\}" ]; then
|
||||
source "$(fzf-share)/key-bindings.zsh"
|
||||
source "$(fzf-share)/completion.zsh"
|
||||
fi
|
||||
source ${./files/keys.zsh}
|
||||
eval "$(direnv hook zsh)"
|
||||
export LD_LIBRARY_PATH=${pkgs.sqlite.out}/lib:$LD_LIBRARY_PATH
|
||||
}
|
||||
function o() {
|
||||
${pkgs.handlr-regex}/bin/handlr open $@ < /dev/null &> /dev/null & disown
|
||||
}
|
||||
precmd() {
|
||||
print -Pn "\e]133;A\e\\"
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
config = {
|
||||
global = {
|
||||
hiden_env_diff = true;
|
||||
warn_timeout = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
home.file."${config.xdg.configHome}/direnv/direnvrc".text = ''
|
||||
: "''${XDG_CACHE_HOME:="''${HOME}/.cache"}"
|
||||
declare -A direnv_layout_dirs
|
||||
direnv_layout_dir() {
|
||||
local hash path
|
||||
echo "''${direnv_layout_dirs[$PWD]:=$(
|
||||
hash="$(sha1sum - <<< "$PWD" | head -c40)"
|
||||
path="''${PWD//[^a-zA-Z0-9]/-}"
|
||||
echo "''${XDG_CACHE_HOME}/direnv/layouts/''${hash}''${path}"
|
||||
)}"
|
||||
}
|
||||
'';
|
||||
programs.fzf = { enable = true; };
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
syntaxHighlighting.enable = false;
|
||||
autosuggestion.enable = true;
|
||||
initContent = pkgs.lib.mkBefore ''
|
||||
ZVM_VI_INSERT_ESCAPE_BINDKEY=jj
|
||||
export LD_LIBRARY_PATH=${pkgs.sqlite.out}/lib:$LD_LIBRARY_PATH
|
||||
source ${./files/waypipe.zsh}
|
||||
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
|
||||
source ${./files/p10k.zsh}
|
||||
source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
|
||||
source ${./files/functions.zsh}
|
||||
source ${./files/fzgo.zsh}
|
||||
function zvm_after_init() {
|
||||
source ${./files/term.zsh}
|
||||
source ${./files/completion.zsh}
|
||||
if [ -n "\$\{commands[fzf-share]\}" ]; then
|
||||
source "$(fzf-share)/key-bindings.zsh"
|
||||
source "$(fzf-share)/completion.zsh"
|
||||
fi
|
||||
source ${./files/keys.zsh}
|
||||
eval "$(direnv hook zsh)"
|
||||
export LD_LIBRARY_PATH=${pkgs.sqlite.out}/lib:$LD_LIBRARY_PATH
|
||||
}
|
||||
function o() {
|
||||
${pkgs.handlr-regex}/bin/handlr open $@ < /dev/null &> /dev/null & disown
|
||||
}
|
||||
'';
|
||||
|
||||
shellAliases = {
|
||||
mallorea = "run_waypipe mallorea";
|
||||
vault = "run_waypipe vault";
|
||||
riva = "run_waypipe riva";
|
||||
kell = "run_waypipe kell";
|
||||
aloria = "run_waypipe aloria";
|
||||
arch = "run_waypipe arch";
|
||||
shellAliases = {
|
||||
mallorea = "run_waypipe mallorea";
|
||||
vault = "run_waypipe vault";
|
||||
riva = "run_waypipe riva";
|
||||
kell = "run_waypipe kell";
|
||||
aloria = "run_waypipe aloria";
|
||||
arch = "run_waypipe arch";
|
||||
|
||||
ll = "ls -lhat";
|
||||
ls = "ls --color=auto";
|
||||
lf = ''cd "$(${pkgs.lf}/bin/lf -print-last-dir)"'';
|
||||
ll = "ls -lhat";
|
||||
ls = "ls --color=auto";
|
||||
lf = ''cd "$(${pkgs.lf}/bin/lf -print-last-dir)"'';
|
||||
|
||||
compress = "tar --use-compress-program = lbzip2 -cvf";
|
||||
wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"'';
|
||||
python = "python3";
|
||||
vim = "nvim";
|
||||
v = ''echo $(pwd) > /tmp/oil_dir && nvim -c ':lua require("oil").open()' && cd "$(cat /tmp/oil_dir 2> /dev/null || pwd)"'';
|
||||
cpr = "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1";
|
||||
mvr = "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1 --remove-source-files";
|
||||
rg = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
|
||||
ag = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
|
||||
reset = "tput reset";
|
||||
compress = "tar --use-compress-program = lbzip2 -cvf";
|
||||
wget = ''wget --hsts-file = "$XDG_DATA_HOME/wget-hsts"'';
|
||||
python = "python3";
|
||||
vim = "nvim";
|
||||
v = ''echo $(pwd) > /tmp/oil_dir && nvim -c ':lua require("oil").open()' && cd "$(cat /tmp/oil_dir 2> /dev/null || pwd)"'';
|
||||
cpr = "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1";
|
||||
mvr = "rsync --archive -hh --partial --info = stats1,progress2 --modify-window = 1 --remove-source-files";
|
||||
rg = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
|
||||
ag = "rg -i --colors 'match:bg:yellow' --colors 'match:fg:black' --colors 'match:style:nobold' --colors 'path:fg:green' --colors 'path:style:bold' --colors 'line:fg:yellow' --colors 'line:style:bold'";
|
||||
reset = "tput reset";
|
||||
};
|
||||
history.size = 10000000;
|
||||
history.save = 10000000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
autocd = true;
|
||||
};
|
||||
history.size = 10000000;
|
||||
history.save = 10000000;
|
||||
history.path = "${config.xdg.dataHome}/zsh/history";
|
||||
autocd = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,5 +16,3 @@ function run_waypipe() {
|
|||
REMOTE_PATH=$(echo $(pwd) | sed "s|/home/[a-z]*|\$HOME|g")
|
||||
SSH_SESSION_ID=$SSH_SESSION_ID waypipe -n ssh -t $1 env REMOTE_PATH=\"$REMOTE_PATH\" SSH_SESSION_ID=$SSH_SESSION_ID "zsh --login"
|
||||
}
|
||||
|
||||
alias s='run_waypipe'
|
||||
|
|
|
|||
|
|
@ -1,189 +1,111 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
serverIP = "10.0.0.1";
|
||||
{ pkgs, lib, inputs, config, ... }:
|
||||
let
|
||||
serverIP = "10.0.0.1";
|
||||
in {
|
||||
imports = [
|
||||
(import ../Common/default.nix {inherit inputs pkgs config;})
|
||||
(import ../Common/desktop.nix {inherit inputs pkgs config;})
|
||||
(import ../Common/nfs.nix {inherit pkgs serverIP;})
|
||||
(import ../Common/zfs.nix {inherit inputs pkgs config;})
|
||||
];
|
||||
|
||||
hardware.graphics.extraPackages = [
|
||||
pkgs.intel-compute-runtime
|
||||
pkgs.intel-media-driver
|
||||
];
|
||||
|
||||
zramSwap.enable = true;
|
||||
services.upower.enable = true;
|
||||
services.logind.settings.Login = {
|
||||
HandlePowerKey = "suspend";
|
||||
};
|
||||
services.throttled.enable = true;
|
||||
services.thinkfan.enable = true;
|
||||
services.thinkfan.settings = {
|
||||
sensors = [
|
||||
# Search for 'coretemp' anywhere in /sys/class/hwmon
|
||||
{
|
||||
hwmon = "/sys/class/hwmon";
|
||||
name = "coretemp";
|
||||
indices = [1];
|
||||
}
|
||||
|
||||
# Search for 'acpitz'
|
||||
{
|
||||
hwmon = "/sys/class/hwmon";
|
||||
name = "acpitz";
|
||||
indices = [1];
|
||||
}
|
||||
|
||||
# Search for 'nvme'
|
||||
{
|
||||
hwmon = "/sys/class/hwmon";
|
||||
name = "nvme";
|
||||
indices = [1];
|
||||
}
|
||||
imports = [
|
||||
(import ../Common/default.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/desktop.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/nfs.nix { inherit pkgs serverIP; })
|
||||
(import ../Common/zfs.nix {inherit inputs pkgs config; })
|
||||
(import ../Common/android.nix { inherit pkgs; })
|
||||
];
|
||||
|
||||
fans = [
|
||||
{tpacpi = "/proc/acpi/ibm/fan";}
|
||||
hardware.graphics.extraPackages = [
|
||||
pkgs.intel-compute-runtime
|
||||
pkgs.intel-media-driver
|
||||
];
|
||||
|
||||
levels = [
|
||||
[0 0 45]
|
||||
[1 42 55]
|
||||
[2 50 60]
|
||||
[3 56 68]
|
||||
[5 64 78]
|
||||
[7 76 95]
|
||||
];
|
||||
};
|
||||
zramSwap.enable = true;
|
||||
services.upower.enable = true;
|
||||
services.logind.extraConfig = ''HandlePowerKey=ignore'';
|
||||
services.throttled.enable = true;
|
||||
services.thinkfan.enable = true;
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
|
||||
networking.hostId = "4e859062";
|
||||
networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
networking.enableIPv6 = false;
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.wireless.iwd.settings = {
|
||||
IPv6 = {
|
||||
Enabled = false;
|
||||
networking.hostId = "4e859062";
|
||||
networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.wireless.iwd.settings = {
|
||||
IPv6 = {
|
||||
Enabled = true;
|
||||
};
|
||||
Settings = {
|
||||
AutoConnect = true;
|
||||
};
|
||||
};
|
||||
Settings = {
|
||||
AutoConnect = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd.services.fprintd = {
|
||||
wantedBy = ["multi-user.target"];
|
||||
serviceConfig.Type = "simple";
|
||||
};
|
||||
services.fprintd = {
|
||||
enable = true;
|
||||
# tod = {
|
||||
# enable = true;
|
||||
# };
|
||||
};
|
||||
security.pam.services.sudo.fprintAuth = true;
|
||||
systemd.services.fprintd = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
serviceConfig.Type = "simple";
|
||||
};
|
||||
services.fprintd = {
|
||||
enable = true;
|
||||
# tod = {
|
||||
# enable = true;
|
||||
# };
|
||||
};
|
||||
security.pam.services.sudo.fprintAuth = true;
|
||||
|
||||
# virtualisation
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
users.users.user.extraGroups = ["libvirtd"];
|
||||
# virtualisation
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.libvirtd.qemu.ovmf.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
users.users.user.extraGroups = [ "libvirtd" ];
|
||||
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.enable = true;
|
||||
networking.useNetworkd = true;
|
||||
systemd.network.config.networkConfig = {
|
||||
ManageForeignRoutingPolicyRules = false;
|
||||
ManageForeignRoutes = false;
|
||||
SpeedMeter = true;
|
||||
};
|
||||
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
|
||||
systemd.network.enable = true;
|
||||
networking.useNetworkd = true;
|
||||
systemd.network.config.networkConfig = {
|
||||
ManageForeignRoutingPolicyRules = false;
|
||||
ManageForeignRoutes = false;
|
||||
SpeedMeter = true;
|
||||
};
|
||||
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
|
||||
|
||||
networking.wg-quick.interfaces = {
|
||||
Tunnel = {
|
||||
address = ["10.0.0.5/24"];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
||||
listenPort = 51820;
|
||||
autostart = false;
|
||||
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [
|
||||
{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = ["0.0.0.0/0" "::/0"];
|
||||
endpoint = "external.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
networking.wg-quick.interfaces = {
|
||||
Tunnel = {
|
||||
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
||||
listenPort = 51820;
|
||||
autostart = false;
|
||||
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
||||
endpoint = "external.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
OPNsense = {
|
||||
address = [ "10.0.0.5/24" "2a02:a03f:83ad:2101::5/128" ];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
||||
listenPort = 51820;
|
||||
autostart = true;
|
||||
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
|
||||
endpoint = "external.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
OPNsense = {
|
||||
address = ["10.0.0.5/24"];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Aloria.key";
|
||||
listenPort = 51820;
|
||||
autostart = true;
|
||||
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [
|
||||
{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = ["10.0.0.1/8" "192.168.1.2/32"];
|
||||
endpoint = "external.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
systemd.services."wg-quick-OPNsense" = {
|
||||
serviceConfig = { Restart = "on-failure"; RestartSec = "2s"; };
|
||||
unitConfig.StartLimitIntervalSec = 0;
|
||||
};
|
||||
GCP = {
|
||||
address = ["10.5.0.5/24"];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/GCP.key";
|
||||
listenPort = 51820;
|
||||
autostart = false;
|
||||
postUp = "resolvectl dns GCP 1.1.1.1;resolvectl dns wlan0 1.1.1.1;";
|
||||
peers = [
|
||||
{
|
||||
publicKey = "NEBNE4Czf2MkZF2X5aVhmofENH1uXjDpvXjIMJvfMFA=";
|
||||
allowedIPs = ["0.0.0.0/0"];
|
||||
endpoint = "35.201.231.151:443";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
systemd.services."wg-quick-OPNsense" = {
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = "2s";
|
||||
};
|
||||
unitConfig.StartLimitIntervalSec = 0;
|
||||
};
|
||||
services.usbmuxd.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
libcamera
|
||||
ifuse
|
||||
libimobiledevice
|
||||
scrcpy
|
||||
v4l-utils
|
||||
];
|
||||
boot.kernel.sysctl = {
|
||||
"net.ipv6.conf.all.disable_ipv6" = 1;
|
||||
"net.ipv6.conf.default.disable_ipv6" = 1;
|
||||
"net.ipv6.conf.lo.disable_ipv6" = 1;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,100 +1,62 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel" "v4l2loopback" "intel_vsc" "intel_vsc_csi" "intel_vsc_vbus"];
|
||||
boot.extraModulePackages = with config.boot.kernelPackages; [v4l2loopback tp_smapi ipu6-drivers];
|
||||
boot.extraModprobeConfig = ''
|
||||
options thinkpad_acpi fan_control=1
|
||||
options v4l2loopback exclusive_caps=1 card_label="Android Virtual Camera"
|
||||
options v4l2loopback exclusive_caps=1 video_nr=42 card_label="IPU6 Virtual Camera"
|
||||
'';
|
||||
# boot.kernelParams = ["ipv6.disable=1"];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "rpool/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
fileSystems."/" =
|
||||
{ device = "rpool/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "rpool/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
fileSystems."/home" =
|
||||
{ device = "rpool/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/5C58-A909";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/5C58-A909";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
# 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.wlp0s20f3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.trackpoint.enable = lib.mkDefault true;
|
||||
hardware.trackpoint.emulateWheel = lib.mkDefault config.hardware.trackpoint.enable;
|
||||
hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint";
|
||||
nixpkgs.config.packageOverrides = pkgs: {
|
||||
zfs = pkgs.zfs_unstable;
|
||||
};
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
hardware.firmware = with pkgs; [
|
||||
ipu6-camera-bins
|
||||
ivsc-firmware
|
||||
];
|
||||
services.udev.extraRules = ''
|
||||
SUBSYSTEM=="intel-ipu6-psys", MODE="0660", GROUP="video"
|
||||
'';
|
||||
systemd.services.ipu6-v4l2-proxy = {
|
||||
description = "IPU6 Libcamera to V4L2Loopback Proxy";
|
||||
# wantedBy = ["multi-user.target"];
|
||||
after = ["systemd-udev-settle.service"];
|
||||
|
||||
serviceConfig = {
|
||||
ExecStart = let
|
||||
gstPluginPath = pkgs.lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" (with pkgs.gst_all_1;
|
||||
[
|
||||
gstreamer
|
||||
gst-plugins-base
|
||||
gst-plugins-good
|
||||
gst-plugins-bad
|
||||
]
|
||||
++ [pkgs.libcamera]);
|
||||
in ''
|
||||
${pkgs.gst_all_1.gstreamer}/bin/gst-launch-1.0 \
|
||||
--gst-plugin-path=${gstPluginPath} \
|
||||
libcamerasrc \
|
||||
! video/x-raw \
|
||||
! vapostproc contrast=1.3 saturation=1.4 brightness=-0.15 \
|
||||
! video/x-raw,width=1280,height=720 \
|
||||
! videoconvert \
|
||||
! gamma gamma=0.7 \
|
||||
! videoconvert \
|
||||
! video/x-raw,format=YUY2 \
|
||||
! v4l2sink device=/dev/video42
|
||||
'';
|
||||
|
||||
Restart = "always";
|
||||
RestartSec = "3";
|
||||
};
|
||||
};
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.trackpoint.enable = lib.mkDefault true;
|
||||
hardware.trackpoint.emulateWheel = lib.mkDefault config.hardware.trackpoint.enable;
|
||||
hardware.trackpoint.device = "TPPS/2 Synaptics TrackPoint";
|
||||
hardware.ipu6.enable = true;
|
||||
hardware.ipu6.platform = "ipu6ep";
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest.extend ( self: super: {
|
||||
# ipu6-drivers = super.ipu6-drivers.overrideAttrs (
|
||||
# final: previous: rec {
|
||||
# src = builtins.fetchGit {
|
||||
# url = "https://github.com/intel/ipu6-drivers.git";
|
||||
# ref = "master";
|
||||
# rev = "b4ba63df5922150ec14ef7f202b3589896e0301a";
|
||||
# };
|
||||
# patches = [
|
||||
# "${src}/patches/0001-v6.10-IPU6-headers-used-by-PSYS.patch"
|
||||
# ] ;
|
||||
# }
|
||||
# );
|
||||
# } );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,137 +1,122 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
nixos-06cb-009a-fingerprint-sensor,
|
||||
...
|
||||
}: let
|
||||
serverIP = "10.0.0.1";
|
||||
{ pkgs, lib, inputs, config, nixos-06cb-009a-fingerprint-sensor, ... }:
|
||||
let
|
||||
serverIP = "10.0.0.1";
|
||||
in {
|
||||
imports = [
|
||||
(import ../Common/default.nix {inherit inputs pkgs config;})
|
||||
(import ../Common/desktop.nix {inherit inputs pkgs config;})
|
||||
(import ../Common/nfs.nix {inherit pkgs serverIP;})
|
||||
(import ../Common/zfs.nix {inherit inputs pkgs config;})
|
||||
];
|
||||
imports = [
|
||||
(import ../Common/default.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/desktop.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/nfs.nix { inherit pkgs serverIP; })
|
||||
(import ../Common/zfs.nix {inherit inputs pkgs config; })
|
||||
(import ../Common/android.nix {inherit inputs pkgs config; })
|
||||
];
|
||||
|
||||
hardware.graphics.extraPackages = [
|
||||
pkgs.intel-compute-runtime
|
||||
pkgs.intel-media-driver
|
||||
];
|
||||
hardware.graphics.extraPackages = [
|
||||
pkgs.intel-compute-runtime
|
||||
pkgs.intel-media-driver
|
||||
];
|
||||
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelParams = ["mitigations=off"];
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.kernelParams = ["mitigations=off"];
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
|
||||
zramSwap.enable = true;
|
||||
services.upower.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.logind.settings.Login = {
|
||||
HandlePowerKey = "suspend";
|
||||
};
|
||||
services.throttled = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
networking.hostId = "b6c5c9af";
|
||||
networking.interfaces.wlan0.useDHCP = lib.mkDefault false;
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.wireless.iwd.settings = {
|
||||
IPv6 = {
|
||||
Enabled = true;
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
Settings = {
|
||||
AutoConnect = true;
|
||||
Country = "ES";
|
||||
};
|
||||
General = {
|
||||
EnableNetworkConfiguration = true;
|
||||
};
|
||||
};
|
||||
# services."06cb-009a-fingerprint-sensor" = {
|
||||
# enable = true;
|
||||
# backend = "python-validity";
|
||||
# };
|
||||
# services."06cb-009a-fingerprint-sensor" = {
|
||||
# enable = true;
|
||||
# backend = "libfprint-tod";
|
||||
# calib-data-file = ./files/calib-data-2.bin;
|
||||
# };
|
||||
|
||||
# virtualisation
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
users.users.user.extraGroups = ["libvirtd"];
|
||||
zramSwap.enable = true;
|
||||
services.upower.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.logind.extraConfig = ''HandlePowerKey=ignore'';
|
||||
services.throttled = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||
START_CHARGE_THRESH_BAT1 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT1 = 80; # 80 and above it stops charging
|
||||
networking.hostId = "b6c5c9af";
|
||||
networking.interfaces.wlan0.useDHCP = lib.mkDefault false;
|
||||
networking.wireless.iwd.enable = true;
|
||||
networking.wireless.iwd.settings = {
|
||||
IPv6 = {
|
||||
Enabled = true;
|
||||
};
|
||||
Settings = {
|
||||
AutoConnect = true;
|
||||
};
|
||||
General = {
|
||||
EnableNetworkConfiguration = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
# services."06cb-009a-fingerprint-sensor" = {
|
||||
# enable = true;
|
||||
# backend = "python-validity";
|
||||
# };
|
||||
# services."06cb-009a-fingerprint-sensor" = {
|
||||
# enable = true;
|
||||
# backend = "libfprint-tod";
|
||||
# calib-data-file = ./files/calib-data-2.bin;
|
||||
# };
|
||||
|
||||
systemd.network.enable = true;
|
||||
networking.useNetworkd = true;
|
||||
systemd.network.config.networkConfig = {
|
||||
ManageForeignRoutingPolicyRules = false;
|
||||
ManageForeignRoutes = false;
|
||||
SpeedMeter = true;
|
||||
};
|
||||
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
|
||||
networking.wg-quick.interfaces = {
|
||||
Tunnel = {
|
||||
address = ["10.0.0.7/24" "2a02:a03f:83ad:2101::7/128"];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Arendia.key";
|
||||
listenPort = 51820;
|
||||
autostart = false;
|
||||
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [
|
||||
{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = ["0.0.0.0/0" "::/0"];
|
||||
endpoint = "ipv4.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
# virtualisation
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.libvirtd.qemu.ovmf.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
users.users.user.extraGroups = [ "libvirtd" ];
|
||||
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
START_CHARGE_THRESH_BAT0 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT0 = 80; # 80 and above it stops charging
|
||||
START_CHARGE_THRESH_BAT1 = 40; # 40 and bellow it starts to charge
|
||||
STOP_CHARGE_THRESH_BAT1 = 80; # 80 and above it stops charging
|
||||
};
|
||||
};
|
||||
OPNsense = {
|
||||
address = ["10.0.0.7/24" "2a02:a03f:83ad:2101::7/128"];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Arendia.key";
|
||||
listenPort = 51820;
|
||||
autostart = true;
|
||||
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [
|
||||
{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = ["10.0.0.1/8" "192.168.1.2/32"];
|
||||
endpoint = "ipv4.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
|
||||
systemd.network.enable = true;
|
||||
networking.useNetworkd = true;
|
||||
systemd.network.config.networkConfig = {
|
||||
ManageForeignRoutingPolicyRules = false;
|
||||
ManageForeignRoutes = false;
|
||||
SpeedMeter = true;
|
||||
};
|
||||
};
|
||||
systemd.services."wg-quick-OPNsense" = {
|
||||
serviceConfig = {
|
||||
Restart = "on-failure";
|
||||
RestartSec = "2s";
|
||||
systemd.services.systemd-networkd-wait-online.enable = lib.mkForce false;
|
||||
networking.wg-quick.interfaces = {
|
||||
Tunnel = {
|
||||
address = [ "10.0.0.7/24" "2a02:a03f:83ad:2101::7/128" ];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Arendia.key";
|
||||
listenPort = 51820;
|
||||
autostart = false;
|
||||
postUp = "resolvectl dns Tunnel 10.0.0.1; resolvectl domain Tunnel ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = [ "0.0.0.0/0" "::/0" ];
|
||||
endpoint = "ipv4.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
OPNsense = {
|
||||
address = [ "10.0.0.7/24" "2a02:a03f:83ad:2101::7/128" ];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Arendia.key";
|
||||
listenPort = 51820;
|
||||
autostart = true;
|
||||
postUp = "resolvectl dns OPNsense 10.0.0.1; resolvectl domain OPNsense ~thomasave.be;";
|
||||
dns = ["10.0.0.1"];
|
||||
peers = [{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = [ "10.0.0.1/8" "192.168.1.2/32" ];
|
||||
endpoint = "ipv4.thomasave.be:13231";
|
||||
persistentKeepalive = 25;
|
||||
}];
|
||||
};
|
||||
};
|
||||
unitConfig.StartLimitIntervalSec = 0;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
gcc
|
||||
];
|
||||
fonts.fontDir.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||
systemd.services."wg-quick-OPNsense" = {
|
||||
serviceConfig = { Restart = "on-failure"; RestartSec = "2s"; };
|
||||
unitConfig.StartLimitIntervalSec = 0;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
gcc
|
||||
];
|
||||
fonts.fontDir.enable = true;
|
||||
services.flatpak.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,40 +1,37 @@
|
|||
{ config, lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "rpool/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "rpool/root";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "rpool/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
fileSystems."/home" = {
|
||||
device = "rpool/home";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/12CE-A600";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/12CE-A600";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
swapDevices = [ ];
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
services.hardware.bolt.enable = true;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
services.hardware.bolt.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,105 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"fzgo",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fzgo": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722536372,
|
||||
"narHash": "sha256-kcaCZFYKWlGyyL1y5MQ/3LVNw+5GfW2kSYDixdrDJl0=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "430ff540f5cedb42cbd9267094d45f275cd480d4",
|
||||
"revCount": 13,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726222338,
|
||||
"narHash": "sha256-KuA8ciNR8qCF3dQaCaeh0JWyQUgEwkwDHr/f49Q5/e8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "503af483e1b328691ea3a434d331995595fb2e3d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722421184,
|
||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1726062873,
|
||||
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fzgo": "fzgo",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
description = "Home Manager configuration of Arm VPS";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
system = "aarch64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."ubuntu" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ../../home/Arm.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
}; # allows access to flake inputs in hm modules
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
{ lib, inputs, config, pkgs, ... }:
|
||||
let
|
||||
serverIP = "192.168.1.2";
|
||||
in {
|
||||
imports = [
|
||||
(import ../Common/default.nix { inherit inputs pkgs; })
|
||||
(import ../Common/nvidia.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/desktop.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/nfs.nix { inherit pkgs serverIP; })
|
||||
];
|
||||
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = [ "10.0.0.8/24" " 2a02:a03f:83ad:2101::8/128" ];
|
||||
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Asturia.key";
|
||||
listenPort = 51820;
|
||||
peers = [{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = [ "10.0.0.1/8" ];
|
||||
endpoint = "192.168.1.1:13231";
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
# Programs & Services
|
||||
programs.gnupg.agent.enable = true;
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
autoStart = true;
|
||||
capSysAdmin = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
fileSystems."/mnt/host" = {
|
||||
device = "host";
|
||||
fsType = "virtiofs";
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "usbhid" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/721d0462-9488-435e-9690-f13f11557edc";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/CE52-0414";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.adb.enable = true;
|
||||
users.users.user.extraGroups = ["adbusers"];
|
||||
services.udev.packages = [
|
||||
pkgs.android-udev-rules
|
||||
];
|
||||
}
|
||||
|
|
@ -1,141 +1,82 @@
|
|||
{pkgs, ...}: {
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.sessionVariables.NIXOS_OZONE_WL = "1"; # hint electron apps to use wayland:
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
security.polkit.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
networking.firewall.enable = false;
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
# Toolchain / C++ runtime
|
||||
stdenv.cc.cc # libc, libgcc, libstdc++
|
||||
stdenv.cc.cc.lib # sometimes needed explicitly
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
security.polkit.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
networking.firewall.enable = false;
|
||||
programs.nix-ld.enable = true;
|
||||
|
||||
# Compression / archive
|
||||
zlib
|
||||
zstd
|
||||
xz
|
||||
bzip2
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.memtest86.enable = true;
|
||||
boot.loader.systemd-boot.netbootxyz.enable = true;
|
||||
boot.loader.timeout = 1;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
systemd.extraConfig = "DefaultTimeoutStopSec=10s";
|
||||
systemd.services.systemd-user-sessions.enable = false;
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
|
||||
# Crypto / TLS / networking
|
||||
openssl
|
||||
curl
|
||||
libssh
|
||||
powerManagement.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
services.fwupd.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
services.fstrim.enable = true;
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Core system libs
|
||||
attr
|
||||
acl
|
||||
util-linux
|
||||
libsodium
|
||||
systemd # libudev, libsystemd
|
||||
libxml2
|
||||
expat
|
||||
|
||||
# Graphics / X11 / desktop
|
||||
libx11
|
||||
libxext
|
||||
libxfixes
|
||||
libxdamage
|
||||
libxcomposite
|
||||
libxrandr
|
||||
libxcb
|
||||
libdrm
|
||||
mesa
|
||||
libxkbcommon
|
||||
|
||||
# Audio / desktop integration
|
||||
alsa-lib
|
||||
dbus
|
||||
cups
|
||||
|
||||
# GLib / GTK stack (lots of GUI apps, Electron, etc.)
|
||||
glib
|
||||
gdk-pixbuf
|
||||
pango
|
||||
cairo
|
||||
atk
|
||||
gtk3
|
||||
|
||||
# NSS/NSPR (Firefox, Electron, many apps)
|
||||
nspr
|
||||
nss
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-emoji
|
||||
iosevka
|
||||
roboto
|
||||
font-awesome
|
||||
jetbrains-mono
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.ubuntu
|
||||
nerd-fonts.zed-mono
|
||||
];
|
||||
};
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.memtest86.enable = true;
|
||||
boot.loader.systemd-boot.netbootxyz.enable = true;
|
||||
boot.loader.timeout = 1;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
systemd.settings.Manager.DefaultTimeoutStopSec = "10s";
|
||||
systemd.settings.Manager.DefaultTimeoutStartSec = "10s";
|
||||
systemd.settings.Manager.DefaultTimeoutAbortSec = "10s";
|
||||
systemd.settings.Manager.DefaultDeviceTimeoutSec = "10s";
|
||||
systemd.services.systemd-user-sessions.enable = false;
|
||||
boot.tmp.cleanOnBoot = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
virtiofsd
|
||||
wget
|
||||
curl
|
||||
git
|
||||
lm_sensors
|
||||
wireguard-tools
|
||||
|
||||
powerManagement.enable = true;
|
||||
services.thermald.enable = true;
|
||||
services.pcscd.enable = true;
|
||||
services.fwupd.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
services.fstrim.enable = true;
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
PasswordAuthentication = false;
|
||||
# Podman
|
||||
dive
|
||||
podman-tui
|
||||
docker-compose
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 2d";
|
||||
};
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
noto-fonts
|
||||
noto-fonts-cjk-sans
|
||||
noto-fonts-color-emoji
|
||||
iosevka
|
||||
roboto
|
||||
font-awesome
|
||||
jetbrains-mono
|
||||
nerd-fonts.fira-code
|
||||
nerd-fonts.ubuntu
|
||||
nerd-fonts.zed-mono
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
android-tools
|
||||
virtiofsd
|
||||
wget
|
||||
curl
|
||||
git
|
||||
lm_sensors
|
||||
wireguard-tools
|
||||
|
||||
# Podman
|
||||
dive
|
||||
podman-tui
|
||||
docker-compose
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than 2d";
|
||||
};
|
||||
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.resolved = {
|
||||
enable = pkgs.lib.mkDefault true;
|
||||
settings.Resolve.FallbackDNS = ["1.1.1.1" "1.0.0.1"];
|
||||
};
|
||||
networking.nameservers = pkgs.lib.mkDefault ["1.1.1.1" "1.0.0.1"];
|
||||
services.resolved = {
|
||||
enable = true;
|
||||
fallbackDns = [ "1.1.1.1" "1.0.0.1" ];
|
||||
};
|
||||
networking.nameservers = ["1.1.1.1" "1.0.0.1"];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,76 +1,62 @@
|
|||
{ inputs, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.udev.packages = [pkgs.yubikey-personalization];
|
||||
programs.appimage.enable = true;
|
||||
programs.appimage.binfmt = true;
|
||||
services.udev.packages = [ pkgs.yubikey-personalization ];
|
||||
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
vulkan-extension-layer
|
||||
];
|
||||
};
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
services.greetd = {
|
||||
enable = pkgs.lib.mkDefault true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "uwsm start hyprland-uwsm.desktop";
|
||||
user = "user";
|
||||
};
|
||||
default_session = initial_session;
|
||||
hardware.graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
vulkan-loader
|
||||
vulkan-validation-layers
|
||||
vulkan-extension-layer
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
environment.variables = {
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
# Calendar
|
||||
# Add the server using gnome-online-accounts:
|
||||
# nix-shell -p gnome-control-center --run "gnome-control-center"
|
||||
# Just add the main webdav server and gnome-calendar will automatically pick up all available calendars.
|
||||
programs.dconf.enable = true;
|
||||
services.gnome.evolution-data-server.enable = true;
|
||||
services.gnome.gnome-online-accounts.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.gnome.sushi.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
wireplumber.enable = true;
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
services.pipewire.wireplumber.extraConfig = {
|
||||
"99-libcamera" = {
|
||||
"wireplumber.settings" = {
|
||||
"camera.use-libcamera" = true;
|
||||
};
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Experimental = true;
|
||||
};
|
||||
services.greetd = {
|
||||
enable = pkgs.lib.mkDefault true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "Hyprland";
|
||||
user = "user";
|
||||
};
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
environment.variables = {
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
|
||||
# Calendar
|
||||
# Add the server using gnome-online-accounts:
|
||||
# nix-shell -p gnome-control-center --run "gnome-control-center"
|
||||
# Just add the main webdav server and gnome-calendar will automatically pick up all available calendars.
|
||||
programs.dconf.enable = true;
|
||||
services.gnome.evolution-data-server.enable = true;
|
||||
services.gnome.gnome-online-accounts.enable = true;
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
services.gnome.sushi.enable = true;
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Experimental = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.blueman.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,70 +1,70 @@
|
|||
{
|
||||
pkgs,
|
||||
serverIP,
|
||||
...
|
||||
}: let
|
||||
sharePath = "/home/server";
|
||||
mountPath = "/home/server";
|
||||
common_options = [
|
||||
"noauto"
|
||||
"_netdev"
|
||||
"soft"
|
||||
"bg"
|
||||
"intr"
|
||||
# "x-systemd.automount"
|
||||
"x-systemd.idle-timeout=600"
|
||||
"x-systemd.device-timeout=2s"
|
||||
"x-systemd.mount-timeout=2s"
|
||||
"timeo=5"
|
||||
"x-gvfs-hide"
|
||||
"x-systemd.after=network-online.target"
|
||||
"x-systemd.requires=network-online.target"
|
||||
];
|
||||
bind_options =
|
||||
[
|
||||
"bind"
|
||||
"x-systemd.after=${builtins.replaceStrings ["/"] ["-"] mountPath}.mount"
|
||||
]
|
||||
++ common_options;
|
||||
in {
|
||||
services.rpcbind.enable = true;
|
||||
boot.supportedFilesystems = ["nfs"];
|
||||
fileSystems.${mountPath} = {
|
||||
device = "${serverIP}:${sharePath}";
|
||||
fsType = "nfs";
|
||||
options =
|
||||
[
|
||||
"x-systemd.after=wg-quick-Tunnel.service"
|
||||
"x-systemd.after=wg-quick-OPNsense.service"
|
||||
]
|
||||
++ common_options;
|
||||
};
|
||||
{pkgs, serverIP, ...}:
|
||||
|
||||
systemd.services."${builtins.replaceStrings ["/"] ["-"] mountPath}-unmount" = {
|
||||
description = "Unmount NFS share before shutdown";
|
||||
wantedBy = ["shutdown.target"];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "/bin/true";
|
||||
ExecStop = "${pkgs.util-linux}/bin/umount -f -l ${mountPath}";
|
||||
TimeoutStopSec = "10s";
|
||||
let
|
||||
sharePath = "/home/server";
|
||||
mountPath = "/home/server";
|
||||
common_options = [
|
||||
"noauto"
|
||||
"_netdev"
|
||||
"soft"
|
||||
"bg"
|
||||
"intr"
|
||||
"x-systemd.automount"
|
||||
"x-systemd.idle-timeout=600"
|
||||
"x-systemd.device-timeout=2s"
|
||||
"x-systemd.mount-timeout=2s"
|
||||
"timeo=5"
|
||||
"x-gvfs-hide"
|
||||
"x-systemd.after=network-online.target"
|
||||
"x-systemd.requires=network-online.target"
|
||||
];
|
||||
bind_options = [
|
||||
"bind"
|
||||
"x-systemd.after=${builtins.replaceStrings ["/"] ["-"] mountPath}.mount"
|
||||
] ++ common_options;
|
||||
in {
|
||||
services.rpcbind.enable = true;
|
||||
boot.supportedFilesystems = [ "nfs" ];
|
||||
fileSystems.${mountPath} = {
|
||||
device = "${serverIP}:${sharePath}";
|
||||
fsType = "nfs";
|
||||
options = [
|
||||
"x-systemd.after=wg-quick-Tunnel.service"
|
||||
"x-systemd.after=wg-quick-OPNsense.service"
|
||||
] ++ common_options;
|
||||
};
|
||||
};
|
||||
fileSystems."/home/user/Workspace" = {
|
||||
device = "/home/server/Workspace";
|
||||
options = bind_options;
|
||||
};
|
||||
fileSystems."/home/user/Documents" = {
|
||||
device = "/home/server/Storage/Thomas/Documents";
|
||||
options = bind_options;
|
||||
};
|
||||
fileSystems."/home/user/Pictures" = {
|
||||
device = "/home/server/Storage/Thomas/Pictures";
|
||||
options = bind_options;
|
||||
};
|
||||
fileSystems."/home/user/Videos" = {
|
||||
device = "/home/server/Storage/Thomas/Videos";
|
||||
options = bind_options;
|
||||
};
|
||||
|
||||
systemd.services."${builtins.replaceStrings ["/"] ["-"] mountPath}-unmount" = {
|
||||
description = "Unmount NFS share before shutdown";
|
||||
wantedBy = [ "shutdown.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
RemainAfterExit = true;
|
||||
ExecStart = "/bin/true";
|
||||
ExecStop = "${pkgs.util-linux}/bin/umount -f -l ${mountPath}";
|
||||
TimeoutStopSec = "10s";
|
||||
};
|
||||
};
|
||||
fileSystems."/home/user/Workspace" = {
|
||||
device = "/home/server/Workspace";
|
||||
options = bind_options;
|
||||
};
|
||||
fileSystems."/home/user/Documents" = {
|
||||
device = "/home/server/Storage/Thomas/Documents";
|
||||
options = bind_options;
|
||||
};
|
||||
fileSystems."/home/user/Pictures" = {
|
||||
device = "/home/server/Storage/Thomas/Pictures";
|
||||
options = bind_options;
|
||||
};
|
||||
fileSystems."/home/user/Videos" = {
|
||||
device = "/home/server/Storage/Thomas/Videos";
|
||||
options = bind_options;
|
||||
};
|
||||
systemd.extraConfig = ''
|
||||
DefaultTimeoutStartSec=15s
|
||||
DefaultTimeoutStopSec=15s
|
||||
DefaultTimeoutAbortSec=15s
|
||||
DefaultDeviceTimeoutSec=15s
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,23 @@
|
|||
{ pkgs, config, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
file
|
||||
gnumake
|
||||
gcc
|
||||
cudatoolkit
|
||||
podman
|
||||
nvidia-container-toolkit
|
||||
];
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
environment.systemPackages = with pkgs; [
|
||||
pciutils
|
||||
file
|
||||
gnumake
|
||||
gcc
|
||||
cudatoolkit
|
||||
podman
|
||||
nvidia-container-toolkit
|
||||
];
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
modesetting.enable = true;
|
||||
powerManagement.enable = true;
|
||||
powerManagement.finegrained = false;
|
||||
open = false;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,33 +1,23 @@
|
|||
{...}: {
|
||||
boot.initrd.supportedFilesystems = ["zfs"];
|
||||
boot.supportedFilesystems = ["zfs"];
|
||||
services.zfs.autoScrub.enable = true;
|
||||
services.sanoid = {
|
||||
enable = true;
|
||||
interval = "*:0,15,30,45:00";
|
||||
datasets = {
|
||||
"rpool/home" = {
|
||||
frequently = 8;
|
||||
yearly = 0;
|
||||
monthly = 0;
|
||||
weekly = 0;
|
||||
daily = 0;
|
||||
hourly = 0;
|
||||
frequent_period = 15;
|
||||
autoprune = true;
|
||||
autosnap = true;
|
||||
};
|
||||
"rpool/storage" = {
|
||||
frequently = 8;
|
||||
yearly = 0;
|
||||
monthly = 0;
|
||||
weekly = 0;
|
||||
daily = 0;
|
||||
hourly = 0;
|
||||
frequent_period = 15;
|
||||
autoprune = true;
|
||||
autosnap = true;
|
||||
};
|
||||
{ inputs, config, pkgs, ... }:
|
||||
{
|
||||
boot.initrd.supportedFilesystems = [ "zfs" ];
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
services.zfs.autoScrub.enable = true;
|
||||
services.sanoid = {
|
||||
enable = true;
|
||||
interval = "*:0,15,30,45:00";
|
||||
datasets = {
|
||||
"rpool/home" = {
|
||||
frequently = 8;
|
||||
yearly = 0;
|
||||
monthly = 0;
|
||||
weekly = 0;
|
||||
daily = 0;
|
||||
hourly = 0;
|
||||
frequent_period = 15;
|
||||
autoprune = true;
|
||||
autosnap = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"fzgo",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"worktimer",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fzgo": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737991358,
|
||||
"narHash": "sha256-Xye+N7I2FMb+GC96xMDjWi/HX5XCoFCz1Ak+KvP9jUQ=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "a005938761624fd8d3ab7cbb64fe57a40a9b36e9",
|
||||
"revCount": 14,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743648554,
|
||||
"narHash": "sha256-23JFd+zd2GamTTdnGuFVeIg8x8C3hLpQJRh/PGTORzo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "107352dde4ff3c01cb5a0b3fe17f5beef37215bc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722421184,
|
||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1743583204,
|
||||
"narHash": "sha256-F7n4+KOIfWrwoQjXrL2wD9RhFYLs2/GGe/MQY1sSdlE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "2c8d3f48d33929642c1c12cd243df4cc7d2ce434",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1730200266,
|
||||
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fzgo": "fzgo",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"worktimer": "worktimer"
|
||||
}
|
||||
},
|
||||
"worktimer": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739738223,
|
||||
"narHash": "sha256-p14lbBwGNJilt2J8y6mCg2pSHM9Bs7vbICYoyUy3XMM=",
|
||||
"ref": "cli",
|
||||
"rev": "eeae39d050f22edcae63ac8b3afa797dab8955b2",
|
||||
"revCount": 6,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/WorkTimer"
|
||||
},
|
||||
"original": {
|
||||
"ref": "cli",
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/WorkTimer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
description = "Home Manager configuration used in Docker";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
worktimer = {
|
||||
type = "git";
|
||||
url = "https://git.thomasave.be/thomasave/WorkTimer";
|
||||
ref = "cli";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."user" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ../../home/Docker.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
}; # allows access to flake inputs in hm modules
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,171 +1,160 @@
|
|||
{
|
||||
lib,
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
serverIP = "192.168.1.2";
|
||||
{ lib, inputs, config, pkgs, ... }:
|
||||
let
|
||||
serverIP = "192.168.1.2";
|
||||
in {
|
||||
imports = [
|
||||
(import ../Common/default.nix {inherit inputs pkgs;})
|
||||
# (import ../Common/nvidia.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/desktop.nix {inherit inputs pkgs config;})
|
||||
(import ../Common/nfs.nix {inherit pkgs serverIP;})
|
||||
(import ../Common/android.nix {inherit pkgs;})
|
||||
];
|
||||
|
||||
# Kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# AMD CPU
|
||||
boot.extraModulePackages = [config.boot.kernelPackages.zenpower];
|
||||
boot.kernelModules = ["zenpower amd_pstate=active"];
|
||||
boot.kernelParams = ["amd_pstate=active"];
|
||||
boot.initrd.kernelModules = ["amdgpu"];
|
||||
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
clinfo
|
||||
rocmPackages.rpp
|
||||
rocmPackages.clr
|
||||
rocmPackages.hipcc
|
||||
rocmPackages.rocm-smi
|
||||
];
|
||||
nixpkgs.config.rocmSupport = true;
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "rocm";
|
||||
};
|
||||
# nixpkgs.config.cudaSupport = true;
|
||||
services.logind.settings.Login = {
|
||||
HandlePowerKey = "suspend";
|
||||
};
|
||||
|
||||
# Virtualization
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
users.users.user.extraGroups = ["libvirtd"];
|
||||
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = ["10.0.0.10/24" " 2a02:a03f:83ad:2101::2/128"];
|
||||
dns = ["10.0.0.1" "fdc9:281f:04d7:9ee9::1"];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Kell.key";
|
||||
listenPort = 51820;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = ["10.0.0.1/8"];
|
||||
endpoint = "192.168.1.1:13231";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
networking.bridges = {
|
||||
"br0" = {
|
||||
interfaces = ["enp5s0"];
|
||||
};
|
||||
};
|
||||
networking.interfaces.br0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
boot.kernel.sysctl."net.ipv6.conf.enp5s0.disable_ipv6" = true;
|
||||
|
||||
# networking.wireless.iwd.enable = true;
|
||||
# networking.wireless.iwd.settings = {
|
||||
# IPv6 = {
|
||||
# Enabled = true;
|
||||
# };
|
||||
# Settings = {
|
||||
# AutoConnect = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
# Programs & Services
|
||||
programs.gnupg.agent.enable = true;
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
autoStart = false;
|
||||
capSysAdmin = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
|
||||
specialisation = {
|
||||
vfio.configuration = {
|
||||
boot.blacklistedKernelModules = ["k10temp" "nvidia" "nouveau" "radeon" "amdgpu"];
|
||||
boot = {
|
||||
initrd.kernelModules = [
|
||||
"kvm-amd"
|
||||
"vfio_pci"
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
# "amdgpu"
|
||||
# "nvidia_modeset"
|
||||
# "nvidia"
|
||||
# "nvidia_uvm"
|
||||
# "nvidia_drm"
|
||||
];
|
||||
kernelParams = [
|
||||
"amd_pstate=active"
|
||||
"amd_iommu=on"
|
||||
"vfio-pci.ids=10de:1b80,10de:10f0,1002:67df,1002:aaf0,1002:687f,1002:aaf8"
|
||||
];
|
||||
postBootCommands = ''
|
||||
DEVS="0000:0b:00.0 0000:0b:00.1 0000:05:00.0 0000:05:00.1
|
||||
for DEV in $DEVS; do
|
||||
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
|
||||
done
|
||||
modprobe -i vfio-pci
|
||||
'';
|
||||
};
|
||||
boot.extraModprobeConfig = "options vfio-pci ids=10de:1b80,10de:10f0,1002:67df,1002:aaf0,1002:687f,1002:aaf8";
|
||||
services.greetd.enable = lib.mkForce false;
|
||||
};
|
||||
vfio-nvidia.configuration = {
|
||||
boot.blacklistedKernelModules = ["k10temp" "nvidia" "nouveau"];
|
||||
boot = {
|
||||
initrd.kernelModules = [
|
||||
"kvm-amd"
|
||||
"vfio_pci"
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
"amdgpu"
|
||||
];
|
||||
kernelParams = [
|
||||
"amd_pstate=active"
|
||||
"amd_iommu=on"
|
||||
"vfio-pci.ids=10de:1b80,10de:10f0"
|
||||
];
|
||||
postBootCommands = ''
|
||||
DEVS="0000:0b:00.0 0000:0b:00.1
|
||||
for DEV in $DEVS; do
|
||||
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
|
||||
done
|
||||
modprobe -i vfio-pci
|
||||
'';
|
||||
};
|
||||
boot.extraModprobeConfig = "options vfio-pci ids=10de:1b80,10de:10f0";
|
||||
};
|
||||
};
|
||||
fonts.fontDir.enable = true;
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = [
|
||||
(pkgs.epsonscan2.override {
|
||||
withNonFreePlugins = true;
|
||||
withGui = true;
|
||||
})
|
||||
imports = [
|
||||
(import ../Common/default.nix { inherit inputs pkgs; })
|
||||
# (import ../Common/nvidia.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/desktop.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/nfs.nix { inherit pkgs serverIP; })
|
||||
(import ../Common/android.nix { inherit pkgs; })
|
||||
];
|
||||
};
|
||||
|
||||
# Kernel
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# AMD CPU
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.zenpower ];
|
||||
boot.kernelModules = [ "zenpower amd_pstate=active" ];
|
||||
boot.kernelParams = ["amd_pstate=active"];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
|
||||
hardware.graphics.extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /opt/rocm/hip - - - - ${pkgs.rocmPackages.clr}"
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
clinfo
|
||||
rocmPackages.rpp
|
||||
rocmPackages.clr
|
||||
rocmPackages.hipcc
|
||||
rocmPackages.rocm-smi
|
||||
];
|
||||
nixpkgs.config.rocmSupport = true;
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
acceleration = "rocm";
|
||||
};
|
||||
# nixpkgs.config.cudaSupport = true;
|
||||
services.logind.extraConfig = ''HandlePowerKey=suspend'';
|
||||
|
||||
# Virtualization
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.spiceUSBRedirection.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
users.users.user.extraGroups = [ "libvirtd" ];
|
||||
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = [ "10.0.0.10/24" " 2a02:a03f:83ad:2101::2/128" ];
|
||||
dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Kell.key";
|
||||
listenPort = 51820;
|
||||
peers = [{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = [ "10.0.0.1/8" ];
|
||||
endpoint = "192.168.1.1:13231";
|
||||
}];
|
||||
};
|
||||
};
|
||||
|
||||
networking.bridges = {
|
||||
"br0" = {
|
||||
interfaces = [ "enp5s0" ];
|
||||
};
|
||||
};
|
||||
networking.interfaces.br0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
|
||||
boot.kernel.sysctl."net.ipv6.conf.enp5s0.disable_ipv6" = true;
|
||||
|
||||
# networking.wireless.iwd.enable = true;
|
||||
# networking.wireless.iwd.settings = {
|
||||
# IPv6 = {
|
||||
# Enabled = true;
|
||||
# };
|
||||
# Settings = {
|
||||
# AutoConnect = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
|
||||
# Programs & Services
|
||||
programs.gnupg.agent.enable = true;
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
autoStart = false;
|
||||
capSysAdmin = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
|
||||
specialisation = {
|
||||
vfio.configuration = {
|
||||
boot.blacklistedKernelModules = [ "k10temp" "nvidia" "nouveau" "radeon" "amdgpu"];
|
||||
boot = {
|
||||
initrd.kernelModules = [
|
||||
"kvm-amd"
|
||||
"vfio_pci"
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
# "amdgpu"
|
||||
# "nvidia_modeset"
|
||||
# "nvidia"
|
||||
# "nvidia_uvm"
|
||||
# "nvidia_drm"
|
||||
];
|
||||
kernelParams = [
|
||||
"amd_pstate=active"
|
||||
"amd_iommu=on"
|
||||
"vfio-pci.ids=10de:1b80,10de:10f0,1002:67df,1002:aaf0,1002:687f,1002:aaf8"
|
||||
];
|
||||
postBootCommands = ''
|
||||
DEVS="0000:0b:00.0 0000:0b:00.1 0000:05:00.0 0000:05:00.1
|
||||
for DEV in $DEVS; do
|
||||
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
|
||||
done
|
||||
modprobe -i vfio-pci
|
||||
'';
|
||||
};
|
||||
boot.extraModprobeConfig = "options vfio-pci ids=10de:1b80,10de:10f0,1002:67df,1002:aaf0,1002:687f,1002:aaf8";
|
||||
services.greetd.enable = lib.mkForce false;
|
||||
};
|
||||
vfio-nvidia.configuration = {
|
||||
boot.blacklistedKernelModules = [ "k10temp" "nvidia" "nouveau" ];
|
||||
boot = {
|
||||
initrd.kernelModules = [
|
||||
"kvm-amd"
|
||||
"vfio_pci"
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
"amdgpu"
|
||||
];
|
||||
kernelParams = [
|
||||
"amd_pstate=active"
|
||||
"amd_iommu=on"
|
||||
"vfio-pci.ids=10de:1b80,10de:10f0"
|
||||
];
|
||||
postBootCommands = ''
|
||||
DEVS="0000:0b:00.0 0000:0b:00.1
|
||||
for DEV in $DEVS; do
|
||||
echo "vfio-pci" > /sys/bus/pci/devices/$DEV/driver_override
|
||||
done
|
||||
modprobe -i vfio-pci
|
||||
'';
|
||||
};
|
||||
boot.extraModprobeConfig = "options vfio-pci ids=10de:1b80,10de:10f0";
|
||||
};
|
||||
};
|
||||
fonts.fontDir.enable = true;
|
||||
hardware.sane = {
|
||||
enable = true;
|
||||
extraBackends = [
|
||||
(pkgs.epsonscan2.override { withNonFreePlugins = true; withGui = true; } )
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,32 +1,29 @@
|
|||
{ 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 = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/daf843cd-8e63-48ed-831a-e055929e86cb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/daf843cd-8e63-48ed-831a-e055929e86cb";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/E1D9-7A48";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/E1D9-7A48";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [ ];
|
||||
|
||||
networking.useDHCP = lib.mkDefault false;
|
||||
networking.useDHCP = lib.mkDefault false;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,163 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"fzgo",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-parts_2": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"worktimer",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727826117,
|
||||
"narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fzgo": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1737991358,
|
||||
"narHash": "sha256-Xye+N7I2FMb+GC96xMDjWi/HX5XCoFCz1Ak+KvP9jUQ=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "a005938761624fd8d3ab7cbb64fe57a40a9b36e9",
|
||||
"revCount": 14,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1740208222,
|
||||
"narHash": "sha256-FqgPcK5BK+Mc4cGBCGz555UsVd/TQK9FvmuamBWu+ZY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "f4a07823a298deff0efb0db30f9318511de7c232",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722421184,
|
||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1739866667,
|
||||
"narHash": "sha256-EO1ygNKZlsAC9avfcwHkKGMsmipUk1Uc0TbrEZpkn64=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "73cf49b8ad837ade2de76f87eb53fc85ed5d4680",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1730200266,
|
||||
"narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fzgo": "fzgo",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"worktimer": "worktimer"
|
||||
}
|
||||
},
|
||||
"worktimer": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts_2",
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1739738223,
|
||||
"narHash": "sha256-p14lbBwGNJilt2J8y6mCg2pSHM9Bs7vbICYoyUy3XMM=",
|
||||
"ref": "cli",
|
||||
"rev": "eeae39d050f22edcae63ac8b3afa797dab8955b2",
|
||||
"revCount": 6,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/WorkTimer"
|
||||
},
|
||||
"original": {
|
||||
"ref": "cli",
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/WorkTimer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
description = "Home Manager configuration of server";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
worktimer = {
|
||||
type = "git";
|
||||
url = "https://git.thomasave.be/thomasave/WorkTimer";
|
||||
ref = "cli";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."server" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ../../home/Mallorea.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
}; # allows access to flake inputs in hm modules
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"fzgo",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fzgo": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722536372,
|
||||
"narHash": "sha256-kcaCZFYKWlGyyL1y5MQ/3LVNw+5GfW2kSYDixdrDJl0=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "430ff540f5cedb42cbd9267094d45f275cd480d4",
|
||||
"revCount": 13,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1726222338,
|
||||
"narHash": "sha256-KuA8ciNR8qCF3dQaCaeh0JWyQUgEwkwDHr/f49Q5/e8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "503af483e1b328691ea3a434d331995595fb2e3d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722421184,
|
||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1726062873,
|
||||
"narHash": "sha256-IiA3jfbR7K/B5+9byVi9BZGWTD4VSbWe8VLpp9B/iYk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4f807e8940284ad7925ebd0a0993d2a1791acb2f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fzgo": "fzgo",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
description = "Home Manager configuration of Pi";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
system = "aarch64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."user" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ../../home/Pi.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
}; # allows access to flake inputs in hm modules
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,59 +1,48 @@
|
|||
{ inputs, config, pkgs, ... }:
|
||||
{
|
||||
inputs,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(import ../Common/default.nix {inherit inputs config pkgs;})
|
||||
(import ../Common/nvidia.nix {inherit pkgs config;})
|
||||
# (import ../Common/desktop.nix { inherit inputs pkgs config; })
|
||||
];
|
||||
imports = [
|
||||
(import ../Common/default.nix { inherit inputs config pkgs; })
|
||||
(import ../Common/desktop.nix { inherit inputs pkgs config; })
|
||||
(import ../Common/nvidia.nix { inherit pkgs config; })
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
# services.sunshine = {
|
||||
# enable = true;
|
||||
# autoStart = false;
|
||||
# capSysAdmin = true;
|
||||
# openFirewall = true;
|
||||
# };
|
||||
|
||||
boot.kernelParams = ["mitigations=off"];
|
||||
|
||||
zramSwap.enable = true;
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = ["10.0.0.12/24"];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Riva.key";
|
||||
listenPort = 51820;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = ["10.0.0.1/8"];
|
||||
endpoint = "192.168.1.1:13231";
|
||||
}
|
||||
];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
services.sunshine = {
|
||||
enable = true;
|
||||
autoStart = false;
|
||||
capSysAdmin = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
boot.kernelParams = ["mitigations=off"];
|
||||
|
||||
zramSwap.enable = true;
|
||||
networking.wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
address = [ "10.0.0.12/24" ];
|
||||
privateKeyFile = "/home/user/.secrets/Wireguard/Riva.key";
|
||||
listenPort = 51820;
|
||||
peers = [{
|
||||
publicKey = "/9ppjm3yeD0duDvxrqgcHscHmftXko+0s2RbivNEy2c=";
|
||||
allowedIPs = [ "10.0.0.1/8" ];
|
||||
endpoint = "192.168.1.1:13231";
|
||||
}];
|
||||
};
|
||||
};
|
||||
fileSystems."/home/server/Workspace" = {
|
||||
device = "/mnt/Workspace";
|
||||
fsType = "virtiofs";
|
||||
};
|
||||
fileSystems."/home/server/.cache/fzgo" = {
|
||||
device = "/mnt/fzgo_cache";
|
||||
fsType = "virtiofs";
|
||||
};
|
||||
fileSystems."/home/user/Workspace" = {
|
||||
device = "/home/server/Workspace";
|
||||
options = ["bind"];
|
||||
};
|
||||
};
|
||||
fileSystems."/home/server/Workspace" = {
|
||||
device = "/mnt/Workspace";
|
||||
fsType = "virtiofs";
|
||||
};
|
||||
fileSystems."/home/server/.cache/fzgo" = {
|
||||
device = "/mnt/fzgo_cache";
|
||||
fsType = "virtiofs";
|
||||
};
|
||||
fileSystems."/home/user/Workspace" = {
|
||||
device = "/home/server/Workspace";
|
||||
options = ["bind"];
|
||||
};
|
||||
services.resolved = {
|
||||
enable = false;
|
||||
};
|
||||
networking.nameservers = ["192.168.1.2"];
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,39 +1,36 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/profiles/qemu-guest.nix")];
|
||||
imports = [ (modulesPath + "/profiles/qemu-guest.nix") ];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-amd"];
|
||||
boot.extraModulePackages = [];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/563963bd-8e27-4c9c-a1d6-d204ea7c43ff";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/563963bd-8e27-4c9c-a1d6-d204ea7c43ff";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/9F3C-9F3B";
|
||||
fsType = "vfat";
|
||||
options = ["fmask=0077" "dmask=0077"];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/9F3C-9F3B";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [];
|
||||
swapDevices = [ ];
|
||||
|
||||
# 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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
# 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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,105 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"fzgo",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fzgo": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722536372,
|
||||
"narHash": "sha256-kcaCZFYKWlGyyL1y5MQ/3LVNw+5GfW2kSYDixdrDJl0=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "430ff540f5cedb42cbd9267094d45f275cd480d4",
|
||||
"revCount": 13,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1727246346,
|
||||
"narHash": "sha256-TcUaKtya339Asu+g6KTJ8h7KiKcKXKp2V+At+7tksyY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "1e22ef1518fb175d762006f9cae7f6312b8caedb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722421184,
|
||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1726937504,
|
||||
"narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9357f4f23713673f310988025d9dc261c20e70c6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fzgo": "fzgo",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
description = "Home Manager configuration of Tolnedra";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."user" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ../../home/Tolnedra.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
}; # allows access to flake inputs in hm modules
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"fzgo",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1719994518,
|
||||
"narHash": "sha256-pQMhCCHyQGRzdfAkdJ4cIWiw+JNuWsTX7f0ZYSyz0VY=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "9227223f6d922fee3c7b190b2cc238a99527bbb7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"fzgo": {
|
||||
"inputs": {
|
||||
"flake-parts": "flake-parts",
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1722536372,
|
||||
"narHash": "sha256-kcaCZFYKWlGyyL1y5MQ/3LVNw+5GfW2kSYDixdrDJl0=",
|
||||
"ref": "refs/heads/master",
|
||||
"rev": "430ff540f5cedb42cbd9267094d45f275cd480d4",
|
||||
"revCount": 13,
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "https://git.thomasave.be/thomasave/fzgo.git"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723986931,
|
||||
"narHash": "sha256-Fy+KEvDQ+Hc8lJAV3t6leXhZJ2ncU5/esxkgt3b8DEY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "2598861031b78aadb4da7269df7ca9ddfc3e1671",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1722421184,
|
||||
"narHash": "sha256-/DJBI6trCeVnasdjUo9pbnodCLZcFqnVZiLUfqLH4jA=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "9f918d616c5321ad374ae6cb5ea89c9e04bf3e58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1723991338,
|
||||
"narHash": "sha256-Grh5PF0+gootJfOJFenTTxDTYPidA3V28dqJ/WV7iis=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8a3354191c0d7144db9756a74755672387b702ba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fzgo": "fzgo",
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
description = "Home Manager configuration of vault";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
fzgo.url = "git+https://git.thomasave.be/thomasave/fzgo.git";
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }@inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."server" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ../../home/Vault.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
}; # allows access to flake inputs in hm modules
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Reference in New Issue