Compare commits

...
2 Commits
54 changed files with 293 additions and 309 deletions
+1 -1
View File
@@ -1,2 +1,2 @@
.DS_Store
.idea/
.DS_Store
Generated
+50
View File
@@ -1,5 +1,23 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": "nixpkgs-lib"
},
"locked": {
"lastModified": 1768135262,
"narHash": "sha256-PVvu7OqHBGWN16zSi6tEmPwwHQ4rLPU9Plvs8/1TUBY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "80daad04eddbbf5a4d883996a73f3f542fa437ac",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
@@ -21,6 +39,21 @@
"type": "github"
}
},
"import-tree": {
"locked": {
"lastModified": 1763762820,
"narHash": "sha256-ZvYKbFib3AEwiNMLsejb/CWs/OL/srFQ8AogkebEPF0=",
"owner": "vic",
"repo": "import-tree",
"rev": "3c23749d8013ec6daa1d7255057590e9ca726646",
"type": "github"
},
"original": {
"owner": "vic",
"repo": "import-tree",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1769089682,
@@ -37,6 +70,21 @@
"type": "github"
}
},
"nixpkgs-lib": {
"locked": {
"lastModified": 1765674936,
"narHash": "sha256-k00uTP4JNfmejrCLJOwdObYC9jHRrr/5M/a/8L2EIdo=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "2075416fcb47225d9b68ac469a5c4801a9c4dd85",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1769170682,
@@ -55,7 +103,9 @@
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"home-manager": "home-manager",
"import-tree": "import-tree",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
+17 -15
View File
@@ -2,6 +2,9 @@
description = "NixOS files config";
inputs = {
import-tree.url = "github:vic/import-tree";
flake-parts.url = "github:hercules-ci/flake-parts";
# Nixpkgs
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
@@ -14,33 +17,32 @@
outputs =
inputs@{
nixpkgs,
flake-parts,
import-tree,
home-manager,
nixpkgs-unstable,
...
}:
let
systems = [ "x86_64-linux" ];
forAllSystems = nixpkgs.lib.genAttrs systems;
in
flake-parts.lib.mkFlake { inherit inputs; } (
{ ... }:
{
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
overlays = import ./overlays { inherit inputs; };
apps = import ./modules/apps;
home = import ./modules/home;
nixos = import ./modules/nixos;
systems = [ "x86_64-linux" ];
flake = {
nixosConfigurations = {
nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./nixos/configuration.nix
(import-tree ./modules/system)
./modules/hardware-configuration.nix
(import ./modules/overlays.nix { inherit nixpkgs nixpkgs-unstable; })
]
++ [
home-manager.nixosModules.home-manager
./home/configuration.nix
(import ./modules/overlays.nix { inherit nixpkgs nixpkgs-unstable; })
(import ./modules/users/home.nix { inherit import-tree home-manager; })
];
};
};
};
}
);
}
-9
View File
@@ -1,9 +0,0 @@
{ inputs, ... }:
{
imports = [ ./parts/users.nix ];
home-manager.useUserPackages = true;
home-manager.overwriteBackup = true;
home-manager.backupFileExtension = "bak";
home-manager.extraSpecialArgs = { inherit inputs; };
}
-12
View File
@@ -1,12 +0,0 @@
{ pkgs, ... }:
{
home.packages = with pkgs; [
zed-editor
# Languages servers
nil
nixd
];
}
-28
View File
@@ -1,28 +0,0 @@
{
inputs,
...
}:
{
imports = [
./configurations/gnome.nix
./configurations/firefox.nix
./configurations/ghostty.nix
./configurations/zed.nix
];
nixpkgs = {
overlays = [
inputs.self.overlays.additions
inputs.self.overlays.modifications
inputs.self.overlays.unstable-packages
];
};
home = {
username = "alistreaza";
homeDirectory = "/home/alistreaza";
};
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
home.stateVersion = "25.11";
}
-5
View File
@@ -1,5 +0,0 @@
{ ... }:
{
home-manager.users.alistreaza = import ../home.nix;
}
-6
View File
@@ -1,6 +0,0 @@
{
imports = [
./services/shell.nix
./services/gnome.nix
];
}
-6
View File
@@ -1,6 +0,0 @@
{
imports = [
../submodules/gnome-shell.nix
../submodules/gnome-apps.nix
];
}
-8
View File
@@ -1,8 +0,0 @@
{
imports = [
../submodules/zsh.nix
../submodules/nh.nix
../submodules/git.nix
../submodules/docker.nix
];
}
+48
View File
@@ -0,0 +1,48 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"uas"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/6c7250d7-8a40-4b12-94de-276c4b325473";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/2620-29F6";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/7c10a8e6-c396-457e-a66f-577bd217b2e3"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
-6
View File
@@ -1,6 +0,0 @@
# Add your reusable home-manager modules to this directory, on their own file (https://nixos.wiki/wiki/Module).
# These should be stuff you would like to share with others, not your personal configurations.
{
# List your module files here
# my-module = import ./my-module.nix;
}
-9
View File
@@ -1,9 +0,0 @@
{
imports = [
./services/boot.nix
./services/graphics.nix
./services/networks.nix
./services/audio.nix
./services/keyboard.nix
];
}
-3
View File
@@ -1,3 +0,0 @@
{
imports = [ ../submodules/pipewire.nix ];
}
-6
View File
@@ -1,6 +0,0 @@
{
imports = [
../submodules/systemd-boot.nix
../submodules/plymouth.nix
];
}
-6
View File
@@ -1,6 +0,0 @@
{
imports = [
../submodules/nvidia.nix
../submodules/nvidia-prime.nix
];
}
-3
View File
@@ -1,3 +0,0 @@
{
imports = [ ../submodules/keyboard-apple.nix ];
}
-6
View File
@@ -1,6 +0,0 @@
{
imports = [
../submodules/dns.nix
../submodules/manager.nix
];
}
-25
View File
@@ -1,25 +0,0 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.graphics.nvidia.prime;
in
{
options.within.graphics.nvidia.prime = {
enable = mkEnableOption "System nvidia prime service";
};
config = mkIf cfg.enable {
services.xserver.videoDrivers = [
"modesetting"
"nvidia"
];
hardware.nvidia.powerManagement.finegrained = true;
hardware.nvidia.prime = {
offload.enable = true;
intelBusId = "PCI:0@0:2:0";
nvidiaBusId = "PCI:1@0:0:0";
};
};
}
+27
View File
@@ -0,0 +1,27 @@
{
nixpkgs,
nixpkgs-unstable,
...
}:
{
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (nixpkgs.lib.getName pkg) [
"nvidia-x11"
];
nixpkgs.overlays = [
(final: prev: {
unstable = import nixpkgs-unstable {
system = prev.system;
config.allowUnfreePredicate =
pkg:
builtins.elem (nixpkgs-unstable.lib.getName pkg) [
"pycharm"
];
};
})
];
}
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.shell.docker;
cfg = config.os.shell.docker;
in
{
options.within.shell.docker = {
options.os.shell.docker = {
enable = mkEnableOption "System docker service";
};
config = mkIf cfg.enable {
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.shell.git;
cfg = config.os.shell.git;
in
{
options.within.shell.git = {
options.os.shell.git = {
enable = mkEnableOption "System git service";
};
config = mkIf cfg.enable {
@@ -6,10 +6,10 @@
}:
with lib;
let
cfg = config.within.gnome.apps;
cfg = config.os.gnome.apps;
in
{
options.within.gnome.apps = {
options.os.gnome.apps = {
enable = mkEnableOption "System gnome apps service";
};
config = mkIf cfg.enable {
@@ -6,10 +6,10 @@
}:
with lib;
let
cfg = config.within.gnome.shell;
cfg = config.os.gnome.shell;
in
{
options.within.gnome.shell = {
options.os.gnome.shell = {
enable = mkEnableOption "System gnome shell service";
};
config = mkIf cfg.enable {
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.shell.nh;
cfg = config.os.shell.nh;
in
{
options.within.shell.nh = {
options.os.shell.nh = {
enable = mkEnableOption "System nh service";
};
config = mkIf cfg.enable {
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.shell.zsh;
cfg = config.os.shell.zsh;
in
{
options.within.shell.zsh = {
options.os.shell.zsh = {
enable = mkEnableOption "System zsh service";
};
config = mkIf cfg.enable {
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.networks.dns;
cfg = config.os.networks.dns;
in
{
options.within.networks.dns = {
options.os.networks.dns = {
enable = mkEnableOption "System dns service";
};
config = mkIf cfg.enable {
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.keyboard.apple;
cfg = config.os.keyboard.apple;
in
{
options.within.keyboard.apple = {
options.os.keyboard.apple = {
enable = mkEnableOption "System apple locales service";
};
config = mkIf cfg.enable {
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.networks.manager;
cfg = config.os.networks.manager;
in
{
options.within.networks.manager = {
options.os.networks.manager = {
enable = mkEnableOption "System networks manager service";
};
config = mkIf cfg.enable {
@@ -1,20 +1,14 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.graphics.nvidia;
cfg = config.os.graphics.nvidia;
in
{
options.within.graphics.nvidia = {
options.os.graphics.nvidia = {
enable = mkEnableOption "System nvidia service";
};
config = mkIf cfg.enable {
nixpkgs.config.allowUnfreePredicate =
pkg:
builtins.elem (lib.getName pkg) [
"nvidia-x11"
];
services.xserver.enable = true;
services.xserver.videoDrivers = [ "nvidia" ];
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.audio.pipewire;
cfg = config.os.audio.pipewire;
in
{
options.within.audio.pipewire = {
options.os.audio.pipewire = {
enable = mkEnableOption "System pipewire service";
};
config = mkIf cfg.enable {
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.boot.plymouth;
cfg = config.os.boot.plymouth;
in
{
options.within.boot.plymouth = {
options.os.boot.plymouth = {
enable = mkEnableOption "Boot plymouth service";
};
config = mkIf cfg.enable {
@@ -1,10 +1,10 @@
{ lib, config, ... }:
with lib;
let
cfg = config.within.boot.systemd;
cfg = config.os.boot.systemd;
in
{
options.within.boot.systemd = {
options.os.boot.systemd = {
enable = mkEnableOption "Boot systemd service";
};
config = mkIf cfg.enable {
+31
View File
@@ -0,0 +1,31 @@
{ ... }:
{
nix.settings.experimental-features = "nix-command flakes";
# System services
os.boot.systemd.enable = true;
os.boot.plymouth.enable = true;
os.graphics.nvidia.enable = true;
os.audio.pipewire.enable = true;
os.networks.dns.enable = true;
os.networks.manager.enable = true;
# System configurations
os.keyboard.apple.enable = true;
# Shell configurations
os.shell.zsh.enable = true;
os.shell.git.enable = true;
os.shell.nh.enable = true;
# Gnome configurations
os.gnome.shell.enable = true;
os.gnome.apps.enable = true;
# Virtualisation Apps
os.shell.docker.enable = true;
# System version
system.stateVersion = "25.11";
}
+8
View File
@@ -0,0 +1,8 @@
{ ... }:
{
networking.hostName = "nixos";
networking.firewall.enable = true;
time.timeZone = "Europe/Brussels";
}
+27
View File
@@ -0,0 +1,27 @@
{ import-tree, ... }:
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.overwriteBackup = true;
home-manager.backupFileExtension = "bak";
home-manager.users = {
alistreaza = {
imports = [
(import-tree ./options)
(import-tree ./partials)
];
home = {
username = "alistreaza";
homeDirectory = "/home/alistreaza";
};
os.ide.zed.enable = true;
os.ide.jetbrains.enable = true;
home.stateVersion = "25.11";
};
};
}
+22
View File
@@ -0,0 +1,22 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.os.ide.jetbrains;
in
{
options.os.ide.jetbrains = {
enable = mkEnableOption "JetBrains options";
};
config = mkIf cfg.enable {
home.packages = with pkgs.unstable; [
jetbrains.pycharm
];
};
}
+26
View File
@@ -0,0 +1,26 @@
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.os.ide.zed;
in
{
options.os.ide.zed = {
enable = mkEnableOption "Zen Editor options";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
zed-editor
nil
nixd
];
};
}

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

Before

Width:  |  Height:  |  Size: 99 KiB

After

Width:  |  Height:  |  Size: 99 KiB

-63
View File
@@ -1,63 +0,0 @@
{
inputs,
...
}:
{
imports = [
# Hardware
./hardware-configuration.nix
./parts/kernel.nix
# Configurations
./parts/users.nix
# Modules
inputs.self.nixos
inputs.self.apps
];
nixpkgs = {
overlays = [
inputs.self.overlays.additions
inputs.self.overlays.modifications
inputs.self.overlays.unstable-packages
];
};
nix = {
settings = {
experimental-features = "nix-command flakes";
};
};
networking.hostName = "nixos";
networking.firewall.enable = true;
time.timeZone = "Europe/Brussels";
# System services
within.boot.systemd.enable = true;
within.boot.plymouth.enable = true;
within.graphics.nvidia.enable = true;
within.audio.pipewire.enable = true;
within.networks.dns.enable = true;
within.networks.manager.enable = true;
# System configurations
within.keyboard.apple.enable = true;
# Shell configurations
within.shell.zsh.enable = true;
within.shell.git.enable = true;
within.shell.nh.enable = true;
# Gnome configurations
within.gnome.shell.enable = true;
within.gnome.apps.enable = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
system.stateVersion = "25.11";
}
-33
View File
@@ -1,33 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/6c7250d7-8a40-4b12-94de-276c4b325473";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2620-29F6";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/7c10a8e6-c396-457e-a66f-577bd217b2e3"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
-12
View File
@@ -1,12 +0,0 @@
{ inputs, ... }:
{
additions = final: _prev: import ../pkgs final;
modifications = final: prev: { };
unstable-packages = final: _prev: {
unstable = import inputs.nixpkgs-unstable {
system = final.system;
};
};
}
-5
View File
@@ -1,5 +0,0 @@
# Custom packages, that can be defined similarly to ones from nixpkgs
# You can build them using 'nix build .#example'
pkgs: {
# example = pkgs.callPackage ./example { };
}