init repos

This commit is contained in:
2026-06-19 05:47:33 +02:00
commit d5d15832f5
20 changed files with 534 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@@ -0,0 +1,2 @@
.claude/
result

134
flake.lock generated Normal file
View File

@@ -0,0 +1,134 @@
{
"nodes": {
"claude-code": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1781026565,
"narHash": "sha256-sL9ZxUqeNFK2TXg0o0swSeJz0KlgkpLiyPSOq+Durug=",
"owner": "sadjow",
"repo": "claude-code-nix",
"rev": "4b0229ec9e37c594156b492653eada8413446f09",
"type": "github"
},
"original": {
"owner": "sadjow",
"repo": "claude-code-nix",
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1780894562,
"narHash": "sha256-c3430xwxwhHipl3jigUGMMBfpaMylDqytW/kdmB3ZGs=",
"owner": "nix-community",
"repo": "disko",
"rev": "24fed06cac83bcc44ac8efbb57cab1a82fa0bedc",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "disko",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1780930886,
"narHash": "sha256-rppURzHviaQN131F+nLiLdGfcb0uCd9gGP0E5+iw9MI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8c3cede7ddc26bd659d2d383b5610efbd2c7a16e",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1780749050,
"narHash": "sha256-3av0pIjlOWQ6rDbNOmpUSvbNnJkGORQKKjb4LtCZsIY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a799d3e3886da994fa307f817a6bc705ae538eeb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1780952837,
"narHash": "sha256-Fwd1+spDtQ0hDyBwme6ufG3n4mY0UrjjFdYHv+G/Hds=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e820eb4a444b46a19b2e03e8dfd2359439ff30fe",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"claude-code": "claude-code",
"disko": "disko",
"nixpkgs": "nixpkgs_2",
"nixpkgs-unstable": "nixpkgs-unstable"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

44
flake.nix Normal file
View File

@@ -0,0 +1,44 @@
{
description = "NixOS Desktop Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
claude-code.url = "github:sadjow/claude-code-nix";
};
outputs = { self, nixpkgs, nixpkgs-unstable, disko, claude-code, ... }: {
nixosConfigurations.nixos-desktop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
pkgs-unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
};
modules = [
disko.nixosModules.disko
./hosts/nixos-desktop
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ claude-code.overlays.default ];
}
];
};
nixosConfigurations.nixos-laptop = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
pkgs-unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
};
modules = [
./hosts/nixos-laptop
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ claude-code.overlays.default ];
}
];
};
};
}

View File

@@ -0,0 +1,27 @@
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
./disko.nix
../../modules/system/boot.nix
../../modules/system/locale.nix
../../modules/system/network.nix
../../modules/system/users.nix
../../modules/desktop/hyprland.nix
../../modules/desktop/audio.nix
../../modules/desktop/fonts.nix
../../modules/hardware/amd-gpu.nix
../../modules/hardware/ollama.nix
../../modules/system/packages.nix
../../modules/system/nfs.nix
../../modules/desktop/packages.nix
../../modules/desktop/gaming.nix
];
networking.hostName = "nixos-desktop";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "25.11";
}

View File

@@ -0,0 +1,66 @@
{
disko.devices = {
disk = {
system = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
home = {
type = "disk";
device = "/dev/sdb";
content = {
type = "gpt";
partitions = {
home = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/home";
};
};
};
};
};
models = {
type = "disk";
device = "/dev/sdc";
content = {
type = "gpt";
partitions = {
models = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/var/lib/private/ollama";
};
};
};
};
};
};
};
}

View File

@@ -0,0 +1,40 @@
# 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 = [ "uhci_hcd" "ehci_pci" "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/1185d3bc-bd55-42fb-a7ef-9d405e05f871";
# fsType = "ext4";
# };
# fileSystems."/boot" =
# { device = "/dev/disk/by-uuid/F439-1F8B";
# fsType = "vfat";
# options = [ "fmask=0022" "dmask=0022" ];
# };
# fileSystems."/home" =
# { device = "/dev/disk/by-uuid/425c456e-52ad-429f-b804-5ebef8c1185a";
# fsType = "ext4";
# };
# fileSystems."/var/lib/private/ollama" =
# { device = "/dev/disk/by-uuid/8f9ff952-b34a-4f22-b6c7-abf815216967";
# fsType = "ext4";
# };
# swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
}

View File

@@ -0,0 +1,23 @@
{ pkgs, ... }:
{
imports = [
./hardware-configuration.nix
../../modules/system/boot.nix
../../modules/system/locale.nix
../../modules/system/network.nix
../../modules/system/users.nix
../../modules/system/packages.nix
../../modules/system/nfs.nix
../../modules/desktop/hyprland.nix
../../modules/desktop/audio.nix
../../modules/desktop/fonts.nix
../../modules/desktop/packages.nix
];
networking.hostName = "nixos-laptop";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "25.11";
}

14
modules/desktop/audio.nix Normal file
View File

@@ -0,0 +1,14 @@
{
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
hardware.bluetooth.enable = true;
hardware.bluetooth.powerOnBoot = true;
services.blueman.enable = true;
}

10
modules/desktop/fonts.nix Normal file
View File

@@ -0,0 +1,10 @@
{ pkgs, ... }:
{
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-color-emoji
font-awesome
nerd-fonts.jetbrains-mono
];
}

View File

@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
};
}

View File

@@ -0,0 +1,30 @@
{ pkgs, ... }:
{
programs.hyprland.enable = true;
programs.thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-volman
];
};
services.gvfs.enable = true;
services.tumbler.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-hyprland ];
};
services.displayManager.sddm = {
enable = true;
wayland.enable = true;
settings.Users.HideUsers = "waha";
theme = "elegant-sddm";
};
security.polkit.enable = true;
programs.dconf.enable = true;
}

View File

@@ -0,0 +1,31 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
alacritty
fuzzel
firefox
waybar
dunst
grim
slurp
wl-clipboard
networkmanagerapplet
blueman
thunderbird
tesseract
tessen
pavucontrol
playerctl
imv
mpv
arc-theme
tela-icon-theme
lxappearance
gsettings-desktop-schemas
glib
dconf
claude-code
opencode
];
}

View File

@@ -0,0 +1,20 @@
{ pkgs, ... }:
{
environment.systemPackages = [
pkgs.nvtopPackages.amd
];
boot.kernelModules = [ "amdgpu" ];
boot.initrd.kernelModules = [ "amdgpu" ];
hardware.graphics = {
enable = true;
enable32Bit = true;
};
hardware.enableRedistributableFirmware = true;
hardware.enableAllFirmware = true;
services.xserver.videoDrivers = [ "amdgpu" ];
}

View File

@@ -0,0 +1,17 @@
{
services.ollama = {
enable = true;
acceleration = "rocm";
host = "0.0.0.0";
port = 11434;
user = "ollama";
group = "ollama";
};
# Fix ownership on the externally mounted disk at /var/lib/private/ollama
systemd.tmpfiles.rules = [
"Z /var/lib/private/ollama 0750 ollama ollama -"
];
networking.firewall.allowedTCPPorts = [ 11434 ];
}

4
modules/system/boot.nix Normal file
View File

@@ -0,0 +1,4 @@
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
}

View File

@@ -0,0 +1,8 @@
{
time.timeZone = "Europe/Paris";
services.xserver.xkb = {
layout = "fr";
variant = "azerty";
};
}

View File

@@ -0,0 +1,8 @@
{
networking.networkmanager.enable = true;
services.openssh = {
enable = true;
settings.PasswordAuthentication = true;
};
}

23
modules/system/nfs.nix Normal file
View File

@@ -0,0 +1,23 @@
{
fileSystems."/mnt/nas/commun" = {
device = "192.168.10.50:/mnt/DocNas/Commun";
fsType = "nfs";
options = [
"nfsvers=4"
"x-systemd.automount"
"noauto"
"x-systemd.idle-timeout=600"
];
};
fileSystems."/mnt/nas/benjamin" = {
device = "192.168.10.50:/mnt/DocNas/Benjamin";
fsType = "nfs";
options = [
"nfsvers=4"
"x-systemd.automount"
"noauto"
"x-systemd.idle-timeout=600"
];
};
}

View File

@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
git
vim
htop
tmux
fastfetch
inxi
];
}

13
modules/system/users.nix Normal file
View File

@@ -0,0 +1,13 @@
{
users.users.waha = {
isNormalUser = true;
extraGroups = [ "wheel" ];
initialPassword = "zekzek";
};
users.users.lafrite = {
isNormalUser = true;
extraGroups = [ "networkmanager" "video" "render" "bluetooth" ];
initialPassword = "zekzek";
};
}