Compare commits
5 Commits
1a4ee743e4
...
a56fc0c35f
| Author | SHA1 | Date | |
|---|---|---|---|
| a56fc0c35f | |||
| ec4abe0496 | |||
| 277779202d | |||
| 4cf3e09d41 | |||
| 1d2edfb87f |
23
README.md
23
README.md
@ -1,14 +1,33 @@
|
|||||||
# dotfiles
|
# dotfiles
|
||||||
|
|
||||||
- my personal nix dotfiles in flake
|
- my personal nix dotfiles in the **flake**
|
||||||
|
|
||||||
|
- simple build command for system
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/dotfiles --depth 1
|
git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/dotfiles
|
||||||
sudo nixos-rebuild switch --flake ~/dotfiles#laptop
|
sudo nixos-rebuild switch --flake ~/dotfiles#laptop
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- generate a vm of the flake with this command
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
nix run github:nix-community/nixos-generators -- -c ./flake.nix --flake '#leanix' -f vm --disk-size 20480
|
nix run github:nix-community/nixos-generators -- -c ./flake.nix --flake '#leanix' -f vm --disk-size 20480
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- deploy configuration on the new system
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Copy my repository
|
||||||
|
git clone https://git.foglar.tech/foglar/dotfiles.git $HOME/dotfiles --depth 1
|
||||||
|
|
||||||
|
# Generate your own hardware configurations for system
|
||||||
|
sudo nixos-generate-config --dir ~/dotfiles/zenith
|
||||||
|
# or
|
||||||
|
sudo nixos-generate-config --dir ~/dotfiles/leanix
|
||||||
|
|
||||||
|
# Rebuild your system from the flake
|
||||||
|
sudo nixos-rebuild switch --flake ~/dotfiles#zenith
|
||||||
|
```
|
||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|||||||
31
TODO.md
31
TODO.md
@ -1,11 +1,24 @@
|
|||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
- [ ] Wallpaper switch
|
- [x] wallpaper switch
|
||||||
- [x] Keyboard switch
|
- [x] keyboard switch
|
||||||
- [x] Waybar fix
|
- [x] waybar fix
|
||||||
- [x] Rofi config
|
- [x] rofi config
|
||||||
- [ ] Cliphist manager fix
|
- [x] cliphist manager fix
|
||||||
- [x] Stylix theming to each module
|
- [x] stylix theming to each module
|
||||||
- [ ] Enabling nvidia graphics and disabling it
|
- [x] rofi theme and other themes, where are colors setup declaratively
|
||||||
- [ ] Modularity connected via configuration.nix file with home manager (disable gnome, gnome configuration will be disabled too)
|
- [ ] enabling nvidia graphics and disabling it
|
||||||
- [x] Rofi theme and other themes, where are colors setup declaratively
|
- [ ] modularity connected via configuration.nix file with home manager (disable gnome, gnome configuration will be disabled too)
|
||||||
|
- [x] custom if else statements
|
||||||
|
- [ ] neovim
|
||||||
|
- [ ] librewolf and firefox fix
|
||||||
|
- [ ] fix kde theme in stylix
|
||||||
|
- [x] move sops
|
||||||
|
- [ ] figure out yubico authentication
|
||||||
|
- [ ] graph of my system structure
|
||||||
|
- [x] add zsh to my config
|
||||||
|
- [ ] ?tryout starship?
|
||||||
|
- [ ] cleanup hyprland subtools (rofi, hyprlock, waybar)
|
||||||
|
- [ ] auto-cpufreq
|
||||||
|
- [ ] modularize hyprland config into multiple files
|
||||||
|
- [ ] consider moving nh config helper into module
|
||||||
|
|||||||
36
flake.nix
36
flake.nix
@ -5,6 +5,11 @@
|
|||||||
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||||
|
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
hyprland = {
|
hyprland = {
|
||||||
url = "github:hyprwm/Hyprland";
|
url = "github:hyprwm/Hyprland";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -15,6 +20,12 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
plasma-manager = {
|
||||||
|
url = "github:nix-community/plasma-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
inputs.home-manager.follows = "home-manager";
|
||||||
|
};
|
||||||
|
|
||||||
spicetify-nix = {
|
spicetify-nix = {
|
||||||
url = "github:Gerg-L/spicetify-nix";
|
url = "github:Gerg-L/spicetify-nix";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -25,17 +36,6 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
url = "github:nix-community/home-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
};
|
|
||||||
|
|
||||||
plasma-manager = {
|
|
||||||
url = "github:nix-community/plasma-manager";
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
|
||||||
inputs.home-manager.follows = "home-manager";
|
|
||||||
};
|
|
||||||
|
|
||||||
firefox-addons = {
|
firefox-addons = {
|
||||||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
@ -54,10 +54,10 @@
|
|||||||
...
|
...
|
||||||
} @ inputs: let
|
} @ inputs: let
|
||||||
userSettings = {
|
userSettings = {
|
||||||
username = "foglar"; # konsta or foglar (else defaulting to foglar or none)
|
username = "foglar"; # konsta or shinya (else defaulting to shinya or none)
|
||||||
hostname = "laptop";
|
hostname = "kogami"; # kogami or ginoza
|
||||||
|
|
||||||
shell = "bash"; # bash, zsh
|
shell = "zsh"; # bash, zsh, none
|
||||||
terminal = "kitty"; # kitty, alacritty
|
terminal = "kitty"; # kitty, alacritty
|
||||||
browser = "librewolf"; # firefox, librewolf, qutebrowser
|
browser = "librewolf"; # firefox, librewolf, qutebrowser
|
||||||
editor = "neovim"; # neovim, vscode
|
editor = "neovim"; # neovim, vscode
|
||||||
@ -86,28 +86,28 @@
|
|||||||
};
|
};
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
laptop = nixpkgs.lib.nixosSystem {
|
kogami = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs system pkgs pkgs-stable userSettings;
|
inherit inputs system pkgs pkgs-stable userSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./zenith/configuration.nix
|
./kogami/configuration.nix
|
||||||
|
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
inputs.nix-ld.nixosModules.nix-ld
|
inputs.nix-ld.nixosModules.nix-ld
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
leanix = nixpkgs.lib.nixosSystem {
|
ginoza = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs system pkgs pkgs-stable userSettings;
|
inherit inputs system pkgs pkgs-stable userSettings;
|
||||||
};
|
};
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
./leanix/configuration.nix
|
./ginoza/configuration.nix
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@ -23,21 +23,9 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# User configuration
|
|
||||||
users.users.${userSettings.username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "${userSettings.username}";
|
|
||||||
extraGroups = ["wheel"];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
# Environment variables
|
|
||||||
environment.sessionVariables = {
|
|
||||||
FLAKE = "/home/${userSettings.username}/.dotfiles";
|
|
||||||
};
|
|
||||||
|
|
||||||
# System level configuration
|
# System level configuration
|
||||||
sys = {
|
sys = {
|
||||||
audio.enable = true;
|
audio.enable = true;
|
||||||
@ -61,6 +49,7 @@
|
|||||||
gdm.enable = true;
|
gdm.enable = true;
|
||||||
};
|
};
|
||||||
style.enable = true;
|
style.enable = true;
|
||||||
|
security.sops.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Configured programs to enable
|
# Configured programs to enable
|
||||||
@ -17,11 +17,17 @@
|
|||||||
desktop.gnome.enable = true;
|
desktop.gnome.enable = true;
|
||||||
|
|
||||||
# Shell management
|
# Shell management
|
||||||
|
sh.oh-my-posh.enable = false;
|
||||||
sh.bash = {
|
sh.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
oh-my-posh.enable = false;
|
oh-my-posh.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sh.zsh = {
|
||||||
|
enable = false;
|
||||||
|
oh-my-posh.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
# Application lists
|
# Application lists
|
||||||
app_list = {
|
app_list = {
|
||||||
hacking.enable = false;
|
hacking.enable = false;
|
||||||
@ -38,7 +44,7 @@
|
|||||||
vscode.enable = false;
|
vscode.enable = false;
|
||||||
git.enable = false;
|
git.enable = false;
|
||||||
neovim.enable = false;
|
neovim.enable = false;
|
||||||
firefox.enable = false;
|
firefox.enable = true;
|
||||||
spotify.enable = false;
|
spotify.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -3,7 +3,6 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
pkgs-stable,
|
pkgs-stable,
|
||||||
userSettings,
|
userSettings,
|
||||||
config,
|
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
@ -17,15 +16,6 @@
|
|||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||||
programs.nix-ld.dev.enable = true;
|
programs.nix-ld.dev.enable = true;
|
||||||
|
|
||||||
sops.defaultSopsFile = ./secrets/secrets.yaml;
|
|
||||||
sops.defaultSopsFormat = "yaml";
|
|
||||||
|
|
||||||
sops.age.keyFile = "/home/foglar/.config/sops/age/keys.txt";
|
|
||||||
|
|
||||||
sops.secrets."zenith/password-hash" = {
|
|
||||||
neededForUsers = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# Home manager
|
# Home manager
|
||||||
home-manager = {
|
home-manager = {
|
||||||
extraSpecialArgs = {inherit inputs pkgs pkgs-stable userSettings;};
|
extraSpecialArgs = {inherit inputs pkgs pkgs-stable userSettings;};
|
||||||
@ -39,22 +29,9 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# User configuration
|
|
||||||
users.users.${userSettings.username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "${userSettings.username}";
|
|
||||||
extraGroups = ["wheel"];
|
|
||||||
hashedPasswordFile = "${config.sops.secrets."zenith/password-hash".path}";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Bootloader
|
# Bootloader
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
||||||
# Environment variables
|
|
||||||
environment.sessionVariables = {
|
|
||||||
FLAKE = "/home/${userSettings.username}/dotfiles";
|
|
||||||
};
|
|
||||||
|
|
||||||
# System level configuration
|
# System level configuration
|
||||||
sys = {
|
sys = {
|
||||||
audio.enable = true;
|
audio.enable = true;
|
||||||
@ -15,11 +15,18 @@
|
|||||||
desktop.gnome.enable = false;
|
desktop.gnome.enable = false;
|
||||||
|
|
||||||
# Shell management
|
# Shell management
|
||||||
|
sh.oh-my-posh.enable = true;
|
||||||
|
|
||||||
sh.bash = {
|
sh.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
oh-my-posh.enable = true;
|
oh-my-posh.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sh.zsh = {
|
||||||
|
enable = true;
|
||||||
|
oh-my-posh.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
# Application lists
|
# Application lists
|
||||||
app_list = {
|
app_list = {
|
||||||
applications.enable = true;
|
applications.enable = true;
|
||||||
@ -51,7 +58,7 @@
|
|||||||
|
|
||||||
themes.enable = false;
|
themes.enable = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
git.enable = true;
|
git.enable = true;
|
||||||
neovim.enable = true;
|
neovim.enable = true;
|
||||||
|
|
||||||
@ -18,8 +18,7 @@
|
|||||||
conda
|
conda
|
||||||
jetbrains.pycharm-professional
|
jetbrains.pycharm-professional
|
||||||
dotnet-sdk_8
|
dotnet-sdk_8
|
||||||
nodejs
|
git-ignore
|
||||||
pnpm
|
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg:
|
nixpkgs.config.allowUnfreePredicate = pkg:
|
||||||
|
|||||||
@ -18,7 +18,6 @@
|
|||||||
jp2a
|
jp2a
|
||||||
yt-dlp
|
yt-dlp
|
||||||
nvtopPackages.full
|
nvtopPackages.full
|
||||||
neofetch
|
|
||||||
wget
|
wget
|
||||||
curl
|
curl
|
||||||
fzf
|
fzf
|
||||||
|
|||||||
@ -38,6 +38,7 @@
|
|||||||
|
|
||||||
services.network-manager-applet.enable = true;
|
services.network-manager-applet.enable = true;
|
||||||
services.dunst.enable = true;
|
services.dunst.enable = true;
|
||||||
|
|
||||||
programs.hyprlock.enable = true;
|
programs.hyprlock.enable = true;
|
||||||
|
|
||||||
home.sessionVariables = {
|
home.sessionVariables = {
|
||||||
|
|||||||
@ -137,7 +137,7 @@
|
|||||||
ublock-origin
|
ublock-origin
|
||||||
]
|
]
|
||||||
++ (
|
++ (
|
||||||
if (userSettings.username == "foglar")
|
if (userSettings.username == "shinya")
|
||||||
then [
|
then [
|
||||||
inputs.firefox-addons.packages."x86_64-linux".simple-translate
|
inputs.firefox-addons.packages."x86_64-linux".simple-translate
|
||||||
inputs.firefox-addons.packages."x86_64-linux".duckduckgo-privacy-essentials
|
inputs.firefox-addons.packages."x86_64-linux".duckduckgo-privacy-essentials
|
||||||
|
|||||||
@ -26,10 +26,29 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
sh.bash = {
|
sh.bash = {
|
||||||
enable = lib.mkDefault true;
|
enable =
|
||||||
oh-my-posh.enable = lib.mkDefault true;
|
if userSettings.shell == "bash"
|
||||||
|
then lib.mkDefault true
|
||||||
|
else lib.mkDefault false;
|
||||||
|
oh-my-posh.enable =
|
||||||
|
if userSettings.shell == "bash"
|
||||||
|
then lib.mkDefault true
|
||||||
|
else lib.mkDefault false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
sh.zsh = {
|
||||||
|
enable =
|
||||||
|
if userSettings.shell == "zsh"
|
||||||
|
then lib.mkDefault true
|
||||||
|
else lib.mkDefault false;
|
||||||
|
oh-my-posh.enable =
|
||||||
|
if userSettings.shell == "zsh"
|
||||||
|
then lib.mkDefault true
|
||||||
|
else lib.mkDefault false;
|
||||||
|
};
|
||||||
|
|
||||||
|
sh.oh-my-posh.enable = lib.mkDefault true;
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
kitty.enable =
|
kitty.enable =
|
||||||
if userSettings.terminal == "kitty"
|
if userSettings.terminal == "kitty"
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
pkgs-stable,
|
pkgs-stable,
|
||||||
lib,
|
lib,
|
||||||
config,
|
config,
|
||||||
|
userSettings,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options = {
|
options = {
|
||||||
@ -141,7 +142,7 @@
|
|||||||
};
|
};
|
||||||
"options" = {
|
"options" = {
|
||||||
"nixos" = {
|
"nixos" = {
|
||||||
"expr" = "(builtins.getFlake \"~/dotfiles/\").nixosConfigurations.laptop.options";
|
"expr" = "(builtins.getFlake \"~/.dotfiles/\").nixosConfigurations.${userSettings.hostname}.options";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
# "home_manager": {
|
# "home_manager": {
|
||||||
|
|||||||
@ -12,6 +12,9 @@
|
|||||||
home.sessionVariables.EDITOR = "nvim";
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
|
|
||||||
programs.neovim.enable = true;
|
programs.neovim.enable = true;
|
||||||
|
programs.neovim.defaultEditor = true;
|
||||||
|
programs.neovim.viAlias = true;
|
||||||
|
programs.neovim.vimAlias = true;
|
||||||
|
|
||||||
#programs.neovim = let
|
#programs.neovim = let
|
||||||
# toLua = str: "lua << EOF\n${str}\nEOF\n";
|
# toLua = str: "lua << EOF\n${str}\nEOF\n";
|
||||||
|
|||||||
@ -5,13 +5,24 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options = {
|
options = {
|
||||||
sh.bash.oh-my-posh.enable = lib.mkEnableOption "enable oh-my-posh";
|
sh.oh-my-posh.enable = lib.mkEnableOption "enable oh-my-posh";
|
||||||
|
sh.bash.oh-my-posh.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "enable oh-my-posh for bash";
|
||||||
|
};
|
||||||
|
sh.zsh.oh-my-posh.enable = lib.mkOption {
|
||||||
|
type = lib.types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "enable oh-my-posh for zsh";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.sh.bash.oh-my-posh.enable {
|
config = lib.mkIf config.sh.oh-my-posh.enable {
|
||||||
programs.oh-my-posh = {
|
programs.oh-my-posh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableBashIntegration = true;
|
enableBashIntegration = if config.sh.bash.enable == true then true else false;
|
||||||
|
enableZshIntegration = if config.sh.zsh.enable == true then true else false;
|
||||||
settings = {
|
settings = {
|
||||||
"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json";
|
"$schema" = "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json";
|
||||||
"blocks" = [
|
"blocks" = [
|
||||||
|
|||||||
@ -5,45 +5,67 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
options = {
|
options = {
|
||||||
sh.bash.enable =
|
sh.bash.enable = lib.mkEnableOption "enables shell bash";
|
||||||
lib.mkEnableOption "enables shell tools";
|
sh.zsh.enable = lib.mkEnableOption "enables shell zsh";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.sh.bash.enable {
|
config = lib.mkMerge [
|
||||||
programs.bash = {
|
(lib.mkIf config.sh.bash.enable {
|
||||||
enable = true;
|
programs.bash = {
|
||||||
enableCompletion = true;
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
#vim = "nvim";
|
ls = "${pkgs.eza}/bin/eza --icons";
|
||||||
ls = "${pkgs.eza}/bin/eza --icons";
|
ll = "${pkgs.eza}/bin/eza -alh --icons";
|
||||||
ll = "${pkgs.eza}/bin/eza -alh --icons";
|
l = "${pkgs.eza}/bin/eza -lh --icons=auto";
|
||||||
l = "${pkgs.eza}/bin/eza -lh --icons=auto";
|
tree = "${pkgs.eza}/bin/eza --tree --icons";
|
||||||
tree = "${pkgs.eza}/bin/eza --tree --icons";
|
open = "rifle";
|
||||||
open = "rifle";
|
ip = "ip -c";
|
||||||
ip = "ip -c";
|
s = "kitten ssh";
|
||||||
s = "kitten ssh";
|
diff = "diff --color";
|
||||||
diff = "diff --color";
|
respawn = "clear; ${pkgs.pfetch}/bin/pfetch";
|
||||||
respawn = "clear; ${pkgs.pfetch}/bin/pfetch";
|
mkdir = "mkdir -p";
|
||||||
mkdir = "mkdir -p";
|
cat = "${pkgs.bat}/bin/bat --style plain";
|
||||||
cat = "${pkgs.bat}/bin/bat --style plain";
|
rasp = "s foglar@192.168.8.140";
|
||||||
rasp = "s foglar@192.168.8.140";
|
hist = "history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy";
|
||||||
hist = "history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy";
|
cdx = "${pkgs.zoxide}/bin/zoxide query --interactive";
|
||||||
cdx = "${pkgs.zoxide}/bin/zoxide query --interactive";
|
|
||||||
|
|
||||||
#distrobox-enter = "distrobox-enter --root";
|
#distrobox-enter = "distrobox-enter --root";
|
||||||
#distrobox-create = "distrobox-create --root";
|
#distrobox-create = "distrobox-create --root";
|
||||||
#distrobox-list = "distrobox-list --root";
|
#distrobox-list = "distrobox-list --root";
|
||||||
|
};
|
||||||
|
|
||||||
|
bashrcExtra = ''
|
||||||
|
${pkgs.pfetch}/bin/pfetch'';
|
||||||
};
|
};
|
||||||
|
|
||||||
bashrcExtra = ''
|
home.sessionVariables = {
|
||||||
${pkgs.pfetch}/bin/pfetch'';
|
XDG_DATA_HOME = "$HOME/.local/share";
|
||||||
};
|
XDG_PICTURES_DIR = "$HOME/Pictures/Screenshots/";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
(lib.mkIf config.sh.zsh.enable {
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
|
||||||
home.sessionVariables = {
|
shellAliases = {
|
||||||
FLAKE = "/home/foglar/dotfiles";
|
ls = "${pkgs.eza}/bin/eza --icons";
|
||||||
XDG_DATA_HOME = "$HOME/.local/share";
|
ll = "${pkgs.eza}/bin/eza -alh --icons";
|
||||||
XDG_PICTURES_DIR = "$HOME/Pictures/Screenshots/";
|
l = "${pkgs.eza}/bin/eza -lh --icons=auto";
|
||||||
};
|
tree = "${pkgs.eza}/bin/eza --tree --icons";
|
||||||
};
|
open = "rifle";
|
||||||
|
ip = "ip -c";
|
||||||
|
s = "kitten ssh";
|
||||||
|
diff = "diff --color";
|
||||||
|
respawn = "clear; ${pkgs.pfetch}/bin/pfetch";
|
||||||
|
mkdir = "mkdir -p";
|
||||||
|
cat = "${pkgs.bat}/bin/bat --style plain";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
})
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
{lib, ...}: {
|
{
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
imports = [
|
imports = [
|
||||||
./packages/docker.nix
|
./packages/docker.nix
|
||||||
./packages/podman.nix
|
./packages/podman.nix
|
||||||
@ -6,6 +9,7 @@
|
|||||||
./packages/tor.nix
|
./packages/tor.nix
|
||||||
./packages/virtual-machines.nix
|
./packages/virtual-machines.nix
|
||||||
./packages/yubikey.nix
|
./packages/yubikey.nix
|
||||||
|
./packages/sops/sops.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
program = {
|
program = {
|
||||||
@ -19,6 +23,7 @@
|
|||||||
yubikey.enable = lib.mkDefault false;
|
yubikey.enable = lib.mkDefault false;
|
||||||
};
|
};
|
||||||
sys.desktop.steamdeck.enable = lib.mkDefault false;
|
sys.desktop.steamdeck.enable = lib.mkDefault false;
|
||||||
|
sys.security.sops.enable = lib.mkDefault true;
|
||||||
programs.kdeconnect.enable = lib.mkDefault true;
|
programs.kdeconnect.enable = lib.mkDefault true;
|
||||||
programs.wireshark.enable = lib.mkDefault true;
|
programs.wireshark.enable = lib.mkDefault true;
|
||||||
}
|
}
|
||||||
|
|||||||
24
nixos/system/packages/sops/secrets/secrets.yaml
Normal file
24
nixos/system/packages/sops/secrets/secrets.yaml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
kogami:
|
||||||
|
password-hash: ENC[AES256_GCM,data:HXuzumA7zAzBUcOBszeslYVDLA7r3W7gINn2FvMCTEHkc+y3zWftK4CVnk+TuRcgP9/htUphs2BmusogFAdmRQ3HmQU8WGQN0A==,iv:n2063dWbEmFKEvXbY2uk+C6lwF7WzA8jalKOFHPVICc=,tag:wb5bq4Dk3a9UnzYFBInHEA==,type:str]
|
||||||
|
ginoza:
|
||||||
|
password-hash: ENC[AES256_GCM,data:xqE0y3Z7+kasYFQLn4Wuo+/c9L8BEakf2HKgN5BsttC2iDuzYSvXrP8K6pe5Skdi5Aq0MVz9LixJFM3PBgLORL1C6k0iDSardw==,iv:bKL40h0rGNmnnkA7EieKAD5KyENXOiTNsTVH1V0B7HU=,tag:c1MsRuiOK/j2b0iKOyO8FQ==,type:str]
|
||||||
|
sops:
|
||||||
|
kms: []
|
||||||
|
gcp_kms: []
|
||||||
|
azure_kv: []
|
||||||
|
hc_vault: []
|
||||||
|
age:
|
||||||
|
- recipient: age1xzkhm0m0gzph8akd7zjv4880hrauynk80ldktld0r44pgn48le5q3tfw8l
|
||||||
|
enc: |
|
||||||
|
-----BEGIN AGE ENCRYPTED FILE-----
|
||||||
|
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwME1uUDlWc2RDTWw0dGly
|
||||||
|
TEx0dWtxOGlsdGtLVmpMZzRqcUN0d0VNOGxZCkkraGs3cjRIQ3o1MUN4eXZnbXhU
|
||||||
|
MXROMzYrenkyVS9TTStmZnVGRXF4YVkKLS0tIFhVUnIyMHdtQ2VZQlQrbCtTWHVG
|
||||||
|
T0cxV21SN0hJaFg3R3hpTjIxa3lJNVEKdIrR5XDHxpCojk2A1pxc4dYtSJRrObbY
|
||||||
|
JS/nDgu74LugEchiOhuIJ7nh3MS5XBOmmt2GTHrqxZEZFoIykjIGug==
|
||||||
|
-----END AGE ENCRYPTED FILE-----
|
||||||
|
lastmodified: "2024-12-26T14:50:21Z"
|
||||||
|
mac: ENC[AES256_GCM,data:db57wvxR3NK0OgI9qAzpjOg2dvcb5H7kY1GvyZmfyUoQpapwTuci36sEwFHDPSUXynzobmhiv49kAEsYm0xhvOhTW1tPReVKi4pKh4EFYl0qOeMs0/cM0pwDCyVkjTQh3qlRR+PFB2oSxDdi7rZFfz26P1iFlEHhvsYug/v16Rs=,iv:m40T1K279d5/7u2jtytwS5UMv6V7RDFpNXQxFEAOauU=,tag:+UQ61SLtcVUIixsT0JnXYA==,type:str]
|
||||||
|
pgp: []
|
||||||
|
unencrypted_suffix: _unencrypted
|
||||||
|
version: 3.9.2
|
||||||
23
nixos/system/packages/sops/sops.nix
Normal file
23
nixos/system/packages/sops/sops.nix
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
userSettings,
|
||||||
|
...
|
||||||
|
}: {
|
||||||
|
options = {
|
||||||
|
sys.security.sops.enable = lib.mkEnableOption "Enable SOPS";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf config.sys.security.sops.enable {
|
||||||
|
sops.defaultSopsFile = ./secrets/secrets.yaml;
|
||||||
|
sops.defaultSopsFormat = "yaml";
|
||||||
|
|
||||||
|
sops.age.keyFile = "/home/${userSettings.username}/.config/sops/age/keys.txt";
|
||||||
|
|
||||||
|
sops.secrets."${userSettings.hostname}/password-hash" = {
|
||||||
|
neededForUsers = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
users.users.${userSettings.username}.hashedPasswordFile = "${config.sops.secrets."${userSettings.hostname}/password-hash".path}";
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -19,6 +19,7 @@
|
|||||||
DEFAULT_BROWSER = "${pkgs."${userSettings.browser}"}/bin/${userSettings.browser}";
|
DEFAULT_BROWSER = "${pkgs."${userSettings.browser}"}/bin/${userSettings.browser}";
|
||||||
TERMINAL = "${pkgs."${userSettings.terminal}"}/bin/${userSettings.terminal}";
|
TERMINAL = "${pkgs."${userSettings.terminal}"}/bin/${userSettings.terminal}";
|
||||||
EDITOR = "${pkgs."${userSettings.editor}"}/bin/${userSettings.editor}";
|
EDITOR = "${pkgs."${userSettings.editor}"}/bin/${userSettings.editor}";
|
||||||
|
FLAKE = "/home/${userSettings.username}/.dotfiles";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Default applications configuration
|
# Default applications configuration
|
||||||
@ -46,5 +47,14 @@
|
|||||||
"image/jpeg" = "org.gnome.Loupe.desktop";
|
"image/jpeg" = "org.gnome.Loupe.desktop";
|
||||||
"image/png" = "org.gnome.Loupe.desktop";
|
"image/png" = "org.gnome.Loupe.desktop";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs.zsh.enable =
|
||||||
|
if userSettings.shell == "zsh"
|
||||||
|
then lib.mkDefault true
|
||||||
|
else lib.mkDefault false;
|
||||||
|
users.defaultUserShell =
|
||||||
|
if userSettings.shell == "zsh"
|
||||||
|
then pkgs.zsh
|
||||||
|
else pkgs.bash;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -60,6 +60,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
services.udisks2.enable = true;
|
services.udisks2.enable = true;
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
polkit.enable = true;
|
polkit.enable = true;
|
||||||
|
|||||||
11
nixos/system/settings/user.nix
Normal file
11
nixos/system/settings/user.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{userSettings, ...}: {
|
||||||
|
# User configuration
|
||||||
|
users.users.${userSettings.username} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
description = "${userSettings.username}";
|
||||||
|
extraGroups = ["wheel"];
|
||||||
|
#! User Hashed password is stored in SOPS
|
||||||
|
#! and is set in the module configuration
|
||||||
|
#! file ../packages/sops/sops.nix
|
||||||
|
};
|
||||||
|
}
|
||||||
@ -10,6 +10,8 @@
|
|||||||
./settings/loginManager.nix
|
./settings/loginManager.nix
|
||||||
./settings/style.nix
|
./settings/style.nix
|
||||||
./settings/default-applications.nix
|
./settings/default-applications.nix
|
||||||
|
|
||||||
|
./settings/user.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
sys = {
|
sys = {
|
||||||
|
|||||||
@ -1,24 +0,0 @@
|
|||||||
zenith:
|
|
||||||
password-hash: ENC[AES256_GCM,data:J0OpGQHKugEvDMJJsLApO4JFmAM4e01WODyonrwUinND/MpzxAjbozlMrDQqb8Lghay3RTOCrslizYIYOkNwUU+MhyFlTAbF7Q==,iv:J4PXhVAUcv1QSycdvQL2jb/IcayyXVdfiJDHiNUalXk=,tag:bm4N8mq/6QUdzwOcy6WVaw==,type:str]
|
|
||||||
leanix:
|
|
||||||
password-hash: ENC[AES256_GCM,data:C5oGejwFkhhYvaDunG0AF9PcCKTQQA//uqi1LaWwEwOphepROoP9d1r1vD8k2cgcrikVSX4NQUBca6fQrqZTXMuxZKBxslE2Fw==,iv:oM2pWAifpCEpTRiGKbbG/QdQ0m8YaoyESzD3rIZkvmc=,tag:W+w3Bbtr8rBfp6SjYwcW0Q==,type:str]
|
|
||||||
sops:
|
|
||||||
kms: []
|
|
||||||
gcp_kms: []
|
|
||||||
azure_kv: []
|
|
||||||
hc_vault: []
|
|
||||||
age:
|
|
||||||
- recipient: age1xzkhm0m0gzph8akd7zjv4880hrauynk80ldktld0r44pgn48le5q3tfw8l
|
|
||||||
enc: |
|
|
||||||
-----BEGIN AGE ENCRYPTED FILE-----
|
|
||||||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBwME1uUDlWc2RDTWw0dGly
|
|
||||||
TEx0dWtxOGlsdGtLVmpMZzRqcUN0d0VNOGxZCkkraGs3cjRIQ3o1MUN4eXZnbXhU
|
|
||||||
MXROMzYrenkyVS9TTStmZnVGRXF4YVkKLS0tIFhVUnIyMHdtQ2VZQlQrbCtTWHVG
|
|
||||||
T0cxV21SN0hJaFg3R3hpTjIxa3lJNVEKdIrR5XDHxpCojk2A1pxc4dYtSJRrObbY
|
|
||||||
JS/nDgu74LugEchiOhuIJ7nh3MS5XBOmmt2GTHrqxZEZFoIykjIGug==
|
|
||||||
-----END AGE ENCRYPTED FILE-----
|
|
||||||
lastmodified: "2024-12-23T18:49:40Z"
|
|
||||||
mac: ENC[AES256_GCM,data:fWWZ3+RnGkQYP1R7q47JyB6NXHKG+D+y+qaB7i+uGfHsIf6VCkerO/ITCk4WSkvsXJDpB9mZWp2ciYypcDAHuBOlZzLscf/et9xDoDhXdM7MgRsX3fA9oeK9Q8D83cUptELlfXKU0Kvs02fAjbDrbwx5rdUtcUxfPNjW2X5lJ3o=,iv:5UwqRhZnj+u29O+x+KjxZJ9x1hcKuuZlnFYbgFnjkTs=,tag:w/z8u8PYkcW7etYg7y6y8w==,type:str]
|
|
||||||
pgp: []
|
|
||||||
unencrypted_suffix: _unencrypted
|
|
||||||
version: 3.9.2
|
|
||||||
Loading…
Reference in New Issue
Block a user