Format all the files
parent
fb78d98640
commit
04dc77e8b9
|
@ -16,7 +16,6 @@
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
|
||||||
|
|
||||||
user = "spagnologasper";
|
user = "spagnologasper";
|
||||||
hostName = "yoga";
|
hostName = "yoga";
|
||||||
|
|
||||||
|
@ -24,9 +23,9 @@
|
||||||
pkgs.lib.nixosSystem {
|
pkgs.lib.nixosSystem {
|
||||||
system = system;
|
system = system;
|
||||||
modules = [
|
modules = [
|
||||||
./modules/system/configuration.nix
|
./modules/system/configuration.nix
|
||||||
(./. + "/hosts/${hostname}/hardware-configuration.nix")
|
(./. + "/hosts/${hostname}/hardware-configuration.nix")
|
||||||
(./. + "/hosts/${hostname}/default.nix")
|
(./. + "/hosts/${hostname}/default.nix")
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
|
@ -37,12 +36,12 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
specialArgs = {inherit inputs user hostName; };
|
specialArgs = { inherit inputs user hostName; };
|
||||||
};
|
};
|
||||||
|
|
||||||
in {
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
yoga = mkSystem inputs.nixpkgs "x86_64-linux" "yoga";
|
yoga = mkSystem inputs.nixpkgs "x86_64-linux" "yoga";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ../../modules/nvidia/default.nix ];
|
||||||
../../modules/nvidia/default.nix
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,25 +1,23 @@
|
||||||
{ config, lib, inputs, pkgs, ...}:
|
{ config, lib, inputs, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ../../modules/default.nix ];
|
||||||
../../modules/default.nix
|
config.modules = {
|
||||||
];
|
dunst.enable = true;
|
||||||
config.modules = {
|
hyprland.enable = true;
|
||||||
dunst.enable = true;
|
kitty.enable = true;
|
||||||
hyprland.enable = true;
|
packages.enable = true;
|
||||||
kitty.enable = true;
|
waybar.enable = true;
|
||||||
packages.enable = true;
|
zsh.enable = true;
|
||||||
waybar.enable = true;
|
fuzzel.enable = true;
|
||||||
zsh.enable = true;
|
gtk.enable = true;
|
||||||
fuzzel.enable = true;
|
direnv.enable = true;
|
||||||
gtk.enable = true;
|
kanshi.enable = true;
|
||||||
direnv.enable = true;
|
nvim.enable = false;
|
||||||
kanshi.enable = true;
|
git.enable = true;
|
||||||
nvim.enable = false;
|
gammastep.enable = true;
|
||||||
git.enable = true;
|
vscode.enable = true;
|
||||||
gammastep.enable = true;
|
tmux.enable = true;
|
||||||
vscode.enable = true;
|
starship.enable = true;
|
||||||
tmux.enable = true;
|
};
|
||||||
starship.enable = true;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1 @@
|
||||||
inputs: {
|
inputs: { mkSystem = import ./mkSystem.nix inputs; }
|
||||||
mkSystem = import ./mkSystem.nix inputs;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{ self, ... } @ inputs: name: system: inputs.nixpkgs.lib.nixosSystem (
|
{ self, ... }@inputs:
|
||||||
{
|
name: system:
|
||||||
inherit system;
|
inputs.nixpkgs.lib.nixosSystem ({
|
||||||
specialArgs = { inherit inputs self; };
|
inherit system;
|
||||||
modules = [
|
specialArgs = { inherit inputs self; };
|
||||||
"${self}/hosts/${name}/system.nix"
|
modules = [
|
||||||
"${self}/hosts/${name}/user.nix"
|
"${self}/hosts/${name}/system.nix"
|
||||||
inputs.home-manager.nixosModule
|
"${self}/hosts/${name}/user.nix"
|
||||||
];
|
inputs.home-manager.nixosModule
|
||||||
}
|
];
|
||||||
)
|
})
|
||||||
|
|
|
@ -4,12 +4,12 @@ with lib;
|
||||||
let cfg = config.modules.direnv;
|
let cfg = config.modules.direnv;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.modules.direnv = { enable = mkEnableOption "direnv"; };
|
options.modules.direnv = { enable = mkEnableOption "direnv"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
programs.direnv = {
|
programs.direnv = {
|
||||||
enable = true;
|
enable = true;
|
||||||
nix-direnv.enable = true;
|
nix-direnv.enable = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,39 +4,39 @@ with lib;
|
||||||
let cfg = config.modules.dunst;
|
let cfg = config.modules.dunst;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.modules.dunst = { enable = mkEnableOption "dunst"; };
|
options.modules.dunst = { enable = mkEnableOption "dunst"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ dunst ];
|
||||||
dunst
|
|
||||||
];
|
|
||||||
|
|
||||||
services.dunst = {
|
services.dunst = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
global = {
|
global = {
|
||||||
origin = "top-left";
|
origin = "top-left";
|
||||||
offset = "60x12";
|
offset = "60x12";
|
||||||
separator_height = 2;
|
separator_height = 2;
|
||||||
padding = 12;
|
padding = 12;
|
||||||
horizontal_padding = 12;
|
horizontal_padding = 12;
|
||||||
text_icon_padding = 12;
|
text_icon_padding = 12;
|
||||||
frame_width = 4;
|
frame_width = 4;
|
||||||
separator_color = "frame";
|
separator_color = "frame";
|
||||||
idle_threshold = 120;
|
idle_threshold = 120;
|
||||||
font = "FiraCode Nerdfont 12";
|
font = "FiraCode Nerdfont 12";
|
||||||
line_height = 0;
|
line_height = 0;
|
||||||
format = "<b>%s</b>\n%b";
|
format = ''
|
||||||
alignment = "center";
|
<b>%s</b>
|
||||||
icon_position = "off";
|
%b'';
|
||||||
startup_notification = "false";
|
alignment = "center";
|
||||||
corner_radius = 12;
|
icon_position = "off";
|
||||||
|
startup_notification = "false";
|
||||||
|
corner_radius = 12;
|
||||||
|
|
||||||
frame_color = "#44465c";
|
frame_color = "#44465c";
|
||||||
background = "#303241";
|
background = "#303241";
|
||||||
foreground = "#d9e0ee";
|
foreground = "#d9e0ee";
|
||||||
timeout = 2;
|
timeout = 2;
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,11 +4,9 @@ with lib;
|
||||||
let cfg = config.modules.fuzzel;
|
let cfg = config.modules.fuzzel;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.modules.fuzzel = {enable = mkEnableOption "fuzzel"; };
|
options.modules.fuzzel = { enable = mkEnableOption "fuzzel"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ fuzzel clipman networkmanager_dmenu ];
|
||||||
fuzzel clipman networkmanager_dmenu
|
home.file.".config/fuzzel/fuzzel.ini".source = ./fuzzel.ini;
|
||||||
];
|
};
|
||||||
home.file.".config/fuzzel/fuzzel.ini".source = ./fuzzel.ini;
|
}
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
|
@ -7,7 +7,9 @@ in {
|
||||||
options.modules.gtk = { enable = mkEnableOption "gtk"; };
|
options.modules.gtk = { enable = mkEnableOption "gtk"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
dconf gtk-engine-murrine gnome.gnome-themes-extra
|
dconf
|
||||||
|
gtk-engine-murrine
|
||||||
|
gnome.gnome-themes-extra
|
||||||
];
|
];
|
||||||
home.sessionVariables.GTK_THEME = "Catppuccin-Macchiato-Compact-Mauve-Dark";
|
home.sessionVariables.GTK_THEME = "Catppuccin-Macchiato-Compact-Mauve-Dark";
|
||||||
gtk = {
|
gtk = {
|
||||||
|
@ -26,9 +28,9 @@ in {
|
||||||
package = pkgs.catppuccin-cursors.macchiatoMauve;
|
package = pkgs.catppuccin-cursors.macchiatoMauve;
|
||||||
};
|
};
|
||||||
iconTheme = {
|
iconTheme = {
|
||||||
name = "Papirus-Dark";
|
name = "Papirus-Dark";
|
||||||
package = pkgs.catppuccin-papirus-folders;
|
package = pkgs.catppuccin-papirus-folders;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home.pointerCursor = {
|
home.pointerCursor = {
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
|
|
|
@ -7,12 +7,19 @@ in {
|
||||||
options.modules.hyprland = { enable = mkEnableOption "hyprland"; };
|
options.modules.hyprland = { enable = mkEnableOption "hyprland"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
hyprpaper hyprland wl-clipboard hyprland-protocols wlogout swayidle
|
hyprpaper
|
||||||
|
hyprland
|
||||||
|
wl-clipboard
|
||||||
|
hyprland-protocols
|
||||||
|
wlogout
|
||||||
|
swayidle
|
||||||
];
|
];
|
||||||
|
|
||||||
home.file.".config/hypr/hyprland.conf".source = ./hyprland.conf;
|
home.file.".config/hypr/hyprland.conf".source = ./hyprland.conf;
|
||||||
home.file.".config/hypr/hyprpaper.conf".source = ./hyprpaper.conf;
|
home.file.".config/hypr/hyprpaper.conf".source = ./hyprpaper.conf;
|
||||||
home.file.".config/hypr/wallpaper.png".source = ../../pictures/wallpaper.png;
|
home.file.".config/hypr/wallpaper.png".source =
|
||||||
home.file.".config/hypr/lock-wallpaper.png".source = ../../pictures/lock-wallpaper.png;
|
../../pictures/wallpaper.png;
|
||||||
|
home.file.".config/hypr/lock-wallpaper.png".source =
|
||||||
|
../../pictures/lock-wallpaper.png;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,140 +4,136 @@ with lib;
|
||||||
let cfg = config.modules.kanshi;
|
let cfg = config.modules.kanshi;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.modules.kanshi = { enable = mkEnableOption "kanshi"; };
|
options.modules.kanshi = { enable = mkEnableOption "kanshi"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ kanshi ];
|
||||||
kanshi
|
|
||||||
];
|
|
||||||
|
|
||||||
services.kanshi = {
|
services.kanshi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
systemdTarget = "hyprland-session.target";
|
systemdTarget = "hyprland-session.target";
|
||||||
|
|
||||||
profiles = {
|
profiles = {
|
||||||
profile1 = {
|
profile1 = {
|
||||||
outputs = [
|
outputs = [
|
||||||
{
|
{
|
||||||
criteria = "Dell Inc. DELL P2419HC H565L03";
|
criteria = "Dell Inc. DELL P2419HC H565L03";
|
||||||
position = "0,0";
|
position = "0,0";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
criteria = "eDP-1";
|
criteria = "eDP-1";
|
||||||
status = "disable";
|
status = "disable";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
yoga = {
|
yoga = {
|
||||||
outputs = [{
|
outputs = [{
|
||||||
criteria = "California Institute of Technology 0x1410 Unknown";
|
|
||||||
mode = "3072x1920@120Hz";
|
|
||||||
scale = 1.0;
|
|
||||||
}];
|
|
||||||
};
|
|
||||||
|
|
||||||
lj_setup = {
|
|
||||||
outputs = [
|
|
||||||
{
|
|
||||||
criteria = "Samsung Electric Company C34H89x H4ZRB05512";
|
|
||||||
mode = "3440x1440@100Hz";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = "California Institute of Technology 0x1410 Unknown";
|
|
||||||
status = "disable";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
portable_monitor = {
|
|
||||||
outputs = [
|
|
||||||
{
|
|
||||||
criteria = "California Institute of Technology 0x1410 Unknown";
|
criteria = "California Institute of Technology 0x1410 Unknown";
|
||||||
mode = "3072x1920@120Hz";
|
mode = "3072x1920@120Hz";
|
||||||
scale = 1.0;
|
scale = 1.0;
|
||||||
position = "1128,3130";
|
}];
|
||||||
}
|
};
|
||||||
{
|
|
||||||
criteria = "Avolites Ltd ARZOPA -S1 0000000000000";
|
|
||||||
mode = "1920x1080@60Hz";
|
|
||||||
position = "1690,2050";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
portable_monitor_2 = {
|
lj_setup = {
|
||||||
outputs = [
|
outputs = [
|
||||||
{
|
{
|
||||||
|
criteria = "Samsung Electric Company C34H89x H4ZRB05512";
|
||||||
|
mode = "3440x1440@100Hz";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "California Institute of Technology 0x1410 Unknown";
|
||||||
|
status = "disable";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
portable_monitor = {
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = "California Institute of Technology 0x1410 Unknown";
|
||||||
|
mode = "3072x1920@120Hz";
|
||||||
|
scale = 1.0;
|
||||||
|
position = "1128,3130";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Avolites Ltd ARZOPA -S1 0000000000000";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "1690,2050";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
portable_monitor_2 = {
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = "AU Optronics 0x313D Unknown";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
scale = 1.0;
|
||||||
|
position = "1920,1080";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Avolites Ltd ARZOPA -S1 0000000000000";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "1920,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
lj_setup_2 = {
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = "AU Optronics 0x313D Unknown";
|
||||||
|
status = "disable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Samsung Electric Company C34H89x H4ZRB05512";
|
||||||
|
mode = "3440x1440@60Hz";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
hs_1 = {
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria = "AU Optronics 0x313D Unknown";
|
||||||
|
#mode = "1920x1080@60Hz";
|
||||||
|
#scale = 1.0;
|
||||||
|
#position = "0,1080";
|
||||||
|
status = "disable";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "Samsung Electric Company S24D330 0x00005B31";
|
||||||
|
mode = "1920x1080@60Hz";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
hs_22 = {
|
||||||
|
outputs = [
|
||||||
|
{
|
||||||
|
criteria =
|
||||||
|
"Philips Consumer Electronics Company PHL27M1N3200Z UK02329015881";
|
||||||
|
mode = "1920x1080@144";
|
||||||
|
}
|
||||||
|
{
|
||||||
|
criteria = "California Institute of Technology 0x1410 Unknown";
|
||||||
|
status = "disable";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
profile7 = {
|
||||||
|
outputs = [{
|
||||||
criteria = "AU Optronics 0x313D Unknown";
|
criteria = "AU Optronics 0x313D Unknown";
|
||||||
mode = "1920x1080@60Hz";
|
mode = "1920x1080@60Hz";
|
||||||
scale = 1.0;
|
scale = 1.0;
|
||||||
position = "1920,1080";
|
}];
|
||||||
}
|
};
|
||||||
{
|
|
||||||
criteria = "Avolites Ltd ARZOPA -S1 0000000000000";
|
|
||||||
mode = "1920x1080@60Hz";
|
|
||||||
position = "1920,0";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
lj_setup_2 = {
|
|
||||||
outputs = [
|
|
||||||
{
|
|
||||||
criteria = "AU Optronics 0x313D Unknown";
|
|
||||||
status = "disable";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = "Samsung Electric Company C34H89x H4ZRB05512";
|
|
||||||
mode = "3440x1440@60Hz";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
hs_1 = {
|
|
||||||
outputs = [
|
|
||||||
{
|
|
||||||
criteria = "AU Optronics 0x313D Unknown";
|
|
||||||
#mode = "1920x1080@60Hz";
|
|
||||||
#scale = 1.0;
|
|
||||||
#position = "0,1080";
|
|
||||||
status = "disable";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = "Samsung Electric Company S24D330 0x00005B31";
|
|
||||||
mode = "1920x1080@60Hz";
|
|
||||||
position = "0,0";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
hs_22 = {
|
|
||||||
outputs = [
|
|
||||||
{
|
|
||||||
criteria =
|
|
||||||
"Philips Consumer Electronics Company PHL27M1N3200Z UK02329015881";
|
|
||||||
mode = "1920x1080@144";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
criteria = "California Institute of Technology 0x1410 Unknown";
|
|
||||||
status = "disable";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
profile7 = {
|
|
||||||
outputs = [{
|
|
||||||
criteria = "AU Optronics 0x313D Unknown";
|
|
||||||
mode = "1920x1080@60Hz";
|
|
||||||
scale = 1.0;
|
|
||||||
}];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,12 +4,10 @@ with lib;
|
||||||
let cfg = config.modules.kitty;
|
let cfg = config.modules.kitty;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.modules.kitty = { enable = mkEnableOption "kitty"; };
|
options.modules.kitty = { enable = mkEnableOption "kitty"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ kitty ];
|
||||||
kitty
|
|
||||||
];
|
|
||||||
|
|
||||||
home.file.".config/kitty/kitty.conf".source = ./kitty.conf;
|
home.file.".config/kitty/kitty.conf".source = ./kitty.conf;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ config, pkgs, lib, ... }: {
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
vulkan-loader
|
vulkan-loader
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
# Remove unecessary preinstalled packages
|
# Remove unecessary preinstalled packages
|
||||||
environment.defaultPackages = [ ];
|
environment.defaultPackages = [ ];
|
||||||
|
|
||||||
environment.sessionVariables = { GTK_USE_PORTAL = "1"; };
|
environment.sessionVariables = { GTK_USE_PORTAL = "1"; };
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn";
|
environment.etc.openvpn.source = "${pkgs.update-resolv-conf}/libexec/openvpn";
|
||||||
|
|
||||||
# Laptop-specific packages (the other ones are installed in `packages.nix`)
|
# Laptop-specific packages (the other ones are installed in `packages.nix`)
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
acpi
|
acpi
|
||||||
tlp
|
tlp
|
||||||
|
@ -32,14 +32,15 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
default_session = {
|
default_session = {
|
||||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --greeting 'Welcome to NixOS!' --cmd Hyprland";
|
command =
|
||||||
|
"${pkgs.greetd.tuigreet}/bin/tuigreet --time --greeting 'Welcome to NixOS!' --cmd Hyprland";
|
||||||
user = "${user}";
|
user = "${user}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
systemd.services.sshd.wantedBy = lib.mkForce [];
|
systemd.services.sshd.wantedBy = lib.mkForce [ ];
|
||||||
|
|
||||||
programs.ssh.startAgent = true;
|
programs.ssh.startAgent = true;
|
||||||
|
|
||||||
|
@ -55,21 +56,18 @@
|
||||||
fonts = {
|
fonts = {
|
||||||
packages = with pkgs; [
|
packages = with pkgs; [
|
||||||
jetbrains-mono
|
jetbrains-mono
|
||||||
roboto
|
roboto
|
||||||
openmoji-color
|
openmoji-color
|
||||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||||
(nerdfonts.override { fonts = [ "FantasqueSansMono" ];})
|
(nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
|
||||||
];
|
];
|
||||||
|
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
hinting.autohint = true;
|
hinting.autohint = true;
|
||||||
defaultFonts = {
|
defaultFonts = { emoji = [ "OpenMoji Color" ]; };
|
||||||
emoji = [ "OpenMoji Color" ];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
xdg = {
|
xdg = {
|
||||||
icons.enable = true;
|
icons.enable = true;
|
||||||
portal = {
|
portal = {
|
||||||
|
@ -83,7 +81,6 @@
|
||||||
|
|
||||||
xdg.portal.config.common.default = "*";
|
xdg.portal.config.common.default = "*";
|
||||||
|
|
||||||
|
|
||||||
programs.dconf.enable = true;
|
programs.dconf.enable = true;
|
||||||
services.dbus.packages = with pkgs; [ dconf ];
|
services.dbus.packages = with pkgs; [ dconf ];
|
||||||
services.dbus.enable = true;
|
services.dbus.enable = true;
|
||||||
|
@ -93,10 +90,10 @@
|
||||||
package = lib.mkForce pkgs.gnome3.gvfs;
|
package = lib.mkForce pkgs.gnome3.gvfs;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Firmware Updater
|
# Firmware Updater
|
||||||
services.fwupd.enable = true;
|
services.fwupd.enable = true;
|
||||||
|
|
||||||
# Nix settings, auto cleanup and enable flakes
|
# Nix settings, auto cleanup and enable flakes
|
||||||
nix = {
|
nix = {
|
||||||
settings.auto-optimise-store = true;
|
settings.auto-optimise-store = true;
|
||||||
settings.allowed-users = [ "${user}" ];
|
settings.allowed-users = [ "${user}" ];
|
||||||
|
@ -109,10 +106,10 @@
|
||||||
experimental-features = nix-command flakes
|
experimental-features = nix-command flakes
|
||||||
keep-outputs = true
|
keep-outputs = true
|
||||||
keep-derivations = true
|
keep-derivations = true
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Boot settings: clean /tmp/, latest kernel and enable bootloader
|
# Boot settings: clean /tmp/, latest kernel and enable bootloader
|
||||||
boot = {
|
boot = {
|
||||||
tmp.cleanOnBoot = true;
|
tmp.cleanOnBoot = true;
|
||||||
loader = {
|
loader = {
|
||||||
|
@ -123,7 +120,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set up locales (timezone and keyboard layout)
|
# Set up locales (timezone and keyboard layout)
|
||||||
time.timeZone = "Europe/Ljubljana";
|
time.timeZone = "Europe/Ljubljana";
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
console = {
|
console = {
|
||||||
|
@ -131,25 +128,25 @@
|
||||||
keyMap = "en";
|
keyMap = "en";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set up user and enable sudo
|
# Set up user and enable sudo
|
||||||
users.users.${user} = {
|
users.users.${user} = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "input" "wheel" "networkmanager" "libvirtd" "wireshark" ];
|
extraGroups = [ "input" "wheel" "networkmanager" "libvirtd" "wireshark" ];
|
||||||
initialHashedPassword = "$6$wqCHereET3WM6UIA$XeJIgGkmO2/zAkktN2JCx5hLNS3kSj6seVQBdSWoMeJ5MOrIha6B/HiDjHI4oKDKYhYVwjgQFqGpncU6OI7Ud/"; # password: d3fault
|
initialHashedPassword =
|
||||||
|
"$6$wqCHereET3WM6UIA$XeJIgGkmO2/zAkktN2JCx5hLNS3kSj6seVQBdSWoMeJ5MOrIha6B/HiDjHI4oKDKYhYVwjgQFqGpncU6OI7Ud/"; # password: d3fault
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set up networking and secure it
|
# Set up networking and secure it
|
||||||
networking = {
|
networking = {
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
hostName = "${hostName}";
|
hostName = "${hostName}";
|
||||||
firewall.enable = false; # This one is necessary to expose ports to the netwok. Usefull for smbserver, responder, http.server, ...
|
firewall.enable =
|
||||||
extraHosts =
|
false; # This one is necessary to expose ports to the netwok. Usefull for smbserver, responder, http.server, ...
|
||||||
''
|
extraHosts = ""; # For adding hosts.
|
||||||
''; # For adding hosts.
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set environment variables
|
# Set environment variables
|
||||||
environment.variables = {
|
environment.variables = {
|
||||||
NIXOS_CONFIG_DIR = "$HOME/.config/nixos/";
|
NIXOS_CONFIG_DIR = "$HOME/.config/nixos/";
|
||||||
NIXPKGS_ALLOW_INSECURE = "1";
|
NIXPKGS_ALLOW_INSECURE = "1";
|
||||||
|
@ -167,24 +164,25 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.localBinInPath = true;
|
environment.localBinInPath = true;
|
||||||
# Security
|
# Security
|
||||||
security = {
|
security = {
|
||||||
sudo.enable = true;
|
sudo.enable = true;
|
||||||
# Extra security
|
# Extra security
|
||||||
protectKernelImage = true;
|
protectKernelImage = true;
|
||||||
pam.services.gtklock.text = lib.readFile "${pkgs.gtklock}/etc/pam.d/gtklock";
|
pam.services.gtklock.text =
|
||||||
|
lib.readFile "${pkgs.gtklock}/etc/pam.d/gtklock";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Sound (PipeWire)
|
# Sound (PipeWire)
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
security.rtkit.enable = true;
|
security.rtkit.enable = true;
|
||||||
services.pipewire = {
|
services.pipewire = {
|
||||||
enable = true;
|
enable = true;
|
||||||
alsa.enable = true;
|
alsa.enable = true;
|
||||||
alsa.support32Bit = true;
|
alsa.support32Bit = true;
|
||||||
pulse.enable = true;
|
pulse.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
bluetooth.enable = true;
|
bluetooth.enable = true;
|
||||||
|
@ -194,7 +192,8 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualisation.waydroid.enable = true; # For mobile app pentesting TODO: Move to module.
|
virtualisation.waydroid.enable =
|
||||||
|
true; # For mobile app pentesting TODO: Move to module.
|
||||||
programs.adb.enable = true;
|
programs.adb.enable = true;
|
||||||
|
|
||||||
services.blueman.enable = true;
|
services.blueman.enable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ inputs, lib, config, pkgs, ... }:
|
{ inputs, lib, config, pkgs, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let cfg = config.modules.waybar;
|
let cfg = config.modules.waybar;
|
||||||
|
@ -10,8 +10,8 @@ in {
|
||||||
programs.waybar = {
|
programs.waybar = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.waybar.overrideAttrs (oldAttrs: {
|
package = pkgs.waybar.overrideAttrs (oldAttrs: {
|
||||||
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
home.file.".config/waybar/style.css".source = ./style.css;
|
home.file.".config/waybar/style.css".source = ./style.css;
|
||||||
|
|
|
@ -4,114 +4,108 @@ with lib;
|
||||||
let cfg = config.modules.zsh;
|
let cfg = config.modules.zsh;
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.modules.zsh = { enable = mkEnableOption "zsh"; };
|
options.modules.zsh = { enable = mkEnableOption "zsh"; };
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [ zsh fzf lsd grc eza ];
|
||||||
zsh
|
|
||||||
fzf
|
|
||||||
lsd
|
|
||||||
grc
|
|
||||||
eza
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.zsh = {
|
programs.zsh = {
|
||||||
enable = true;
|
|
||||||
shellAliases = {
|
|
||||||
md-notes = "cd ~/Documents/md-notes/ && nvim .";
|
|
||||||
randwall = "feh --bg-scale --randomize ~/pictures/wallpapers/*";
|
|
||||||
zapiski = "~/Documents/faks_git/FRI-ZAPISKI";
|
|
||||||
ctf = "cd ~/Documents/ctf/2022";
|
|
||||||
faks = "cd ~/Documents/faks";
|
|
||||||
faks-git = "cd ~/Documents/faks_git";
|
|
||||||
rm = "rm -i";
|
|
||||||
night = "brightnessctl s 1%";
|
|
||||||
nightlock = "swaylock -c 000000";
|
|
||||||
hsrv = "ssh hsrv";
|
|
||||||
rs = "export QT_QPA_PLATFORM=xcb; rstudio-bin --no-sandbox &";
|
|
||||||
rot13 = "tr 'A-Za-z' 'N-ZA-Mn-za-m'";
|
|
||||||
nix-update = "nix-channel --update && nix-env -u";
|
|
||||||
ls = "lsd";
|
|
||||||
sus = "systemctl suspend";
|
|
||||||
sur = "systemctl reboot";
|
|
||||||
sup = "power off";
|
|
||||||
hg = "history | grep";
|
|
||||||
ss = "grc ss";
|
|
||||||
tree = "eza --tree";
|
|
||||||
rebuild-os =
|
|
||||||
"sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/.config/home-manager#yoga --impure";
|
|
||||||
};
|
|
||||||
initExtra = ''
|
|
||||||
export EDITOR='nvim'
|
|
||||||
|
|
||||||
bin_txt() {
|
|
||||||
curl -X PUT --data "$1" https://p.spanskiduh.dev
|
|
||||||
}
|
|
||||||
|
|
||||||
bin_file() {
|
|
||||||
curl -X PUT --data-binary "@$1" https://p.spanskiduh.dev
|
|
||||||
}
|
|
||||||
|
|
||||||
cleanup-os() {
|
|
||||||
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
|
|
||||||
sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system
|
|
||||||
sudo nix-collect-garbage -d
|
|
||||||
sudo nix-store --optimize
|
|
||||||
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
# Gpg tty
|
|
||||||
GPG_TTY=$(tty)
|
|
||||||
export GPG_TTY
|
|
||||||
export FUNCNEST=500
|
|
||||||
|
|
||||||
'';
|
|
||||||
oh-my-zsh = {
|
|
||||||
enable = true;
|
enable = true;
|
||||||
theme = "cypher";
|
shellAliases = {
|
||||||
|
md-notes = "cd ~/Documents/md-notes/ && nvim .";
|
||||||
|
randwall = "feh --bg-scale --randomize ~/pictures/wallpapers/*";
|
||||||
|
zapiski = "~/Documents/faks_git/FRI-ZAPISKI";
|
||||||
|
ctf = "cd ~/Documents/ctf/2022";
|
||||||
|
faks = "cd ~/Documents/faks";
|
||||||
|
faks-git = "cd ~/Documents/faks_git";
|
||||||
|
rm = "rm -i";
|
||||||
|
night = "brightnessctl s 1%";
|
||||||
|
nightlock = "swaylock -c 000000";
|
||||||
|
hsrv = "ssh hsrv";
|
||||||
|
rs = "export QT_QPA_PLATFORM=xcb; rstudio-bin --no-sandbox &";
|
||||||
|
rot13 = "tr 'A-Za-z' 'N-ZA-Mn-za-m'";
|
||||||
|
nix-update = "nix-channel --update && nix-env -u";
|
||||||
|
ls = "lsd";
|
||||||
|
sus = "systemctl suspend";
|
||||||
|
sur = "systemctl reboot";
|
||||||
|
sup = "power off";
|
||||||
|
hg = "history | grep";
|
||||||
|
ss = "grc ss";
|
||||||
|
tree = "eza --tree";
|
||||||
|
rebuild-os =
|
||||||
|
"sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/.config/home-manager#yoga --impure";
|
||||||
|
};
|
||||||
|
initExtra = ''
|
||||||
|
export EDITOR='nvim'
|
||||||
|
|
||||||
|
bin_txt() {
|
||||||
|
curl -X PUT --data "$1" https://p.spanskiduh.dev
|
||||||
|
}
|
||||||
|
|
||||||
|
bin_file() {
|
||||||
|
curl -X PUT --data-binary "@$1" https://p.spanskiduh.dev
|
||||||
|
}
|
||||||
|
|
||||||
|
cleanup-os() {
|
||||||
|
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
|
||||||
|
sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system
|
||||||
|
sudo nix-collect-garbage -d
|
||||||
|
sudo nix-store --optimize
|
||||||
|
sudo nix-env --list-generations --profile /nix/var/nix/profiles/system
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
# Gpg tty
|
||||||
|
GPG_TTY=$(tty)
|
||||||
|
export GPG_TTY
|
||||||
|
export FUNCNEST=500
|
||||||
|
|
||||||
|
'';
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
theme = "cypher";
|
||||||
|
plugins = [
|
||||||
|
"sudo"
|
||||||
|
"terraform"
|
||||||
|
"systemadmin"
|
||||||
|
"vi-mode"
|
||||||
|
"z"
|
||||||
|
"colorize"
|
||||||
|
"compleat"
|
||||||
|
"ansible"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
plugins = [
|
plugins = [
|
||||||
"sudo"
|
{
|
||||||
"terraform"
|
name = "zsh-autosuggestions";
|
||||||
"systemadmin"
|
src = pkgs.fetchFromGitHub {
|
||||||
"vi-mode"
|
owner = "zsh-users";
|
||||||
"z"
|
repo = "zsh-autosuggestions";
|
||||||
"colorize"
|
rev = "v0.4.0";
|
||||||
"compleat"
|
sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
|
||||||
"ansible"
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "fzf-tab";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "Aloxaf";
|
||||||
|
repo = "fzf-tab";
|
||||||
|
rev = "b06e7574577cd729c629419a62029d31d0565a7a";
|
||||||
|
sha256 = "sha256-ilUavAIWmLiMh2PumtErMCpOcR71ZMlQkKhVOTDdHZw=";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
{
|
||||||
|
name = "warhol";
|
||||||
|
src = pkgs.fetchFromGitHub {
|
||||||
|
owner = "unixorn";
|
||||||
|
repo = "warhol.plugin.zsh";
|
||||||
|
rev = "49a2fb6789179c789f54b95221c91fdc1bd5f804";
|
||||||
|
sha256 = "sha256-cL7qfgoJseS/epWPyzUy0Ul4GMtyPzYkZ5tsHbRjcRI=";
|
||||||
|
};
|
||||||
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
plugins = [
|
|
||||||
{
|
|
||||||
name = "zsh-autosuggestions";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "zsh-users";
|
|
||||||
repo = "zsh-autosuggestions";
|
|
||||||
rev = "v0.4.0";
|
|
||||||
sha256 = "0z6i9wjjklb4lvr7zjhbphibsyx51psv50gm07mbb0kj9058j6kc";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "fzf-tab";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "Aloxaf";
|
|
||||||
repo = "fzf-tab";
|
|
||||||
rev = "b06e7574577cd729c629419a62029d31d0565a7a";
|
|
||||||
sha256 = "sha256-ilUavAIWmLiMh2PumtErMCpOcR71ZMlQkKhVOTDdHZw=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
{
|
|
||||||
name = "warhol";
|
|
||||||
src = pkgs.fetchFromGitHub {
|
|
||||||
owner = "unixorn";
|
|
||||||
repo = "warhol.plugin.zsh";
|
|
||||||
rev = "49a2fb6789179c789f54b95221c91fdc1bd5f804";
|
|
||||||
sha256 = "sha256-cL7qfgoJseS/epWPyzUy0Ul4GMtyPzYkZ5tsHbRjcRI=";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue