feat: nixbook on gnome wayland

This commit is contained in:
Thiago Sposito 2025-08-30 23:19:46 -03:00
parent 955bf3c105
commit 73c352c872
Signed by: thiago
GPG key ID: 3065EA73A976D430
9 changed files with 196 additions and 51 deletions

View file

@ -1,15 +1,13 @@
image: nixos/unstable image: nixos/unstable
environment: environment:
NIX_CONFIG: "experimental-features = nix-command flakes" NIX_CONFIG: "experimental-features = nix-command flakes"
MY_NIX_FLAGS: "--extra-experimental-features command --extra-experimental-features flakes"
sources: sources:
- https://git.sr.ht/~sposito/nix-conf - https://git.sr.ht/~sposito/nix-conf
tasks: tasks:
- build: |
cd nix-conf
nix flake check
- check_fmt: | - check_fmt: |
cd nix-conf cd ~/nix-conf
nixpkgs-fmt --check . nix run nixpkgs#nixpgs-fmt ${MY_NIX_FLAGS} -- --check .
- static: | - static: |
cd nix-conf cd ~/nix-conf
nix run nixpkgs#statix check . nix run nixpkgs#statix ${MY_NIX_FLAGS} -- check .

6
flake.lock generated
View file

@ -114,11 +114,11 @@
"systems": "systems_2" "systems": "systems_2"
}, },
"locked": { "locked": {
"lastModified": 1756305488, "lastModified": 1756587208,
"narHash": "sha256-+6cgFdac+DN5PAZg3YtRXAEdk++r6msy7wfFMNMNsEY=", "narHash": "sha256-pATHF/7rZeEYxnkvLZgrLbCjG4xBJDJ4zkjUiu+hhiU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nixvim", "repo": "nixvim",
"rev": "b7e96214e8e7244eceae73c606dcd243f6d180a3", "rev": "8bad4d407dace583ebf6a41d32cab479788898fe",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -38,6 +38,7 @@
libinput libinput
nerd-fonts.fira-code nerd-fonts.fira-code
nil nil
nixd
nixpkgs-fmt nixpkgs-fmt
nixfmt-rfc-style nixfmt-rfc-style
nordic nordic

View file

@ -3,41 +3,17 @@
imports = [ imports = [
../common/default.nix ../common/default.nix
../common/network.nix
./apple.nix ./apple.nix
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
boot = {
networking.hostName = "Nixbook"; loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
programs.hyprland.enable = true; kernelPackages = pkgs.linuxPackages_latest;
programs.hyprland.withUWSM = true;
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
};
services = {
xserver.enable = true;
displayManager.sddm = {
enable = true;
wayland.enable = true;
};
libinput = {
enable = true;
touchpad.clickMethod = "clickfinger";
};
openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = false;
};
};
}; };
environment.sessionVariables = { NIXOS_OZONE_WL = "1"; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
exfat exfat
gcsfuse gcsfuse
@ -51,5 +27,138 @@
wget wget
]; ];
networking.hostName = "Nixbook";
programs.hyprland.enable = false;
programs.hyprland.withUWSM = false;
hardware = {
sane.enable = true;
graphics.enable = true;
};
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "pt_BR.UTF-8";
LC_IDENTIFICATION = "pt_BR.UTF-8";
LC_MEASUREMENT = "pt_BR.UTF-8";
LC_MONETARY = "pt_BR.UTF-8";
LC_NAME = "pt_BR.UTF-8";
LC_NUMERIC = "pt_BR.UTF-8";
LC_PAPER = "pt_BR.UTF-8";
LC_TELEPHONE = "pt_BR.UTF-8";
LC_TIME = "pt_BR.UTF-8";
};
nix = {
settings = {
auto-optimise-store = true;
};
};
programs = {
dconf.enable = true;
virt-manager.enable = true;
};
security = {
pam.services.gdm.enableGnomeKeyring = true;
polkit.enable = true;
polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.bluez.GattProfile1.Release") {
return polkit.Result.YES;
}
});
'';
rtkit.enable = true;
};
services = {
xserver = {
enable = true;
xkb = {
layout = "us";
variant = "alt-intl";
};
};
desktopManager.gnome.enable = true;
displayManager = {
gdm.enable = true;
gdm.wayland = true;
defaultSession = "gnome";
};
udev.packages = [ pkgs.libwacom ];
avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
extraConfig = ''
[server]
allow-interfaces=wlp7s0
'';
};
earlyoom = {
enable = true;
freeMemThreshold = 5;
freeSwapThreshold = 10;
};
flatpak.enable = true;
libinput = {
enable = true;
touchpad.clickMethod = "clickfinger";
};
openssh = {
enable = true;
settings = {
PermitRootLogin = "yes";
PasswordAuthentication = false;
};
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
systemd = {
services."getty@tty1".enable = false;
services."autovt@tty1".enable = false;
};
systemd.timers.btrfs-scrub = {
description = "Run Btrfs Scrub Daily";
wantedBy = [ "timers.target" ];
timerConfig = {
OnCalendar = "daily";
Persistent = true;
};
};
systemd.services = {
btrfs-scrub = {
description = "Daily Btrfs Scrub";
serviceConfig = {
Type = "oneshot";
Nice = 19;
IOSchedulingClass = "idle";
ExecStart = "${pkgs.btrfs-progs}/bin/btrfs scrub start -n 2 -B / && ${pkgs.btrfs-progs}/bin/btrfs scrub start -n 2 -B /mnt/hdd0";
};
};
};
system.stateVersion = "23.11"; system.stateVersion = "23.11";
} }

View file

@ -23,11 +23,44 @@
extraModulePackages = [ ]; extraModulePackages = [ ];
}; };
fileSystems."/" = { fileSystems."/" =
device = "/dev/nvme0n1"; {
device = "/dev/disk/by-uuid/492e3157-429e-4b9b-995f-c341c83b17ab";
fsType = "btrfs"; fsType = "btrfs";
options = [ "subvol=@root" ];
}; };
fileSystems."/nix" =
{
device = "/dev/disk/by-uuid/492e3157-429e-4b9b-995f-c341c83b17ab";
fsType = "btrfs";
options = [ "subvol=@nix" ];
};
fileSystems."/var/log" =
{
device = "/dev/disk/by-uuid/492e3157-429e-4b9b-995f-c341c83b17ab";
fsType = "btrfs";
options = [ "subvol=@log" ];
};
fileSystems."/home" =
{
device = "/dev/disk/by-uuid/492e3157-429e-4b9b-995f-c341c83b17ab";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/50A0-7758";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/fab2d71e-86d2-4ba7-841c-13b790357a73"; }
];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View file

@ -42,14 +42,15 @@
}; };
networking.firewall = { networking.firewall = {
enable = true;
allowPing = true;
allowedTCPPorts = [ allowedTCPPorts = [
11434 11434
8888 8888
8000 8000
8080 8080
]; ];
allowPing = true;
enable = true;
hostName = "Nixstation";
}; };
nix = { nix = {

View file

@ -52,7 +52,15 @@
}; };
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
programs.zsh.enable = true; programs = {
zsh.enable = true;
gnupg = {
agent = {
enable = true;
pinentryPackage = pkgs.pinentry-tty;
};
};
};
services = { services = {
pcscd.enable = true; pcscd.enable = true;
# xserver.displayManager.sessionCommands = # xserver.displayManager.sessionCommands =

View file

@ -1,7 +1,6 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
networking = { networking = {
hostName = "Nixstation";
networkmanager.enable = true; networkmanager.enable = true;
firewall = { firewall = {

View file

@ -1,4 +0,0 @@
Thiago Sposito <sposito.thiago@gmail.com> Thiago Sposito <th.spo@pm.me>
Thiago Alexandria Sposito <sposito.thiago@gmail.com> Thiago Sposito <th.spo@pm.me>
Thiago Alexandria Sposito <thiago@sposito.ch> Thiago Sposito <th.spo@pm.me>