Compare commits

..

No commits in common. "092579af9878e0b7d31a3ae4979203537cafccaa" and "412ce8623a783095943bb73ea81c7542c6fe469f" have entirely different histories.

56 changed files with 218 additions and 439 deletions

View File

@ -18,41 +18,34 @@
nvf.url = "github:notashelf/nvf"; nvf.url = "github:notashelf/nvf";
}; };
outputs = outputs = { self, nixpkgs, nix-flatpak, nvf, ... } @ inputs:
{
self,
nixpkgs,
nix-flatpak,
nvf,
...
}@inputs:
let let
system = "x86_64-linux"; system = "x86_64-linux";
overlays = builtins.attrValues (import ./overlays); overlays = builtins.attrValues (import ./overlays);
in in
{ {
nixosConfigurations = { nixosConfigurations = {
desktop1 = nixpkgs.lib.nixosSystem { desktop1 = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system overlays; }; specialArgs = { inherit inputs system overlays; };
modules = [ modules = [
./hosts/desktop1/configuration.nix ./hosts/desktop1/configuration.nix
nix-flatpak.nixosModules.nix-flatpak nix-flatpak.nixosModules.nix-flatpak
inputs.stylix.nixosModules.stylix inputs.stylix.nixosModules.stylix
nvf.nixosModules.default nvf.nixosModules.default
]; ];
};
laptop1 = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system overlays; };
modules = [
./hosts/laptop1/configuration.nix
nix-flatpak.nixosModules.nix-flatpak
inputs.stylix.nixosModules.stylix
nvf.nixosModules.default
];
};
}; };
laptop1 = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs system overlays; };
modules = [
./hosts/laptop1/configuration.nix
nix-flatpak.nixosModules.nix-flatpak
inputs.stylix.nixosModules.stylix
nvf.nixosModules.default
];
};
}; };
};
} }

View File

@ -1,25 +1,18 @@
{ { inputs, pkgs, overlays, ... }:
inputs,
pkgs,
overlays,
...
}:
{ {
imports = [ imports =
inputs.home-manager.nixosModules.home-manager [
../../modules/nix/default.nix inputs.home-manager.nixosModules.home-manager
]; ../../modules/nix/default.nix
];
nixpkgs.overlays = overlays; nixpkgs.overlays = overlays;
users.users.smayzy = { users.users.smayzy = {
isNormalUser = true; isNormalUser = true;
description = "smayzy"; description = "smayzy";
extraGroups = [ extraGroups = [ "networkmanager" "wheel" ];
"networkmanager"
"wheel"
];
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View File

@ -1,8 +1,9 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
imports = [ imports =
../../modules/home-manager/default.nix [
../../modules/home-manager/default.nix
]; ];
smayzy.webapps.enable = true; smayzy.webapps.enable = true;
@ -25,7 +26,7 @@
recursive = true; recursive = true;
force = true; force = true;
}; };
"wallpaper" = { "wallpaper" = {
source = builtins.toPath ../../wallpapers; source = builtins.toPath ../../wallpapers;
recursive = true; recursive = true;
force = true; force = true;
@ -40,8 +41,8 @@
dconf.settings = { dconf.settings = {
"org/virt-manager/virt-manager/connections" = { "org/virt-manager/virt-manager/connections" = {
autoconnect = [ "qemu:///system" ]; autoconnect = ["qemu:///system"];
uris = [ "qemu:///system" ]; uris = ["qemu:///system"];
}; };
}; };
@ -52,9 +53,9 @@
syntaxHighlighting.enable = true; syntaxHighlighting.enable = true;
history.size = 100000; history.size = 100000;
shellAliases = { shellAliases = {
grep = "grep --color=auto"; grep = "grep --color=auto";
cp = "cp -r"; cp = "cp -r";
cd = "sl"; cd = "sl";
}; };
}; };

View File

@ -1,10 +1,11 @@
{ inputs, config, ... }: { inputs, config, ... }:
{ {
imports = [ imports =
../common/common.nix [
./hardware-configuration.nix ../common/common.nix
]; ./hardware-configuration.nix
];
networking.hostName = "desktop1"; networking.hostName = "desktop1";

View File

@ -1,41 +1,25 @@
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ imports =
(modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
"xhci_pci"
"ahci"
"nvme"
"usb_storage"
"usbhid"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/976bcf9c-3b56-4aa6-98f8-1c899af2b0f8"; { device = "/dev/disk/by-uuid/976bcf9c-3b56-4aa6-98f8-1c899af2b0f8";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/8E7F-2417"; { device = "/dev/disk/by-uuid/8E7F-2417";
fsType = "vfat"; fsType = "vfat";
options = [ options = [ "fmask=0077" "dmask=0077" ];
"fmask=0077" };
"dmask=0077"
];
};
swapDevices = [ ]; swapDevices = [ ];

View File

@ -1,7 +1,8 @@
{ ... }: { ... }:
{ {
imports = [ imports =
../common/home.nix [
../common/home.nix
]; ];
} }

View File

@ -1,11 +1,12 @@
{ inputs, config, ... }: { inputs, config, ... }:
{ {
imports = [ imports =
../common/common.nix [
./hardware-configuration.nix ../common/common.nix
]; ./hardware-configuration.nix
];
smayzy = { smayzy = {
laptop.enable = true; laptop.enable = true;
hyprland.enable = true; hyprland.enable = true;

View File

@ -1,46 +1,32 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ { config, lib, pkgs, modulesPath, ... }:
config,
lib,
pkgs,
modulesPath,
...
}:
{ {
imports = [ imports =
(modulesPath + "/installer/scan/not-detected.nix") [ (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ];
"xhci_pci"
"nvme"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" =
device = "/dev/disk/by-uuid/fa4f1a61-338b-4f1e-9f6c-2b2f2cd12f38"; { device = "/dev/disk/by-uuid/fa4f1a61-338b-4f1e-9f6c-2b2f2cd12f38";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = { fileSystems."/boot" =
device = "/dev/disk/by-uuid/8E15-A6E3"; { device = "/dev/disk/by-uuid/8E15-A6E3";
fsType = "vfat"; fsType = "vfat";
options = [ options = [ "fmask=0077" "dmask=0077" ];
"fmask=0077" };
"dmask=0077"
swapDevices =
[ { device = "/dev/disk/by-uuid/b451db56-e0a5-4799-88a1-34a31ffe3b08"; }
]; ];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/b451db56-e0a5-4799-88a1-34a31ffe3b08"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's # (the default) this is the recommended approach. When using systemd-networkd it's

View File

@ -1,7 +1,8 @@
{ ... }: { ... }:
{ {
imports = [ imports =
../common/home.nix [
../common/home.nix
]; ];
} }

View File

@ -1,9 +1,4 @@
{ { pkgs, lib, config, ... }:
pkgs,
lib,
config,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -13,26 +8,27 @@ in
default = false; default = false;
description = "set to true if you want to use a nvidia GC"; description = "set to true if you want to use a nvidia GC";
}; };
config = mkIf config.smayzy.lf.enable { config = mkIf config.smayzy.lf.enable {
xdg.configFile."lf/icons".source = ./icons; xdg.configFile."lf/icons".source = ./icons;
programs.lf = { programs.lf = {
enable = true; enable = true;
commands = { commands = {
dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"''; dragon-out = ''%${pkgs.xdragon}/bin/xdragon -a -x "$fx"'';
editor-open = ''$$EDITOR $f''; editor-open = ''$$EDITOR $f'';
mkdir = '' mkdir = ''
''${{ ''${{
printf "Directory Name: " printf "Directory Name: "
read DIR read DIR
mkdir $DIR mkdir $DIR
}} }}
''; '';
}; };
keybindings = { keybindings = {
"\\\"" = ""; "\\\"" = "";
o = ""; o = "";
c = "mkdir"; c = "mkdir";
@ -40,18 +36,18 @@ in
"`" = "mark-load"; "`" = "mark-load";
"\\'" = "mark-load"; "\\'" = "mark-load";
"<enter>" = "open"; "<enter>" = "open";
do = "dragon-out"; do = "dragon-out";
"g~" = "cd"; "g~" = "cd";
gh = "cd"; gh = "cd";
"g/" = "/"; "g/" = "/";
ee = "editor-open"; ee = "editor-open";
V = ''$${pkgs.bat}/bin/bat --paging=always --theme=gruvbox "$f"''; V = ''$${pkgs.bat}/bin/bat --paging=always --theme=gruvbox "$f"'';
}; };
settings = { settings = {
preview = true; preview = true;
hidden = true; hidden = true;
@ -59,31 +55,32 @@ in
icons = true; icons = true;
ignorecase = true; ignorecase = true;
}; };
extraConfig = extraConfig =
let let
previewer = pkgs.writeShellScriptBin "pv.sh" '' previewer =
file=$1 pkgs.writeShellScriptBin "pv.sh" ''
w=$2 file=$1
h=$3 w=$2
x=$4 h=$3
y=$5 x=$4
y=$5
if [[ "$( ${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then
${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty if [[ "$( ${pkgs.file}/bin/file -Lb --mime-type "$file")" =~ ^image ]]; then
exit 1 ${pkgs.kitty}/bin/kitty +kitten icat --silent --stdin no --transfer-mode file --place "''${w}x''${h}@''${x}x''${y}" "$file" < /dev/null > /dev/tty
fi exit 1
fi
${pkgs.pistol}/bin/pistol "$file"
''; ${pkgs.pistol}/bin/pistol "$file"
cleaner = pkgs.writeShellScriptBin "clean.sh" ''
${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
'';
in
''
set cleaner ${cleaner}/bin/clean.sh
set previewer ${previewer}/bin/pv.sh
''; '';
cleaner = pkgs.writeShellScriptBin "clean.sh" ''
${pkgs.kitty}/bin/kitty +kitten icat --clear --stdin no --silent --transfer-mode file < /dev/null > /dev/tty
'';
in
''
set cleaner ${cleaner}/bin/clean.sh
set previewer ${previewer}/bin/pv.sh
'';
}; };
}; };
} }

View File

@ -1,9 +1,4 @@
{ { lib, pkgs, config, ... }:
lib,
pkgs,
config,
...
}:
let let
browser = lib.getExe pkgs.firefox; browser = lib.getExe pkgs.firefox;
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;

View File

@ -1,10 +1,4 @@
{ { lib, config, pkgs, smayzy, ... }:
lib,
config,
pkgs,
smayzy,
...
}:
let let
mkIf = lib.mkIf; mkIf = lib.mkIf;
in in
@ -60,12 +54,12 @@ in
}; };
}) })
]; ];
systemd.user.services.hypr-wallpaper = { systemd.user.services.hypr-wallpaper = {
Unit = { Unit = {
Description = "Wallpaper auto-changer"; Description = "Wallpaper auto-changer";
}; };
Service = { Service = {
ExecStart = "${pkgs.bash}/bin/bash /home/smayzy/.config/hypr/wallpaper.sh"; ExecStart = "${pkgs.bash}/bin/bash /home/smayzy/.config/hypr/wallpaper.sh";
Restart = "always"; Restart = "always";
@ -75,3 +69,4 @@ in
}; };
} }

View File

@ -8,7 +8,7 @@ in
default = false; default = false;
description = "audio settings"; description = "audio settings";
}; };
config = mkIf config.smayzy.audio.enable { config = mkIf config.smayzy.audio.enable {
services.pulseaudio.enable = false; services.pulseaudio.enable = false;
security.rtkit.enable = true; security.rtkit.enable = true;

View File

@ -1,9 +1,4 @@
{ { config, lib, pkgs, ...}:
config,
lib,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,4 +1,4 @@
{ config, lib, ... }: { config, lib, ...}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -12,11 +12,11 @@ in
config = mkIf config.smayzy.nh.enable { config = mkIf config.smayzy.nh.enable {
programs.nh = { programs.nh = {
enable = true; enable = true;
clean = { clean= {
enable = true; enable = true;
extraArgs = "--keep 10"; extraArgs = "--keep 10";
dates = "hourly"; dates = "hourly";
}; };
flake = "/home/smayzy/nix-config"; flake = "/home/smayzy/nix-config";
}; };
}; };

View File

@ -1,9 +1,4 @@
{ { config, lib, pkgs, ... }:
config,
lib,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -13,7 +8,7 @@ in
default = false; default = false;
description = "nvf config"; description = "nvf config";
}; };
config = mkIf config.smayzy.nvf.enable { config = mkIf config.smayzy.nvf.enable {
programs.nvf = { programs.nvf = {
enable = true; enable = true;
@ -30,14 +25,14 @@ in
clang.enable = true; clang.enable = true;
rust.enable = true; rust.enable = true;
}; };
theme = { theme = {
enable = true; enable = true;
name = lib.mkDefault "dracula"; name = lib.mkDefault "dracula";
}; };
treesitter.enable = true; treesitter.enable = true;
statusline.lualine.enable = true; statusline.lualine.enable = true;
telescope.enable = true; telescope.enable = true;
autocomplete.nvim-cmp.enable = true; autocomplete.nvim-cmp.enable = true;
}; };
}; };
}; };

View File

@ -1,9 +1,4 @@
{ { config, lib, pkgs, ...}:
config,
lib,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -26,7 +21,6 @@ in
fastfetch fastfetch
lf lf
tshark tshark
nixfmt
]; ];
}; };
} }

View File

@ -1,4 +1,4 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,4 +1,4 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -15,6 +10,6 @@ in
}; };
config = mkIf config.smayzy.floorp.enable { config = mkIf config.smayzy.floorp.enable {
environment.systemPackages = with pkgs; [ floorp ]; environment.systemPackages = with pkgs; [ floorp ];
}; };
} }

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -15,6 +10,6 @@ in
}; };
config = mkIf config.smayzy.librewolf.enable { config = mkIf config.smayzy.librewolf.enable {
environment.systemPackages = with pkgs; [ librewolf ]; environment.systemPackages = with pkgs; [ librewolf ];
}; };
} }

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,4 +1,4 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -28,27 +28,22 @@
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
time.timeZone = "Europe/Paris"; time.timeZone = "Europe/Paris";
nixpkgs.config.allowUnfreePredicate = nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
pkg: "steam"
builtins.elem (lib.getName pkg) [ "steam-original"
"steam" "steam-unwrapped"
"steam-original" "steam-run"
"steam-unwrapped" "obsidian"
"steam-run" "nvidia-x11"
"obsidian" "nvidia-settings"
"nvidia-x11" ];
"nvidia-settings"
];
services.xserver.xkb = { services.xserver.xkb = {
layout = "fr"; layout = "fr";
variant = ""; variant = "";
}; };
console.keyMap = "fr"; console.keyMap = "fr";
nix.settings.experimental-features = [ nix.settings.experimental-features = [ "nix-command" "flakes" ];
"nix-command"
"flakes"
];
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
} }

View File

@ -1,4 +1,4 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,4 +1,4 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
@ -21,10 +21,10 @@ let
]; ];
flatpaks = flatpaks =
(if config.smayzy.flatpak.gaming.enable then gaming else [ ]) (if config.smayzy.flatpak.gaming.enable then gaming else [])
++ (if config.smayzy.flatpak.dev.enable then dev else [ ]) ++ (if config.smayzy.flatpak.dev.enable then dev else [])
++ (if config.smayzy.flatpak.utils.enable then utils else [ ]) ++ (if config.smayzy.flatpak.utils.enable then utils else [])
++ (if config.smayzy.flatpak.media.enable then media else [ ]); ++ (if config.smayzy.flatpak.media.enable then media else []);
in in
{ {
options.smayzy.flatpak = mkOption { options.smayzy.flatpak = mkOption {
@ -35,25 +35,25 @@ in
default = false; default = false;
description = "enable flatpak support"; description = "enable flatpak support";
}; };
gaming.enable = mkOption { gaming.enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = "enable gaming flatpaks"; description = "enable gaming flatpaks";
}; };
dev.enable = mkOption { dev.enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;
description = "enable dev flatpaks"; description = "enable dev flatpaks";
}; };
utils.enable = mkOption { utils.enable = mkOption {
type = types.bool; type = types.bool;
default = true; default = true;
description = "enable utils flatpak"; description = "enable utils flatpak";
}; };
media.enable = mkOption { media.enable = mkOption {
type = types.bool; type = types.bool;
default = false; default = false;

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,4 +1,4 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,4 +1,4 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,4 +1,4 @@
{ lib, config, ... }: { lib, config, ... }:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -20,7 +20,7 @@ in
floorp.enable = true; floorp.enable = true;
stylix.enable = true; stylix.enable = true;
audio.enable = true; audio.enable = true;
office.enable = true; office.enable= true;
webcord.enable = true; webcord.enable = true;
element.enable = true; element.enable = true;
sddm.enable = true; sddm.enable = true;

View File

@ -1,6 +1,6 @@
{ config, lib, ... }: { config, lib, ... }:
with lib; with lib;
{ {
options.smayzy.grub-on-lap.enable = mkOption { options.smayzy.grub-on-lap.enable = mkOption {
@ -8,8 +8,8 @@ with lib;
default = false; default = false;
description = "make grub works on this piece of shit laptop that can't boot normally"; description = "make grub works on this piece of shit laptop that can't boot normally";
}; };
config = { config = {
boot.loader.systemd-boot.enable = false; boot.loader.systemd-boot.enable = false;
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true; boot.loader.grub.efiSupport = true;
@ -19,4 +19,4 @@ with lib;
boot.loader.efi.canTouchEfiVariables = mkIf (!config.smayzy.grub-on-lap.enable) true; boot.loader.efi.canTouchEfiVariables = mkIf (!config.smayzy.grub-on-lap.enable) true;
}; };
} }

View File

@ -1,15 +1,7 @@
{ config, lib, ... }: { config, lib, ... }:
let let
inherit (lib) inherit (lib) mkIf mkOption types mkMerge;
mkIf validOptions = [ "desktop" "laptop" ];
mkOption
types
mkMerge
;
validOptions = [
"desktop"
"laptop"
];
in in
{ {
options.smayzy.power = mkOption { options.smayzy.power = mkOption {
@ -25,8 +17,8 @@ in
enable = true; enable = true;
settings = { settings = {
charger = { charger = {
governor = "performance"; governor = "performance";
turbo = "auto"; turbo = "auto";
}; };
}; };
}; };
@ -40,15 +32,15 @@ in
settings = { settings = {
CPU_SCALING_GOVERNOR_ON_AC = "performance"; CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; CPU_ENERGY_PERF_POLICY_ON_BAT = "power";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_MIN_PERF_ON_AC = 0; CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100; CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0; CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 100; CPU_MAX_PERF_ON_BAT = 100;
STOP_CHARGE_THRESH_BAT0 = 95; STOP_CHARGE_THRESH_BAT0 = 95;
}; };
}; };

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { config, lib, pkgs, ... }:
config,
lib,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { config, lib, pkgs, ... }:
config,
lib,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -16,13 +11,13 @@ in
config = mkIf config.smayzy.virt.enable { config = mkIf config.smayzy.virt.enable {
programs.virt-manager.enable = true; programs.virt-manager.enable = true;
users.groups.libvirtd.members = [ "smayzy" ]; users.groups.libvirtd.members = ["smayzy"];
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.qemu.runAsRoot = false; virtualisation.libvirtd.qemu.runAsRoot = false;
virtualisation.libvirtd.qemu.ovmf.enable = true; virtualisation.libvirtd.qemu.ovmf.enable = true;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
qemu_kvm qemu_kvm
]; ];
# https://wiki.nixos.org/wiki/QEMU # https://wiki.nixos.org/wiki/QEMU

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in

View File

@ -1,9 +1,4 @@
{ { lib, config, pkgs, ... }:
lib,
config,
pkgs,
...
}:
let let
inherit (lib) mkIf mkOption types; inherit (lib) mkIf mkOption types;
in in
@ -19,10 +14,10 @@ in
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
}; };
xdg.portal.enable = true; xdg.portal.enable = true;
xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
fonts.packages = with pkgs; [ nerd-fonts.jetbrains-mono ]; fonts.packages = with pkgs; [ nerd-fonts.jetbrains-mono ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [