Skip to content

My machine configuration for all my Linux and Mac devices

Notifications You must be signed in to change notification settings

icecreammatt/nixfiles

Repository files navigation

nixfiles

Asahi

Click me
nix build .#asahiConfiguration.asahi.activationPackage
./result/activate

Work x86

Click me
nix build .#darwinConfigurations.mc-2A3MD6R-MBP.system
./result/sw/bin/darwin-rebuild switch --flake . # Use this for the initial build
darwin-rebuild switch --flake . #this will work after initial build

Personal M1

Click me
nix --experimental-features 'flakes nix-command' build .#darwinConfigurations.Bebop.system
nix build .#darwinConfigurations.Bebop.system # the longer version above might be neede for initial install
sudo ./result/activate

./result/sw/bin/darwin-rebuild switch --flake . # Use this for the initial build
darwin-rebuild switch --flake . #this will work after initial build

NixOS | Raspberry Pi & VM & Gaming PC

Click me

Build command will match nix config with machine hostname

sudo nixos-rebuild switch --flake .

Building iso image

nix build .#nixosConfigurations.isoInstaller.config.system.build.isoImage
qemu-img create -f qcow2 example.img 80G
qemu-system-x86_64 -cdrom ./result/iso/nixos-****-linux.iso -drive file=example.img -net nic -net user,hostfwd=tcp::10022-:22 -daemonize -m 8G

nrs (nix rebuild switch)

Once all systems have been built once the nrs alias can be used to "nix rebuilt switch" which works on NixOS, Asahi Linux and OSX. No need to memorize separate commands for each environment. The alias defined in the fish config will pick the correct command depending on if running NixOS, Darwin or Asahi.

Shoutouts

Directory Setup

├── hosts (Computers)
│  ├── asahi (M1 Linux)
│  ├── darwin (MacOS)
│  │  └── hosts
│  │     ├── Bebop
│  │     └── mc-2A3MD6R-MBP
│  └── nixos (NixOS)
│     ├── gaming
│     ├── mini
│     ├── pi4
│     └── vm
├── modules (Programs)
│  ├── DE (Linux Desktop Environments)
│  │  ├── hypr
│  │  ├── rofi
│  │  └── waybar
│  ├── editors
│  │  └── nvim
│  ├── firefox
│  └── shell (CLI tools and dotfiles)
│     ├── bottom
│     ├── broot
│     ├── cava
│     ├── kitty
│     ├── lazygit
│     ├── neofetch
│     ├── scripts
│     ├── wezterm
│     └── xplr
└── overlay (Customizations and Overlays)
   ├── nnn
   └── worm

Old Package Versions

Click me Finding older versions by using commit hash and then convert url into

Firefox

about:config

  • mousewheel.default.delta_multiplier_(X,Y,Z) = 15

Keyboard login screen fix SDDM / KDE Plasma

Use Colemak DH on login screen

localectl --no-convert set-x11-keymap us apple_laptop colemak_dh
  • Troubleshooting
cat /etc/X11/xorg.conf.d/00-keyboard.conf
cat /etc/vconsole.conf
localectl list-x11-keymap-variants
localectl list-x11-keymap-layouts

Fixing error for mistyped commands

https://evanrelf.com/nixos-fix-command-not-found-database-file-error/

DBI connect('dbname=/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite','',...) failed: unable to open database file at /run/current-system/sw/bin/command-not-found line 13.
cannot open database `/nix/var/nix/profiles/per-user/root/channels/nixos/programs.sqlite' at /run/current-system/sw/bin/command-not-found line 13.
$ sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
$ sudo nix-channel --update nixos

About

My machine configuration for all my Linux and Mac devices

Resources

Stars

Watchers

Forks

Packages

No packages published