mirror of
https://github.com/szymon-jozef/amazing-dotfiles.git
synced 2026-09-07 12:10:45 +02:00
some flake magic or something
This commit is contained in:
10
README.md
10
README.md
@@ -23,11 +23,15 @@ Then I created [superior dotfiles](https://github.com/szymon-jozef/superior_dotf
|
||||
As of today I'm using this repo with home manager. I'm still trying stuff out, but it looks pretty good right now.
|
||||
|
||||
# How to try this out?
|
||||
I guess you should [install home manager](https://nix-community.github.io/home-manager/index.xhtml#sec-install-standalone). You can do it on *any* distro! Then you just copy this repo to `~/.config/home-manager` and run
|
||||
I guess you should [install home manager](https://nix-community.github.io/home-manager/index.xhtml#sec-install-standalone). You can do it on *any* distro, but I only use Arch, so I don't guarantee it will work elsewhere. To try it out just copy this repo to `~/.config/home-manager`, cd there and then run:
|
||||
## On NixOS
|
||||
```bash
|
||||
home-manager switch -b backup
|
||||
home-manager switch --flake .#nixos -b backup
|
||||
```
|
||||
## On Arch
|
||||
```bash
|
||||
home-manager switch --flake .#arch -b backup
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
I hope you'll enjoy it, if you for whatever reason want to try this random ass dotfiles found on the internet…
|
||||
|
||||
41
flake.nix
41
flake.nix
@@ -18,17 +18,42 @@
|
||||
catppuccin,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
user = "szymon";
|
||||
# for git
|
||||
email = "szymon_jozef@proton.me";
|
||||
full_name = "Szymon P";
|
||||
in
|
||||
{
|
||||
homeConfigurations = {
|
||||
"arch" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
extraSpecialArgs = {
|
||||
isNixOS = false;
|
||||
username = user;
|
||||
email = email;
|
||||
full_name = full_name;
|
||||
};
|
||||
modules = [
|
||||
./home.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
];
|
||||
|
||||
homeConfigurations."szymon" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
|
||||
modules = [
|
||||
./home.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
];
|
||||
"nixos" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
extraSpecialArgs = {
|
||||
isNixOS = true;
|
||||
username = user;
|
||||
email = email;
|
||||
full_name = full_name;
|
||||
};
|
||||
modules = [
|
||||
./home.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
17
home.nix
17
home.nix
@@ -1,10 +1,17 @@
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
isNixOS,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "szymon";
|
||||
home.homeDirectory = "/home/szymon";
|
||||
home.username = username;
|
||||
home.homeDirectory = "/home/${username}";
|
||||
|
||||
home.file."test-os.txt".text = if isNixOS then "this is nixos" else "this is arch";
|
||||
|
||||
nix = {
|
||||
package = pkgs.nix;
|
||||
@@ -60,10 +67,6 @@
|
||||
VISUAL = "nvim";
|
||||
};
|
||||
|
||||
home.sessionPath = [
|
||||
"/home/szymon/.lmstudio/bin"
|
||||
];
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{ ... }:
|
||||
{ lib, isNixOS, ... }:
|
||||
|
||||
{
|
||||
programs.ashell = {
|
||||
enable = true;
|
||||
package = null;
|
||||
package = lib.mkIf (!isNixOS) null;
|
||||
settings = {
|
||||
outputs = {
|
||||
Targets = [ "DP-1" ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pgks, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.atuin = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{ isNixOS, ... }:
|
||||
|
||||
{
|
||||
programs.fish = {
|
||||
@@ -42,7 +42,9 @@
|
||||
|
||||
set -l rel_file (realpath --relative-to=$config_dir $file)
|
||||
|
||||
if home-manager switch -b backup
|
||||
if home-manager switch --flake "$config_dir#${
|
||||
if isNixOS then "nixos" else "arch"
|
||||
}" -b backup
|
||||
git add -A
|
||||
set commit_msg "update: $rel_file"
|
||||
git commit -m "$commit_msg"
|
||||
|
||||
@@ -1,4 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
full_name,
|
||||
email,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
@@ -9,8 +14,8 @@
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "Szymon P";
|
||||
email = "szymon_jozef@proton.me";
|
||||
name = full_name;
|
||||
email = email;
|
||||
};
|
||||
init.defaultBranch = "master";
|
||||
push.autoSetupRemote = true;
|
||||
@@ -18,7 +23,7 @@
|
||||
};
|
||||
|
||||
signing = {
|
||||
key = "szymon_jozef@proton.me";
|
||||
key = email;
|
||||
signByDefault = true;
|
||||
};
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{ lib, ... }:
|
||||
{ lib, isNixOS, ... }:
|
||||
|
||||
{
|
||||
programs.kitty = lib.mkForce {
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
package = null;
|
||||
package = lib.mkIf (!isNixOS) null;
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
dynamic_background_opacity = true;
|
||||
|
||||
@@ -1,15 +1,20 @@
|
||||
{ ... }:
|
||||
{
|
||||
lib,
|
||||
isNixOS,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
programs.satty = {
|
||||
enable = true;
|
||||
package = null;
|
||||
package = lib.mkIf (!isNixOS) null;
|
||||
settings = {
|
||||
general = {
|
||||
fullscreen = true;
|
||||
early-exit = true;
|
||||
initial-tool = "crop";
|
||||
output-filename = "/home/szymon/Obrazy/zrzuty/%d-%m-%Y_%H:%M:%S.png";
|
||||
output-filename = "/home/${username}/Obrazy/zrzuty/%d-%m-%Y_%H:%M:%S.png";
|
||||
save-after-copy = true;
|
||||
disable-notifications = false;
|
||||
actions-on-escape = [ "exit" ];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ args, ... }:
|
||||
{ username, ... }:
|
||||
|
||||
{
|
||||
services.ssh-agent.enable = true;
|
||||
@@ -10,13 +10,13 @@
|
||||
matchBlocks = {
|
||||
"dmowski" = {
|
||||
hostname = "192.168.0.30";
|
||||
user = "szymon";
|
||||
user = username;
|
||||
port = 22;
|
||||
identityFile = "~/.ssh/dmowski";
|
||||
};
|
||||
|
||||
"aur.archlinux.org" = {
|
||||
user = "szymon";
|
||||
user = username;
|
||||
identityFile = "~/.ssh/aur";
|
||||
};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pgks, ... }:
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.yazi = {
|
||||
|
||||
Reference in New Issue
Block a user