1
0
Fork 0
mirror of https://github.com/Horhik/dotfiles.git synced 2024-11-22 00:11:27 +00:00

return to nixos

This commit is contained in:
horhik 2021-08-26 09:47:50 +03:00
parent f4ad8bd499
commit 3d4698b954
9 changed files with 60 additions and 8 deletions

43
nix/README.md Normal file
View file

@ -0,0 +1,43 @@
# NixOS setup
1. Backup your old config
```bash
$ sudo mv /etc/nixos /etc/nixos.old
```
2. Copy repo and symlink new config from dotfiles
```bash
$ git clone https://github.com/horhik/dotfiles
$ cd dotfiles
$ sudo ln -s $HOME/dotfiles/nix /etc/nixos
```
3. Past your hardware-configuration
```bash
$ sudo cp /etc/nixos.old/hardware-configuration.nix /etc/nixos/
```
4. Install home-manager
```bash
$ nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
$ nix-channel --update
$ nix-channel --add https://github.com/nix-community/home-manager/archive/release-21.05.tar.gz home-manager
$ nix-channel --update
export NIX_PATH=$HOME/.nix-defexpr/channels${NIX_PATH:+:}$NIX_PATH
$ nix-shell '<home-manager>' -A install
```
5. Copy dotfiles
```bash
stow --adopt -vt ~ $HOME/dotfiles/home/*
```
6. Build nixos
```bash
cd /etc/nixos
sudo nixos-rebuild build --flake "#."
```

View file

@ -121,7 +121,7 @@
mononoki fontmatrix
firefox
connman
wpa_supplicant python3 xkblayout-state acpi yaru-theme
wpa_supplicant python3 xkblayout-state acpi yaru-theme xkb-switch
pipewire pulsemixer nerdfonts
feh compton ninja meson cmake
anki clang_12 zathura redshift rustup neofetch tree
@ -131,6 +131,7 @@
spotify obsidian discord
nfs-utils cifs-utils
nfs-ganesha
transmission
];
# Some programs need SUID wrappers, can be configured further or are
@ -219,7 +220,7 @@
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
sha256 = "0c2p2ycx6c50rzfd5k56cc411cb0ilhc3zyhhxlwcjnz1ysn5laj";
sha256 = "039kk45r6pqsfd865lgfiwbaqlpll4p9pmndbzhi6l5w5r8dbabm";
}))
];
}

View file

@ -74,9 +74,12 @@
imports = [
./modules/picom.nix
./modules/tmux.nix
./modules/bspwm
];
};
})
{ nixpkgs.overlays = overlays; }
];
inherit pkgs;
};

View file

@ -14,17 +14,17 @@
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/1dd41f8e-142f-4799-a5e5-cc916cf016c1";
{ device = "/dev/disk/by-uuid/906b2b92-4e31-4a91-938f-14ac752dffe7";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/7555-74BA";
{ device = "/dev/disk/by-uuid/8200-D543";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/4d03f0d2-c4d2-4f50-9b0c-86ab4df15cfd"; }
[ { device = "/dev/disk/by-uuid/98b5b158-730a-470c-95f1-d8a32ebff9ad"; }
];
}

5
nix/modules/bspwm.nix Normal file
View file

@ -0,0 +1,5 @@
{ pkgs, ... }:
{
services.xserver.windowManager.bspwm.enable = true;
home.packages = [pkgs.sxhdkd];
}

View file

@ -74,7 +74,7 @@
rounded-corners-exclude = [
"window_type = 'dock'",
"_NET_WM_STATE@:32a *= '_NET_WM_STATE_FULLSCREEN'",
"class_g = 'keynav'",
"class_g = 'keynav'"
];
round-borders = 0;
round-borders-exclude = [

View file

@ -1,8 +1,8 @@
{config, pkgs, ...}:
programs.tmux = {
{
enable = true;
clock24 = true;
extraPackages = tmuxPlugins : [tmux-gruvbox.gruvbox ];
home.packages = [pkgs.tmuxPlugins.gruvbox ];
extraTmuxConf = ''
set -g @plugin 'egel/tmux-gruvbox'
set -g @tmux-gruvbox 'dark' # or 'light'