Merge branch 'main' of github.com:fwastring/nix

This commit is contained in:
fwastring 2025-07-28 10:12:12 +02:00
commit 88a323530b
12 changed files with 75 additions and 68 deletions

View file

@ -1,8 +1,10 @@
# NixOS # NixOS
Ett repo för att hantera konfigurationsfiler för mina datorer. @Wastring
- laptop (Acer Swift 3) - laptop (Acer Swift 3)
- desktop/server (Lenovo ThinkCentre) - desktop (ThinkCentre)
- macmini (2014 MacMini)
@iFACTS
- jobb (Dell Laptop) - jobb (Dell Laptop)
- work-desktop (Lenovo ThinkCentre) - work-desktop (VM @ Proxmox)

View file

@ -29,6 +29,10 @@ in
azure-cli azure-cli
dotnetCorePackages.sdk_8_0_3xx dotnetCorePackages.sdk_8_0_3xx
google-cloud-sdk
jira-cli-go
gh
allure
awscli awscli
unstable.minio-client unstable.minio-client
@ -37,7 +41,6 @@ in
postgresql postgresql
go-migrate-pg go-migrate-pg
argocd argocd
gh
ngrok ngrok
tailwindcss tailwindcss
yarn yarn

40
config/headless-home.nix Normal file
View file

@ -0,0 +1,40 @@
# This is your home-manager configuration file
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
{
inputs,
lib,
config,
pkgs,
myhostname,
...
}:
{
imports = [
../shared/tmux.nix
../shared/fish.nix
../shared/git.nix
../shared/nixpkgs.nix
../shared/lazygit.nix
../shared/ssh.nix
../shared/oh-my-posh.nix
];
nixpkgs = {
overlays = [ ];
config = {
allowUnfree = true;
allowUnfreePredicate = _: true;
};
};
programs.home-manager.enable = true;
programs.fish.enable = true;
programs.man.generateCaches = false;
home.username = "fw";
home.homeDirectory = "/home/fw";
home.stateVersion = "25.05"; # Did you read the comment?
systemd.user.startServices = "sd-switch";
}

View file

@ -19,5 +19,12 @@
dockerfile-language-server-nodejs dockerfile-language-server-nodejs
nodejs_22 nodejs_22
bash-language-server bash-language-server
helm-ls
yaml-language-server
vue-language-server
vtsls
typescript
typescript-language-server
lua-language-server
]; ];
} }

View file

@ -54,7 +54,7 @@
pulseaudio pulseaudio
devour # Swallow windows devour # Swallow windows
caligula # Burn ISOs caligula # Burn ISOs
texliveFull ptouch-print
# Transforms # Transforms
yt-dlp yt-dlp

View file

@ -62,6 +62,7 @@
pass-update pass-update
])) ]))
lazygit lazygit
chawan
# Typesetting # Typesetting
typst typst

View file

@ -189,7 +189,7 @@
}; };
# > Our main home-manager configuration file < # > Our main home-manager configuration file <
modules = [ modules = [
./config/home.nix ./config/headless-home.nix
( (
{ nixpkgs, ... }: { nixpkgs, ... }:
{ {

View file

@ -58,13 +58,6 @@
liveRestore = false; liveRestore = false;
}; };
security.rtkit.enable = true;
services = {
tailscale = {
enable = true;
};
};
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
environment.sessionVariables = { environment.sessionVariables = {
@ -93,30 +86,15 @@
LC_TIME = "sv_SE.UTF-8"; LC_TIME = "sv_SE.UTF-8";
}; };
boot.loader = {
efi = {
canTouchEfiVariables = false;
};
grub = {
efiSupport = true;
efiInstallAsRemovable = true;
device = "nodev";
};
};
console.keyMap = "sv-latin1"; console.keyMap = "sv-latin1";
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
services = {
xserver = {
enable = true;
xkb = {
layout = "se";
variant = "";
};
};
};
networking.hostName = myhostname; networking.hostName = myhostname;
services.xserver.dpi = 140; services.xserver.dpi = 140;
system.stateVersion = "23.11"; system.stateVersion = "25.05";
} }

View file

@ -5,36 +5,27 @@
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/profiles/qemu-guest.nix")
]; ];
boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "nvme" "xhci_pci" "firewire_ohci" "usb_storage" "usbhid" "sd_mod" ]; boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/ab96fcd1-cab1-43e1-aae2-161bd088bb46"; { device = "/dev/disk/by-uuid/a73a76fd-122b-4b72-904c-0c2ab22c36b1";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = swapDevices = [ ];
{ device = "/dev/disk/by-uuid/3F89-6CDD";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/5b889d43-0313-4fa2-ac22-5e303a3efb5b"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction # still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
# networking.interfaces.eno1.useDHCP = lib.mkDefault true; # networking.interfaces.ens18.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;
} }

View file

@ -34,7 +34,6 @@
} }
]; ];
shellAbbrs = { shellAbbrs = {
cat = "bat";
ls = "eza -l --no-time --no-permissions --no-user"; ls = "eza -l --no-time --no-permissions --no-user";
k = "kubectl"; k = "kubectl";
ka = "kubectl apply -f"; ka = "kubectl apply -f";

View file

@ -10,16 +10,12 @@
font = font =
if myhostname == "laptop" then if myhostname == "laptop" then
{ {
# name = "Iosevka Nerd Font Bold";
name = "ComicShannsMono Nerd Font"; name = "ComicShannsMono Nerd Font";
# name = "Hack Nerd Font Mono Bold";
size = 18; size = 18;
} }
else else
{ {
# name = "Iosevka Nerd Font Bold";
name = "ComicShannsMono Nerd Font"; name = "ComicShannsMono Nerd Font";
# name = "Hack Nerd Font Mono Bold";
size = 12; size = 12;
}; };
shellIntegration = { shellIntegration = {
@ -32,15 +28,5 @@
cursor_blink_interval = 0; cursor_blink_interval = 0;
enable_audio_bell = false; enable_audio_bell = false;
}; };
keybindings = {
"ctrl+alt+k" = "launch --location=hsplit --cwd=current";
"ctrl+alt+l" = "launch --location=vsplit --cwd=current";
"ctrl+shift+n" = "next_tab";
"ctrl+shift+b" = "prev_tab";
"ctrl+h" = "neighboring_window left";
"ctrl+l" = "neighboring_window right";
"ctrl+j" = "neighboring_window down";
"ctrl+k" = "neighboring_window up";
};
}; };
} }

View file

@ -32,10 +32,10 @@
bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard' bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard" bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -i -f -selection primary | xclip -i -selection clipboard"
# set -g default-terminal "st-256color" set -g default-terminal "st-256color"
# set -g terminal-overrides "st-256color" set -g terminal-overrides "st-256color"
set -g default-terminal "xterm-kitty" # set -g default-terminal "xterm-kitty"
set -g terminal-overrides "xterm-kitty" # set -g terminal-overrides "xterm-kitty"
set -ga terminal-overrides ",xterm-256color:Tc" set -ga terminal-overrides ",xterm-256color:Tc"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm'