This commit is contained in:
Hadi 2024-05-02 15:40:12 +02:00
parent 92ec6a5ea8
commit 81ab14b256
86 changed files with 227 additions and 146 deletions

View File

@ -33,11 +33,11 @@
]
},
"locked": {
"lastModified": 1711099426,
"narHash": "sha256-HzpgM/wc3aqpnHJJ2oDqPBkNsqWbW0WfWUO8lKu8nGk=",
"lastModified": 1713532798,
"narHash": "sha256-wtBhsdMJA3Wa32Wtm1eeo84GejtI43pMrFrmwLXrsEc=",
"owner": "numtide",
"repo": "devshell",
"rev": "2d45b54ca4a183f2fdcf4b19c895b64fbf620ee8",
"rev": "12e914740a25ea1891ec619bb53cf5e6ca922e40",
"type": "github"
},
"original": {
@ -198,11 +198,11 @@
]
},
"locked": {
"lastModified": 1713566308,
"narHash": "sha256-7Y91t8pheIzjJveUMAPyeh5NOq5F49Nq4Hl2532QpJs=",
"lastModified": 1714515075,
"narHash": "sha256-azMK7aWH0eUc3IqU4Fg5rwZdB9WZBvimOGG3piqvtsY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "057117a401a34259c9615ce62218aea7afdee4d3",
"rev": "6d3b6dc9222c12b951169becdf4b0592ee9576ef",
"type": "github"
},
"original": {
@ -219,11 +219,11 @@
]
},
"locked": {
"lastModified": 1712989663,
"narHash": "sha256-r2X/DIAyKOLiHoncjcxUk1TENWDTTaigRBaY53Cts/w=",
"lastModified": 1714343445,
"narHash": "sha256-OzD1P0o46uD3Ix4ZI/g9z3YAeg+4g+W3qctB6bNOReo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "40ab43ae98cb3e6f07eaeaa3f3ed56d589da21b0",
"rev": "9fe79591c1005ce6f93084ae7f7dab0a2891440d",
"type": "github"
},
"original": {
@ -248,11 +248,11 @@
]
},
"locked": {
"lastModified": 1713214463,
"narHash": "sha256-zAOOjqHAbccCRgJSuvTCA0FNLqKswN63LgVo43R7pxw=",
"lastModified": 1713612213,
"narHash": "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "0a53b9957f0b17f1a0036b25198f569969ad43a0",
"rev": "cab4746180f210a3c1dd3d53e45c510e309e90e1",
"type": "github"
},
"original": {
@ -266,17 +266,18 @@
"hyprcursor": "hyprcursor",
"hyprland-protocols": "hyprland-protocols",
"hyprlang": "hyprlang",
"hyprwayland-scanner": "hyprwayland-scanner",
"nixpkgs": "nixpkgs_2",
"systems": "systems_2",
"wlroots": "wlroots",
"xdph": "xdph"
},
"locked": {
"lastModified": 1713576016,
"narHash": "sha256-myIH+dRrr4PX8CEeWqHY+FsV86yxqaux7uDw1JPbly8=",
"lastModified": 1714612681,
"narHash": "sha256-Uv+XnqVAXzljkFVkGm92mgrmA2MRiszX8j7TmJUV1uA=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "10caa03ce5bc2ce8238c494d59405213d32ddead",
"rev": "56de72f357222beca94e3d4f8152e2523a22c0b3",
"type": "github"
},
"original": {
@ -335,6 +336,31 @@
"type": "github"
}
},
"hyprwayland-scanner": {
"inputs": {
"nixpkgs": [
"hyprland",
"nixpkgs"
],
"systems": [
"hyprland",
"systems"
]
},
"locked": {
"lastModified": 1714589749,
"narHash": "sha256-zzkb5vc4n/YI5KHrMie7oMZlgCKxs7zm/ybVXNL02Z0=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "c8c2151c607a036ddfc790f5f70237ab984266aa",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
@ -343,11 +369,11 @@
]
},
"locked": {
"lastModified": 1711763326,
"narHash": "sha256-sXcesZWKXFlEQ8oyGHnfk4xc9f2Ip0X/+YZOq3sKviI=",
"lastModified": 1713946171,
"narHash": "sha256-lc75rgRQLdp4Dzogv5cfqOg6qYc5Rp83oedF2t0kDp8=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "36524adc31566655f2f4d55ad6b875fb5c1a4083",
"rev": "230a197063de9287128e2c68a7a4b0cd7d0b50a7",
"type": "github"
},
"original": {
@ -358,11 +384,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1713521961,
"narHash": "sha256-EwR8wW9AqJhSIY+0oxWRybUZ32BVKuZ9bjlRh8SJvQ8=",
"lastModified": 1714465198,
"narHash": "sha256-ySkEJvS0gPz2UhXm0H3P181T8fUxvDVcoUyGn0Kc5AI=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "5d48925b815fd202781bfae8fb6f45c07112fdb2",
"rev": "68d680c1b7c0e67a9b2144d6776583ee83664ef4",
"type": "github"
},
"original": {
@ -390,11 +416,11 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1713434076,
"narHash": "sha256-+/p5edwlkqKZc6GDAQl+92Hoe1f3NNbUF9uj+X9H3pU=",
"lastModified": 1713638189,
"narHash": "sha256-q7APLfB6FmmSMI1Su5ihW9IwntBsk2hWNXh8XtSdSIk=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "8494ae076b7878d61a7d2d25e89a847fe8f8364c",
"rev": "74574c38577914733b4f7a775dd77d24245081dd",
"type": "github"
},
"original": {
@ -406,11 +432,11 @@
},
"nixpkgs_2": {
"locked": {
"lastModified": 1712963716,
"narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=",
"lastModified": 1714253743,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cfd6b5fc90b15709b780a5a1619695a88505a176",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
"type": "github"
},
"original": {
@ -465,11 +491,11 @@
"pre-commit-hooks": "pre-commit-hooks"
},
"locked": {
"lastModified": 1713530381,
"narHash": "sha256-54sXzrwhKkI9uzeHRPNtpB4pCQqIkzzr1FFUiG4znQU=",
"lastModified": 1714600955,
"narHash": "sha256-AHz9OVQeVlbhTboR5Wchjet9a2h+a8aPTDjEyVQLz/g=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "83a7ce9846b1b01a34b3e6b25077c1a5044ad7b3",
"rev": "82a19581defe682ff9ca7cb8b1b980b6dc297cf2",
"type": "github"
},
"original": {
@ -505,11 +531,11 @@
]
},
"locked": {
"lastModified": 1712897695,
"narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=",
"lastModified": 1713954846,
"narHash": "sha256-RWFafuSb5nkWGu8dDbW7gVb8FOQOPqmX/9MlxUUDguw=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8",
"rev": "6fb82e44254d6a0ece014ec423cb62d92435336f",
"type": "github"
},
"original": {
@ -586,11 +612,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1713532771,
"narHash": "sha256-vfKxhYVMzG2tg48/1rewBoSLCrKIjQsG1j7Nm/Y2gf4=",
"lastModified": 1713892811,
"narHash": "sha256-uIGmA2xq41vVFETCF1WW4fFWFT2tqBln+aXnWrvjGRE=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "a929a011a09db735abc45a8a45d1ff7fdee62755",
"rev": "f1b0adc27265274e3b0c9b872a8f476a098679bd",
"type": "github"
},
"original": {
@ -696,17 +722,17 @@
"wlroots": {
"flake": false,
"locked": {
"lastModified": 1713124002,
"narHash": "sha256-vPeZCY+sdiGsz4fl3AVVujfyZyQBz6+vZdkUE4hQ+HI=",
"lastModified": 1713731601,
"narHash": "sha256-bdcKdtLkusvv85DNuJsajZLFeq7bXp+x5AGP1Sd4wD8=",
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "611a4f24cd2384378f6e500253983107c6656c64",
"rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea",
"type": "github"
},
"original": {
"owner": "hyprwm",
"repo": "wlroots-hyprland",
"rev": "611a4f24cd2384378f6e500253983107c6656c64",
"rev": "5c1d51c5a2793480f5b6c4341ad0797052aec2ea",
"type": "github"
}
},
@ -730,11 +756,11 @@
]
},
"locked": {
"lastModified": 1713214484,
"narHash": "sha256-h1bSIsDuPk1FGgvTuSHJyiU2Glu7oAyoPMJutKZmLQ8=",
"lastModified": 1714060055,
"narHash": "sha256-j43TS9wv9luaAlpxcxw0sjxkbcc2mGANVR2RYgo3RCw=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "bb44921534a9cee9635304fdb876c1b3ec3a8f61",
"rev": "0fe840441e43da12cd7865ed9aa8cdc35a8da85a",
"type": "github"
},
"original": {

View File

@ -29,14 +29,15 @@
modules = [
nixos-hardware.nixosModules.omen-16-n0005ne # REMOVE
./nixos/configuration.nix
./hosts
./nixos/fonts.nix
./nixos/tuigreet.nix
{ _module.args = { inherit inputs; }; }
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.hadi = import ./home/home.nix; # CHANGEME - replace "hadi"
users."hadi" = import ./home/home.nix;
extraSpecialArgs = {
inherit inputs;
inherit spicetify-nix;

4
home/apps/default.nix Normal file
View File

@ -0,0 +1,4 @@
{
imports =
[ ./kitty ./lf ./neofetch ./nvim ./qutebrowser ./spicetify ./wofi ./cava ];
}

View File

@ -1,4 +1,4 @@
{ pkgs, config, ... }: {
{ pkgs, ... }: {
home.packages = with pkgs; [ pistol ];
programs.lf = {

View File

@ -49,13 +49,21 @@
odd.fg = "#${config.theme.colors.fg}";
even.bg = "#${config.theme.colors.bg}";
even.fg = "#${config.theme.colors.fg}";
selected.odd.bg = "#${config.theme.colors.primary-bg}";
selected.odd.fg = "#${config.theme.colors.primary-fg}";
selected.even.bg = "#${config.theme.colors.primary-bg}";
selected.even.fg = "#${config.theme.colors.primary-fg}";
indicator.error = "#${config.theme.colors.color1}";
indicator.start = "#${config.theme.colors.alt-bg}";
indicator.stop = "#${config.theme.colors.alt-bg}";
selected = {
odd = {
bg = "#${config.theme.colors.primary-bg}";
fg = "#${config.theme.colors.primary-fg}";
};
even = {
bg = "#${config.theme.colors.primary-bg}";
fg = "#${config.theme.colors.primary-fg}";
};
};
indicator = {
error = "#${config.theme.colors.color1}";
start = "#${config.theme.colors.alt-bg}";
stop = "#${config.theme.colors.alt-bg}";
};
};
hints = {
@ -65,10 +73,14 @@
};
completion = {
category.bg = "#${config.theme.colors.bg}";
category.fg = "#${config.theme.colors.fg}";
category.border.top = "#${config.theme.colors.bg}";
category.border.bottom = "#${config.theme.colors.bg}";
category = {
bg = "#${config.theme.colors.bg}";
fg = "#${config.theme.colors.fg}";
border = {
top = "#${config.theme.colors.bg}";
bottom = "#${config.theme.colors.bg}";
};
};
odd.bg = "#${config.theme.colors.bg}";
even.bg = "#${config.theme.colors.bg}";
@ -77,11 +89,13 @@
match.fg = "#${config.theme.colors.primary-bg}";
item.selected.bg = "#${config.theme.colors.primary-bg}";
item.selected.border.top = "#${config.theme.colors.primary-bg}";
item.selected.border.bottom = "#${config.theme.colors.primary-bg}";
item.selected.fg = "#${config.theme.colors.primary-fg}";
item.selected.match.fg = "#${config.theme.colors.primary-fg}";
item.selected = {
bg = "#${config.theme.colors.primary-bg}";
border.top = "#${config.theme.colors.primary-bg}";
border.bottom = "#${config.theme.colors.primary-bg}";
fg = "#${config.theme.colors.primary-fg}";
match.fg = "#${config.theme.colors.primary-fg}";
};
};
statusbar = {
@ -136,6 +150,7 @@
content = {
autoplay = false;
javascript.clipboard = "access";
javascript.enabled = true;
pdfjs = true;
};

View File

@ -1,12 +0,0 @@
{
programs.git = {
enable = true;
userName = "Hadi"; # CHANGEME
userEmail = "112569860+anotherhadi@users.noreply.github.com"; # CHANGEME
extraConfig = {
init.defaultBranch = "main";
# Automatically track remote branch
push.autoSetupRemote = true;
};
};
}

View File

@ -1,29 +1,12 @@
{ config, pkgs, ... }: {
{ pkgs, ... }:
let variable = import ../variables.nix;
in {
imports = [
./hyprland
./nvim
./waybar
./kitty
./dunst
./wlogout
./wofi
./qutebrowser
./git
./shell
./misc
./scripts
./neofetch
./spicetify
./theme
./wallpapers
./lf
./sops # REMOVE
];
imports = [ ./themes ./system ./scripts ./apps ];
home = {
username = "hadi"; # CHANGEME
homeDirectory = "/home/hadi"; # CHANGEME
username = variable.username;
homeDirectory = variable.homeDirectory;
packages = with pkgs; [
swappy
@ -49,6 +32,7 @@
bc
gcc
blueman
zip
unzip
xdg_utils
tldr
@ -68,7 +52,7 @@
firefox
];
stateVersion = "23.11";
stateVersion = variable.stateVersion;
};
programs.home-manager.enable = true;
}

View File

@ -1 +0,0 @@
{ imports = [ ./cava/default.nix ]; }

View File

@ -1,7 +1,6 @@
{ pkgs, config, ... }:
let
homedir = config.home.homeDirectory;
increments = "5";
brightness-change = pkgs.writeShellScriptBin "brightness-change" ''

View File

@ -9,6 +9,6 @@
./night-shift.nix
./screenshot.nix
./startup.nix
./nerdfont_fzf.nix
./nerdfont_fzf
];
}

View File

@ -29,7 +29,7 @@ in {
home.packages = with pkgs; [ nerdfont-fzf nerdfont-fzf-fetch nerdfont-popup ];
xdg.configFile."nerdfont_glyphnames.json" = {
source = ../misc/nerdfont_glyphnames.json;
source = ./nerdfont_glyphnames.json;
};
}

View File

@ -2,6 +2,7 @@
{ pkgs, config, ... }:
let
homedir = config.home.homeDirectory;
variable = import ../../variables.nix;
battery-notif = pkgs.writeShellScriptBin "battery-notif" ''
# Send notifications when low on battery and not in charge
@ -44,9 +45,12 @@ let
startup = pkgs.writeShellScriptBin "startup" ''
# Because HM enabling services suck.
systemctl --user start sops-nix
[[ ${
toString variable.enableSops
} == "true" ]] && systemctl --user start sops-nix
[[ ${toString variable.enableNextcloud} == "true" ]] && nextcloud-watch &
nextcloud-watch &
battery-notif &
${pkgs.waybar}/bin/waybar &
'';

4
home/system/default.nix Normal file
View File

@ -0,0 +1,4 @@
{
imports =
[ ./git ./dunst ./hyprland ./shell ./sops ./waybar ./wlogout ./sops ];
}

View File

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }: {
{ config, pkgs, ... }: {
home.packages = with pkgs; [ libnotify ];

View File

@ -0,0 +1,12 @@
let variable = import ../../../variables.nix;
in {
programs.git = {
enable = true;
userName = variable.git.username;
userEmail = variable.git.email;
extraConfig = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
};
};
}

View File

@ -1,4 +1,6 @@
{ self, pkgs, config, hyprland, ... }: {
{ self, pkgs, config, hyprland, ... }:
let variable = import ../../../variables.nix;
in {
imports = [ ./hyprlock.nix ./hypridle.nix ./hyprpaper.nix ./hyprcursor.nix ];
@ -142,7 +144,7 @@
};
input = {
kb_layout = "fr"; # CHANGEME
kb_layout = variable.keyboardLayout;
kb_options = "caps:escape";
follow_mouse = 1;

View File

@ -1,4 +1,4 @@
{ config, pkgs, ... }: {
{ pkgs, ... }: {
home.packages = with pkgs; [ hyprcursor ];
# home.file.".local/share/icons/rose-pine-hyprcursor" = {

View File

@ -42,6 +42,8 @@
sl = "ls";
open = "${pkgs.xdg_utils}/bin/xdg-open";
icat = "${pkgs.kitty}/bin/kitty +kitten icat";
note = "vim ~/Nextcloud/obsidian";
obs = "vim ~/Nextcloud/obsidian";
};
};
}

View File

@ -1,9 +1,9 @@
{ sops-nix, config, ... }: {
{ sops-nix, ... }: {
imports = [ sops-nix.homeManagerModules.sops ];
sops = {
age.keyFile = "/home/hadi/.config/sops/age/keys.txt";
defaultSopsFile = ../../secrets/secrets.yaml;
defaultSopsFile = ../../../secrets/secrets.yaml;
secrets = {
sshconfig = { path = "/home/hadi/.ssh/config"; };
oxk = { path = "/home/hadi/.ssh/oxserver"; };

View File

@ -1,4 +1,4 @@
{ pkgs, config, lib, ... }: {
{ config, ... }: {
services = {
blueman-applet.enable = true;
network-manager-applet.enable = true;
@ -31,6 +31,7 @@
"hyprland/window" = {
"format" = "{title:30}";
"max-length" = 30;
"separate-outputs" = true;
};
"hyprland/workspaces" = {

View File

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -1,8 +1,5 @@
{ lib, ... }:
with lib;
{
with lib; {
options.theme = {
waybar-transparent = mkOption {

View File

@ -1,5 +1,5 @@
{ config, ... }: {
imports = [ ./nixy.nix ];
imports = [ ./nixy.nix ./wallpapers ];
config.theme.colors.primary-ansi-16-number =
if config.theme.colors.primary-ansi-16 == "black" then
0

View File

@ -1,4 +1,4 @@
{ config, ... }: {
{
xdg.configFile."wallpapers" = {
recursive = true;
source = ./wallpapers;

View File

Before

Width:  |  Height:  |  Size: 826 KiB

After

Width:  |  Height:  |  Size: 826 KiB

View File

Before

Width:  |  Height:  |  Size: 1.3 MiB

After

Width:  |  Height:  |  Size: 1.3 MiB

View File

Before

Width:  |  Height:  |  Size: 12 MiB

After

Width:  |  Height:  |  Size: 12 MiB

View File

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

View File

Before

Width:  |  Height:  |  Size: 378 KiB

After

Width:  |  Height:  |  Size: 378 KiB

View File

Before

Width:  |  Height:  |  Size: 288 KiB

After

Width:  |  Height:  |  Size: 288 KiB

View File

Before

Width:  |  Height:  |  Size: 641 KiB

After

Width:  |  Height:  |  Size: 641 KiB

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

Before

Width:  |  Height:  |  Size: 8.6 MiB

After

Width:  |  Height:  |  Size: 8.6 MiB

View File

@ -1,3 +0,0 @@
{inputs, ...}:{
imports = [ ./tuigreet ./fonts ];
}

View File

@ -1,5 +1,16 @@
{ pkgs, config, ... }: {
imports = [ ./hardware-configuration.nix ./nvidia.nix ];
{ pkgs, ... }:
let
variable = import ../variables.nix;
imports = [ ./hardware-configuration.nix ];
# Weird variable name to avoid conflict with the `imports` variable...
secondImports =
if variable.enableNvidia then imports ++ [ ./nvidia.nix ] else imports;
thirdImports = if variable.enablePrime then
secondImports ++ [ ./prime.nix ]
else
secondImports;
in {
imports = thirdImports;
# Bootloader.
boot.loader.efi.canTouchEfiVariables = true;
@ -12,36 +23,36 @@
##############
# CHANGEME
networking.hostName = "nixy";
time.timeZone = "Europe/Paris";
i18n.defaultLocale = "en_US.UTF-8";
networking.hostName = variable.hostName;
time.timeZone = variable.timeZone;
i18n.defaultLocale = variable.defaultLocale;
i18n.extraLocaleSettings = {
LC_ADDRESS = "fr_FR.UTF-8";
LC_IDENTIFICATION = "fr_FR.UTF-8";
LC_MEASUREMENT = "fr_FR.UTF-8";
LC_MONETARY = "fr_FR.UTF-8";
LC_NAME = "fr_FR.UTF-8";
LC_NUMERIC = "fr_FR.UTF-8";
LC_PAPER = "fr_FR.UTF-8";
LC_TELEPHONE = "fr_FR.UTF-8";
LC_TIME = "fr_FR.UTF-8";
LC_ADDRESS = variable.extraLocale;
LC_IDENTIFICATION = variable.extraLocale;
LC_MEASUREMENT = variable.extraLocale;
LC_MONETARY = variable.extraLocale;
LC_NAME = variable.extraLocale;
LC_NUMERIC = variable.extraLocale;
LC_PAPER = variable.extraLocale;
LC_TELEPHONE = variable.extraLocale;
LC_TIME = variable.extraLocale;
};
users.users.hadi = { # CHANGEME
users.users.${variable.username} = {
isNormalUser = true;
description = "Hadi account";
description = "${variable.username} account";
extraGroups = [ "networkmanager" "wheel" ];
};
# Auto Update & Clean
system.autoUpgrade = {
enable = true;
dates = "04:00";
flake = "${config.users.users.hadi.home}/.config/nixos"; # CHANGEME
flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
allowReboot = false;
};
# system.autoUpgrade = {
# enable = true;
# dates = "04:00";
# flake = "${config.users.users.${variable.username}.home}/.config/nixos";
# flags = [ "--update-input" "nixpkgs" "--commit-lock-file" ];
# allowReboot = false;
# };
##############
@ -110,5 +121,5 @@
services.dbus.enable = true;
system.stateVersion = "23.11";
system.stateVersion = variable.stateVersion;
}

View File

@ -13,7 +13,7 @@
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
open = true;
nvidiaSettings = true;
};
}

13
nixos/prime.nix Normal file
View File

@ -0,0 +1,13 @@
{ pkgs, ... }: {
hardware.nvidia.prime = {
offload = {
enable = true;
enableOffloadCmd = true;
};
# sync.enable = true;
amdgpuBusId = "PCI:5:0:0";
nvidiaBusId = "PCI:1:0:0";
};
}

22
variables.nix Normal file
View File

@ -0,0 +1,22 @@
{
# CHANGEME
hostName = "nixy";
username = "hadi";
homeDirectory = "/home/hadi";
keyboardLayout = "fr";
timeZone = "Europe/Paris";
defaultLocale = "en_US.UTF-8";
extraLocale = "fr_FR.UTF-8";
git = {
username = "Hadi";
email = "112569860+anotherhadi@users.noreply.github.com";
};
stateVersion = "23.11";
enableSops = true;
enableNextcloud = true;
enableNvidia = true;
enablePrime = true;
}