Compare commits

..

No commits in common. "c2eaa3b7df2c0c72dcd158c9ac7db00418c52bae" and "34d77cf53b05537f159598724423123192e13670" have entirely different histories.

13 changed files with 124 additions and 188 deletions

4
.gitignore vendored
View File

@ -1,2 +1,2 @@
kogami.qcow2
ginoza.qcow2
laptop.qcow2

24
TODO.md
View File

@ -7,26 +7,18 @@
- [x] cliphist manager fix
- [x] stylix theming to each module
- [x] rofi theme and other themes, where are colors setup declaratively
- [x] enabling nvidia graphics and disabling it
- [x] add zsh to my config
- [x] custom if else statements
- [x] move sops
- [x] figure out yubico authentication
- [x] options for YUBIKEY to make more sense and control
- [x] power profiles solution in waybar
- [x] auto-cpufreq
- [ ] enabling nvidia graphics and disabling it
- [ ] 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
- [ ] make static background folder and figure out how to simply manage backgrounds across my devices
- [ ] NVIDIA options
- [ ] fix plasma manager and extend gnome configuration
- [ ] merge shell aliases
- [ ] update my home page and create new web
- [ ] fix kde theme in stylix
- [ ] ?tryout starship?

View File

@ -33,26 +33,6 @@
"type": "github"
}
},
"auto-cpufreq": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1733175750,
"narHash": "sha256-tczSI0dnsitstia/uVt7FyGQbtuW8lMhhMYj0TRSAT4=",
"owner": "AdnanHodzic",
"repo": "auto-cpufreq",
"rev": "4dae1d4b59bedc1d57118a9eb704c2e1cde5f83c",
"type": "github"
},
"original": {
"owner": "AdnanHodzic",
"repo": "auto-cpufreq",
"type": "github"
}
},
"base16": {
"inputs": {
"fromYaml": "fromYaml"
@ -128,11 +108,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1735202720,
"narHash": "sha256-7aEdACqT2B7nZNFjn2Y66Qucfl1AHHVFKxm4yvO0O10=",
"lastModified": 1734943800,
"narHash": "sha256-T6tJ1fGRcVksmRqbDRsvYD3Qnw8AU3e2j0Im01twFcI=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "fe816609e68ee1887ee89e43c9ca1aad75362477",
"rev": "2c702b4a038306dce64a90fc011c92ebabb82f63",
"type": "gitlab"
},
"original": {
@ -288,11 +268,11 @@
]
},
"locked": {
"lastModified": 1735053786,
"narHash": "sha256-Gm+0DcbUS338vvkwyYWms5jsWlx8z8MeQBzcnIDuIkw=",
"lastModified": 1734944412,
"narHash": "sha256-36QfCAl8V6nMIRUCgiC79VriJPUXXkHuR8zQA1vAtSU=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "35b98d20ca8f4ca1f6a2c30b8a2c8bb305a36d84",
"rev": "8264bfe3a064d704c57df91e34b795b6ac7bad9e",
"type": "github"
},
"original": {
@ -398,11 +378,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1735310446,
"narHash": "sha256-1wUsJQ0MJBzAuQ+3c3e3OR5SW8iUF1sHco33xIcvDSg=",
"lastModified": 1734907157,
"narHash": "sha256-sF3Wot4jIemoSo0YigdHyoR5JMaXgKja+mPJGoXXk/k=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "43ca66779b7d267cc6c52bdea75d3ff8eb60132f",
"rev": "5f7ad767dbf0bac9ddd6bf6c825fb9ed7921308a",
"type": "github"
},
"original": {
@ -598,11 +578,11 @@
},
"nixpkgs-stable_2": {
"locked": {
"lastModified": 1735141468,
"narHash": "sha256-VIAjBr1qGcEbmhLwQJD6TABppPMggzOvqFsqkDoMsAY=",
"lastModified": 1734875076,
"narHash": "sha256-Pzyb+YNG5u3zP79zoi8HXYMs15Q5dfjDgwCdUI5B0nY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4005c3ff7505313cbc21081776ad0ce5dfd7a3ce",
"rev": "1807c2b91223227ad5599d7067a61665c52d1295",
"type": "github"
},
"original": {
@ -622,11 +602,11 @@
]
},
"locked": {
"lastModified": 1735049224,
"narHash": "sha256-fWUd9kyXdepphJ7cCzOsuSo7l0kbFCkUqfgKqZyFZzE=",
"lastModified": 1733858086,
"narHash": "sha256-h2BDIDKiqgMpA6E+mu0RgMGy3FeM6k+EuJ9xgOQ1+zw=",
"owner": "nix-community",
"repo": "plasma-manager",
"rev": "d16bbded0ae452bc088489e7dca3ef58d8d1830b",
"rev": "7e2010249529931a3848054d5ff0dbf24675ab68",
"type": "github"
},
"original": {
@ -661,7 +641,6 @@
},
"root": {
"inputs": {
"auto-cpufreq": "auto-cpufreq",
"firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"hyprland": "hyprland",
@ -702,11 +681,11 @@
]
},
"locked": {
"lastModified": 1735272951,
"narHash": "sha256-xGQ4qVMb8XRIpDYq+tNu3db5LzoKyAJFRl3VA0us/+M=",
"lastModified": 1734927365,
"narHash": "sha256-xuYqPNPPsmb5djiU4odmyTidFQC3TeLe814ubuvXJo4=",
"owner": "Gerg-L",
"repo": "spicetify-nix",
"rev": "c4e2fb9a6a46acf1fd842ae33a342e71bd9a2263",
"rev": "678dd4c5c2957f1f359a329ef00e17cbd273bd50",
"type": "github"
},
"original": {
@ -734,11 +713,11 @@
"tinted-tmux": "tinted-tmux"
},
"locked": {
"lastModified": 1735253599,
"narHash": "sha256-aKLAUkdeMH2N5gMDNiOC7KghRNy1necLtLa9+zUcj1g=",
"lastModified": 1734885904,
"narHash": "sha256-NxA4JnLuXyle2/nUKDbW8vORwSd+Z20limIl7DhlZbs=",
"owner": "danth",
"repo": "stylix",
"rev": "963e77a3a4fc2be670d5a9a6cbeb249b8a43808a",
"rev": "4d87b96ceca38532f39c1b7efd8a9235bfcee3d6",
"type": "github"
},
"original": {

View File

@ -45,11 +45,6 @@
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
auto-cpufreq = {
url = "github:AdnanHodzic/auto-cpufreq";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
@ -103,7 +98,6 @@
inputs.stylix.nixosModules.stylix
inputs.nix-ld.nixosModules.nix-ld
inputs.sops-nix.nixosModules.sops
inputs.auto-cpufreq.nixosModules.default
];
};
ginoza = nixpkgs.lib.nixosSystem {

View File

@ -62,11 +62,6 @@
tor.enable = false;
virt-manager.enable = false;
virtualbox.enable = false;
yubikey = {
enable = false;
lock-on-remove = false;
notify = false;
};
};
# Basic programs to enable

View File

@ -66,26 +66,14 @@
tor.enable = true;
virt-manager.enable = true;
virtualbox.enable = false;
yubikey = {
enable = true;
lock-on-remove = false;
notify = true;
};
yubikey.enable = true;
};
# Basic programs to enable
programs.kdeconnect.enable = true;
programs.wireshark.enable = true;
programs.auto-cpufreq.enable = true;
programs.ssh.extraConfig = ''
Host masaoka
HostName 192.168.8.140
User foglar
IdentityFile ~/.ssh/id_masaoka
'';
#services.twingate.enable = true;
services.twingate.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
@ -93,6 +81,14 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.

View File

@ -83,7 +83,6 @@
}
'';
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View File

@ -3,7 +3,18 @@
config,
pkgs,
...
}: let
}: {
options = {
sh.bash.enable = lib.mkEnableOption "enables shell bash";
sh.zsh.enable = lib.mkEnableOption "enables shell zsh";
};
config = lib.mkMerge [
(lib.mkIf config.sh.bash.enable {
programs.bash = {
enable = true;
enableCompletion = true;
shellAliases = {
ls = "${pkgs.eza}/bin/eza --icons";
ll = "${pkgs.eza}/bin/eza -alh --icons";
@ -16,25 +27,14 @@
respawn = "clear; ${pkgs.pfetch}/bin/pfetch";
mkdir = "mkdir -p";
cat = "${pkgs.bat}/bin/bat --style plain";
rasp = "s masaoka";
rasp = "s foglar@192.168.8.140";
hist = "history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy";
cdx = "${pkgs.zoxide}/bin/zoxide query --interactive";
#distrobox-enter = "distrobox-enter --root";
#distrobox-create = "distrobox-create --root";
#distrobox-list = "distrobox-list --root";
};
in {
options = {
sh.bash.enable = lib.mkEnableOption "enables shell bash";
sh.zsh.enable = lib.mkEnableOption "enables shell zsh";
};
config = lib.mkMerge [
(lib.mkIf config.sh.bash.enable {
programs.bash = {
enable = true;
enableCompletion = true;
shellAliases = shellAliases;
bashrcExtra = ''
${pkgs.pfetch}/bin/pfetch'';
@ -52,11 +52,19 @@ in {
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = shellAliases;
initExtra = ''
${pkgs.pfetch}/bin/pfetch
set -o emacs'';
shellAliases = {
ls = "${pkgs.eza}/bin/eza --icons";
ll = "${pkgs.eza}/bin/eza -alh --icons";
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";
};
};
})
];

View File

@ -1,4 +1,7 @@
{lib, ...}: {
{
lib,
...
}: {
imports = [
./packages/docker.nix
./packages/podman.nix
@ -17,11 +20,7 @@
tor.enable = lib.mkDefault true;
virt-manager.enable = lib.mkDefault true;
virtualbox.enable = lib.mkDefault true;
yubikey = {
enable = lib.mkDefault false;
lock-on-remove = lib.mkDefault false;
notify = lib.mkDefault false;
};
yubikey.enable = lib.mkDefault false;
};
sys.desktop.steamdeck.enable = lib.mkDefault false;
sys.security.sops.enable = lib.mkDefault true;

View File

@ -3,8 +3,6 @@ kogami:
ginoza:
password-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rBJcbmvJTsDa7,iv:wI2fH8hCBopVz3rWXj8el0Uof3DeL0lkezqE6MeMJ/k=,tag:uKDGStJ96RRqxX1wdIzgaQ==,type:str]
sops:
kms: []
gcp_kms: []
@ -20,8 +18,8 @@ sops:
T0cxV21SN0hJaFg3R3hpTjIxa3lJNVEKdIrR5XDHxpCojk2A1pxc4dYtSJRrObbY
JS/nDgu74LugEchiOhuIJ7nh3MS5XBOmmt2GTHrqxZEZFoIykjIGug==
-----END AGE ENCRYPTED FILE-----
lastmodified: "2024-12-27T12:09:56Z"
mac: ENC[AES256_GCM,data:AFNKn5oyHEwxKkLHh67le/02QaBitPipF1+BzvYdxQgHjTm5JCGn1yZZHmNDMIRAVTSECubWh1fvBiCVbkTSIGnYjXEb/Kw3732E+Cb4RYAPQRVkdJeg9h1ZwmdGUGajjZwCtnuuUl65ZMpW7njVHT0M+y91nWAQJ4CAbrAfAbw=,iv:2wmu+hBG3azJT+wrvlZPpdfqaEAbBCeDM0ncgfvhzOg=,tag:5PVBh6a/bsLV9YsXnPO5aw==,type:str]
lastmodified: "2024-12-26T19:06:52Z"
mac: ENC[AES256_GCM,data:1n5O72DFe6dgvEfE6ZOAP1JR4TFZQAWeDYU/NLtisjoVliREcVmaZEM3vxDnrLueLFdNZ0jxu9fEjG0cnwUDkJNIeFyj8mhzY3bIC5LiSVriKPLGiJW3fMBsK6btJTa8OJ7xJsFIKgXpVHAgOit9ZBT24VnLZ9zFgWk84whR1eE=,iv:RaKCWl5zfKsD0502WVRv8Vx2+jGz3J7yhRkSzb/RFPM=,tag:JT2sKaoK7SCKCk1nWrHZMQ==,type:str]
pgp: []
unencrypted_suffix: _unencrypted
version: 3.9.2

View File

@ -18,22 +18,7 @@
neededForUsers = true;
};
# SSH private keys
sops.secrets = {
"ssh_keys/masaoka" = {
path = "/home/${userSettings.username}/.ssh/id_masaoka";
owner = userSettings.username;
group = "users";
};
};
users.users.${userSettings.username}.hashedPasswordFile = "${config.sops.secrets."${userSettings.hostname}/password-hash".path}";
security.pam.yubico.id =
[]
++ (
if config.program.yubikey.enable
then ["${config.sops.secrets.yubikey_id}".value]
else []
);
security.pam.yubico.id = ["${config.sops.secrets.yubikey_id}".value];
};
}

View File

@ -7,13 +7,10 @@
options = {
program.yubikey = {
enable = lib.mkEnableOption "Enable YubiKey authentication";
lock-on-remove = lib.mkEnableOption "Lock the session when the YubiKey is removed";
notify = lib.mkEnableOption "Notify when the YubiKey is touched";
};
};
config = lib.mkMerge [
(lib.mkIf config.program.yubikey.enable {
config = lib.mkIf config.program.yubikey.enable {
environment.systemPackages = with pkgs; [
yubioath-flutter
yubikey-manager
@ -45,14 +42,7 @@
enable = true;
enableSSHSupport = true;
};
})
(lib.mkIf config.program.yubikey.notify {
programs.yubikey-touch-detector = {
enable = true;
libnotify = true;
};
})
(lib.mkIf config.program.yubikey.lock-on-remove {
services.udev.extraRules = ''
ACTION=="remove",\
ENV{ID_BUS}=="usb",\
@ -61,6 +51,5 @@
ENV{ID_VENDOR}=="Yubico",\
RUN+="${pkgs.systemd}/bin/loginctl lock-sessions"
'';
})
];
};
}

View File

@ -60,6 +60,8 @@
};
services.udisks2.enable = true;
services.power-profiles-daemon.enable = true;
security = {
polkit.enable = true;
pam.services.hyprlock = {};