mirror of
https://github.com/semere-meb/dotfiles-nix.git
synced 2026-08-03 10:24:36 +00:00
initial dendritic migration
This commit is contained in:
parent
86fe70288b
commit
168633cf07
12 changed files with 254 additions and 147 deletions
36
modules/core.nix
Normal file
36
modules/core.nix
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.dotfiles.core;
|
||||
in
|
||||
{
|
||||
options.dotfiles.core = {
|
||||
enable = lib.mkEnableOption "Core system configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
services.power-profiles-daemon.enable = true;
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "26.05";
|
||||
};
|
||||
}
|
||||
11
modules/default.nix
Normal file
11
modules/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./core.nix
|
||||
./user.nix
|
||||
./desktop.nix
|
||||
./dev.nix
|
||||
./shell.nix
|
||||
];
|
||||
}
|
||||
53
modules/desktop.nix
Normal file
53
modules/desktop.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.dotfiles.desktop;
|
||||
in
|
||||
{
|
||||
options.dotfiles.desktop = {
|
||||
enable = lib.mkEnableOption "Graphical desktop environment (DWL)";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
programs.dwl.enable = true;
|
||||
programs.dwl.package = pkgs.dwl.override {
|
||||
configH = ../hosts/nabro/dwl-config.h;
|
||||
};
|
||||
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
pulse.enable = true;
|
||||
alsa.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.jetbrains-mono
|
||||
];
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
security.polkit.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
pamixer
|
||||
brightnessctl
|
||||
wl-clipboard
|
||||
wmenu
|
||||
fnott
|
||||
foot
|
||||
firefox
|
||||
tor-browser
|
||||
];
|
||||
|
||||
home-manager.users.semere = {
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
font = "JetBrainsMono Nerd Font:size=11";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
25
modules/dev.nix
Normal file
25
modules/dev.nix
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.dotfiles.dev;
|
||||
in
|
||||
{
|
||||
options.dotfiles.dev = {
|
||||
enable = lib.mkEnableOption "Development tools and language servers";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
gcc
|
||||
gnumake
|
||||
clang-tools
|
||||
lldb
|
||||
python3
|
||||
uv
|
||||
ruff
|
||||
ty
|
||||
nil
|
||||
nixd
|
||||
];
|
||||
};
|
||||
}
|
||||
72
modules/shell.nix
Normal file
72
modules/shell.nix
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.dotfiles.shell;
|
||||
in
|
||||
{
|
||||
options.dotfiles.shell = {
|
||||
enable = lib.mkEnableOption "Shell, Git, GPG, and CLI environment";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
wget
|
||||
tree
|
||||
tealdeer
|
||||
gnupg
|
||||
pass
|
||||
p7zip
|
||||
btop
|
||||
helix
|
||||
opencode
|
||||
];
|
||||
|
||||
home-manager.users.semere = {
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "Semere M. Mebrahtom";
|
||||
email = "semere.meharena1@gmail.com";
|
||||
};
|
||||
commit.gpgsign = true;
|
||||
gpg.program = "gpg";
|
||||
};
|
||||
signing = {
|
||||
key = "451054EEC0D2AFD1741D4E6A7FC937214DF30488";
|
||||
signByDefault = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 1800;
|
||||
enableSshSupport = true;
|
||||
pinentry.package = pkgs.pinentry-curses;
|
||||
};
|
||||
|
||||
programs.bash = {
|
||||
enable = true;
|
||||
shellAliases = {
|
||||
ll = "ls -lha";
|
||||
};
|
||||
};
|
||||
|
||||
programs.fzf = {
|
||||
enable = true;
|
||||
enableBashIntegration = true;
|
||||
};
|
||||
|
||||
programs.helix = {
|
||||
enable = true;
|
||||
settings = {
|
||||
editor = {
|
||||
line-numbers = "relative";
|
||||
lsp.display-messages = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
26
modules/user.nix
Normal file
26
modules/user.nix
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
cfg = config.dotfiles.user;
|
||||
in
|
||||
{
|
||||
options.dotfiles.user = {
|
||||
enable = lib.mkEnableOption "User configuration";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.semere = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [
|
||||
"wheel"
|
||||
"networkmanager"
|
||||
];
|
||||
};
|
||||
|
||||
home-manager.users.semere = {
|
||||
home.username = "semere";
|
||||
home.homeDirectory = "/home/semere";
|
||||
home.stateVersion = "26.05";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue