feat: add nix configs for host neon with wayland, niri and nocitalia-shell
This commit is contained in:
23
flake.lock
generated
23
flake.lock
generated
@@ -36,10 +36,31 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"noctalia": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765375284,
|
||||||
|
"narHash": "sha256-McMVhLcwdFA5DS8yVGbk4COlINRkLrN1UTAymY416xQ=",
|
||||||
|
"owner": "noctalia-dev",
|
||||||
|
"repo": "noctalia-shell",
|
||||||
|
"rev": "a47559c1c6cdaafb12d0280e4f4e76db5767d39b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "noctalia-dev",
|
||||||
|
"repo": "noctalia-shell",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs",
|
||||||
|
"noctalia": "noctalia"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
40
flake.nix
40
flake.nix
@@ -14,16 +14,23 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# noctalia shell
|
||||||
|
noctalia = {
|
||||||
|
url = "github:noctalia-dev/noctalia-shell";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, home-manager, ... }:
|
};
|
||||||
|
|
||||||
|
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
||||||
let
|
let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in {
|
in {
|
||||||
# nixos system config
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
|
# default config
|
||||||
default = nixpkgs.lib.nixosSystem {
|
default = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
modules = [
|
modules = [
|
||||||
@@ -33,13 +40,32 @@
|
|||||||
./hosts/default/hardware-configuration.nix
|
./hosts/default/hardware-configuration.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# laptop neon
|
||||||
|
neon = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
};
|
};
|
||||||
# home-manager config
|
modules = [
|
||||||
homeConfigurations = {
|
# import host specific configs
|
||||||
aaron = home-manager.lib.homeManagerConfiguration {
|
./hosts/neon/configuration.nix
|
||||||
inherit pkgs;
|
# import host specific hardware configs
|
||||||
modules = [ ./hosts/default/home.nix ];
|
./hosts/neon/hardware-configuration.nix
|
||||||
|
# import noctalia shell configs
|
||||||
|
./hosts/neon/noctalia.nix
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
## home-manager config
|
||||||
|
#homeConfigurations = {
|
||||||
|
# aaron = home-manager.lib.homeManagerConfiguration {
|
||||||
|
# inherit pkgs;
|
||||||
|
# modules = [ ./hosts/default/home.nix ];
|
||||||
|
# };
|
||||||
|
#};
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
132
hosts/neon/configuration.nix
Normal file
132
hosts/neon/configuration.nix
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
# 0x29a nixos conifg
|
||||||
|
|
||||||
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
# use flakes
|
||||||
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
|
# configure bootloader
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
# plymouth boot eye candy
|
||||||
|
boot.initrd.systemd.enable = true;
|
||||||
|
boot.plymouth.enable = true;
|
||||||
|
boot.plymouth.theme = "spinner";
|
||||||
|
|
||||||
|
# use latest kernel
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
# networking
|
||||||
|
networking.hostName = "neon";
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# bluetooth
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
|
# time zone.
|
||||||
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
|
||||||
|
# select internationalisation properties
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "de_CH-latin1";
|
||||||
|
};
|
||||||
|
|
||||||
|
# window manager configs
|
||||||
|
programs.niri.enable = true;
|
||||||
|
programs.xwayland.enable = true;
|
||||||
|
services.displayManager.gdm = {
|
||||||
|
enable = true;
|
||||||
|
wayland = true;
|
||||||
|
};
|
||||||
|
services.tuned.enable = true;
|
||||||
|
services.upower.enable = true;
|
||||||
|
|
||||||
|
environment.pathsToLink = [ "/libexec" ];
|
||||||
|
environment.variables.EDITOR = "vim";
|
||||||
|
|
||||||
|
# enable sound
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# define a user account
|
||||||
|
users.users.aaron = {
|
||||||
|
isNormalUser = true;
|
||||||
|
group = "users";
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
packages = with pkgs; [
|
||||||
|
tree
|
||||||
|
fastfetch
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# browser
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
|
||||||
|
# zsh config
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestions.enable = true;
|
||||||
|
ohMyZsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [ "git" "sudo" ];
|
||||||
|
theme = "gentoo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# system packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
efibootmgr
|
||||||
|
neovim
|
||||||
|
vim
|
||||||
|
git
|
||||||
|
alacritty
|
||||||
|
ghostty
|
||||||
|
kitty
|
||||||
|
gnupg
|
||||||
|
xwayland
|
||||||
|
xwayland-satellite
|
||||||
|
wget
|
||||||
|
];
|
||||||
|
|
||||||
|
# Some programs need SUID wrappers
|
||||||
|
programs.mtr.enable = true;
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# enable the OpenSSH daemon
|
||||||
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# firewall configs
|
||||||
|
networking.firewall.allowedTCPPorts = [ 22 ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ ];
|
||||||
|
|
||||||
|
# install state version
|
||||||
|
system.stateVersion = "25.11"; # Don't change
|
||||||
|
}
|
||||||
|
|
||||||
41
hosts/neon/hardware-configuration.nix
Normal file
41
hosts/neon/hardware-configuration.nix
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
# 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 + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" "cryptd" ];
|
||||||
|
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-label/nixcrypt";
|
||||||
|
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-label/nixroot";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-label/nixboot";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [ "fmask=0022" "dmask=0022" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/home" =
|
||||||
|
{ device = "/dev/disk/by-label/nixhome";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-label/nixswap"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
76
hosts/neon/home.nix
Normal file
76
hosts/neon/home.nix
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# user config
|
||||||
|
home.username = "aaron";
|
||||||
|
home.homeDirectory = "/home/aaron";
|
||||||
|
|
||||||
|
# packages
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
fastfetch
|
||||||
|
zip
|
||||||
|
xz
|
||||||
|
unzip
|
||||||
|
p7zip
|
||||||
|
jq
|
||||||
|
mtr
|
||||||
|
iperf3
|
||||||
|
dnsutils
|
||||||
|
ldns
|
||||||
|
socat
|
||||||
|
nmap
|
||||||
|
cowsay
|
||||||
|
file
|
||||||
|
which
|
||||||
|
tree
|
||||||
|
zstd
|
||||||
|
gnupg
|
||||||
|
btop
|
||||||
|
iotop
|
||||||
|
iftop
|
||||||
|
strace
|
||||||
|
ltrace
|
||||||
|
lsof
|
||||||
|
sysstat
|
||||||
|
lm_sensors
|
||||||
|
ethtool
|
||||||
|
pciutils
|
||||||
|
usbutils
|
||||||
|
];
|
||||||
|
|
||||||
|
# configure git
|
||||||
|
programs.git.settings = {
|
||||||
|
enable = true;
|
||||||
|
userName = "aaron";
|
||||||
|
userEmail = "aaron@0x29a.ch";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [ "git" "sudo" "python" "ansible" ];
|
||||||
|
theme = "agnoster";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
## deploy qtile config
|
||||||
|
#home.file."qtile-config" = {
|
||||||
|
# target = ".config/qtile/config.py";
|
||||||
|
# source = "${inputs.qtile-config}/qtile_config/config.py";
|
||||||
|
# force = true;
|
||||||
|
#};
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "vim";
|
||||||
|
};
|
||||||
|
|
||||||
|
# enable home manager
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
|
||||||
|
# don't change
|
||||||
|
home.stateVersion = "25.05";
|
||||||
|
}
|
||||||
7
hosts/neon/noctalia.nix
Normal file
7
hosts/neon/noctalia.nix
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
{ pkgs, inputs, ... }:
|
||||||
|
{
|
||||||
|
# install noctalia package
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user