diff --git a/flake.nix b/flake.nix index 6f6ee3a..e81df2e 100644 --- a/flake.nix +++ b/flake.nix @@ -38,7 +38,6 @@ }; in { nixosConfigurations = { - pennsardin = nixpkgs-unstable.lib.nixosSystem { specialArgs = { inherit nvim-config; }; system = "x86_64-linux"; @@ -79,6 +78,32 @@ ]; }; + penduick = nixpkgs-unstable.lib.nixosSystem { + specialArgs = { inherit nvim-config; }; + system = "x86_64-linux"; + pkgs = mkUnstablePkgsWithNur { + system = "x86_64-linux"; + config = { + allowUnfree = true; + allowUnsupportedSystem = true; + }; + }; + + modules = [ + ./hosts/penduick/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true ; + useUserPackages = true ; + extraSpecialArgs = {inherit nvim-config; }; + }; + } + agenix.nixosModules.default + ]; + + }; + forbann = nixpkgs-stable.lib.nixosSystem { system = "x86_64-linux"; modules = [ diff --git a/hm/users/dunoz-desktop.nix b/hm/users/dunoz-desktop.nix new file mode 100644 index 0000000..8b017b8 --- /dev/null +++ b/hm/users/dunoz-desktop.nix @@ -0,0 +1,18 @@ +{pkgs, ...}: { + imports = [ + ../desktop/bspwm.nix + ../common/browser.nix + ../common/nvim.nix + ./dunoz.nix + ]; + home = { + packages = with pkgs; [ + fastfetch + nerd-fonts.iosevka + proton-pass + smug + ]; + }; +} +# vim: set ts=2 sw=2 sts=2 et : + diff --git a/hm/users/dunoz.nix b/hm/users/dunoz.nix new file mode 100644 index 0000000..b32120c --- /dev/null +++ b/hm/users/dunoz.nix @@ -0,0 +1,19 @@ +{pkgs, nvim-config, ...}: { + imports = [ + ../../hm/common/git.nix + ../../hm/common/zsh.nix + ]; + home = { + username = "dunoz"; + homeDirectory = "/home/dunoz"; + packages = with pkgs; [ + bat + tree + ]; + }; + + programs.zsh.enable = true; + + home.stateVersion = "25.05"; # ou ton actuelle +} +# vim: set ts=2 sw=2 sts=2 et : diff --git a/hosts/penduick/configuration.nix b/hosts/penduick/configuration.nix new file mode 100644 index 0000000..0bc789a --- /dev/null +++ b/hosts/penduick/configuration.nix @@ -0,0 +1,54 @@ +{ config, pkgs, ... }: +let + globals = import ../../config/globals.nix; +in { + imports = [ + ./hardware-configuration.nix + ../../modules/desktop/xorg-bspwm.nix + ../../modules/common/nix.nix + ../../modules/common/base.nix + ../../modules/common/fonts.nix + ../../modules/common/networking.nix + ../../modules/common/plymouth.nix + ../../modules/common/audio.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + boot.initrd.luks.devices.cryptroot.device = "/dev/nvme0n1p3"; + + networking.hostName = "penduick"; + networking.networkmanager.enable = true; + + console.keyMap = "fr"; + + services.openssh.enable = true; + services.openssh.settings = { + PermitRootLogin = "no"; + PasswordAuthentication = true; + }; + + users.users.dunoz = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; + initialPassword = "temp"; + }; + + home-manager = { + useGlobalPkgs = true ; + users.dunoz = import ../../hm/users/dunoz-desktop.nix ; + }; + + environment.systemPackages = with pkgs; [ + vim git btop htop wget curl + neovim + ]; + + + + +# Optionnel mais utile pour SSH au démarrage +systemd.services.sshd.wantedBy = [ "multi-user.target" ]; + + system.stateVersion = "25.05"; +} diff --git a/hosts/penduick/hardware-configuration.nix b/hosts/penduick/hardware-configuration.nix new file mode 100644 index 0000000..a473630 --- /dev/null +++ b/hosts/penduick/hardware-configuration.nix @@ -0,0 +1,66 @@ +# 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" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ "dm-snapshot" ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/233c2886-05e4-4f9f-a708-6c920c7d9e32"; + fsType = "btrfs"; + }; + + fileSystems."/home" = + { device = "/dev/disk/by-uuid/09b55bee-0134-4e96-8183-e85412fa7724"; + fsType = "btrfs"; + }; + + fileSystems."/nix" = + { device = "/dev/disk/by-uuid/4ce480f5-8212-4b28-b275-a0250c2edae1"; + fsType = "btrfs"; + }; + + fileSystems."/var" = + { device = "/dev/disk/by-uuid/f54d2ebe-f1ca-4471-a9a5-6959280984ee"; + fsType = "btrfs"; + }; + + fileSystems."/persist" = + { device = "/dev/disk/by-uuid/829b6a38-e49a-46ca-8737-b21c86c93352"; + fsType = "btrfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/B68E-0AAC"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + fileSystems."/rescue" = + { device = "/dev/disk/by-uuid/af3f9f20-2a6c-44e2-ad81-f07bd18ae283"; + fsType = "ext4"; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/41fcc628-50bf-43df-9daa-0095b45fd9bd"; } + ]; + + # 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 + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}