Compare commits
3 Commits
fab7ceefe8
...
ef82b13831
| Author | SHA1 | Date | |
|---|---|---|---|
| ef82b13831 | |||
| 6e5778b4d5 | |||
| 10a3bb165d |
21
README.md
21
README.md
@ -23,7 +23,7 @@
|
||||
|
||||
## Build and deploy
|
||||
|
||||
### Automatic installation
|
||||
### Automatic installation **Recommended**
|
||||
|
||||
- Use this one command on system with NixOS installed
|
||||
- This will download script with installation commands
|
||||
@ -32,28 +32,25 @@
|
||||
nix-shell -p git --command "nix run --experimental-features 'nix-command flakes' git+https://git.foglar.tech/foglar/dotfiles"
|
||||
```
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Ultimately, I can’t gaurantee this will work for anyone other than myself, so use this at your own discretion.
|
||||
|
||||
### Manual installation
|
||||
|
||||
- Build and install with ssmple command:
|
||||
|
||||
```bash
|
||||
nix run git+https://git.foglar.tech/foglar/dotfiles.git
|
||||
```
|
||||
|
||||
- simple build command for system using kogami profile
|
||||
- Simple build command using kogami profile
|
||||
|
||||
```bash
|
||||
git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/.dotfiles
|
||||
sudo nixos-rebuild switch --flake ~/.dotfiles#kogami --update # To update flake.lock file
|
||||
```
|
||||
|
||||
- generate a vm of the flake with this command
|
||||
- Generate a vm of the flake with this command
|
||||
|
||||
```bash
|
||||
nix run github:nix-community/nixos-generators -- -c ./flake.nix --flake '#ginoza' -f vm --disk-size 20480
|
||||
```
|
||||
|
||||
- deploy configuration on the new system
|
||||
- Deploy configuration on the new system
|
||||
|
||||
```bash
|
||||
# Copy my repository
|
||||
@ -126,7 +123,7 @@ nix-shell nixpkgs#age -c age-keygen -o ~/.config/sops/age/keys.txt
|
||||
```
|
||||
|
||||
- Secrets are managed in yaml file [secrets.yaml](./nixos/system/packages/sops/secrets/secrets.yaml)
|
||||
- Things that are actually managed in sops configuration:
|
||||
- Things that are managed in sops configuration:
|
||||
- SSH keys
|
||||
- Passwords
|
||||
- Yubikey ID
|
||||
@ -186,7 +183,7 @@ nvim /nixos/system/packages/ssh-client.nix
|
||||
|
||||
- [EmergentMind's Nix-Config](https://github.com/EmergentMind/nix-config) - explanation of Yubikey setup and declarative configuration of SSH keys
|
||||
- [YT video](https://www.youtube.com/watch?v=3CeXbONjIgE)
|
||||
- [LibrePhoenix's Nix-Config](https://github.com/librephoenix/nixos-config) - if else options and modular control center
|
||||
- [LibrePhoenix's Nix-Config](https://github.com/librephoenix/nixos-config) - if else options, modular control center, one line installation
|
||||
- [YT video about modular control center](https://www.youtube.com/watch?v=H_Qct7TVB6o)
|
||||
- [YT video about if else options](https://www.youtube.com/watch?v=Qull6TMQm4Q)
|
||||
- [YT video about install with one command](https://www.youtube.com/watch?v=20BN4gqHwaQ&t=2025s)
|
||||
|
||||
9
TODO.md
9
TODO.md
@ -22,19 +22,22 @@
|
||||
- [x] fix wlogout
|
||||
- [x] cleanup hyprland subtools (rofi, hyprlock, waybar)
|
||||
- [x] fix rofi cliboard manager by moving it into separate file managed by nix
|
||||
- [x] nix-on-droid
|
||||
- [x] stylix make in one place and check for each program if it is enabled (tmux)
|
||||
- [ ] neovim
|
||||
- [ ] librewolf and firefox fix, extensions and bookmarks in librewolf
|
||||
- [ ] modularize hyprland config into multiple files
|
||||
- [ ] consider moving nh config helper into module
|
||||
- [ ] make static background folder and figure out how to simply manage backgrounds across my devices
|
||||
- [ ] fix plasma manager and extend gnome configuration
|
||||
- [ ] nix-on-droid
|
||||
- [ ] ssh public key deployment
|
||||
- [ ] consider moving userSettings from flake.nix to each profile
|
||||
- [ ] add grub bootloader to configuration
|
||||
- [ ] stylix make in one place and check for each program if it is enabled (tmux)
|
||||
- [ ] add grub bootloader to configuration (and theme)
|
||||
- [ ] distinguish between profiles and decide which version of nixpkgs it should use (my notebook unstable, server stable ...)
|
||||
- [ ] check nvtop if nvidia is enabled
|
||||
- [ ] add notification management for bluetooth etc...
|
||||
- [ ] add syncthing configuration
|
||||
- [ ] qutebrowser configuration
|
||||
|
||||
- [ ] update my home page and create new web
|
||||
- [ ] fix kde theme in stylix
|
||||
|
||||
66
flake.lock
66
flake.lock
@ -128,11 +128,11 @@
|
||||
},
|
||||
"locked": {
|
||||
"dir": "pkgs/firefox-addons",
|
||||
"lastModified": 1735736119,
|
||||
"narHash": "sha256-LlFTsG0yk8OZ+HjuxnpEzliG0bf+BEWLvKHQZkFtQ+U=",
|
||||
"lastModified": 1735902745,
|
||||
"narHash": "sha256-Jc4QaD2ay04ogn8XND8WLcs4ZsBBlk4j50OK+0AFFJ4=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "4da6d4129925b1884cf0d1eb79ba6983abfa6933",
|
||||
"rev": "bb5bbc46eb380d3a9bd12e5f7fdd171c65280a8a",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
@ -284,11 +284,11 @@
|
||||
"zig": "zig"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735689283,
|
||||
"narHash": "sha256-LOZRScnB8Q9ylmlXnt2j2v4Aj1b5JZTdSeKYaFL1RDw=",
|
||||
"lastModified": 1735875799,
|
||||
"narHash": "sha256-EI6C+CRmfHqkjnp0aJxYb/pTImwb5FZOu1HWHnnZsOc=",
|
||||
"owner": "ghostty-org",
|
||||
"repo": "ghostty",
|
||||
"rev": "60611b8a4a1d5b3c1097cce85eb0311de0696cfa",
|
||||
"rev": "e2f9eb6a6f4dc2108f91293938374c0ed314dcb8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -343,11 +343,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735745492,
|
||||
"narHash": "sha256-Vs2IkQx4uDv2YehZ1sCw9K+kuMrBa3opnkGJJhMPNPo=",
|
||||
"lastModified": 1735900408,
|
||||
"narHash": "sha256-U+oZBQ3f5fF2hHsupKQH4ihgTKLHgcJh6jEmKDg+W10=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "9a9fef316ad191b3086edda465e850af282de4e0",
|
||||
"rev": "1c8d4c8d592e8fab4cff4397db5529ec6f078cf9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -385,11 +385,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1733085484,
|
||||
"narHash": "sha256-dVmNuUajnU18oHzBQWZm1BQtANCHaqNuxTHZQ+GN0r8=",
|
||||
"lastModified": 1735774425,
|
||||
"narHash": "sha256-C73gLFnEh8ZI0uDijUgCDWCd21T6I6tsaWgIBHcfAXg=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "c1fee8d4a60b89cae12b288ba9dbc608ff298163",
|
||||
"rev": "5f6aa268e419d053c3d5025da740e390b12ac936",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -474,11 +474,11 @@
|
||||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735748884,
|
||||
"narHash": "sha256-+0Fl1mesL6RJ9Z8jjQtRgdW6R0C4Ptmm89yZJCOyMgM=",
|
||||
"lastModified": 1735851503,
|
||||
"narHash": "sha256-r5FFHhiZZOOlzWsS06oz+7MKpjJydDXsD9N2NcKFSjE=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "7f177fa1cf3d8ede2841cdbbbdb7acaf27e40d57",
|
||||
"rev": "f3c49c1295126c2154ee800ceedb48b79451840c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -499,11 +499,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1728345020,
|
||||
"narHash": "sha256-xGbkc7U/Roe0/Cv3iKlzijIaFBNguasI31ynL2IlEoM=",
|
||||
"lastModified": 1735734474,
|
||||
"narHash": "sha256-9OV4lOqrEJVLdOrpNN/9msNwAhI6FQTu4N7fufilG08=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "hyprland-protocols",
|
||||
"rev": "a7c183800e74f337753de186522b9017a07a8cee",
|
||||
"rev": "271df559dd30e4bc5ec6af02d017ac0aaabd63a7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -650,11 +650,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735547435,
|
||||
"narHash": "sha256-Gf6EuiKaxINuVYfDH4NQ8+WJWHovz2SUTa3WaKS0GlI=",
|
||||
"lastModified": 1735774660,
|
||||
"narHash": "sha256-g/9+jzWvu73YPHw9AB/yVCDSld7GdovliAUkfVP7YU0=",
|
||||
"owner": "Mic92",
|
||||
"repo": "nix-ld",
|
||||
"rev": "2cfdb1f527f060d215ba284348e46c8678512b71",
|
||||
"rev": "5f12c696cae384350f95f2af9dffe39ee0e445e5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -789,11 +789,11 @@
|
||||
},
|
||||
"nixpkgs-stable_3": {
|
||||
"locked": {
|
||||
"lastModified": 1735531152,
|
||||
"narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=",
|
||||
"lastModified": 1735669367,
|
||||
"narHash": "sha256-tfYRbFhMOnYaM4ippqqid3BaLOXoFNdImrfBfCp4zn0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b",
|
||||
"rev": "edf04b75c13c2ac0e54df5ec5c543e300f76f1c9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -962,11 +962,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735468296,
|
||||
"narHash": "sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8=",
|
||||
"lastModified": 1735844895,
|
||||
"narHash": "sha256-CIRlqX9tBK2awJkmVu2cKuap/0QziDXStQZ/u/+e8Z4=",
|
||||
"owner": "Mic92",
|
||||
"repo": "sops-nix",
|
||||
"rev": "bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27",
|
||||
"rev": "24d89184adf76d7ccc99e659dc5f3838efb5ee32",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -983,11 +983,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735704986,
|
||||
"narHash": "sha256-ExCFptQk7nPPDOopYGo3lTqXb+0Hr+vt1yG158hbCb0=",
|
||||
"lastModified": 1735877772,
|
||||
"narHash": "sha256-6OT4xYCwZTJ9qK28NNM98ibFZinwrJK/sRlg+dDqdJs=",
|
||||
"owner": "Gerg-L",
|
||||
"repo": "spicetify-nix",
|
||||
"rev": "11f711f1cb90f8b07ea735bd411c50b0abd850e8",
|
||||
"rev": "0227d83d2eb29189b8ed8d180e2442ada633dd0d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -1015,11 +1015,11 @@
|
||||
"tinted-tmux": "tinted-tmux"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1735664732,
|
||||
"narHash": "sha256-KoXLDDDT/nMBMl6VtoAGxJ58COvT+SWL5aiR+hUPBUo=",
|
||||
"lastModified": 1735864066,
|
||||
"narHash": "sha256-V1JmPXW3vmxCuvf+IItGlLgBH8rolUahCMFyglxy19s=",
|
||||
"owner": "danth",
|
||||
"repo": "stylix",
|
||||
"rev": "f48cab39ba162c5eaef3d975aaac467c20db402b",
|
||||
"rev": "0ce2a52decf36d815065f8cda06586ed59ed3ef7",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
||||
32
install.sh
32
install.sh
@ -1,26 +1,46 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Running script"
|
||||
|
||||
if [ $# -gt 0 ]; then
|
||||
SCRIPT_DIR=$1
|
||||
else
|
||||
SCRIPT_DIR=~/.dotfiles
|
||||
fi
|
||||
|
||||
nix-shell -p git --command "git clone https://git.foglar.tech/foglar/dotfiles.git $SCRIPT_DIR"
|
||||
if [ -d $SCRIPT_DIR ]; then
|
||||
gum confirm "The directory $SCRIPT_DIR already exists. Do you want to delete it?" && yes | rm -rv $SCRIPT_DIR
|
||||
fi
|
||||
|
||||
nixos_profile=$(gum choose kogami ginoza tsunemori)
|
||||
download_wallpapers=$(gum confirm "Do you want to download wallpapers (it may take longer)?" && echo true || echo false)
|
||||
|
||||
if [ -d $SCRIPT_DIR ]; then
|
||||
gum warn "The directory $SCRIPT_DIR already exists. Downloading updates..."
|
||||
cd $SCRIPT_DIR && git pull
|
||||
else
|
||||
nix-shell -p git --command "git clone https://git.foglar.tech/foglar/dotfiles.git $SCRIPT_DIR"
|
||||
fi
|
||||
|
||||
sudo nixos-generate-config --show-hardware-config >$SCRIPT_DIR/kogami/hardware-configuration.nix
|
||||
gum log --structured --level info "Creating hardware configuration..." file $SCRIPT_DIR/kogami/hardware-configuration.nix
|
||||
sudo nixos-generate-config --show-hardware-config >$SCRIPT_DIR/ginoza/hardware-configuration.nix
|
||||
gum log --structured --level info "Creating hardware configuration..." file $SCRIPT_DIR/kogami/hardware-configuration.nix
|
||||
|
||||
# Username
|
||||
sed -i "0,/shinya/s//$(whoami)/" $SCRIPT_DIR/flake.nix
|
||||
gum log --structured --level info "Setting user name in flake.nix..." file $SCRIPT_DIR/flake.nix
|
||||
# Set hostname by selected profile
|
||||
sed -i "0,/kogami/s//$profile/" $SCRIPT_DIR/flake.nix
|
||||
gum log --structured --level info "Setting hostname in flake.nix..." file $SCRIPT_DIR/flake.nix
|
||||
# Set dotfiles path as $SCRIPT_DIR path
|
||||
|
||||
# Editor
|
||||
if [ -z $EDITOR ]; then
|
||||
EDITOR=nano
|
||||
fi
|
||||
gum log --structured --level info "Opening flake.nix in $EDITOR..." file $SCRIPT_DIR/flake.nix
|
||||
$EDITOR $SCRIPT_DIR/flake.nix
|
||||
|
||||
profile=$(gum choose kogami ginoza)
|
||||
gum log --structured --level info "Building configuration for $profile..." profile $profile
|
||||
sudo nixos-rebuild build --flake $SCRIPT_DIR#"${profile}"
|
||||
|
||||
gum confirm "Do you want to switch to the new configuration?" && sudo nixos-rebuild switch --flake $SCRIPT_DIR#"${profile}"
|
||||
gum confirm "Do you want to reboot now?" && systemctl reboot || echo "Please reboot later, to switch to the new configuration"
|
||||
gum confirm "Do you want to reboot now?" && systemctl reboot || gum log "Please reboot later, to switch to the new configuration"
|
||||
|
||||
@ -25,6 +25,7 @@
|
||||
ranger
|
||||
unzip
|
||||
fd
|
||||
imagemagick # convert images from formats like jpg, png, etc.
|
||||
]
|
||||
++ (
|
||||
if pkgs.system == "x86_64-linux"
|
||||
|
||||
@ -47,25 +47,6 @@
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
stylix.iconTheme = {
|
||||
enable = true;
|
||||
package = pkgs.papirus-icon-theme;
|
||||
dark = "Papirus-Dark";
|
||||
};
|
||||
|
||||
stylix.targets = {
|
||||
dunst.enable = true;
|
||||
kde.enable = true;
|
||||
gtk.enable = true;
|
||||
|
||||
waybar = {
|
||||
enable = true;
|
||||
enableCenterBackColors = false;
|
||||
enableLeftBackColors = false;
|
||||
enableRightBackColors = false;
|
||||
};
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
enable = true;
|
||||
|
||||
|
||||
@ -56,10 +56,4 @@
|
||||
btop.enable = lib.mkDefault true;
|
||||
fzf.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
alejandra
|
||||
nh
|
||||
nixd
|
||||
];
|
||||
}
|
||||
|
||||
@ -23,8 +23,12 @@
|
||||
./tools/kitty.nix
|
||||
./tools/tmux.nix
|
||||
./tools/zoxide.nix
|
||||
|
||||
./style.nix
|
||||
];
|
||||
|
||||
style.enable = true;
|
||||
|
||||
sh.bash = {
|
||||
enable =
|
||||
if userSettings.shell == "bash"
|
||||
@ -97,16 +101,8 @@
|
||||
fzf.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
stylix.targets = {
|
||||
bat.enable = lib.mkDefault true;
|
||||
btop.enable = lib.mkDefault true;
|
||||
fzf.enable = lib.mkDefault true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
alejandra
|
||||
nh
|
||||
nixd
|
||||
];
|
||||
|
||||
home.file = {
|
||||
|
||||
@ -161,6 +161,10 @@
|
||||
programs.vscode.extensions = with pkgs-stable.vscode-extensions; [
|
||||
jnoortheen.nix-ide
|
||||
];
|
||||
home.packages = with pkgs-stable; [
|
||||
alejandra
|
||||
nixd
|
||||
];
|
||||
})
|
||||
|
||||
(lib.mkIf config.program.vscode.ide.web.enable {
|
||||
@ -189,6 +193,10 @@
|
||||
github.vscode-pull-request-github
|
||||
github.vscode-github-actions
|
||||
];
|
||||
|
||||
programs.vscode.userSettings = {
|
||||
"git.autofetch" = true;
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf config.program.vscode.markdown.enable {
|
||||
|
||||
@ -14,12 +14,15 @@
|
||||
enable = true;
|
||||
userName = "${userSettings.username}";
|
||||
userEmail = "kohout.fi.2023@skola.ssps.cz";
|
||||
lfs.enable = true;
|
||||
};
|
||||
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
git
|
||||
github-cli
|
||||
git-lfs
|
||||
git-credential-manager
|
||||
]
|
||||
++ (
|
||||
if pkgs.system == "x86_64-linux"
|
||||
|
||||
43
nixos/home/packages/style.nix
Normal file
43
nixos/home/packages/style.nix
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
options = {
|
||||
style.enable = lib.mkEnableOption "style";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.style.enable {
|
||||
stylix.iconTheme = {
|
||||
enable = true;
|
||||
package = pkgs.papirus-icon-theme;
|
||||
dark = "Papirus-Dark";
|
||||
};
|
||||
|
||||
stylix.targets = {
|
||||
bat.enable = lib.mkDefault true;
|
||||
btop.enable = lib.mkDefault true;
|
||||
fzf.enable = lib.mkDefault true;
|
||||
|
||||
tmux.enable =
|
||||
if config.program.tmux.enable
|
||||
then lib.mkDefault true
|
||||
else lib.mkDefault false;
|
||||
dunst.enable =
|
||||
if config.desktop.hyprland.enable
|
||||
then lib.mkDefault true
|
||||
else lib.mkDefault false;
|
||||
|
||||
kde.enable = true;
|
||||
gtk.enable = true;
|
||||
|
||||
waybar = {
|
||||
enable = true;
|
||||
enableCenterBackColors = false;
|
||||
enableLeftBackColors = false;
|
||||
enableRightBackColors = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@ -9,8 +9,6 @@
|
||||
};
|
||||
|
||||
config = lib.mkIf config.program.tmux.enable {
|
||||
#stylix.targets.tmux.enable = true;
|
||||
|
||||
programs.tmux = {
|
||||
enable = true;
|
||||
clock24 = true;
|
||||
|
||||
@ -12,10 +12,8 @@
|
||||
};
|
||||
|
||||
sh.zsh = {
|
||||
enable =
|
||||
true;
|
||||
oh-my-posh.enable =
|
||||
true;
|
||||
enable = true;
|
||||
oh-my-posh.enable = true;
|
||||
};
|
||||
|
||||
sh.oh-my-posh.enable = true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user