parent
43c06ae4c4
commit
8b7d68b296
7 changed files with 310 additions and 224 deletions
|
@ -1,7 +1,18 @@
|
|||
{ inputs, self, lib, ... }: {
|
||||
imports = [ inputs.treefmt-nix.flakeModule inputs.git-hooks-nix.flakeModule ];
|
||||
{
|
||||
inputs,
|
||||
self,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
inputs.treefmt-nix.flakeModule
|
||||
inputs.git-hooks-nix.flakeModule
|
||||
];
|
||||
|
||||
perSystem = { ... }: {
|
||||
perSystem =
|
||||
{ ... }:
|
||||
{
|
||||
treefmt.config = {
|
||||
projectRootFile = ".git/config";
|
||||
programs = {
|
||||
|
@ -16,10 +27,12 @@
|
|||
};
|
||||
};
|
||||
|
||||
flake.checks = let build = _: nc: nc.config.system.build.toplevel;
|
||||
in {
|
||||
x86_64-linux =
|
||||
lib.mapAttrs build { inherit (self.nixosConfigurations) picard; };
|
||||
flake.checks =
|
||||
let
|
||||
build = _: nc: nc.config.system.build.toplevel;
|
||||
in
|
||||
{
|
||||
x86_64-linux = lib.mapAttrs build { inherit (self.nixosConfigurations) picard; };
|
||||
aarch64-linux = lib.mapAttrs build {
|
||||
inherit (self.nixosConfigurations) sisko; # pbp;
|
||||
};
|
||||
|
|
18
flake.nix
18
flake.nix
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
description =
|
||||
"A complete, declarative, and reproducible configuration of my entire Nix fleet";
|
||||
description = "A complete, declarative, and reproducible configuration of my entire Nix fleet";
|
||||
|
||||
inputs = {
|
||||
flakeParts.url = "github:hercules-ci/flake-parts";
|
||||
|
@ -34,11 +33,12 @@
|
|||
url = "github:MatthewCroughan/NixThePlanet/";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixDarwin = { url = "github:LnL7/nix-darwin"; };
|
||||
nixDarwin = {
|
||||
url = "github:LnL7/nix-darwin";
|
||||
};
|
||||
nix-on-droid.url = "github:nix-community/nix-on-droid";
|
||||
lix = {
|
||||
url =
|
||||
"git+https://git@git.lix.systems/lix-project/lix?rev=f6077314fa6aff862758095bb55fe844e9162a1d"; # FIXME update
|
||||
url = "git+https://git@git.lix.systems/lix-project/lix?rev=f6077314fa6aff862758095bb55fe844e9162a1d"; # FIXME update
|
||||
flake = false;
|
||||
};
|
||||
lix-module = {
|
||||
|
@ -65,7 +65,8 @@
|
|||
emacs-overlay.url = "github:nix-community/emacs-overlay";
|
||||
};
|
||||
|
||||
outputs = inputs@{ flakeParts, ... }:
|
||||
outputs =
|
||||
inputs@{ flakeParts, ... }:
|
||||
flakeParts.lib.mkFlake { inherit inputs; } {
|
||||
imports = [
|
||||
# TODO export modules as flake outputs
|
||||
|
@ -76,6 +77,9 @@
|
|||
./shell
|
||||
./checks
|
||||
];
|
||||
systems = [ "x86_64-linux" "aarch64-linux" ];
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -16,7 +16,8 @@ let
|
|||
fi
|
||||
fi
|
||||
'';
|
||||
in {
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hyprpaper.nix
|
||||
../waybar
|
||||
|
@ -38,7 +39,9 @@ in {
|
|||
brightnessctl
|
||||
];
|
||||
|
||||
systemd.user.sessionVariables = { NIXOS_OZONE_WL = "1"; };
|
||||
systemd.user.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
services.network-manager-applet.enable = true;
|
||||
services.blueman-applet.enable = true;
|
||||
|
@ -61,7 +64,9 @@ in {
|
|||
};
|
||||
};
|
||||
|
||||
qt = { enable = true; };
|
||||
qt = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
# services.kanshi = {
|
||||
# enable = true;
|
||||
|
@ -91,14 +96,16 @@ in {
|
|||
# };
|
||||
|
||||
home.file.".icons/catppuccin-mocha-sapphire" = {
|
||||
source =
|
||||
"${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors";
|
||||
source = "${pkgs.catppuccin-cursors.mochaSapphire}/share/icons/catppuccin-mocha-sapphire-cursors";
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
plugins = with pkgs.hyprlandPlugins; [ hy3 hyprspace ];
|
||||
plugins = with pkgs.hyprlandPlugins; [
|
||||
hy3
|
||||
hyprspace
|
||||
];
|
||||
# TODO migrate to structured options
|
||||
extraConfig = builtins.readFile ./hyprland.conf;
|
||||
};
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
{ fleetModules, lib, pkgs, ... }: {
|
||||
imports = fleetModules [
|
||||
{
|
||||
fleetModules,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
fleetModules [
|
||||
"common"
|
||||
"ssh"
|
||||
"ccr"
|
||||
|
@ -28,7 +35,8 @@
|
|||
"prometheus-exporters"
|
||||
"promtail"
|
||||
"syncthing"
|
||||
] ++ [ ./disko.nix ];
|
||||
]
|
||||
++ [ ./disko.nix ];
|
||||
|
||||
ccr = {
|
||||
enable = true;
|
||||
|
@ -70,8 +78,12 @@
|
|||
};
|
||||
|
||||
boot.initrd.kernelModules = [ "i915" ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages;
|
||||
|
|
|
@ -1,5 +1,13 @@
|
|||
{ fleetModules, lib, config, pkgs, ... }: {
|
||||
imports = fleetModules [
|
||||
{
|
||||
fleetModules,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports =
|
||||
fleetModules [
|
||||
"common"
|
||||
"ssh"
|
||||
"ccr"
|
||||
|
@ -34,7 +42,8 @@
|
|||
"guix"
|
||||
"prometheus-exporters"
|
||||
"promtail"
|
||||
] ++ [ ./disko.nix ];
|
||||
]
|
||||
++ [ ./disko.nix ];
|
||||
|
||||
ccr = {
|
||||
enable = true;
|
||||
|
@ -88,8 +97,13 @@
|
|||
|
||||
boot.kernelParams = [ "ip=dhcp" ];
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "nvme" "xhci_pci" "ahci" "usbhid" "r8169" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"nvme"
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"usbhid"
|
||||
"r8169"
|
||||
];
|
||||
boot.kernelModules = [
|
||||
"kvm-amd"
|
||||
"ddcci"
|
||||
|
@ -138,8 +152,7 @@
|
|||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "schedutil";
|
||||
hardware.cpu.amd.updateMicrocode =
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
|
||||
hardware.graphics = {
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
{ config, lib, fleetFlake, ... }: {
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
fleetFlake,
|
||||
...
|
||||
}:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: _: {
|
||||
nix-eval-job =
|
||||
fleetFlake.inputs.lix-eval-jobs.packages.${final.system}.nix-eval-jobs
|
||||
// {
|
||||
nix-eval-job = fleetFlake.inputs.lix-eval-jobs.packages.${final.system}.nix-eval-jobs // {
|
||||
nix = final.nix;
|
||||
};
|
||||
})
|
||||
|
@ -17,7 +21,10 @@
|
|||
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
trusted-users = [ "root" "@wheel" ];
|
||||
trusted-users = [
|
||||
"root"
|
||||
"@wheel"
|
||||
];
|
||||
netrc-file = "/etc/nix/netrc";
|
||||
substituters = [
|
||||
# "s3://cache?profile=default®ion=eu-south-1&scheme=https&endpoint=cache.aciceri.dev"
|
||||
|
@ -49,7 +56,8 @@
|
|||
options = "--delete-older-than 180d";
|
||||
};
|
||||
|
||||
registry = lib.mkForce ({
|
||||
registry = lib.mkForce (
|
||||
{
|
||||
nixpkgs.to = {
|
||||
type = "path";
|
||||
path = fleetFlake.inputs.nixpkgs;
|
||||
|
@ -58,7 +66,8 @@
|
|||
type = "path";
|
||||
path = fleetFlake.inputs.nixpkgs;
|
||||
};
|
||||
} // (lib.optionalAttrs (builtins.hasAttr "ccr" config) {
|
||||
}
|
||||
// (lib.optionalAttrs (builtins.hasAttr "ccr" config) {
|
||||
nixfleet.to = {
|
||||
type = "path";
|
||||
path = "/home/${config.ccr.username}/projects/aciceri/nixfleet";
|
||||
|
@ -71,7 +80,8 @@
|
|||
type = "path";
|
||||
path = "/home/${config.ccr.username}/.config/emacs";
|
||||
};
|
||||
}));
|
||||
})
|
||||
);
|
||||
|
||||
distributedBuilds = true;
|
||||
buildMachines =
|
||||
|
@ -79,16 +89,26 @@
|
|||
hostName = "sisko.fleet";
|
||||
system = "aarch64-linux";
|
||||
maxJobs = 7;
|
||||
supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ];
|
||||
supportedFeatures = [
|
||||
"kvm"
|
||||
"nixos-test"
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
];
|
||||
protocol = "ssh-ng";
|
||||
sshUser = "root";
|
||||
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
|
||||
} ++ (lib.lists.optional (config.networking.hostName == "picard") {
|
||||
hostName =
|
||||
"mac.staging.mlabs.city?remote-program=/run/current-system/sw/bin/nix-store";
|
||||
}
|
||||
++ (lib.lists.optional (config.networking.hostName == "picard") {
|
||||
hostName = "mac.staging.mlabs.city?remote-program=/run/current-system/sw/bin/nix-store";
|
||||
system = "x86_64-darwin";
|
||||
maxJobs = 4;
|
||||
supportedFeatures = [ "kvm" "nixos-test" "big-parallel" "benchmark" ];
|
||||
supportedFeatures = [
|
||||
"kvm"
|
||||
"nixos-test"
|
||||
"big-parallel"
|
||||
"benchmark"
|
||||
];
|
||||
protocol = "ssh";
|
||||
sshUser = "root";
|
||||
sshKey = "/home/${config.ccr.username}/.ssh/id_rsa";
|
||||
|
|
|
@ -2,7 +2,8 @@ pkgs: epkgs:
|
|||
let
|
||||
inherit (epkgs) melpaPackages nongnuPackages elpaPackages;
|
||||
|
||||
buildEmacsPackage = args:
|
||||
buildEmacsPackage =
|
||||
args:
|
||||
epkgs.trivialBuild {
|
||||
pname = args.name;
|
||||
inherit (args) src;
|
||||
|
@ -26,10 +27,13 @@ let
|
|||
};
|
||||
|
||||
# *List* containing emacs packages from (M)ELPA
|
||||
mainPackages = builtins.filter
|
||||
mainPackages =
|
||||
builtins.filter
|
||||
# if an extra package has the same name then give precedence to it
|
||||
(package: !builtins.elem package.pname (builtins.attrNames extraPackages))
|
||||
(with melpaPackages; [
|
||||
(
|
||||
with melpaPackages;
|
||||
[
|
||||
meow
|
||||
meow-tree-sitter
|
||||
dracula-theme
|
||||
|
@ -104,6 +108,19 @@ let
|
|||
solidity-mode
|
||||
# org-re-reveal # FIXME very not nice hash mismatch when building
|
||||
# gptel # TODO uncomment when there will be a new release including GPT-4o
|
||||
]) ++ (with elpaPackages; [ delight kind-icon ef-themes indent-bars ement ])
|
||||
++ (with nongnuPackages; [ eat corfu-terminal haskell-ts-mode ]);
|
||||
in mainPackages ++ (builtins.attrValues extraPackages)
|
||||
]
|
||||
)
|
||||
++ (with elpaPackages; [
|
||||
delight
|
||||
kind-icon
|
||||
ef-themes
|
||||
indent-bars
|
||||
ement
|
||||
])
|
||||
++ (with nongnuPackages; [
|
||||
eat
|
||||
corfu-terminal
|
||||
haskell-ts-mode
|
||||
]);
|
||||
in
|
||||
mainPackages ++ (builtins.attrValues extraPackages)
|
||||
|
|
Loading…
Add table
Reference in a new issue