Compare commits
18 commits
main
...
export-nix
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 0fb2ed977e | ||
Bruno BELANYI | c593180cf2 | ||
Bruno BELANYI | d94c9da1c1 | ||
Bruno BELANYI | e33357f72e | ||
Bruno BELANYI | dd7134ca3e | ||
Bruno BELANYI | 33a7d0a141 | ||
Bruno BELANYI | 272a8fb7b9 | ||
Bruno BELANYI | ad17fed0bf | ||
Bruno BELANYI | 334a3346b8 | ||
Bruno BELANYI | 53594d2fb4 | ||
Bruno BELANYI | 9f82f2a7e8 | ||
Bruno BELANYI | ac03fb3b31 | ||
Bruno BELANYI | 034cd3ac55 | ||
Bruno BELANYI | 2027bb327e | ||
Bruno BELANYI | 61c234d932 | ||
Bruno BELANYI | fe6df44b85 | ||
Bruno BELANYI | d113742905 | ||
Bruno BELANYI | aa1336bb8d |
|
@ -9,15 +9,15 @@ steps:
|
|||
|
||||
- name: notifiy
|
||||
image: bash
|
||||
environment:
|
||||
ADDRESS:
|
||||
from_secret: matrix_homeserver
|
||||
ROOM:
|
||||
from_secret: matrix_roomid
|
||||
USER:
|
||||
from_secret: matrix_username
|
||||
PASS:
|
||||
from_secret: matrix_password
|
||||
secrets:
|
||||
- source: matrix_homeserver
|
||||
target: address
|
||||
- source: matrix_roomid
|
||||
target: room
|
||||
- source: matrix_username
|
||||
target: user
|
||||
- source: matrix_password
|
||||
target: pass
|
||||
commands:
|
||||
- nix run '.#matrix-notifier'
|
||||
when:
|
||||
|
|
57
flake.lock
57
flake.lock
|
@ -14,11 +14,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715290355,
|
||||
"narHash": "sha256-2T7CHTqBXJJ3ZC6R/4TXTcKoXWHcvubKNj9SfomURnw=",
|
||||
"lastModified": 1703433843,
|
||||
"narHash": "sha256-nmtA4KqFboWxxoOAA6Y1okHbZh+HsXaMPFkYHsoDRDw=",
|
||||
"owner": "ryantm",
|
||||
"repo": "agenix",
|
||||
"rev": "8d37c5bdeade12b6479c85acd133063ab53187a0",
|
||||
"rev": "417caa847f9383e111d1397039c9d4337d024bf0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -53,11 +53,11 @@
|
|||
"flake-compat": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1696426674,
|
||||
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||
"lastModified": 1673956053,
|
||||
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
|
||||
"owner": "edolstra",
|
||||
"repo": "flake-compat",
|
||||
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -73,11 +73,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715865404,
|
||||
"narHash": "sha256-/GJvTdTpuDjNn84j82cU6bXztE0MSkdnTWClUCRub78=",
|
||||
"lastModified": 1704152458,
|
||||
"narHash": "sha256-DS+dGw7SKygIWf9w4eNBUZsK+4Ug27NwEWmn2tnbycg=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8dc45382d5206bd292f9c2768b8058a8fd8311d9",
|
||||
"rev": "88a2cd8166694ba0b6cb374700799cec53aef527",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -94,11 +94,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -116,11 +116,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"lastModified": 1660459072,
|
||||
"narHash": "sha256-8DFJjXG8zqoONA1vXtgeKXy68KdJL5UaXR8NtVMUbx8=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"rev": "a20de23b925fd8264fd7fad6454652e142fd7f73",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -136,11 +136,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715930644,
|
||||
"narHash": "sha256-W9pyM3/vePxrffHtzlJI6lDS3seANQ+Nqp+i58O46LI=",
|
||||
"lastModified": 1704276313,
|
||||
"narHash": "sha256-4eD4RaAKHLj0ztw5pQcNFs3hGpxrsYb0e9Qir+Ute+w=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "e3ad5108f54177e6520535768ddbf1e6af54b59d",
|
||||
"rev": "4d8f90205c6c90be2e81d94d0e5eedf71c1ba34e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -152,11 +152,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1715961556,
|
||||
"narHash": "sha256-+NpbZRCRisUHKQJZF3CT+xn14ZZQO+KjxIIanH3Pvn4=",
|
||||
"lastModified": 1703961334,
|
||||
"narHash": "sha256-M1mV/Cq+pgjk0rt6VxoyyD+O8cOUiai8t9Q6Yyq4noY=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4a6b83b05df1a8bd7d99095ec4b4d271f2956b64",
|
||||
"rev": "b0d36bd0a420ecee3bc916c91886caca87c894e9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -168,11 +168,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1716149933,
|
||||
"narHash": "sha256-0Ui2HmmKvSqxXfT5kCzTu2EO+kqYxavPZHROxQLsI14=",
|
||||
"lastModified": 1704289500,
|
||||
"narHash": "sha256-SMoojjdEMgf6GtPh5vzofdeev4nyM+vBi2J6Z/Sufco=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "0d0e224fe23a49977d871ae2fe2f14c84b03322a",
|
||||
"rev": "a18213c74e43dd6e941c41d77382377938c77caf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -185,6 +185,9 @@
|
|||
"pre-commit-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-utils": [
|
||||
"futils"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
|
@ -194,11 +197,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715870890,
|
||||
"narHash": "sha256-nacSOeXtUEM77Gn0G4bTdEOeFIrkCBXiyyFZtdGwuH0=",
|
||||
"lastModified": 1703939133,
|
||||
"narHash": "sha256-Gxe+mfOT6bL7wLC/tuT2F+V+Sb44jNr8YsJ3cyIl4Mo=",
|
||||
"owner": "cachix",
|
||||
"repo": "pre-commit-hooks.nix",
|
||||
"rev": "fa606cccd7b0ccebe2880051208e4a0f61bfc8c1",
|
||||
"rev": "9d3d7e18c6bc4473d7520200d4ddab12f8402d38",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
repo = "pre-commit-hooks.nix";
|
||||
ref = "master";
|
||||
inputs = {
|
||||
flake-utils.follows = "futils";
|
||||
nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs-stable.follows = "nixpkgs";
|
||||
};
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
{ flake-parts
|
||||
, systems
|
||||
, futils
|
||||
, ...
|
||||
} @ inputs:
|
||||
let
|
||||
mySystems = import systems;
|
||||
mySystems = futils.lib.defaultSystems;
|
||||
in
|
||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||
systems = mySystems;
|
||||
|
@ -13,6 +13,7 @@ flake-parts.lib.mkFlake { inherit inputs; } {
|
|||
./checks.nix
|
||||
./dev-shells.nix
|
||||
./home-manager.nix
|
||||
./hosts.nix
|
||||
./lib.nix
|
||||
./nixos.nix
|
||||
./overlays.nix
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
{ self, inputs, lib, ... }:
|
||||
{ self, config, inputs, lib, ... }:
|
||||
let
|
||||
inherit (config) hosts;
|
||||
|
||||
defaultModules = [
|
||||
# Include generic settings
|
||||
"${self}/modules/home"
|
||||
|
@ -14,9 +16,11 @@ let
|
|||
# Enable home-manager
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
# Import common modules
|
||||
"${self}/modules/common"
|
||||
];
|
||||
|
||||
mkHome = name: system: inputs.home-manager.lib.homeManagerConfiguration {
|
||||
mkHomeCommon = mainModules: system: inputs.home-manager.lib.homeManagerConfiguration {
|
||||
# Work-around for home-manager
|
||||
# * not letting me set `lib` as an extraSpecialArgs
|
||||
# * not respecting `nixpkgs.overlays` [1]
|
||||
|
@ -29,34 +33,51 @@ let
|
|||
];
|
||||
};
|
||||
|
||||
modules = defaultModules ++ [
|
||||
"${self}/hosts/homes/${name}"
|
||||
];
|
||||
modules = defaultModules ++ mainModules;
|
||||
|
||||
extraSpecialArgs = {
|
||||
# Inject inputs to use them in global registry
|
||||
inherit inputs;
|
||||
# For consumption by common modules
|
||||
type = "home";
|
||||
};
|
||||
};
|
||||
|
||||
homes = {
|
||||
mkHome = name: mkHomeCommon [ "${self}/hosts/homes/${name}" ];
|
||||
|
||||
mkNixosHome = name: mkHomeCommon [
|
||||
"${self}/hosts/nixos/${name}/home.nix"
|
||||
"${self}/hosts/nixos/${name}/profiles.nix"
|
||||
];
|
||||
in
|
||||
{
|
||||
hosts.homes = {
|
||||
"ambroisie@bazin" = "x86_64-linux";
|
||||
"ambroisie@mousqueton" = "x86_64-linux";
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
perSystem = { system, ... }: {
|
||||
# Work-around for https://github.com/nix-community/home-manager/issues/3075
|
||||
legacyPackages = {
|
||||
homeConfigurations =
|
||||
let
|
||||
filteredHomes = lib.filterAttrs (_: v: v == system) homes;
|
||||
filteredHomes = lib.filterAttrs (_: v: v == system) hosts.homes;
|
||||
allHomes = filteredHomes // {
|
||||
# Default configuration
|
||||
ambroisie = system;
|
||||
};
|
||||
homeManagerHomes = lib.mapAttrs mkHome allHomes;
|
||||
|
||||
filteredNixosHosts = lib.filterAttrs (_: v: v == system) hosts.nixos;
|
||||
nixosHomes' = lib.mapAttrs mkNixosHome filteredNixosHosts;
|
||||
nixosHomeUsername = (host: self.nixosConfigurations.${host}.config.my.user.name);
|
||||
nixosHomes = lib.mapAttrs' (host: lib.nameValuePair "${nixosHomeUsername host}@${host}") nixosHomes';
|
||||
in
|
||||
lib.mapAttrs mkHome allHomes;
|
||||
lib.foldl' lib.mergeAttrs { }
|
||||
[
|
||||
homeManagerHomes
|
||||
nixosHomes
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
21
flake/hosts.nix
Normal file
21
flake/hosts.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
# Define `hosts.{darwin,home,nixos}` options for consumption in other modules
|
||||
{ lib, ... }:
|
||||
let
|
||||
mkHostsOption = description: lib.mkOption {
|
||||
inherit description;
|
||||
type = with lib.types; attrsOf str;
|
||||
default = { };
|
||||
example = { name = "x86_64-linux"; };
|
||||
};
|
||||
in
|
||||
{
|
||||
options = {
|
||||
hosts = {
|
||||
darwin = mkHostsOption "Darwin hosts";
|
||||
|
||||
homes = mkHostsOption "Home Manager hosts";
|
||||
|
||||
nixos = mkHostsOption "NixOS hosts";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{ self, inputs, lib, ... }:
|
||||
{ self, config, inputs, lib, ... }:
|
||||
let
|
||||
defaultModules = [
|
||||
{
|
||||
|
@ -12,6 +12,8 @@ let
|
|||
}
|
||||
# Include generic settings
|
||||
"${self}/modules/nixos"
|
||||
# Import common modules
|
||||
"${self}/modules/common"
|
||||
];
|
||||
|
||||
buildHost = name: system: lib.nixosSystem {
|
||||
|
@ -24,12 +26,18 @@ let
|
|||
inherit (self) lib;
|
||||
# Inject inputs to use them in global registry
|
||||
inherit inputs;
|
||||
# For consumption by common modules
|
||||
type = "nixos";
|
||||
};
|
||||
};
|
||||
in
|
||||
{
|
||||
flake.nixosConfigurations = lib.mapAttrs buildHost {
|
||||
aramis = "x86_64-linux";
|
||||
porthos = "x86_64-linux";
|
||||
config = {
|
||||
hosts.nixos = {
|
||||
aramis = "x86_64-linux";
|
||||
porthos = "x86_64-linux";
|
||||
};
|
||||
|
||||
flake.nixosConfigurations = lib.mapAttrs buildHost config.hosts.nixos;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Google Laptop configuration
|
||||
{ lib, options, pkgs, ... }:
|
||||
# Google Cloudtop configuration
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
services.gpg-agent.enable = lib.mkForce false;
|
||||
|
||||
|
@ -12,10 +12,8 @@
|
|||
# I use scripts that use the passthrough sequence often on this host
|
||||
enablePassthrough = true;
|
||||
|
||||
terminalFeatures = {
|
||||
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
||||
xterm-256color = { };
|
||||
};
|
||||
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
||||
trueColorTerminals = [ "xterm-256color" ];
|
||||
};
|
||||
|
||||
ssh = {
|
||||
|
@ -23,21 +21,5 @@
|
|||
package = pkgs.emptyDirectory;
|
||||
};
|
||||
};
|
||||
|
||||
zsh = {
|
||||
notify = {
|
||||
enable = true;
|
||||
|
||||
exclude = options.my.home.zsh.notify.exclude.default ++ [
|
||||
"adb shell$" # Only interactive shell sessions
|
||||
];
|
||||
|
||||
ssh = {
|
||||
enable = true;
|
||||
# `notify-send` is proxied to the ChromeOS layer
|
||||
useOsc777 = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,10 +15,8 @@
|
|||
# I use scripts that use the passthrough sequence often on this host
|
||||
enablePassthrough = true;
|
||||
|
||||
terminalFeatures = {
|
||||
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
||||
xterm-256color = { };
|
||||
};
|
||||
# HTerm uses `xterm-256color` as its `$TERM`, so use that here
|
||||
trueColorTerminals = [ "xterm-256color" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -26,12 +26,6 @@
|
|||
firmware = {
|
||||
cpuFlavor = "intel";
|
||||
};
|
||||
|
||||
graphics = {
|
||||
enable = true;
|
||||
|
||||
gpuFlavor = "intel";
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
my.home = {
|
||||
# Use graphical pinentry
|
||||
bitwarden.pinentry = pkgs.pinentry-gtk2;
|
||||
bitwarden.pinentry = "qt";
|
||||
# Ebook library
|
||||
calibre.enable = true;
|
||||
# Some amount of social life
|
||||
|
@ -14,7 +14,7 @@
|
|||
# Blue light filter
|
||||
gammastep.enable = true;
|
||||
# Use a small popup to enter passwords
|
||||
gpg.pinentry = pkgs.pinentry-gtk2;
|
||||
gpg.pinentry = "qt";
|
||||
# Machine specific packages
|
||||
packages.additionalPackages = with pkgs; [
|
||||
element-desktop # Matrix client
|
||||
|
|
|
@ -3,14 +3,15 @@
|
|||
|
||||
{
|
||||
boot = {
|
||||
# Use the systemd-boot EFI boot loader.
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
# Use the GRUB 2 boot loader.
|
||||
loader.grub = {
|
||||
enable = true;
|
||||
# Define on which hard drive you want to install Grub.
|
||||
device = "/dev/disk/by-id/ata-HGST_HUS724020ALA640_PN2181P6J58M1P";
|
||||
};
|
||||
|
||||
initrd = {
|
||||
availableKernelModules = [ "ahci" "xhci_pci" "ehci_pci" "usbhid" "sd_mod" ];
|
||||
availableKernelModules = [ "uhci_hcd" "ahci" "usbhid" ];
|
||||
kernelModules = [ "dm-snapshot" ];
|
||||
};
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
./hardware.nix
|
||||
./home.nix
|
||||
./networking.nix
|
||||
./profiles.nix
|
||||
./secrets
|
||||
./services.nix
|
||||
./system.nix
|
||||
|
@ -16,5 +17,11 @@
|
|||
# Set your time zone.
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
system.stateVersion = "24.05"; # Did you read the comment?
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "20.09"; # Did you read the comment?
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
# Hardware configuration
|
||||
{ modulesPath, ... }:
|
||||
{ lib, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
|
@ -11,18 +11,9 @@
|
|||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/boot";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-label/swap"; }
|
||||
];
|
||||
|
||||
my.hardware = {
|
||||
firmware = {
|
||||
cpuFlavor = "intel";
|
||||
};
|
||||
};
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||
}
|
||||
|
|
|
@ -1,18 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
my.home = {
|
||||
nix = {
|
||||
cache = {
|
||||
# This server is the one serving the cache, don't try to query it
|
||||
selfHosted = false;
|
||||
};
|
||||
};
|
||||
|
||||
# Allow using extended features when SSH-ing from various clients
|
||||
tmux.terminalFeatures = {
|
||||
# Allow using 24bit color when SSH-ing from various clients
|
||||
tmux.trueColorTerminals = [
|
||||
# My usual terminal, e.g: on laptop
|
||||
alacritty = { };
|
||||
};
|
||||
"alacritty"
|
||||
];
|
||||
|
||||
# Always start a tmux session when opening a shell session
|
||||
zsh.launchTmux = true;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
SWAP_SIZE=16GiB
|
||||
|
||||
parted /dev/sda --script -- \
|
||||
mklabel gpt \
|
||||
mklabel msdos \
|
||||
mkpart primary 512MiB -$SWAP_SIZE \
|
||||
mkpart primary linux-swap -$SWAP_SIZE 100% \
|
||||
mkpart ESP fat32 1MiB 512MiB \
|
||||
|
@ -11,24 +11,14 @@ parted /dev/sda --script -- \
|
|||
|
||||
parted /dev/sdb --script -- \
|
||||
mklabel gpt \
|
||||
mkpart primary 0% 100%
|
||||
parted /dev/sdc --script -- \
|
||||
mklabel gpt \
|
||||
mkpart primary 0% 100%
|
||||
parted /dev/sdd --script -- \
|
||||
mklabel gpt \
|
||||
mkpart primary 0% 100%
|
||||
mkpart primary 0MiB 100%
|
||||
|
||||
mkfs.ext4 -L media1 /dev/sda1
|
||||
mkfs.ext4 -L media2 /dev/sdb1
|
||||
mkfs.ext4 -L media3 /dev/sdc1
|
||||
mkfs.ext4 -L media4 /dev/sdd1
|
||||
|
||||
pvcreate /dev/sda1
|
||||
pvcreate /dev/sdb1
|
||||
pvcreate /dev/sdc1
|
||||
pvcreate /dev/sdd1
|
||||
vgcreate lvm /dev/sda1 /dev/sdb1 /dev/sdc1 /dev/sdd1
|
||||
vgcreate lvm /dev/sda1 /dev/sdb1
|
||||
lvcreate -l 100%FREE -n media lvm
|
||||
|
||||
mkfs.ext4 -L nixos /dev/mapper/lvm-media
|
||||
|
@ -37,17 +27,17 @@ mkfs.fat -F 32 -n boot /dev/sda3
|
|||
|
||||
mount /dev/disk/by-label/nixos /mnt
|
||||
swapon /dev/sda2
|
||||
mkdir -p /mnt/boot
|
||||
mount /dev/disk/by-label/boot /mnt/boot
|
||||
|
||||
apt install sudo
|
||||
useradd -m -G sudo setupuser
|
||||
# shellcheck disable=2117
|
||||
su setupuser
|
||||
|
||||
cat << EOF
|
||||
# Run the following commands as setup user
|
||||
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
||||
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
|
||||
nix profile install nixpkgs#nixos-install-tools
|
||||
curl -L https://nixos.org/nix/install | sh
|
||||
. $HOME/.nix-profile/etc/profile.d/nix.sh
|
||||
nix-channel --add https://nixos.org/channels/nixos-20.09 nixpkgs
|
||||
sudo "$(which nixos-generate-config)" --root /mnt
|
||||
|
||||
# Change uuids to labels
|
||||
|
@ -64,6 +54,3 @@ git crypt unlock
|
|||
|
||||
nixos-install --root /mnt --flake '.#<hostname>'
|
||||
EOF
|
||||
|
||||
# shellcheck disable=2117
|
||||
su setupuser
|
||||
|
|
|
@ -6,17 +6,30 @@
|
|||
hostName = "porthos"; # Define your hostname.
|
||||
domain = "belanyi.fr"; # Define your domain.
|
||||
|
||||
# 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`.
|
||||
useDHCP = true;
|
||||
|
||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||
# replicates the default behaviour.
|
||||
useDHCP = false;
|
||||
|
||||
interfaces = {
|
||||
eno1.useDHCP = true;
|
||||
eno2.useDHCP = true;
|
||||
bond0.useDHCP = true;
|
||||
bonding_masters.useDHCP = true;
|
||||
dummy0.useDHCP = true;
|
||||
erspan0.useDHCP = true;
|
||||
eth0.useDHCP = true;
|
||||
eth1.useDHCP = true;
|
||||
gre0.useDHCP = true;
|
||||
gretap0.useDHCP = true;
|
||||
ifb0.useDHCP = true;
|
||||
ifb1.useDHCP = true;
|
||||
ip6tnl0.useDHCP = true;
|
||||
sit0.useDHCP = true;
|
||||
teql0.useDHCP = true;
|
||||
tunl0.useDHCP = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Which interface is used to connect to the internet
|
||||
my.hardware.networking.externalInterface = "eno1";
|
||||
my.hardware.networking.externalInterface = "eth0";
|
||||
}
|
||||
|
|
4
hosts/nixos/porthos/profiles.nix
Normal file
4
hosts/nixos/porthos/profiles.nix
Normal file
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
# Nothing
|
||||
}
|
|
@ -1,8 +1,10 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg bQFr9oAnbo1rI/MpUV8wQz/Xj7iZY4ZU+Swf0nSIQFw
|
||||
zama2XJ0gdvUlD2GHMhmZqHSxHe+dKSfXnHoWDcSw7Y
|
||||
-> ssh-ed25519 jPowng gitUwSKTNKWLSxnwa185O7x/u0ul93g8wPESdZaKRk8
|
||||
uvBIfAUkZp5sg6rfeEGvL5ZDV8m2uSEotW02kjPN3Hw
|
||||
--- SZxe5f/CUZBvPQa2Sz/UBY3L68rMkIGGRuZPk7YE+Vg
|
||||
¾r ú&…¥‹{~v?¨}=Ä
|
||||
}+
¿SQ’M[²]Œ±kMÒAàtŒÃmMë/£µLsü|Þ…m©CÀñiYC}ƒŽ‡çxŽ€
|
||||
-> ssh-ed25519 cKojmg 0bz3W8QcGaulxy+kDmM717jTthQpFOCwV9HkenFJEyo
|
||||
NKeh1/JkX4WAWbOjUeKLMbsyCevnDf3a70FfYUav26c
|
||||
-> ssh-ed25519 jPowng Q59ybJMMteOSB6hZ5m6UPP0N2p8jrDSu5vBYwPgGcRw
|
||||
j420on2jSsfMsv4MDtiOTMIFjaXV7sIsrS+g4iab+68
|
||||
-> z}.q-grease s2W<qM_Z t
|
||||
n1Yfs/gmNsl/n9HtuKBIIT8iwIjYca2yxlh7Q1XAT1B+RZ8oGjW8yCPj1unbDGZL
|
||||
e5BfLO3zgkEZnQ
|
||||
--- FSgNKEdDeeTjCx9jN9UtOFl58mC/Lbu1PAYRGK0CZW4
|
||||
U€¿+æ©jïÝ{gø`GŽ›ÆàˆR¾Qk]šóïdÐ6å˜ú‚y5T²$Äñs~Ùh‰Ä£òÔ<C3B2>Fº¢ç%°vöÌm<C38C>
|
|
@ -1,7 +0,0 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg fpiyZo1AR5hCfk/KtbgWCTzz+05/VOUnnaHhWgXQRwc
|
||||
d2w9IX/kq/T6OwQ1zImsCmzIX2yfFD8hQDbs0IW3ZIA
|
||||
-> ssh-ed25519 jPowng E9R7p9NCubUQrymjnrNfEjSNIIAXrBQLogNkWsOx8xc
|
||||
MrWEE5LNtOqAjnwA6byfSa1udnbUtqBy4FhdxipuA+g
|
||||
--- fKgerjgGs+brvNKnrWdpmOadl34LipMT6Msqse2g3E0
|
||||
Œ¡E9³ï¬‚KYRL-‡„°¡Ç·\E–ŸK{ÃÜ7âço»ïò²XÂGx<0E>ÍT’Î)Ëœôä<C3B4>6°%ˆLO€Tðÿ*‰™*8\£É@G
|
Binary file not shown.
|
@ -1,7 +1,8 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg O3DMSSPQP9/ehXmzs0xcCGllu7VSzhd6b4Pii8t2vWQ
|
||||
Ys1nMv2384elWWGW9C8HabvwUeWu52VsQpxx9L/4/dM
|
||||
-> ssh-ed25519 jPowng ft/9SX5fpG7+7gHMubaFtb+50/gfNgmaofOVq5UjRUE
|
||||
xMwdFjFdkH0Li+PikaFt0WAZbFUu5daHgkfN8aQQumo
|
||||
--- 7DVINvXIXdE1MRwIkeajonYsy1cp4HugCxfTeub5SXU
|
||||
<¥ö¡Ãñ<ýØ{VÇ?ñfk/¤áI®"<22>ï×/5K"Š¸(ì¢ùiÃÔôìñ
|
||||
-> ssh-ed25519 cKojmg dgS4bezgtDi44R1A8am+J6zh80kUVYTo1heaxJCtzX4
|
||||
F3w/62xwtqYa40NU7OvF9pnZzYz/5hACAGJfMA4e2zw
|
||||
-> ssh-ed25519 jPowng lx81CK3yeNp9RjHCUFJeKYZlRzxBmXuADVBvRc13zCI
|
||||
P7e75t8xU+ZkYmeQ8mmMfyZZsRdG1J8yrvSUkiWzkFQ
|
||||
-> *z4/`-grease S/)a{e sFd";=
|
||||
--- 15FVhqRTkoPFEeETRRyFQhsv4Fn19Ozlax0u8Zy9mNA
|
||||
õ#+¥àÎvøSÈ4èá}<7D>§Rì%‹Î¯F4fnDœ˜J¹¤Z‹¸A¥Û™,_
|
Binary file not shown.
|
@ -1,7 +1,9 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg 0J8FMcVRf78LYG+dTOFzu3luXwhOjdOg0sx4Jxdccj4
|
||||
tdrCcfcYbTZYhL18RG3goiqtyhu3NTn+fJhdIAnU5uA
|
||||
-> ssh-ed25519 jPowng qlF8nkSEg5fZgai0VP5eTSlZOHyj5IcalTf+QNWITVo
|
||||
O5aiZX0AJD76ixsu6i9xnnFBQANdsu3h6XzdTQ6KtKU
|
||||
--- ByMQt9bnbzd8YO0Y93FIYF/lmdbYcOydkYdKxpRQujM
|
||||
+堍6JNm裶遁[Eb1p)vD究侖PL9捦€z逡<7A>煸!縺贿噮'嘥閍顖卷赿5︰:[控d肯峈撟M抪庱zj<7A>
|
||||
-> ssh-ed25519 cKojmg 1+cLlzctgcM0FnVDwMPOAqBkvMcDBRg8SvCw4djI93Y
|
||||
oV2XI4f1AvM9P591kZZ6NgJXa+SDtqGzCSgc4psOmxM
|
||||
-> ssh-ed25519 jPowng Ufjfh1p350XxRPg95+/DHdmnl4lC0bbzUUlaxd1Bmxc
|
||||
/RHwFDSn2ov+60r1uHUigrsn99+GmmKmlk4h4T2gbA0
|
||||
-> *Lc$@-grease
|
||||
pzVJAHy1qRq3jUrnFV0DDO7/hwV1US4Ogf0RsrVfX0xzbr73uJ003YjieVB25LqN
|
||||
--- ME7/iVevyiguyhXugbkVFGzJV0yDccyKNlWbEZa/FmY
|
||||
YžŠXjb2uþnd;i0íýX]…§é0–þjé’L„PÔT~óú ƒÙ^kc”$D×ÚÛr¹úu³¶fr€e¸OÕ¸þ<C2B8>+p•¨<E280A2><C2A8>&ãw®öϨ
|
Binary file not shown.
|
@ -1,10 +0,0 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg Lhgx43wR8PtAMf5v1eJxKlUBSAoOLdOOn/QaQrwF8zA
|
||||
jfUCpgNzkHCNTWCqtErDaLMmg1Oy+s9zUra1JLCi+J4
|
||||
-> ssh-ed25519 jPowng kSeQ/SmMrzd8ByVu3YHWeZyKmqFZvQSBnDunkB8e6wc
|
||||
WRmnfrV5xcRXA9t0ZXx6YvbRl0sX4PTrw63VVKX4Ei4
|
||||
--- a+LLM1gP9g1AbUapbeeKaS4cEcRBmPo3MHU2DSWTAds
|
||||
Ò,FÜÒ6”â⬘ixÌ<78>°Øe|
«
|
||||
²
|
||||
ÌÏœ,{†
ˆõvª!–†‰zÜ$P;ãé©TØÆÉKW
|
||||
qGô
|
|
@ -1,7 +1,9 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg 46BI3ItrXRWMivmd/K8bmkKlrYFSr8cbehAkmwCskig
|
||||
gTjYquH1hDEZ2zWD5P7gN/ejTCH8JJb8bC/VLZ3koeg
|
||||
-> ssh-ed25519 jPowng 5MqfJlasDbbqlI0dX98NZzHxmYmnnpveyBxa4z48V0o
|
||||
r7Yiv4+SZiDncD0Xzp5eFSP4f2yjGBOILKxEO1iT3Os
|
||||
--- l43+JtT28i1YDhNX3hE3Qb7swskOBc5ghDqiyh3rU2s
|
||||
Ž+)´”¯ÛPô¢nåWT,.<2E>‹²eÚNW€Îñ YƱkçÿF4Ê#=˜)üîò™6Ö±ÛmȵîJ‹<4A>ª#
|
||||
-> ssh-ed25519 jPowng BkIjie2KrwDLaZYYIguCs7TPA/wQy+YPguikuhfye0M
|
||||
7viTA/EGYB/jRKQm6fFd86DMd4j+Jxsaw/xQ1T8ZKNo
|
||||
-> ssh-ed25519 cKojmg t1Y8bZvPccNAX8vWQLTfCyOJIBXN515vyfFrEI2EVww
|
||||
bJEjpIWrKeQrA/JfY7FRdB6hpHwR/aG4Vya1ChFNBKs
|
||||
-> jK/-grease Oz.R ?;)G ],
|
||||
AuHk9TcC9kl0dg8/L6UfHIk3e9fgGwSTJAJpVgInhok
|
||||
--- 47z9lol5MtpX0IsO/0ggLDMcNVfl4lNNvoHUSwOU/18
|
||||
)gЪeuÞ!œš-
ÞTì¥YAðM+ˆãGbMe@|A,è&ãÆE!܆p=P²=û9¹ÙP¹!Üö’Q|Ðä r
|
Binary file not shown.
Binary file not shown.
|
@ -1,9 +1,9 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg u+5VWUy7eFq4boAIOhuKXZYD4mhczaUAcjz4+coVggA
|
||||
QlBHHgz7uY3TVgex59yZA0XgsIeHi2WN2S+UleC7bMg
|
||||
-> ssh-ed25519 jPowng IyeI6WUjF8wxe92xD3xY++4ZqXtY8divB39eLWfAtm8
|
||||
eGj8w5X2ydS1LJvNSmo56xzRVoUB0iAKKs2NHX968Yc
|
||||
--- hsYH9lUl3wIErJmBKzlWV+gIR5v6vgPIcNDgd0hiRGc
|
||||
¹Ã@Úl<C39A>ôQûsÈ„ÿ×£©Dƒ}^{ºžá¾X)¸nYóJhXhg8wƒž´ “ú°˜Ó¨Ç‚Çw–‡y(œ–aè¸ìê.0>|ÚPSlOÃ|ÈÊE‰õÂÙé°€¡<E282AC>BWó_ˆ³ÜÌ)|x4©„šºë\_F¶
|
||||
ZÒo0=dts –j<E28093>[ùŽõ0O+ÑÕRž8±‡ÕiüËçŽÜ»ˆõŒæÆdÀ«ß8j»â©ê
|
||||
‚g¹©‘–$xŒÿò¥Æbâ÷í<C3B7>˜äX·¢gÂ^¼íùG¼Êô¤Ž$UÏûB*ö°é²¡£ÈÔ)[t¶ÃHa•vŸ7<>ÌÑj£âD.z¸+¬[~–õÁÃé9Ùý<C399>àz¼øô`sé¶,_!^YÓïʯ2H¹øS‹¿¼©øÅ<C3B8>øý*âñó@êjZ^ˆôæÎv~غ¶@ò<>
|
||||
-> ssh-ed25519 cKojmg lmu3MinmydRHD0A/YVRRtopermfoBC8M8cTHfVanY1s
|
||||
ygrtpZZJ7aeQTblNazpoP7DdifmDxHsE3DFJsIrWX5M
|
||||
-> ssh-ed25519 jPowng X0cihOc+fBtmtrkEivIHQngdYIobezXEF1x+pHqNzAw
|
||||
/+sw9x1NWY0anZhDMpAywBPrR0F4XCHaF9e8j/Yo/kI
|
||||
-> 32;%1s-grease
|
||||
JafjuSZty6a4NSO/y4y5wHWL8Mw
|
||||
--- dwCl66vdpsL0MR5NWWvg3JUnQ2QZQBeW0Dj0l5tvOKY
|
||||
oi,`ÓÜ#uÄwW%PoubÚcy8<79>ó
ƒÃÉ><¿F‰Ååq…ÂKÂÇk0Çk/<2F>hÀ¥Ÿ5势ÝF+ýu‡ •e€<06>¾Ÿ²óôbãè>1QŠ2®ñwn˜WbÖ–B˜âî<C3A2>iŸ^xurâ†-/llùÒÀÀ-ã=°7;jã0»I×%Fi¼<69>í€ø‹™A;Y†ìUd]KÅI0(½ ”øAg£Ðóž^†uG:äpkJ’Ÿ:q<>¢šWSaLw¯¿Ô!ïM³4ã L/ùZŇ®¢D¶-XéUb»‘vÊbP‚ó›0ÇÅfÂ9êú<08> †âJ`ÃX°ôÐOÅ!s›{ÙÄQAšc€c;ÏÃÑ‹4öMíچݹlxH&ïéöé{é}ÁäÛzZ¦œ‚9ûÊXžÜ“g‰]Vϱ•0gt¡¿…žw·
|
Binary file not shown.
|
@ -1,8 +1,9 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg xRtF3XVc7yPicAV/E4U7mn0itvD0h1BWBTjwunuoe2E
|
||||
OkB9sjGB3ulH4Feuyj3Ed0DBG4+mghW/Qpum9oXL/8c
|
||||
-> ssh-ed25519 jPowng 1r8drqhz1yZdTq0Kvqya+ArU1C2fkN7Gg9LiWWfeUFg
|
||||
cjbxntVwHvqLaJpiKs/Y8ojeb6e3/cLFcsoeuoobfFg
|
||||
--- B1qA2PylJBrdZxZtCzlU2kRPvxLM+IrXTvR+ERxVtTY
|
||||
"W9<57>Äbg¸©~Ì/áÕb4ãÕ†ú³ÜÔIÊ
|
||||
Û}ð
§ËÅË-³²ªNó±”ÑC7vWœbºØ?¦8=œÉwÆBÃUpJClï²OÈ™³œnOÁ\
|
||||
-> ssh-ed25519 cKojmg N182xey8TWRVUWTRP16rT0zlhYZNr/pOZVR7YRnlIkk
|
||||
HVqAag55z1cKLgjR3WsUj2wvaVjxm169JcDRJGRvCVU
|
||||
-> ssh-ed25519 jPowng Dc+aaUTxDsMTY+oOst0SC3ldq1e6zX8F5A5uBL5RHhc
|
||||
JWZou6+VaFc5f2OLRIrmFFWg3Er6WSY+TloXU0mP1K8
|
||||
-> |9_9Aqh%-grease $ X8Mn|5 aKnl' fl<D{T-
|
||||
+fAc0cajqxhYWu55HCY
|
||||
--- SrmtWXQXGYxNTabSrb5tBRXHnK1F22Qoiy7hKYrrF+0
|
||||
ñD·û²:,õn0i<>½Àß^ÆŠ`üÔ2Æ#y'ý9ÖñÓÒŽéÿæ<C3BF>r]ÀØ›¹x“³S=ú°ˆôuJéEÛóc€lH Ê~eÅ‚›ŸKtévo'êv+
|
Binary file not shown.
Binary file not shown.
|
@ -1,9 +1,10 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg l5lOlGnbvQ4D2kaSj1dd8Xr+btlNbTkT0SxSz02Vr1E
|
||||
Cjy73yKL1N8LnjRXXLpxX+wIOFCa8wrG44VjXUND1lI
|
||||
-> ssh-ed25519 jPowng nYHfkP9dRkxu4Fqh8MgrbdZAc8gk+VGDyxIV6RsSeEM
|
||||
rKKi1NDoKMMzQ+kUs5ZX4zMqRBI0QwGY7q6K/L9+dLI
|
||||
--- Umv3UCtXlApug7uuqmwbQN38i8Lx9/b0uhLgbc3OdZM
|
||||
äBLsś ‹?ÖsÓ“s<E2809C>2Îy
|
||||
R0ą‘!<fü9txB7dň<13>™ÚŠň^©ô ɇLJ&ńW
€<©e]
|
||||
ţ/$$
|
||||
-> ssh-ed25519 cKojmg OdLtFHbHbc28rUn47vgsVvXxFNg9nF+9y9R6XOK390Y
|
||||
yQQYUPQGjN2+xrSqqBYa7/zS618KrVjX5Amw2MFuSLg
|
||||
-> ssh-ed25519 jPowng NwUjiLtiXVi6XFmht5l1CxEs3gm0oN4vHYwDZyda7Q4
|
||||
di6znVjNRO6QdqteVNkeot5Ko2NwWLe6v+zVR3f+o10
|
||||
-> 4Vx%\(-grease ^^Z>EC91 R 2BJ d48Wip*s
|
||||
yPiBgChRF31XgxccQFLO3MzRL7+5s29sfRoF3W1yUX6Bu59MpxD4D+n/jhLcxSH/
|
||||
CxW7KaiOctNmPm5tWh6qjmgQ+V4bcAji5vo4FKs40l56cfyueEJj+Q
|
||||
--- WUGF28zqK9E1AlOeeCtSHxFg6ikRy85gOoLtBd4m0y0
|
||||
.|…rr>©†ðìì1ÅÆ2SÉž.×hw<12>wqºš%i˜øé ‚*U^)Öè'qžµ›O2ÓœümòQÝ7˜¯m`
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,8 +1,10 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg 1hbRAuAGrTy6nmkAq+UWua8weywphZsTIGF68YQEOlQ
|
||||
92Q7uIKv1EiO73wMh53jrTuEkzP6ziBmX9SWXCl4d3w
|
||||
-> ssh-ed25519 jPowng aPb9v/S/mLW95Qom+swvasqY878RxpxxOkMJA2wb6nY
|
||||
qu/dzcqciqKzNc28HqFMHA1XnrJy+/wWgbfM1+BrlkE
|
||||
--- 8PXOozvZzNZQD2OT4a+0XuIQauzUGSvovdfDugmp+bc
|
||||
x²Ž‚ê Ã>ùý²ç¦©ðóÁÇ_ÏC9d™T5ŸûKzЄqØcZ©°É¾pŒš¾¡ ใºv
|
||||
)Œ³õ²¥
|
||||
-> ssh-ed25519 cKojmg zhpo89xef68JoeOFWzhdFshrj2BXXUCFPMLVJzv6EyE
|
||||
fmJxJi5rmyai9qGwDo7iHg4BrObGre96KCpl+g91O6I
|
||||
-> ssh-ed25519 jPowng INA6EZdy4J1p3QY5mfVOQXiLdOjIDaZR+CZMP+GfkXM
|
||||
8Nf5soaxY5SEzeJca5kaJkx7ByOvc4NkJVetB7wpEmo
|
||||
-> xjK'w-grease
|
||||
f5v0cvlt4JbHlAwDOob86qOInWdlN/oohTg
|
||||
--- NTGv4rr+MhJ/YeZhVHOjoS1V+zCHFf2itJYfK36R+wE
|
||||
š×—®JÚ dő– oŞę'YFUź@
|
||||
r7”ă“_N$‰˙Ź–č‡>‚ˇę]hq»-¨FŰ°qX˙?Î|?µĘ
|
|
@ -1,7 +1,10 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg r3ZUTfSNcHc1TS2fVtk99Y2xJMMunkwkcR0dQIdiCi4
|
||||
LICSnzAaooGy6x4wt0vNM6YtQ4S17QohZNt7lfVrD6Q
|
||||
-> ssh-ed25519 jPowng KLU68ws4lemr0wWHxm8H8pf1SQAoUZTN4QSPzk2PyHk
|
||||
6pjH1pI956oaf9ZIHPPq8p3g/mZC5GxWhWkT54Wohf0
|
||||
--- cAQbniTwwtTftfXU/dGtA69yF/hh8iB97vHxvkIZMMo
|
||||
°c#Ž=^Ì~?5ú-w—NT†Ì¡<C38C>¨+¶¨Ä!z¥<7A> "’ Zö"2ºëðù×M!pž5×V¬ÈÛjçΡѡŽâ¥âL¹ÁÌyóÐŹúš›n÷ÄŠ8zQö°+¨ËÁØ©9WSµ§<C2B5>Æ0¨u}YÚ
|
||||
-> ssh-ed25519 cKojmg tZwn2usN6K62oS4vBa6boh9zEp/+cS4chP8boXG6SH4
|
||||
Fr3kV8gUDoiDqMxPYWsHyww8umYhQEKhqbVBiVw5NeI
|
||||
-> ssh-ed25519 jPowng wRbJl4G85obH/GluQBBsXE7MOvooEui65eqHfurvuQs
|
||||
KqVZMBSyHhkayEdwI6ocmA4qhHY9zYJvg1CEKM1SOa0
|
||||
-> 2E"/OFW-grease o Qp3HFe^
|
||||
bGhCNicPqt7txqxUiEWXCFs1OuQLqOqHmjHSqYQv919dqYep/xBXzi/aRf3dsdvh
|
||||
TCJCTvZG31Qxvikp
|
||||
--- xKJGbdVp+Z5h0vCBleSF2zYYYd2S5i0y4szNqjRwrDY
|
||||
Tª
/N¯<4E>¨¹i7m4‚#³MhiñP¹šÒÞ›Á¥-ÏgI÷ñ±%@E†(›iÿ7·ý©ýYg¦k±´"+㸠Àª(þ]o¨¸–ý†ð<E280A0>@báÊÞ§+Ï[‚Y"ÿ‘ÌBóóCR[ >-Ë.4d…¤b9v
|
|
@ -1,7 +1,9 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg bICZUDqk/C2divEZu2lxUDsrtS1inSbDbS8hxJSJfHc
|
||||
FsfueyP6WCesAu5EcXIxxtvbb8RX09qNTN9GvuhYuTw
|
||||
-> ssh-ed25519 jPowng Uujsu6c+QTXqCNi6c+zxk5tf0UQcG+Qm/SZF4dzSKCY
|
||||
RPVNNNauz73A8kWA0VSQiMWCerUkxPoXG2MUrFly3Bc
|
||||
--- 8h4hGasOwZxk+i5aQfg6AzdA1G4wROhxz2rmM9u41b8
|
||||
{Rワ<>ラ=42<34>
y<>咨ッ眺テj嚀廁<E59A80>WQ▽隯%畊ス宅 顕褜返<E8A49C>弁K<E5BC81>ト蘊マFョモ?埴膕K歯「
|
||||
-> ssh-ed25519 cKojmg 8rcBI7fYHuA3jO6EzJNFaAj2niIApKDt1HQEv61AKTs
|
||||
ANxkIX/CeI7t7Zqp6wmjt/D194Z+xpeiidb+qvYzoQU
|
||||
-> ssh-ed25519 jPowng oruewwTM9X/HjjcmOPcQVdp02rQBlgJPdzvlAffs3T0
|
||||
MrO0kaNhjgOkNHuz3NrIMWXNrXOHH9dT/Fk6hoQNKyY
|
||||
-> COK%H7-grease
|
||||
6yfI90QurOKlM+kgpW8KZ/iBzDYD9yhNmjG1LQ
|
||||
--- uArz8eHg8sLO0sdlkM6cELFh+FHiI5BrM0+iXJxxiDo
|
||||
¿vývû´ÊNÊbæ@Ÿ¡Â<C2A1>FÛMMíYËÆíÌ&‰’/%¤¹Ñm¨®ØtÁÖ“ªd†h„|¡ðŒß©8¼Ž Ú½¨9‚®<11>Cã¯/Å
|
|
@ -1,7 +0,0 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg nJbOfp0/wmFOZLzcWjoGB7wEB8e56aO1NntSmn5KomU
|
||||
/Vio4Z/t7IPJrdzdwUPidVH3wrouSkwRzNHP0T4z3x0
|
||||
-> ssh-ed25519 jPowng QXg/xqs7/VfkYQg3X77w4i53q64bL9oYeTxqb9NVhiQ
|
||||
sMHIXlmrIxtIr+s0X4lBqev/PPd3AKD5P7AP5K4NeJg
|
||||
--- gzTn+6+aa4Ptic1lsvSt+r3IEBysHrvMMIyONogMDF0
|
||||
<EFBFBD>ÏÂ<EFBFBD>Ë®UE_í</¯çQ·Ü+U“AГMÄÿ/kï×dAL/”úÕįÍoæ\XïEDÇÑfã\ièÄ‘½àpF„`#¬n4è–x1î<31>ûÞèDëàÂË5CéЦ&fòB»q${Gg…Aqˆ³@üVu!Cc…R\ªÖ¨
|
|
@ -12,8 +12,6 @@ in
|
|||
{
|
||||
"acme/dns-key.age".publicKeys = all;
|
||||
|
||||
"aria/rpc-token.age".publicKeys = all;
|
||||
|
||||
"backup/password.age".publicKeys = all;
|
||||
"backup/credentials.age".publicKeys = all;
|
||||
|
||||
|
@ -21,24 +19,13 @@ in
|
|||
"drone/secret.age".publicKeys = all;
|
||||
"drone/ssh/private-key.age".publicKeys = all;
|
||||
|
||||
"forgejo/mail-password.age" = {
|
||||
owner = "git";
|
||||
publicKeys = all;
|
||||
};
|
||||
|
||||
"gitea/mail-password.age" = {
|
||||
owner = "git";
|
||||
publicKeys = all;
|
||||
};
|
||||
|
||||
"lohr/secret.age" = {
|
||||
owner = "lohr";
|
||||
publicKeys = all;
|
||||
};
|
||||
"lohr/ssh-key.age" = {
|
||||
owner = "lohr";
|
||||
publicKeys = all;
|
||||
};
|
||||
"lohr/secret.age".publicKeys = all;
|
||||
"lohr/ssh-key.age".publicKeys = all;
|
||||
|
||||
"matrix/mail.age" = {
|
||||
owner = "matrix-synapse";
|
||||
|
@ -52,10 +39,6 @@ in
|
|||
publicKeys = all;
|
||||
};
|
||||
|
||||
"mealie/mail.age" = {
|
||||
publicKeys = all;
|
||||
};
|
||||
|
||||
"miniflux/credentials.age".publicKeys = all;
|
||||
|
||||
"monitoring/password.age" = {
|
||||
|
@ -79,8 +62,6 @@ in
|
|||
|
||||
"podgrab/password.age".publicKeys = all;
|
||||
|
||||
"pyload/credentials.age".publicKeys = all;
|
||||
|
||||
"sso/auth-key.age".publicKeys = all;
|
||||
"sso/ambroisie/password-hash.age".publicKeys = all;
|
||||
"sso/ambroisie/totp-secret.age".publicKeys = all;
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,8 +1,10 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg Froxrdh4H2Bsj4X2xicyBXHPRlbkRJAOztoTfzxItSM
|
||||
FnsLS2QYm8mJUO+c152FieLCFkALxxwQLnY4PAj8zsU
|
||||
-> ssh-ed25519 jPowng pKl4p02M+U5JsiOnM2wXL5bkPwsI3IHjlTutlvez3zM
|
||||
NSuOFsyV8JqtTq97lNzacJnJ3YZgWp53XxU3mjUlcMQ
|
||||
--- 2TK2ViFblmDheaYdat/GF0ze1wVsla1EPLaeRdMM4Gs
|
||||
®àµÕ¨ENÜžäm›Û2uÂ~Ju¼b´´t[Ý$Tñþ^‘2–°<E28093>½jœÙÜi@xªÒ¸*Ä°g[MÞH½½Xš!”‰6Áez¼…¥DW]ÓÕ<‰–`XÛâêÁÜÄPóéý÷ÃÞ›
|
||||
¶¥q*Îo¼½ÃÑ$‚åÓ<²
|
||||
-> ssh-ed25519 cKojmg mP2H3PWJN6Pv3q6C2wci3KnXjtFAIiuGy0YH0sGIy2g
|
||||
f43QqyUQfTYznszub47kgc2Mz95zVScTDkwnG3INi9U
|
||||
-> ssh-ed25519 jPowng fENbu7+FZ1mnQQHQCLm1spLHmsQGlRoJResUJtGzYkY
|
||||
hX+AqCkLCca6m/aKtGCThi7/mCCz/TZQNJNOlOmlqyA
|
||||
-> J<-grease
|
||||
n7+CPRr4oazWnE7yzpJN2ZAI4QrGsAerloP4wNeebjQDx8+IxJq1JE0g3Yi0RxzN
|
||||
chDccuSPLYk45Ov+SD/qqqFZlQ
|
||||
--- p81HYw3LFj+qz2kiZsDcevM4ZBfvN743P9Jdi7J9XkM
|
||||
‚¢ìÛ±S·7 <EFBFBD>‘ý£÷ÜãV»»Bðßâø±³ˆ¶ïO‰lEt˜‹Á…šqý</Ç—Ø©9²ã(ØP†$Wƒ0h;÷‰±àJy¯feø‚ >·_D,PºVFp\æ"AM}èg?<3F>ÿ<EFBFBD>Ý/\²Ä;ùy’¬Óš(<28>ÑSñKË
|
Binary file not shown.
|
@ -1,8 +1,10 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg KslHl4v8yCsKZn5TduLgpTfpTi1uOInC9N2e8Ow83FI
|
||||
NzcJJr8kw1ykAdWRZOeWdNhx0BTgE7FwTKcge+yLJ/w
|
||||
-> ssh-ed25519 jPowng YGWcOai0A9l2HDZyV0GtD8kEbY/xTUssODFBcseWAkA
|
||||
nJaHXkipFSHdyektoKV5y1jQrjkvnU7pwZwAymiQm7M
|
||||
--- IgWkDulol1jRa+pcx7DbEy5pvC+2nrRJHsdQVPvPur0
|
||||
Bb<ÅŒb!ÏëE?:ÇÓô=÷srJC<4A>œüKz5ø®Ô{–Æ4`¾&N0€ÕÈö¹57ñüví’©+´1
|
||||
+(d§á¡{ìQŠÙ
|
||||
-> ssh-ed25519 cKojmg +WwRpd2MzycutQFXyLsr2+GzSgF67Z6UuvyqYZaLd3w
|
||||
sppt8HzaZP3yxnvnhzjl18Trnz8g3VyXJ6CaVBWd7jA
|
||||
-> ssh-ed25519 jPowng wanoqGB7T8bim/WZ4IAYViFQoGzaIZSgeoTr3YKpeTY
|
||||
ihDAdGa1XVW/qQz40V1v7a7iK7tu0EHMa7ayIogpcRw
|
||||
-> l-grease |PIcZ NIr >0;*
|
||||
4o8o0bevQZ6uDSx1WxxlDCURbFCM+yK1XPdrb9aztCSvG2a+ne78E42l5rBcoH7I
|
||||
m51A8uWS4nSj36N/76v6K4kelxKzWUg
|
||||
--- O6cGbTAVbDcdmPHf7UzfZiyiRtu1yfL4sBI+CkJA1qw
|
||||
ýqýŐ$ň`żw'čS“X¸]Ąá÷ř®úî…?¤6‹Đ/ĆN(Bžň N«a”.˙ HŽ7żí•I<E280A2>ú÷Ŕoz‡/4:sK",7J
|
Binary file not shown.
|
@ -1,7 +1,10 @@
|
|||
age-encryption.org/v1
|
||||
-> ssh-ed25519 cKojmg tAW2hbBSxsael6cdbN+vI4h1/PMNrWYct8cppCAasn0
|
||||
cex/wBTviSIXc8clNm5PGltTYa1Q5PwqlX4BGsNHiyU
|
||||
-> ssh-ed25519 jPowng YxfhtpytvuhIARQAaJ0w94aOZiGNUOBR0pF+Sp80D2k
|
||||
nMon/VdYUQTs6LFccDGeIKWeNYib1wwtFmEYZkDZxg0
|
||||
--- giL477X0+uZ2Ocvbixt5f5kNc1laj5P79oW8P9XsNP0
|
||||
¨›Ãd>ò±cE?nb¹vš_²'2ûûà³<1B>Õµ¥_6P›u:ÊusºE“8õ“ØÏ“xuڶ̪…Îxù̧ïžC[†®°ˆÁ.õêŽ6‰¯ qÌÀÍîJ°Ä5GäKÌ)N<ÊyYÉ¥tX=l7T´2¨ùRÙ
|
||||
-> ssh-ed25519 jPowng yz0I+AazPmamF7NOnwYNrPE/ArarU01jd2mVDJUPSTY
|
||||
6Y/YQ7gb8cAZf3zT9SKOorvfUnU7kYff+gHh8fG2mY8
|
||||
-> ssh-ed25519 cKojmg 0FZU9v8eHsVeE+EoX9Y4IgfIj/8+45waPaSnSDb961I
|
||||
L6SzJoh5xqai45scoVAa6v9zslBGFYNnZY044d470uQ
|
||||
-> I[G-grease p
|
||||
AMRQY1alSzHi/PLL80kcvnM1Z9YNfoUo9u5alWXYMyzrRsg+vXjMuBvAXg3fmnzr
|
||||
wdOowTYMRV+jEG8vzkcQTsv+f7JIyo4DvOOaPyGfWMl1
|
||||
--- ih3IAFPcN1JP3FP1vcRGnPrfk91yrnIX0m/Szkbcf7Q
|
||||
ÑmW„r‚µœ_\)Í°]QŠ¦xMÃs/݃Îݪäœó‚Í6óº“k±äÅY§xïMy¶ J¿¸‹GßÃ)i2_'ÖœHF€þ.âg_Îe5³#uätñØÕ 7j„ŽPñ²'TÞ¥8´•\IàW«UùäK°1Úº9½è
|
Binary file not shown.
|
@ -10,11 +10,6 @@ in
|
|||
adblock = {
|
||||
enable = true;
|
||||
};
|
||||
# Audiobook and podcast library
|
||||
audiobookshelf = {
|
||||
enable = true;
|
||||
port = 9599;
|
||||
};
|
||||
# Backblaze B2 backup
|
||||
backup = {
|
||||
enable = true;
|
||||
|
@ -41,14 +36,14 @@ in
|
|||
flood = {
|
||||
enable = true;
|
||||
};
|
||||
# Forgejo forge
|
||||
forgejo = {
|
||||
# Gitea forge
|
||||
gitea = {
|
||||
enable = true;
|
||||
mail = {
|
||||
enable = true;
|
||||
host = "smtp.migadu.com";
|
||||
user = lib.my.mkMailAddress "forgejo" "belanyi.fr";
|
||||
passwordFile = secrets."forgejo/mail-password".path;
|
||||
host = "smtp.migadu.com:465";
|
||||
user = lib.my.mkMailAddress "gitea" "belanyi.fr";
|
||||
passwordFile = secrets."gitea/mail-password".path;
|
||||
};
|
||||
};
|
||||
# Meta-indexers
|
||||
|
@ -73,10 +68,6 @@ in
|
|||
secretFile = secrets."matrix/sliding-sync-secret".path;
|
||||
};
|
||||
};
|
||||
mealie = {
|
||||
enable = true;
|
||||
credentialsFile = secrets."mealie/mail".path;
|
||||
};
|
||||
miniflux = {
|
||||
enable = true;
|
||||
credentialsFiles = secrets."miniflux/credentials".path;
|
||||
|
@ -139,15 +130,10 @@ in
|
|||
podgrab = {
|
||||
enable = true;
|
||||
passwordFile = secrets."podgrab/password".path;
|
||||
dataDir = "/data/media/podcasts";
|
||||
port = 9598;
|
||||
};
|
||||
# Regular backups
|
||||
postgresql-backup.enable = true;
|
||||
pyload = {
|
||||
enable = true;
|
||||
credentialsFile = secrets."pyload/credentials".path;
|
||||
};
|
||||
# RSS provider for websites that do not provide any feeds
|
||||
rss-bridge.enable = true;
|
||||
# Usenet client
|
||||
|
|
35
modules/common/default.nix
Normal file
35
modules/common/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
# Modules that are common to various module systems
|
||||
# Usually with very small differences, if any, between them.
|
||||
{ lib, type ? null, ... }:
|
||||
let
|
||||
allowedTypes = [
|
||||
"darwin"
|
||||
"home"
|
||||
"nixos"
|
||||
];
|
||||
|
||||
allowedTypesString = lib.concatStringSep ", " (builtins.map lib.escapeNixString allowedTypes);
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./profiles
|
||||
];
|
||||
|
||||
config = {
|
||||
assertions = [
|
||||
{
|
||||
assertion = type != null;
|
||||
message = ''
|
||||
You must provide `type` as part of specialArgs to use the common modules.
|
||||
It must be one of ${allowedTypesString}.
|
||||
'';
|
||||
}
|
||||
{
|
||||
assertion = type != null -> builtins.elem type allowedTypes;
|
||||
message = ''
|
||||
`type` specialArgs must be one of ${allowedTypesString}.
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
19
modules/common/profiles/bluetooth/default.nix
Normal file
19
modules/common/profiles/bluetooth/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, lib, type, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.bluetooth;
|
||||
in
|
||||
{
|
||||
options.my.profiles.bluetooth = with lib; {
|
||||
enable = mkEnableOption "bluetooth profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
(lib.optionalAttrs (type == "home") {
|
||||
my.home.bluetooth.enable = true;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs (type == "nixos") {
|
||||
my.hardware.bluetooth.enable = true;
|
||||
})
|
||||
]);
|
||||
}
|
25
modules/common/profiles/default.nix
Normal file
25
modules/common/profiles/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
|||
# Configuration that spans accross system and home, or are almagations of modules
|
||||
{ config, lib, type, ... }:
|
||||
{
|
||||
imports = [
|
||||
./bluetooth
|
||||
./devices
|
||||
./gtk
|
||||
./laptop
|
||||
./wm
|
||||
./x
|
||||
];
|
||||
|
||||
config = lib.mkMerge [
|
||||
# Transparently enable home-manager profiles as well
|
||||
(lib.optionalAttrs (type == "nixos") {
|
||||
home-manager.users.${config.my.user.name} = {
|
||||
config = {
|
||||
my = {
|
||||
inherit (config.my) profiles;
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
22
modules/common/profiles/devices/default.nix
Normal file
22
modules/common/profiles/devices/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, type, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.devices;
|
||||
in
|
||||
{
|
||||
options.my.profiles.devices = with lib; {
|
||||
enable = mkEnableOption "devices profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
(lib.optionalAttrs (type == "nixos") {
|
||||
my.hardware = {
|
||||
ergodox.enable = true;
|
||||
|
||||
mx-ergo.enable = true;
|
||||
};
|
||||
|
||||
# MTP devices auto-mount via file explorers
|
||||
services.gvfs.enable = true;
|
||||
})
|
||||
]);
|
||||
}
|
21
modules/common/profiles/gtk/default.nix
Normal file
21
modules/common/profiles/gtk/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, type, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.gtk;
|
||||
in
|
||||
{
|
||||
options.my.profiles.gtk = with lib; {
|
||||
enable = mkEnableOption "gtk profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
(lib.optionalAttrs (type == "home") {
|
||||
# GTK theme configuration
|
||||
my.home.gtk.enable = true;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs (type == "nixos") {
|
||||
# Allow setting GTK configuration using home-manager
|
||||
programs.dconf.enable = true;
|
||||
})
|
||||
]);
|
||||
}
|
27
modules/common/profiles/laptop/default.nix
Normal file
27
modules/common/profiles/laptop/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, type, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.laptop;
|
||||
in
|
||||
{
|
||||
options.my.profiles.laptop = with lib; {
|
||||
enable = mkEnableOption "laptop profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
(lib.optionalAttrs (type == "home") {
|
||||
# Enable battery notifications
|
||||
my.home.power-alert.enable = true;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs (type == "nixos") {
|
||||
# Enable touchpad support
|
||||
services.xserver.libinput.enable = true;
|
||||
|
||||
# Enable TLP power management
|
||||
my.services.tlp.enable = true;
|
||||
|
||||
# Enable upower power management
|
||||
my.hardware.upower.enable = true;
|
||||
})
|
||||
]);
|
||||
}
|
36
modules/common/profiles/wm/default.nix
Normal file
36
modules/common/profiles/wm/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, type, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.wm;
|
||||
|
||||
applyWm = wm: configs: lib.mkIf (cfg.windowManager == wm) (lib.my.merge configs);
|
||||
in
|
||||
{
|
||||
options.my.profiles.wm = with lib; {
|
||||
windowManager = mkOption {
|
||||
type = with types; nullOr (enum [ "i3" ]);
|
||||
default = null;
|
||||
example = "i3";
|
||||
description = "Which window manager to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(applyWm "i3" [
|
||||
(lib.optionalAttrs (type == "home") {
|
||||
# i3 settings
|
||||
my.home.wm.windowManager = "i3";
|
||||
# Screenshot tool
|
||||
my.home.flameshot.enable = true;
|
||||
# Auto disk mounter
|
||||
my.home.udiskie.enable = true;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs (type == "nixos") {
|
||||
# Enable i3
|
||||
services.xserver.windowManager.i3.enable = true;
|
||||
# udiskie fails if it can't find this dbus service
|
||||
services.udisks2.enable = true;
|
||||
})
|
||||
])
|
||||
];
|
||||
}
|
27
modules/common/profiles/x/default.nix
Normal file
27
modules/common/profiles/x/default.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, type, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.x;
|
||||
in
|
||||
{
|
||||
options.my.profiles.x = with lib; {
|
||||
enable = mkEnableOption "X profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
(lib.optionalAttrs (type == "home") {
|
||||
# X configuration
|
||||
my.home.x.enable = true;
|
||||
})
|
||||
|
||||
(lib.optionalAttrs (type == "nixos") {
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
# Nice wallpaper
|
||||
services.xserver.displayManager.lightdm.background =
|
||||
let
|
||||
wallpapers = "${pkgs.plasma5Packages.plasma-workspace-wallpapers}/share/wallpapers";
|
||||
in
|
||||
"${wallpapers}/summer_1am/contents/images/2560x1600.jpg";
|
||||
})
|
||||
]);
|
||||
}
|
|
@ -25,8 +25,6 @@ in
|
|||
search_mode = "skim";
|
||||
# Show long command lines at the bottom
|
||||
show_preview = true;
|
||||
# I like being able to edit my commands
|
||||
enter_accept = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.bitwarden;
|
||||
in
|
||||
|
@ -6,7 +6,12 @@ in
|
|||
options.my.home.bitwarden = with lib; {
|
||||
enable = my.mkDisableOption "bitwarden configuration";
|
||||
|
||||
pinentry = mkPackageOption pkgs "pinentry" { default = [ "pinentry-tty" ]; };
|
||||
pinentry = mkOption {
|
||||
type = types.str;
|
||||
default = "tty";
|
||||
example = "gtk2";
|
||||
description = "Which pinentry interface to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
|
|
@ -39,7 +39,6 @@
|
|||
./tmux
|
||||
./udiskie
|
||||
./vim
|
||||
./wget
|
||||
./wm
|
||||
./x
|
||||
./xdg
|
||||
|
|
|
@ -7,9 +7,9 @@ in
|
|||
enable = my.mkDisableOption "direnv configuration";
|
||||
|
||||
defaultFlake = mkOption {
|
||||
type = with types; nullOr str;
|
||||
default = null;
|
||||
example = "pkgs";
|
||||
type = types.str;
|
||||
default = "pkgs";
|
||||
example = "nixpkgs";
|
||||
description = ''
|
||||
Which flake from the registry should be used for
|
||||
<command>use pkgs</command> by default.
|
||||
|
@ -39,7 +39,7 @@ in
|
|||
in
|
||||
lib.my.genAttrs' files linkLibFile;
|
||||
|
||||
home.sessionVariables = lib.mkIf (cfg.defaultFlake != null) {
|
||||
home.sessionVariables = {
|
||||
DIRENV_DEFAULT_FLAKE = cfg.defaultFlake;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -69,6 +69,8 @@ unbind <C-f>
|
|||
" Redirections {{{
|
||||
" Always redirect Reddit to the old site
|
||||
autocmd DocStart ^http(s?)://www.reddit.com js tri.excmds.urlmodify("-t", "www", "old")
|
||||
" Use a better Twitter front-end
|
||||
autocmd DocStart ^http(s?)://twitter.com js tri.excmds.urlmodify("-t", "twitter.com", "nitter.net")
|
||||
" }}}
|
||||
|
||||
" Disabled websites {{{
|
||||
|
|
|
@ -26,14 +26,7 @@ in
|
|||
gdb
|
||||
];
|
||||
|
||||
xdg = {
|
||||
configFile."gdb/gdbinit".source = ./gdbinit;
|
||||
dataFile. "gdb/.keep".text = "";
|
||||
};
|
||||
|
||||
home.sessionVariables = {
|
||||
GDBHISTFILE = "${config.xdg.dataHome}/gdb/gdb_history";
|
||||
};
|
||||
xdg.configFile."gdb/gdbinit".source = ./gdbinit;
|
||||
}
|
||||
|
||||
(lib.mkIf cfg.rr.enable {
|
||||
|
|
|
@ -148,10 +148,6 @@ in
|
|||
autoStash = true;
|
||||
};
|
||||
|
||||
rerere = {
|
||||
enabled = true;
|
||||
};
|
||||
|
||||
url = {
|
||||
"git@git.belanyi.fr:" = {
|
||||
insteadOf = "https://git.belanyi.fr/";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.gpg;
|
||||
in
|
||||
|
@ -6,7 +6,12 @@ in
|
|||
options.my.home.gpg = with lib; {
|
||||
enable = my.mkDisableOption "gpg configuration";
|
||||
|
||||
pinentry = mkPackageOption pkgs "pinentry" { default = [ "pinentry-tty" ]; };
|
||||
pinentry = mkOption {
|
||||
type = types.str;
|
||||
default = "tty";
|
||||
example = "gtk2";
|
||||
description = "Which pinentry interface to use";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -17,7 +22,7 @@ in
|
|||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true; # One agent to rule them all
|
||||
pinentryPackage = cfg.pinentry;
|
||||
pinentryFlavor = cfg.pinentry;
|
||||
extraConfig = ''
|
||||
allow-loopback-pinentry
|
||||
'';
|
||||
|
|
|
@ -18,6 +18,8 @@ let
|
|||
himalaya = {
|
||||
enable = cfg.himalaya.enable;
|
||||
# FIXME: try to actually configure it at some point
|
||||
backend = "imap";
|
||||
sender = "smtp";
|
||||
};
|
||||
|
||||
msmtp = {
|
||||
|
|
|
@ -13,7 +13,6 @@ in
|
|||
|
||||
scripts = [
|
||||
pkgs.mpvScripts.mpris # Allow controlling using media keys
|
||||
pkgs.mpvScripts.mpv-cheatsheet # Show some simple mappings on '?'
|
||||
pkgs.mpvScripts.uosc # Nicer UI
|
||||
];
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ let
|
|||
# Use pinned nixpkgs when using `nix run pkgs#<whatever>`
|
||||
pkgs = inputs.nixpkgs;
|
||||
}
|
||||
(lib.optionalAttrs cfg.inputs.overrideNixpkgs {
|
||||
(lib.optionalAttrs cfg.overrideNixpkgs {
|
||||
# ... And with `nix run nixpkgs#<whatever>`
|
||||
nixpkgs = inputs.nixpkgs;
|
||||
})
|
||||
|
@ -22,26 +22,20 @@ in
|
|||
options.my.home.nix = with lib; {
|
||||
enable = my.mkDisableOption "nix configuration";
|
||||
|
||||
cache = {
|
||||
selfHosted = my.mkDisableOption "self-hosted cache";
|
||||
};
|
||||
linkInputs = my.mkDisableOption "link inputs to `$XDG_CONFIG_HOME/nix/inputs`";
|
||||
|
||||
inputs = {
|
||||
link = my.mkDisableOption "link inputs to `/etc/nix/inputs/`";
|
||||
addToRegistry = my.mkDisableOption "add inputs and self to registry";
|
||||
|
||||
addToRegistry = my.mkDisableOption "add inputs and self to registry";
|
||||
addToNixPath = my.mkDisableOption "add inputs and self to nix path";
|
||||
|
||||
addToNixPath = my.mkDisableOption "add inputs and self to nix path";
|
||||
|
||||
overrideNixpkgs = my.mkDisableOption "point nixpkgs to pinned system version";
|
||||
};
|
||||
overrideNixpkgs = my.mkDisableOption "point nixpkgs to pinned system version";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.inputs.addToNixPath -> cfg.inputs.link;
|
||||
assertion = cfg.addToNixPath -> cfg.linkInputs;
|
||||
message = ''
|
||||
enabling `my.home.nix.addToNixPath` needs to have
|
||||
`my.home.nix.linkInputs = true`
|
||||
|
@ -60,21 +54,7 @@ in
|
|||
};
|
||||
}
|
||||
|
||||
(lib.mkIf cfg.cache.selfHosted {
|
||||
nix = {
|
||||
settings = {
|
||||
extra-substituters = [
|
||||
"https://cache.belanyi.fr/"
|
||||
];
|
||||
|
||||
extra-trusted-public-keys = [
|
||||
"cache.belanyi.fr:LPhrTqufwfxTceg1nRWueDWf7/2zSVY9K00pq2UI7tw="
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.inputs.addToRegistry {
|
||||
(lib.mkIf cfg.addToRegistry {
|
||||
nix.registry =
|
||||
let
|
||||
makeEntry = v: { flake = v; };
|
||||
|
@ -83,7 +63,7 @@ in
|
|||
makeEntries channels;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.inputs.link {
|
||||
(lib.mkIf cfg.linkInputs {
|
||||
xdg.configFile =
|
||||
let
|
||||
makeLink = n: v: {
|
||||
|
@ -95,7 +75,7 @@ in
|
|||
makeLinks channels;
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.inputs.addToNixPath {
|
||||
(lib.mkIf cfg.addToNixPath {
|
||||
home.sessionVariables.NIX_PATH = "${config.xdg.configHome}/nix/inputs\${NIX_PATH:+:$NIX_PATH}";
|
||||
})
|
||||
]);
|
||||
|
|
|
@ -16,7 +16,6 @@ in
|
|||
LESS = "-R -+X -c";
|
||||
# Better XDG compliance
|
||||
LESSHISTFILE = "${config.xdg.dataHome}/less/history";
|
||||
LESSKEY = "${config.xdg.configHome}/less/lesskey";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ in
|
|||
};
|
||||
|
||||
porthos = {
|
||||
hostname = "37.187.146.15";
|
||||
hostname = "91.121.177.163";
|
||||
identityFile = "~/.ssh/shared_rsa";
|
||||
user = "ambroisie";
|
||||
};
|
||||
|
|
|
@ -5,14 +5,6 @@ let
|
|||
config.my.home.x.enable
|
||||
(config.my.home.wm.windowManager != null)
|
||||
];
|
||||
|
||||
mkTerminalFlags = opt: flag:
|
||||
let
|
||||
mkFlag = term: ''set -as terminal-features ",${term}:${flag}"'';
|
||||
enabledTerminals = lib.filterAttrs (_: v: v.${opt}) cfg.terminalFeatures;
|
||||
terminals = lib.attrNames enabledTerminals;
|
||||
in
|
||||
lib.concatMapStringsSep "\n" mkFlag terminals;
|
||||
in
|
||||
{
|
||||
options.my.home.tmux = with lib; {
|
||||
|
@ -20,22 +12,16 @@ in
|
|||
|
||||
enablePassthrough = mkEnableOption "tmux DCS passthrough sequence";
|
||||
|
||||
terminalFeatures = mkOption {
|
||||
type = with types; attrsOf (submodule {
|
||||
options = {
|
||||
hyperlinks = my.mkDisableOption "hyperlinks through OSC8";
|
||||
|
||||
trueColor = my.mkDisableOption "24-bit (RGB) color support";
|
||||
};
|
||||
});
|
||||
|
||||
default = { ${config.my.home.terminal.program} = { }; };
|
||||
defaultText = litteralExpression ''
|
||||
{ ''${config.my.home.terminal.program} = { }; };
|
||||
trueColorTerminals = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = lib.my.nullableToList config.my.home.terminal.program;
|
||||
defaultText = ''
|
||||
`[ config.my.home.terminal.program ]` if it is non-null, otherwise an
|
||||
empty list.
|
||||
'';
|
||||
example = { xterm-256color = { }; };
|
||||
example = [ "xterm-256color" ];
|
||||
description = ''
|
||||
$TERM values which should be considered to have additional features.
|
||||
$TERM values which should be considered to always support 24-bit color.
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
@ -46,7 +32,7 @@ in
|
|||
keyMode = "vi"; # Home-row keys and other niceties
|
||||
clock24 = true; # I'm one of those heathens
|
||||
escapeTime = 0; # Let vim do its thing instead
|
||||
historyLimit = 100000; # Bigger buffer
|
||||
historyLimit = 50000; # Bigger buffer
|
||||
terminal = "tmux-256color"; # I want accurate termcap info
|
||||
|
||||
plugins = with pkgs.tmuxPlugins; [
|
||||
|
@ -103,10 +89,13 @@ in
|
|||
''
|
||||
}
|
||||
|
||||
# Force OSC8 hyperlinks for each relevant $TERM
|
||||
${mkTerminalFlags "hyperlinks" "hyperlinks"}
|
||||
# Force 24-bit color for each relevant $TERM
|
||||
${mkTerminalFlags "trueColor" "RGB"}
|
||||
${
|
||||
let
|
||||
mkTcFlag = term: ''set -as terminal-features ",${term}:RGB"'';
|
||||
in
|
||||
lib.concatMapStringsSep "\n" mkTcFlag cfg.trueColorTerminals
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Add comment format
|
||||
setlocal comments=b://,s1:/*,mb:*,ex:*/
|
||||
setlocal commentstring=//\ %s
|
||||
let b:undo_ftplugin.='|setlocal comments< commentstring<'
|
|
@ -1,6 +0,0 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Set comment string, as it seems that no official GN support exists upstream
|
||||
setlocal commentstring=#\ %s
|
||||
let b:undo_ftplugin.='|setlocal commentstring<'
|
|
@ -1,6 +0,0 @@
|
|||
" Create the `b:undo_ftplugin` variable if it doesn't exist
|
||||
call ftplugined#check_undo_ft()
|
||||
|
||||
" Use a small indentation value on JSON files
|
||||
setlocal shiftwidth=2
|
||||
let b:undo_ftplugin.='|setlocal shiftwidth<'
|
|
@ -105,7 +105,7 @@ in
|
|||
nixpkgs-fmt
|
||||
|
||||
# Shell
|
||||
nodePackages.bash-language-server
|
||||
shellcheck
|
||||
shfmt
|
||||
];
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-- Use Automake filetype for `local.am` files
|
||||
-- Use Automake filetype for `local.am` files, explicit `set` to force override
|
||||
vim.filetype.add({
|
||||
filename = {
|
||||
["local.am"] = "automake",
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
-- Use `bp` filetype for Blueprint files
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
bp = "bp",
|
||||
},
|
||||
})
|
|
@ -1,7 +0,0 @@
|
|||
-- Use GLSL filetype for common shader file extensions
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
frag = "glsl",
|
||||
vert = "glsl",
|
||||
},
|
||||
})
|
|
@ -1,7 +0,0 @@
|
|||
-- Use GN filetype for Chromium Generate Ninja files
|
||||
vim.filetype.add({
|
||||
extension = {
|
||||
gn = "gn",
|
||||
gni = "gn",
|
||||
},
|
||||
})
|
|
@ -88,23 +88,6 @@ set background=dark
|
|||
|
||||
" 24 bit colors
|
||||
set termguicolors
|
||||
" Setup some overrides for gruvbox
|
||||
lua << EOF
|
||||
local gruvbox = require("gruvbox")
|
||||
local colors = gruvbox.palette
|
||||
|
||||
gruvbox.setup({
|
||||
overrides = {
|
||||
-- Only URLs should be underlined
|
||||
["@string.special.path"] = { link = "GruvboxOrange" },
|
||||
-- Revert back to the better diff highlighting
|
||||
DiffAdd = { fg = colors.green, bg = "NONE" },
|
||||
DiffChange = { fg = colors.aqua, bg = "NONE" },
|
||||
DiffDelete = { fg = colors.red, bg = "NONE" },
|
||||
DiffText = { fg = colors.yellow, bg = colors.bg0 },
|
||||
}
|
||||
})
|
||||
EOF
|
||||
" Use my preferred colorscheme
|
||||
colorscheme gruvbox
|
||||
" }}}
|
||||
|
|
|
@ -51,7 +51,8 @@ M.on_attach = function(client, bufnr)
|
|||
local wk = require("which-key")
|
||||
|
||||
local function list_workspace_folders()
|
||||
vim.print(vim.lsp.buf.list_workspace_folders())
|
||||
local utils = require("ambroisie.utils")
|
||||
utils.dump(vim.lsp.buf.list_workspace_folders())
|
||||
end
|
||||
|
||||
local function cycle_diagnostics_display()
|
||||
|
|
|
@ -1,5 +1,11 @@
|
|||
local M = {}
|
||||
|
||||
--- pretty print lua object
|
||||
--- @param obj any object to pretty print
|
||||
M.dump = function(obj)
|
||||
print(vim.inspect(obj))
|
||||
end
|
||||
|
||||
--- checks if a given command is executable
|
||||
--- @param cmd string? command to check
|
||||
--- @return boolean executable
|
||||
|
@ -9,7 +15,7 @@ end
|
|||
|
||||
--- return a function that checks if a given command is executable
|
||||
--- @param cmd string? command to check
|
||||
--- @return fun(): boolean executable
|
||||
--- @return fun(cmd: string): boolean executable
|
||||
M.is_executable_condition = function(cmd)
|
||||
return function()
|
||||
return M.is_executable(cmd)
|
||||
|
@ -34,11 +40,11 @@ M.is_ssh = function()
|
|||
return false
|
||||
end
|
||||
|
||||
--- list all active LSP clients for specific buffer, or all buffers
|
||||
--- list all active LSP clients for current buffer
|
||||
--- @param bufnr int? buffer number
|
||||
--- @return table all active LSP client names
|
||||
M.list_lsp_clients = function(bufnr)
|
||||
local clients = vim.lsp.get_active_clients({ bufnr = bufnr })
|
||||
local clients = vim.lsp.buf_get_clients(bufnr)
|
||||
local names = {}
|
||||
|
||||
for _, client in ipairs(clients) do
|
||||
|
|
|
@ -29,17 +29,16 @@ if utils.is_executable("clangd") then
|
|||
})
|
||||
end
|
||||
|
||||
-- Haskell
|
||||
if utils.is_executable("haskell-language-server-wrapper") then
|
||||
lspconfig.hls.setup({
|
||||
-- Nix
|
||||
if utils.is_executable("nil") then
|
||||
lspconfig.nil_ls.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- Nix
|
||||
if utils.is_executable("nil") then
|
||||
lspconfig.nil_ls.setup({
|
||||
if utils.is_executable("rnix-lsp") then
|
||||
lspconfig.rnix.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
|
@ -53,13 +52,6 @@ if utils.is_executable("pyright") then
|
|||
})
|
||||
end
|
||||
|
||||
if utils.is_executable("ruff-lsp") then
|
||||
lspconfig.ruff_lsp.setup({
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- Rust
|
||||
if utils.is_executable("rust-analyzer") then
|
||||
lspconfig.rust_analyzer.setup({
|
||||
|
@ -67,12 +59,3 @@ if utils.is_executable("rust-analyzer") then
|
|||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
||||
-- Shell
|
||||
if utils.is_executable("bash-language-server") then
|
||||
lspconfig.bashls.setup({
|
||||
filetypes = { "bash", "sh", "zsh" },
|
||||
capabilities = capabilities,
|
||||
on_attach = lsp.on_attach,
|
||||
})
|
||||
end
|
||||
|
|
|
@ -10,7 +10,7 @@ local function list_spell_languages()
|
|||
end
|
||||
|
||||
local function list_lsp_clients()
|
||||
local client_names = utils.list_lsp_clients(0)
|
||||
local client_names = utils.list_lsp_clients()
|
||||
|
||||
if #client_names == 0 then
|
||||
return ""
|
||||
|
|
|
@ -18,16 +18,48 @@ null_ls.register({
|
|||
}),
|
||||
})
|
||||
|
||||
-- C, C++
|
||||
null_ls.register({
|
||||
null_ls.builtins.formatting.clang_format.with({
|
||||
-- Only used if available, but prefer clangd formatting if available
|
||||
condition = function()
|
||||
return utils.is_executable("clang-format") and not utils.is_executable("clangd")
|
||||
end,
|
||||
}),
|
||||
})
|
||||
|
||||
-- Haskell
|
||||
null_ls.register({
|
||||
null_ls.builtins.formatting.brittany.with({
|
||||
-- Only used if available
|
||||
condition = utils.is_executable_condition("brittany"),
|
||||
}),
|
||||
})
|
||||
|
||||
-- Nix
|
||||
null_ls.register({
|
||||
null_ls.builtins.formatting.nixpkgs_fmt.with({
|
||||
-- Only used if available
|
||||
condition = utils.is_executable_condition("nixpkgs-fmt"),
|
||||
-- Only used if available, but prefer rnix if available
|
||||
condition = function()
|
||||
return utils.is_executable("nixpkgs-fmt")
|
||||
and not utils.is_executable("rnix-lsp")
|
||||
and not utils.is_executable("nil")
|
||||
end,
|
||||
}),
|
||||
})
|
||||
|
||||
-- Python
|
||||
null_ls.register({
|
||||
null_ls.builtins.diagnostics.flake8.with({
|
||||
-- Only used if available, but prefer pflake8 if available
|
||||
condition = function()
|
||||
return utils.is_executable("flake8") and not utils.is_executable("pflake8")
|
||||
end,
|
||||
}),
|
||||
null_ls.builtins.diagnostics.pyproject_flake8.with({
|
||||
-- Only used if available
|
||||
condition = utils.is_executable_condition("pflake8"),
|
||||
}),
|
||||
null_ls.builtins.diagnostics.mypy.with({
|
||||
-- Only used if available
|
||||
condition = utils.is_executable_condition("mypy"),
|
||||
|
@ -49,6 +81,22 @@ null_ls.register({
|
|||
|
||||
-- Shell (non-POSIX)
|
||||
null_ls.register({
|
||||
null_ls.builtins.code_actions.shellcheck.with({
|
||||
-- Restrict to bash and zsh
|
||||
filetypes = { "bash", "zsh" },
|
||||
-- Only used if available
|
||||
condition = utils.is_executable_condition("shellcheck"),
|
||||
}),
|
||||
null_ls.builtins.diagnostics.shellcheck.with({
|
||||
-- Show error code in message
|
||||
diagnostics_format = "[#{c}] #{m}",
|
||||
-- Require explicit empty string test, use bash dialect
|
||||
extra_args = { "-s", "bash", "-o", "avoid-nullary-conditions" },
|
||||
-- Restrict to bash and zsh
|
||||
filetypes = { "bash", "zsh" },
|
||||
-- Only used if available
|
||||
condition = utils.is_executable_condition("shellcheck"),
|
||||
}),
|
||||
null_ls.builtins.formatting.shfmt.with({
|
||||
-- Indent with 4 spaces, simplify the code, indent switch cases,
|
||||
-- add space after redirection, use bash dialect
|
||||
|
@ -62,6 +110,22 @@ null_ls.register({
|
|||
|
||||
-- Shell (POSIX)
|
||||
null_ls.register({
|
||||
null_ls.builtins.code_actions.shellcheck.with({
|
||||
-- Restrict to POSIX sh
|
||||
filetypes = { "sh" },
|
||||
-- Only used if available
|
||||
condition = utils.is_executable_condition("shellcheck"),
|
||||
}),
|
||||
null_ls.builtins.diagnostics.shellcheck.with({
|
||||
-- Show error code in message
|
||||
diagnostics_format = "[#{c}] #{m}",
|
||||
-- Require explicit empty string test
|
||||
extra_args = { "-o", "avoid-nullary-conditions" },
|
||||
-- Restrict to POSIX sh
|
||||
filetypes = { "sh" },
|
||||
-- Only used if available
|
||||
condition = utils.is_executable_condition("shellcheck"),
|
||||
}),
|
||||
null_ls.builtins.formatting.shfmt.with({
|
||||
-- Indent with 4 spaces, simplify the code, indent switch cases,
|
||||
-- add space after redirection, use POSIX
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
cfg = config.my.home.wget;
|
||||
in
|
||||
{
|
||||
options.my.home.wget = with lib; {
|
||||
enable = my.mkDisableOption "wget configuration";
|
||||
|
||||
package = mkPackageOption pkgs "wget" { };
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = [
|
||||
cfg.package
|
||||
];
|
||||
|
||||
|
||||
home.sessionVariables = lib.mkIf cfg.enable {
|
||||
WGETRC = "${config.xdg.configHome}/wgetrc";
|
||||
};
|
||||
|
||||
xdg.configFile."wgetrc".text = ''
|
||||
hsts-file = ${config.xdg.dataHome}/wget-hsts
|
||||
'';
|
||||
};
|
||||
}
|
|
@ -42,16 +42,14 @@ in
|
|||
ANDROID_USER_HOME = "${configHome}/android";
|
||||
CARGO_HOME = "${dataHome}/cargo";
|
||||
DOCKER_CONFIG = "${configHome}/docker";
|
||||
GRADLE_USER_HOME = "${dataHome}/gradle";
|
||||
GDBHISTFILE = "${dataHome}/gdb/gdb_history";
|
||||
HISTFILE = "${dataHome}/bash/history";
|
||||
INPUTRC = "${configHome}/readline/inputrc";
|
||||
LESSHISTFILE = "${dataHome}/less/history";
|
||||
LESSKEY = "${configHome}/less/lesskey";
|
||||
PSQL_HISTORY = "${dataHome}/psql_history";
|
||||
PYTHONPYCACHEPREFIX = "${cacheHome}/python/";
|
||||
PYTHONUSERBASE = "${dataHome}/python/";
|
||||
PYTHON_HISTORY = "${stateHome}/python/history";
|
||||
REDISCLI_HISTFILE = "${dataHome}/redis/rediscli_history";
|
||||
REPO_CONFIG_DIR = "${configHome}/repo";
|
||||
REDISCLI_HISTFILE = "${dataHome}/redis/rediscli_history";
|
||||
XCOMPOSECACHE = "${dataHome}/X11/xcompose";
|
||||
_JAVA_OPTIONS = "-Djava.util.prefs.userRoot=${configHome}/java";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -15,152 +15,81 @@ in
|
|||
enable = my.mkDisableOption "zsh configuration";
|
||||
|
||||
launchTmux = mkEnableOption "auto launch tmux at shell start";
|
||||
|
||||
notify = {
|
||||
enable = mkEnableOption "zsh-done notification";
|
||||
|
||||
exclude = mkOption {
|
||||
type = with types; listOf str;
|
||||
default = [
|
||||
"delta"
|
||||
"direnv reload"
|
||||
"fg"
|
||||
"git (?!push|pull|fetch)"
|
||||
"htop"
|
||||
"less"
|
||||
"man"
|
||||
"nvim"
|
||||
"tail -f"
|
||||
"tmux"
|
||||
"vim"
|
||||
];
|
||||
example = [ "command --long-running-option" ];
|
||||
description = ''
|
||||
List of exclusions which should not be create a notification. Accepts
|
||||
Perl regexes (implicitly anchored with `^\s*`).
|
||||
'';
|
||||
};
|
||||
|
||||
ssh = {
|
||||
enable = mkEnableOption "notify through SSH/non-graphical connections";
|
||||
|
||||
useOsc777 = lib.my.mkDisableOption "use OSC-777 for notifications";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
zsh-completions
|
||||
config = lib.mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
zsh-completions
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = "${relativeXdgConfig}/zsh"; # Don't clutter $HOME
|
||||
enableCompletion = true;
|
||||
|
||||
history = {
|
||||
size = 500000;
|
||||
save = 500000;
|
||||
extended = true;
|
||||
expireDuplicatesFirst = true;
|
||||
ignoreSpace = true;
|
||||
ignoreDups = true;
|
||||
share = false;
|
||||
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
}
|
||||
{
|
||||
name = "agkozak-zsh-prompt";
|
||||
file = "share/zsh/site-functions/agkozak-zsh-prompt.plugin.zsh";
|
||||
src = pkgs.agkozak-zsh-prompt;
|
||||
}
|
||||
];
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
dotDir = "${relativeXdgConfig}/zsh"; # Don't clutter $HOME
|
||||
enableCompletion = true;
|
||||
# Modal editing is life, but CLI benefits from emacs gymnastics
|
||||
defaultKeymap = "emacs";
|
||||
|
||||
history = {
|
||||
size = 500000;
|
||||
save = 500000;
|
||||
extended = true;
|
||||
expireDuplicatesFirst = true;
|
||||
ignoreSpace = true;
|
||||
ignoreDups = true;
|
||||
share = false;
|
||||
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
name = "fast-syntax-highlighting";
|
||||
file = "share/zsh/site-functions/fast-syntax-highlighting.plugin.zsh";
|
||||
src = pkgs.zsh-fast-syntax-highlighting;
|
||||
}
|
||||
{
|
||||
name = "agkozak-zsh-prompt";
|
||||
file = "share/zsh/site-functions/agkozak-zsh-prompt.plugin.zsh";
|
||||
src = pkgs.agkozak-zsh-prompt;
|
||||
}
|
||||
];
|
||||
|
||||
# Modal editing is life, but CLI benefits from emacs gymnastics
|
||||
defaultKeymap = "emacs";
|
||||
|
||||
# Make those happen early to avoid doing double the work
|
||||
initExtraFirst = lib.mkBefore ''
|
||||
${
|
||||
lib.optionalString cfg.launchTmux ''
|
||||
# Launch tmux unless already inside one
|
||||
if [ -z "$TMUX" ]; then
|
||||
exec tmux new-session
|
||||
fi
|
||||
''
|
||||
}
|
||||
'';
|
||||
|
||||
initExtra = lib.mkAfter ''
|
||||
source ${./completion-styles.zsh}
|
||||
source ${./extra-mappings.zsh}
|
||||
source ${./options.zsh}
|
||||
|
||||
# Source local configuration
|
||||
if [ -f "$ZDOTDIR/zshrc.local" ]; then
|
||||
source "$ZDOTDIR/zshrc.local"
|
||||
fi
|
||||
'';
|
||||
|
||||
localVariables = {
|
||||
# I like having the full path
|
||||
AGKOZAK_PROMPT_DIRTRIM = 0;
|
||||
# Because I *am* from EPITA
|
||||
AGKOZAK_PROMPT_CHAR = [ "42sh$" "42sh#" ":" ];
|
||||
# Easy on the eyes
|
||||
AGKOZAK_COLORS_BRANCH_STATUS = "magenta";
|
||||
# I don't like moving my eyes
|
||||
AGKOZAK_LEFT_PROMPT_ONLY = 1;
|
||||
};
|
||||
|
||||
# Enable VTE integration
|
||||
enableVteIntegration = true;
|
||||
};
|
||||
}
|
||||
|
||||
(lib.mkIf cfg.notify.enable {
|
||||
programs.zsh = {
|
||||
plugins = [
|
||||
{
|
||||
name = "zsh-done";
|
||||
file = "share/zsh/site-functions/done.plugin.zsh";
|
||||
src = pkgs.ambroisie.zsh-done;
|
||||
}
|
||||
];
|
||||
|
||||
# `localVariables` values don't get merged correctly due to their type,
|
||||
# don't use `mkIf`
|
||||
localVariables = {
|
||||
DONE_EXCLUDE =
|
||||
let
|
||||
joined = lib.concatMapStringsSep "|" (c: "(${c})") cfg.notify.exclude;
|
||||
in
|
||||
''^\s*(${joined})'';
|
||||
# Make those happen early to avoid doing double the work
|
||||
initExtraFirst = ''
|
||||
${
|
||||
lib.optionalString cfg.launchTmux ''
|
||||
# Launch tmux unless already inside one
|
||||
if [ -z "$TMUX" ]; then
|
||||
exec tmux new-session
|
||||
fi
|
||||
''
|
||||
}
|
||||
# Enable `zsh-done` through SSH, if configured
|
||||
// lib.optionalAttrs cfg.notify.ssh.enable {
|
||||
DONE_ALLOW_NONGRAPHICAL = 1;
|
||||
};
|
||||
'';
|
||||
|
||||
# Use OSC-777 to send the notification through SSH
|
||||
initExtra = lib.mkIf cfg.notify.ssh.useOsc777 ''
|
||||
done_send_notification() {
|
||||
local exit_status="$1"
|
||||
local title="$2"
|
||||
local message="$3"
|
||||
initExtra = ''
|
||||
source ${./completion-styles.zsh}
|
||||
source ${./extra-mappings.zsh}
|
||||
source ${./options.zsh}
|
||||
|
||||
${lib.getExe pkgs.ambroisie.osc777} "$title" "$message"
|
||||
}
|
||||
'';
|
||||
# Source local configuration
|
||||
if [ -f "$ZDOTDIR/zshrc.local" ]; then
|
||||
source "$ZDOTDIR/zshrc.local"
|
||||
fi
|
||||
'';
|
||||
|
||||
localVariables = {
|
||||
# I like having the full path
|
||||
AGKOZAK_PROMPT_DIRTRIM = 0;
|
||||
# Because I *am* from EPITA
|
||||
AGKOZAK_PROMPT_CHAR = [ "42sh$" "42sh#" ":" ];
|
||||
# Easy on the eyes
|
||||
AGKOZAK_COLORS_BRANCH_STATUS = "magenta";
|
||||
# I don't like moving my eyes
|
||||
AGKOZAK_LEFT_PROMPT_ONLY = 1;
|
||||
};
|
||||
})
|
||||
]);
|
||||
|
||||
# Enable VTE integration
|
||||
enableVteIntegration = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
imports = [
|
||||
./hardware
|
||||
./home
|
||||
./profiles
|
||||
./programs
|
||||
./secrets
|
||||
./services
|
||||
|
|
|
@ -25,8 +25,8 @@ in
|
|||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
services.pipewire.wireplumber.configPackages = [
|
||||
(pkgs.writeTextDir "share/wireplumber/bluetooth.lua.d/51-bluez-config.lua" ''
|
||||
environment.etc = {
|
||||
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||
bluez_monitor.properties = {
|
||||
-- SBC XQ provides better audio
|
||||
["bluez5.enable-sbc-xq"] = true,
|
||||
|
@ -40,8 +40,8 @@ in
|
|||
-- FIXME: Some devices may now support both hsp_ag and hfp_ag
|
||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||
}
|
||||
'')
|
||||
];
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
||||
# Support for A2DP audio profile
|
||||
|
|
|
@ -6,10 +6,9 @@
|
|||
./bluetooth
|
||||
./ergodox
|
||||
./firmware
|
||||
./graphics
|
||||
./mx-ergo
|
||||
./networking
|
||||
./sound
|
||||
./trackball
|
||||
./upower
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1,75 +0,0 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
cfg = config.my.hardware.graphics;
|
||||
in
|
||||
{
|
||||
options.my.hardware.graphics = with lib; {
|
||||
enable = mkEnableOption "graphics configuration";
|
||||
|
||||
gpuFlavor = mkOption {
|
||||
type = with types; nullOr (enum [ "amd" "intel" ]);
|
||||
default = null;
|
||||
example = "intel";
|
||||
description = "Which kind of GPU to install driver for";
|
||||
};
|
||||
|
||||
amd = {
|
||||
enableKernelModule = lib.my.mkDisableOption "Kernel driver module";
|
||||
|
||||
amdvlk = lib.mkEnableOption "Use AMDVLK instead of Mesa RADV driver";
|
||||
};
|
||||
|
||||
intel = {
|
||||
enableKernelModule = lib.my.mkDisableOption "Kernel driver module";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable (lib.mkMerge [
|
||||
{
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
|
||||
# AMD GPU
|
||||
(lib.mkIf (cfg.gpuFlavor == "amd") {
|
||||
boot.initrd.kernelModules = lib.mkIf cfg.amd.enableKernelModule [ "amdgpu" ];
|
||||
|
||||
hardware.opengl = {
|
||||
extraPackages = with pkgs; [
|
||||
# OpenCL
|
||||
rocmPackages.clr
|
||||
rocmPackages.clr.icd
|
||||
]
|
||||
++ lib.optional cfg.amd.amdvlk amdvlk
|
||||
;
|
||||
|
||||
extraPackages32 = with pkgs; [
|
||||
]
|
||||
++ lib.optional cfg.amd.amdvlk driversi686Linux.amdvlk
|
||||
;
|
||||
};
|
||||
})
|
||||
|
||||
# Intel GPU
|
||||
(lib.mkIf (cfg.gpuFlavor == "intel") {
|
||||
boot.initrd.kernelModules = lib.mkIf cfg.intel.enableKernelModule [ "i915" ];
|
||||
|
||||
environment.variables = {
|
||||
VDPAU_DRIVER = "va_gl";
|
||||
};
|
||||
|
||||
hardware.opengl = {
|
||||
extraPackages = with pkgs; [
|
||||
# Open CL
|
||||
intel-compute-runtime
|
||||
|
||||
# VA API
|
||||
intel-media-driver
|
||||
intel-vaapi-driver
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
|
@ -1,11 +1,11 @@
|
|||
# Hold down the `next page` button to scroll using the ball
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.hardware.trackball;
|
||||
cfg = config.my.hardware.mx-ergo;
|
||||
in
|
||||
{
|
||||
options.my.hardware.trackball = with lib; {
|
||||
enable = mkEnableOption "trackball configuration";
|
||||
options.my.hardware.mx-ergo = with lib; {
|
||||
enable = mkEnableOption "MX Ergo configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
@ -13,7 +13,6 @@ in
|
|||
# This section must be *after* the one configured by `libinput`
|
||||
# for the `ScrollMethod` configuration to not be overriden
|
||||
inputClassSections = lib.mkAfter [
|
||||
# MX Ergo
|
||||
''
|
||||
Identifier "MX Ergo scroll button configuration"
|
||||
MatchProduct "MX Ergo"
|
|
@ -13,16 +13,23 @@ in
|
|||
|
||||
config = lib.mkIf cfg.enable {
|
||||
home-manager = {
|
||||
# Not a fan of out-of-directory imports, but this is a good exception
|
||||
users.${config.my.user.name} = import "${inputs.self}/modules/home";
|
||||
users.${config.my.user.name} = {
|
||||
# Not a fan of out-of-directory imports, but this is a good exception
|
||||
imports = [
|
||||
"${inputs.self}/modules/common"
|
||||
"${inputs.self}/modules/home"
|
||||
];
|
||||
};
|
||||
|
||||
# Nix Flakes compatibility
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
|
||||
# Forward inputs to home-manager configuration
|
||||
extraSpecialArgs = {
|
||||
# Forward inputs to home-manager configuration
|
||||
inherit inputs;
|
||||
# For consumption by common modules
|
||||
type = "home";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.my.profiles.bluetooth;
|
||||
in
|
||||
{
|
||||
options.my.profiles.bluetooth = with lib; {
|
||||
enable = mkEnableOption "bluetooth profile";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
my.hardware.bluetooth.enable = true;
|
||||
|
||||
my.home.bluetooth.enable = true;
|
||||
};
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue