initial nixos flake setup

This commit is contained in:
aditya
2026-05-09 03:23:16 +05:30
commit 0b65bb0b7f
10 changed files with 319 additions and 0 deletions
+85
View File
@@ -0,0 +1,85 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ...}:
{
imports =
[
./hardware-configuration.nix
./home/manager.nix
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "nixos";
networking.networkmanager.enable = true;
time.timeZone = "Asia/Kolkata";
i18n.defaultLocale = "en_IN";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_IN";
LC_IDENTIFICATION = "en_IN";
LC_MEASUREMENT = "en_IN";
LC_MONETARY = "en_IN";
LC_NAME = "en_IN";
LC_NUMERIC = "en_IN";
LC_PAPER = "en_IN";
LC_TELEPHONE = "en_IN";
LC_TIME = "en_IN";
};
services.xserver.enable = true;
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.xserver.xkb = {
layout = "us";
variant = "";
};
services.printing.enable = false;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
users.users.aditya = {
isNormalUser = true;
description = "aditya";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
kdePackages.kate
];
};
programs.firefox.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages =
(with pkgs; [
telegram-desktop
(discord.override {
withOpenASAR = true;
})
helix
nixd
nodejs
]);
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.stateVersion = "25.11";
}
Generated
+66
View File
@@ -0,0 +1,66 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1777851538,
"narHash": "sha256-Gp8qwTEYNoy2yvmErVGlvLOQvrtEECCAKbonW7VJef8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cc09c0f9b7eaa95c2d9827338a5eb03d32505ca5",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1778003029,
"narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1777954456,
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable"
}
}
},
"root": "root",
"version": 7
}
+23
View File
@@ -0,0 +1,23 @@
{
description = "aditya's flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... } @ inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
];
};
};
}
+31
View File
@@ -0,0 +1,31 @@
# 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 = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/9f40ff0e-ae87-450f-9bd6-5926d23ab7ce";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/367B-5E6B";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
swapDevices = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+13
View File
@@ -0,0 +1,13 @@
{...}:
{
home.username = "aditya";
home.homeDirectory = "/home/aditya";
home.stateVersion = "25.11";
imports = [
./programs/gh.nix
./programs/git.nix
./programs/zed.nix
];
}
+12
View File
@@ -0,0 +1,12 @@
{...}:
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "aditya";
users = {
aditya = import ./aditya.nix;
};
};
}
+13
View File
@@ -0,0 +1,13 @@
{...}:
{
programs.gh = {
enable = true;
gitCredentialHelper = {
enable = true;
};
settings = {
git_protocol = "https";
};
};
}
+17
View File
@@ -0,0 +1,17 @@
{...}:
{
programs.git = {
enable = true;
settings = {
user = {
name = "aditya";
email = "dedomil@tuta.io";
};
};
# signing = {
# key = null;
# signByDefault = true;
# };
};
}
+40
View File
@@ -0,0 +1,40 @@
{...}:
{
programs.zed-editor = {
enable = true;
extensions = ["crimson-theme"];
userSettings = {
ui_font_size = 20;
ui_font_family = "DejaVu Sans Mono";
buffer_font_size = 20;
buffer_font_family = "DejaVu Sans Mono";
autosave = {
after_delay = { milliseconds = 1000; };
};
colorize_brackets = true;
telemetry = {
diagnostics = false;
metrics = false;
};
project_panel = {
diagnostic_badges = true;
dock = "right";
};
collaboration_panel = {
dock = "right";
};
outline_panel = {
dock = "right";
};
git_panel = {
dock = "right";
};
theme = {
mode = "system";
light = "Crimson Light";
dark = "Crimson Dark";
};
};
};
}
+19
View File
@@ -0,0 +1,19 @@
{ inputs, ... }:
{
nixpkgs.overlays = [
(final: prev:
let
unstable-pkgs = import inputs.nixpkgs-unstable {
inherit (prev) system;
config.allowUnfree = true;
config.allowUnsupportedSystem = true;
};
in
{
inherit (unstable-pkgs) ollama kdePackages sddm;
unstable = unstable-pkgs;
}
)
];
}