Initial nixos configuration
This commit is contained in:
parent
35f4a8026e
commit
7ac5d06c18
7
flake.lock
generated
7
flake.lock
generated
@ -25,15 +25,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1745627989,
|
"lastModified": 1746171682,
|
||||||
"narHash": "sha256-mOCdFmxocBPae7wg7RYWOtJzWMJk34u9493ItY0dVqw=",
|
"narHash": "sha256-EyXUNSa+H+YvGVuQJP1nZskXAowxKYp79RNUsNdQTj4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "4d2d32231797bfa7213ae5e8ac89d25f8caaae82",
|
"rev": "50eee705bbdbac942074a8c120e8194185633675",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
|
"ref": "release-24.11",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
16
flake.nix
16
flake.nix
@ -4,23 +4,24 @@
|
|||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
||||||
|
|
||||||
home-manager.url = "github:nix-community/home-manager";
|
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||||
nix-vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
|
nix-vscode-extensions.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: let
|
outputs =
|
||||||
|
inputs:
|
||||||
|
let
|
||||||
inherit (inputs.nixpkgs) lib;
|
inherit (inputs.nixpkgs) lib;
|
||||||
|
|
||||||
mkNixosSystems = lib.mapAttrs (
|
mkNixosSystems = lib.mapAttrs (
|
||||||
name: modules:
|
name: modules:
|
||||||
lib.nixosSystem {
|
lib.nixosSystem {
|
||||||
modules =
|
modules = modules ++ [
|
||||||
modules
|
|
||||||
++ [
|
|
||||||
{
|
{
|
||||||
|
imports = [ (import "${inputs.home-manager}/nixos") ];
|
||||||
networking.hostName = name;
|
networking.hostName = name;
|
||||||
nixpkgs.overlays = [ inputs.nix-vscode-extensions.overlays.default ];
|
nixpkgs.overlays = [ inputs.nix-vscode-extensions.overlays.default ];
|
||||||
}
|
}
|
||||||
@ -28,8 +29,9 @@
|
|||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in {
|
in
|
||||||
formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
{
|
||||||
|
formatter.x86_64-linux = inputs.nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style;
|
||||||
|
|
||||||
nixosConfigurations = mkNixosSystems {
|
nixosConfigurations = mkNixosSystems {
|
||||||
polysaa = [
|
polysaa = [
|
||||||
|
@ -7,14 +7,23 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
modulesPath,
|
modulesPath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = ["xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"nvme"
|
||||||
|
"usbhid"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
boot.initrd.luks.devices.cryptroot.device = "/dev/disk/by-uuid/c75f2769-d32f-4eed-9237-ece7e783fec3";
|
boot.initrd.luks.devices.cryptroot.device =
|
||||||
|
"/dev/disk/by-uuid/c75f2769-d32f-4eed-9237-ece7e783fec3";
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
@ -27,7 +36,10 @@
|
|||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-uuid/6B09-29A2";
|
device = "/dev/disk/by-uuid/6B09-29A2";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
options = ["fmask=0022" "dmask=0022"];
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
|
@ -6,12 +6,16 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./locale.nix
|
./locale.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
|
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
@ -21,10 +25,11 @@
|
|||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
||||||
|
|
||||||
networking.networkmanager.ensureProfiles.profiles = with builtins;
|
networking.networkmanager.ensureProfiles.profiles =
|
||||||
lib.concatMapAttrs
|
with builtins;
|
||||||
(fname: _: import (./networks + "/${fname}"))
|
lib.concatMapAttrs (fname: _: import (./networks + "/${fname}")) (
|
||||||
(lib.filterAttrs (fname: _: lib.hasSuffix ".nix" fname) (readDir ./networks));
|
lib.filterAttrs (fname: _: lib.hasSuffix ".nix" fname) (readDir ./networks)
|
||||||
|
);
|
||||||
|
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "Europe/Paris";
|
time.timeZone = "Europe/Paris";
|
||||||
@ -37,9 +42,14 @@
|
|||||||
users.users.mysaa = {
|
users.users.mysaa = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||||
packages = with pkgs; [
|
};
|
||||||
|
home-manager.users.mysaa =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
tree
|
tree
|
||||||
];
|
];
|
||||||
|
home.stateVersion = "24.11";
|
||||||
};
|
};
|
||||||
|
|
||||||
# List packages installed in system profile. To search, run:
|
# List packages installed in system profile. To search, run:
|
||||||
|
@ -4,7 +4,8 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
modulePath,
|
modulePath,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
console.keyMap = "fr-bepo";
|
console.keyMap = "fr-bepo";
|
||||||
@ -12,7 +13,10 @@
|
|||||||
i18n.inputMethod = {
|
i18n.inputMethod = {
|
||||||
enable = true;
|
enable = true;
|
||||||
type = "fcitx5";
|
type = "fcitx5";
|
||||||
fcitx5.addons = with pkgs; [fcitx5-gtk fcitx5-mozc];
|
fcitx5.addons = with pkgs; [
|
||||||
|
fcitx5-gtk
|
||||||
|
fcitx5-mozc
|
||||||
|
];
|
||||||
fcitx5.waylandFrontend = true;
|
fcitx5.waylandFrontend = true;
|
||||||
fcitx5.plasma6Support = true;
|
fcitx5.plasma6Support = true;
|
||||||
fcitx5.settings.inputMethod = {
|
fcitx5.settings.inputMethod = {
|
||||||
@ -35,8 +39,12 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
fcitx5.settings.globalOptions = {
|
fcitx5.settings.globalOptions = {
|
||||||
"[Hotkey]" = {"EnumerateWithTriggerKeys" = true;};
|
"[Hotkey]" = {
|
||||||
"[Hotkey/TriggerKeys]" = {"0" = "Control+Shift+K";};
|
"EnumerateWithTriggerKeys" = true;
|
||||||
|
};
|
||||||
|
"[Hotkey/TriggerKeys]" = {
|
||||||
|
"0" = "Control+Shift+K";
|
||||||
|
};
|
||||||
"[Behaviour]" = {
|
"[Behaviour]" = {
|
||||||
"ActiveByDefault" = true;
|
"ActiveByDefault" = true;
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,8 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
../basic
|
../basic
|
||||||
./packages.nix
|
./packages.nix
|
||||||
@ -17,7 +18,10 @@
|
|||||||
services.displayManager.sddm.enable = true;
|
services.displayManager.sddm.enable = true;
|
||||||
services.desktopManager.plasma6.enable = true;
|
services.desktopManager.plasma6.enable = true;
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
services.xserver.videoDrivers = ["displaylink" "modesetting"];
|
services.xserver.videoDrivers = [
|
||||||
|
"displaylink"
|
||||||
|
"modesetting"
|
||||||
|
];
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
# services.printing.enable = true;
|
# services.printing.enable = true;
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
users.users.mysaa.packages = with pkgs; [
|
{
|
||||||
|
home-manager.users.mysaa.home.packages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
vlc
|
vlc
|
||||||
(vscode-with-extensions.override {
|
(vscode-with-extensions.override {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user