refactor: drop disko, simplify inputs, centralize fuse/rclone, bump state versions
- Remove disko everywhere: - Delete hosts/Nixbook/disko.nix and hosts/Nixtest/disko.nix - Drop disko input, modules, and disko-install app - Update README to remove disko mention - Simplify flake inputs: - Use nixpkgs = nixos-unstable only - Home Manager -> master (follows nixpkgs) - Remove nixpkgs-unstable and vscode-extensions - Pass allowUnfree via specialArgs - Centralize storage tools: - Add fuse3 and rclone to hosts/common/default.nix - Remove hosts/common/rclone.nix and screen.nix - Add user thiago to "fuse" group - Drop per-host rclone packages - NVIDIA module: - Use pkgs.linuxPackages.nvidiaPackages.latest (no unstable import) - Keep nvidiaSettings=true, open=false - Remove sunshine service block - Hosts: - Nixstation: remove Hyprland block, zramSwap 30% -> 25% - Clean hardware-configuration args - Versions: - system.stateVersion: 24.05 -> 25.11 (Nixstation) - home.stateVersion: 24.05 -> 25.11 - README: adjust Nixbook and common modules descriptions
This commit is contained in:
parent
60eef49dc2
commit
b41147d8e1
14 changed files with 22 additions and 216 deletions
|
|
@ -6,10 +6,10 @@ The setup is split into host-specific configurations, common reusable modules, a
|
|||
## Structure
|
||||
- **flake.nix** — entry point, defines inputs (nixpkgs, home-manager, nixvim, etc.) and system/home outputs.
|
||||
- **hosts/** — machine-specific system configurations.
|
||||
- `Nixbook/` — laptop setup (Apple hardware, Hyprland, disk layout via disko).
|
||||
- `Nixbook/` — laptop setup (Apple hardware, Hyprland)
|
||||
- `Nixstation/` — desktop workstation (NVIDIA, virtualization, btrfs scrub, firewall).
|
||||
- `Nixtest/` — minimal VM environment for testing with QEMU.
|
||||
- `common/` — shared modules (users, keyboard, network, gpus, rclone, etc.).
|
||||
- `common/` — shared modules (users, keyboard, network, gpus, etc.).
|
||||
- **home-manager/** — user environment configurations.
|
||||
- `home.nix` — main Home Manager entry for user packages and programs.
|
||||
- `vim.nix`, `zsh.nix`, `gnome.nix`, `hyprland/` — modular desktop and tool configurations.
|
||||
|
|
|
|||
33
flake.nix
33
flake.nix
|
|
@ -2,57 +2,43 @@
|
|||
description = "my NixOS Config";
|
||||
|
||||
inputs = {
|
||||
disko.url = "github:nix-community/disko";
|
||||
disko.inputs.nixpkgs.follows = "nixpkgs";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
url = "github:nix-community/home-manager/master";
|
||||
};
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
vscode-extensions = {
|
||||
url = "github:nix-community/nix-vscode-extensions";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
flake-utils.follows = "vscode-extensions/flake-utils";
|
||||
flake-utils.inputs.nixpkgs.follows = "nixpkgs";
|
||||
vs-extensions-pkgs.follows = "vscode-extensions/nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
, nixpkgs-unstable
|
||||
, ...
|
||||
}@inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
system = "x86_64-linux";
|
||||
unstable = import nixpkgs-unstable { inherit system; config.allowUnfree = true; };
|
||||
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
Nixbook = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
allowUnfree = true;
|
||||
};
|
||||
modules = [
|
||||
./hosts/Nixbook
|
||||
./hosts/Nixbook/disko.nix
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
};
|
||||
Nixstation = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs unstable; };
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
allowUnfree = true;};
|
||||
modules = [
|
||||
./hosts/Nixstation
|
||||
];
|
||||
|
|
@ -83,12 +69,5 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
apps.x86_64-linux.disko-install = {
|
||||
type = "app";
|
||||
program = "${inputs.disko.packages.x86_64-linux.disko}/bin/disko-install";
|
||||
};
|
||||
|
||||
devShells.x86_64-linux = { };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,6 @@
|
|||
obsidian
|
||||
python3
|
||||
python3Packages.pip
|
||||
rclone
|
||||
ripgrep
|
||||
shfmt
|
||||
statix
|
||||
|
|
@ -151,5 +150,5 @@
|
|||
};
|
||||
|
||||
systemd.user.startServices = "sd-switch";
|
||||
home.stateVersion = "24.05";
|
||||
home.stateVersion = "25.11";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,7 +48,6 @@
|
|||
neovim
|
||||
nil
|
||||
nixpkgs-fmt
|
||||
rclone
|
||||
wget
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,68 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
esp = {
|
||||
size = "512M";
|
||||
start = "1M";
|
||||
type = "EF00";
|
||||
label = "EFI";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
swap = {
|
||||
size = "16G";
|
||||
type = "8200";
|
||||
label = "Swap";
|
||||
content = {
|
||||
type = "swap";
|
||||
randomEncryption = false;
|
||||
};
|
||||
};
|
||||
|
||||
root = {
|
||||
type = "8300";
|
||||
label = "NixOS";
|
||||
size = "870G";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
mountpoint = "/";
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"@log" = {
|
||||
mountpoint = "/var/log";
|
||||
};
|
||||
};
|
||||
extraArgs = [
|
||||
"-L"
|
||||
"nixos-root"
|
||||
];
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
{ config
|
||||
, lib
|
||||
, pkgs
|
||||
, modulesPath
|
||||
, inputs
|
||||
, ...
|
||||
}:
|
||||
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@
|
|||
../common/keychron.nix
|
||||
../common/network.nix
|
||||
../common/nvidia/default.nix
|
||||
../common/rclone.nix
|
||||
../common/screen.nix
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
|
|
@ -111,11 +109,6 @@
|
|||
|
||||
# };
|
||||
dconf.enable = true;
|
||||
hyprland = {
|
||||
enable = false;
|
||||
withUWSM = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
security.pam.services.gdm.enableGnomeKeyring = true;
|
||||
|
|
@ -150,8 +143,6 @@
|
|||
|
||||
flatpak.enable = true;
|
||||
|
||||
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
|
|
@ -159,6 +150,7 @@
|
|||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
systemd = {
|
||||
services."getty@tty1".enable = false;
|
||||
services."autovt@tty1".enable = false;
|
||||
|
|
@ -184,7 +176,7 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
system.stateVersion = "24.05"; # keep it!
|
||||
system.stateVersion = "25.11"; # keep it!
|
||||
time.timeZone = "America/Sao_Paulo";
|
||||
virtualisation = {
|
||||
vmware.host.enable = false;
|
||||
|
|
@ -199,7 +191,7 @@
|
|||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = 30;
|
||||
memoryPercent = 25;
|
||||
algorithm = "zstd";
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,6 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
imports = [
|
||||
./disko.nix
|
||||
];
|
||||
|
||||
networking.hostName = "Nixtest";
|
||||
services = {
|
||||
xserver.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,58 +0,0 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
esp = {
|
||||
size = "128M";
|
||||
start = "1M";
|
||||
type = "EF00";
|
||||
label = "EFI";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
|
||||
root = {
|
||||
type = "8300";
|
||||
label = "NixOS";
|
||||
size = "32G";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
mountpoint = "/";
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
"@home" = {
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"@log" = {
|
||||
mountpoint = "/var/log";
|
||||
};
|
||||
};
|
||||
extraArgs = [
|
||||
"-L"
|
||||
"nixos-root"
|
||||
];
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -19,6 +19,7 @@
|
|||
systemPackages = with pkgs; [
|
||||
exfat
|
||||
file
|
||||
fuse3
|
||||
gcsfuse
|
||||
git
|
||||
gnupg
|
||||
|
|
@ -29,6 +30,7 @@
|
|||
pcsc-safenet
|
||||
pcsctools
|
||||
pkcs11helper
|
||||
rclone
|
||||
sops
|
||||
wget
|
||||
zsa-udev-rules
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
{ config
|
||||
, pkgs
|
||||
, unstable
|
||||
{ pkgs
|
||||
, ...
|
||||
}:
|
||||
{
|
||||
|
|
@ -19,39 +17,27 @@
|
|||
};
|
||||
nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = true;
|
||||
open = false; # keep it like that for now, unstable!!
|
||||
package = pkgs.linuxPackages.nvidiaPackages.latest;
|
||||
powerManagement.enable = false;
|
||||
powerManagement.finegrained = false;
|
||||
open = false; # keep it like that for now, unstable!!
|
||||
nvidiaSettings = true;
|
||||
package = unstable.linuxPackages.nvidiaPackages.latest;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
sunshine = {
|
||||
enable = false;
|
||||
# autoStart = true;
|
||||
# openFirewall = true;
|
||||
package = pkgs.sunshine.overrideAttrs (old: {
|
||||
cmakeFlags = (old.cmakeFlags or [ ]) ++ [
|
||||
"-DSUNSHINE_ENABLE_CUDA=OFF"
|
||||
"-DCUDA_FAIL_ON_MISSING=OFF"
|
||||
];
|
||||
});
|
||||
};
|
||||
xserver = {
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
};
|
||||
nixpkgs.config.cudaSupport = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
mesa
|
||||
cudaPackages.cuda_nvcc
|
||||
cudaPackages.cudatoolkit
|
||||
glxinfo
|
||||
libepoxy
|
||||
libglvnd
|
||||
mesa
|
||||
nvidia-container-toolkit
|
||||
cudaPackages.cudatoolkit
|
||||
cudaPackages.cuda_nvcc
|
||||
];
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
rclone
|
||||
fuse3 # Required for mounting
|
||||
];
|
||||
|
||||
users.users.thiago = {
|
||||
extraGroups = [ "fuse" ];
|
||||
};
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
hardware.i2c.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
ddcutil
|
||||
ddcui
|
||||
];
|
||||
}
|
||||
|
|
@ -9,6 +9,7 @@ in
|
|||
initialPassword = "changeme";
|
||||
extraGroups =
|
||||
[
|
||||
"fuse"
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"scard"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue