split everything into modules and update nixpkgs

This commit is contained in:
aditya
2026-05-14 00:29:17 +05:30
parent 0e2136c3a0
commit cc2380eec1
18 changed files with 270 additions and 81 deletions
+15 -58
View File
@@ -1,57 +1,17 @@
# 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, ...}:
{ pkgs, inputs, ...}:
{
imports =
[
imports = [
./hardware-configuration.nix
./home/manager.nix
./system
./home/manager.nix
./services
./programs
./hardware
];
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;
};
security.polkit.enable = true;
users.users.aditya = {
isNormalUser = true;
@@ -62,23 +22,20 @@
];
};
programs.firefox.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
bemenu
telegram-desktop
(discord.override {
withOpenASAR = true;
})
helix
bruno
chromium
kdePackages.kdenlive
antigravity
zed-editor
devenv
nixd
nodejs
inputs.pano-scrobbler.packages."x86_64-linux".default
];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.stateVersion = "25.11";
}
Generated
+32 -11
View File
@@ -7,43 +7,43 @@
]
},
"locked": {
"lastModified": 1777851538,
"narHash": "sha256-Gp8qwTEYNoy2yvmErVGlvLOQvrtEECCAKbonW7VJef8=",
"lastModified": 1779726825,
"narHash": "sha256-RUkMrREjKDQrA+dA9+xZviGAxM5W1aVdyOr/bSYpHrE=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "cc09c0f9b7eaa95c2d9827338a5eb03d32505ca5",
"rev": "b179bde238977f7d4454fc770b1a727eaf55111c",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"ref": "release-26.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1778003029,
"narHash": "sha256-q/nkKLDtHIyLjZpKhWk3cSK5IYsFqtMd6UtXF3ddjgA=",
"lastModified": 1779971959,
"narHash": "sha256-R5nauXyqyfRUFiZycFFZdkF7wl6eaUpPLst35+2nJQY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "0c88e1f2bdb93d5999019e99cb0e61e1fe2af4c5",
"rev": "ec942ba042dad5ef097e2ef3a3effc034241f011",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"ref": "nixos-26.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1777954456,
"narHash": "sha256-hGdgeU2Nk87RAuZyYjyDjFL6LK7dAZN5RE9+hrDTkDU=",
"lastModified": 1779560665,
"narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "549bd84d6279f9852cae6225e372cc67fb91a4c1",
"rev": "64c08a7ca051951c8eae34e3e3cb1e202fe36786",
"type": "github"
},
"original": {
@@ -53,11 +53,32 @@
"type": "github"
}
},
"pano-scrobbler": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1779270916,
"narHash": "sha256-OEVnC5U5zeTcw6Br5YHEfOO+2/4U+dUMVByLF2hFYOU=",
"owner": "kawaiiDango",
"repo": "pano-scrobbler-flake",
"rev": "299c8dcec11254928e7df9dbd92c0888ea7eed47",
"type": "github"
},
"original": {
"owner": "kawaiiDango",
"repo": "pano-scrobbler-flake",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"pano-scrobbler": "pano-scrobbler",
"sops-nix": "sops-nix"
}
},
+7 -3
View File
@@ -2,19 +2,23 @@
description = "aditya's flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs.url = "github:nixos/nixpkgs/nixos-26.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
pano-scrobbler = {
url = "github:kawaiiDango/pano-scrobbler-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, ... } @ inputs: {
outputs = { nixpkgs, home-manager, ... } @ inputs: {
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
+6
View File
@@ -0,0 +1,6 @@
{
hardware.bluetooth = {
enable = false;
powerOnBoot = false;
};
}
+5
View File
@@ -0,0 +1,5 @@
{
imports = [
./bluetooth.nix
];
}
+65 -3
View File
@@ -1,14 +1,76 @@
{ pkgs, ... }:
{ pkgs, lib, ... }:
{
home.username = "aditya";
home.homeDirectory = "/home/aditya";
home.stateVersion = "25.11";
home.packages = with pkgs.unstable; [
pear-desktop
wayland.windowManager.sway = {
enable = true;
wrapperFeatures.gtk = true;
config = {
modifier = "Mod4";
input = {
"type:touchpad" = {
tap = "enabled";
tap_button_map = "lrm";
natural_scroll = "enabled";
};
};
menu = "${pkgs.bemenu}/bin/bemenu-run";
keybindings = lib.mkOptionDefault {
"Mod4+d" = "exec ${pkgs.bemenu}/bin/bemenu-run";
};
output = {
"*" = { scale = "1.25"; };
};
};
};
home.packages = with pkgs; [
unstable.pear-desktop
unstable.cloudflared
];
xdg.configFile."pipewire/pipewire.conf.d/99-input-denoising.conf".text = ''
context.modules = [
{ name = libpipewire-module-filter-chain
args = {
node.description = "noise cancelling source"
media.name = "noise cancelling source"
filter.graph = {
nodes = [
{
type = ladspa
name = rnnoise
plugin = librnnoise_ladspa
label = noise_suppressor_mono
control = {
"VAD Threshold (%)" = 97.0
"VAD Grace Period (ms)" = 50
"Retroactive VAD Grace (ms)" = 0
}
}
]
}
audio.rate = 48000
audio.position = ["MONO"]
capture.props = {
node.name = "capture.rnnoise_source"
node.passive = true
audio.rate = 48000
audio.channels = 1
}
playback.props = {
node.name = "rnnoise_source"
media.class = Audio/Source
audio.channels = 1
}
}
}
]
'';
imports = [
./programs
];
+8 -1
View File
@@ -1,4 +1,4 @@
{...}:
{ pkgs, lib, ... }:
{
programs.zed-editor = {
@@ -35,6 +35,13 @@
light = "Crimson Light";
dark = "Crimson Dark";
};
lsp = {
rust-analyzer = {
binary = {
path = lib.getExe pkgs.rust-analyzer;
};
};
};
};
};
}
+10
View File
@@ -0,0 +1,10 @@
{
programs = {
firefox.enable = true;
nix-ld.enable = true;
sway = {
enable = true;
wrapperFeatures.gtk = true;
};
};
}
+6
View File
@@ -0,0 +1,6 @@
{
imports = [
./common.nix
./obs-studio.nix
];
}
+13
View File
@@ -0,0 +1,13 @@
{ pkgs, ... }:
{
programs.obs-studio = {
enable = true;
enableVirtualCamera = true;
plugins = with pkgs.obs-studio-plugins; [
obs-pipewire-audio-capture
obs-vaapi
obs-plugin-countdown
];
};
}
+16
View File
@@ -0,0 +1,16 @@
{
services.cloudflared = {
enable = true;
tunnels = {
"thinkpad" = {
credentialsFile = "/home/aditya/.cloudflared/a3a0512b-6c48-44f9-b760-15d6cf7d1232.json";
default = "http_status:404";
ingress = {
"thinkpad.aditya.stream" = {
service = "http://localhost:3000";
};
};
};
};
};
}
+7
View File
@@ -0,0 +1,7 @@
{ pkgs, ... }:
{
services.printing.enable = true;
services.printing.cups-pdf.enable = true;
services.printing.drivers = with pkgs; [ hplip ];
}
+21
View File
@@ -0,0 +1,21 @@
{
imports = [
./cloudflared.nix
./cups.nix
./pipewire.nix
];
services.xserver = {
enable = true;
xkb = {
layout = "us";
variant = "";
};
};
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
services.flatpak.enable = true;
services.gnome.gnome-keyring.enable = true;
}
+12
View File
@@ -0,0 +1,12 @@
{ pkgs, ... }:
{
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
extraLadspaPackages = [ pkgs.rnnoise-plugin.ladspa ];
};
services.pulseaudio.enable = false;
}
+12
View File
@@ -0,0 +1,12 @@
{
boot.loader = {
systemd-boot.enable = false;
grub = {
enable = true;
efiSupport = true;
useOSProber = true;
devices = [ "nodev" ];
};
efi.canTouchEfiVariables = true;
};
}
+25
View File
@@ -0,0 +1,25 @@
{
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";
};
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.stateVersion = "25.11";
}
+3 -2
View File
@@ -1,7 +1,8 @@
{ ... }:
{
imports = [
./bootloader.nix
./networking.nix
./configuration.nix
./overlays.nix
];
}
+4
View File
@@ -0,0 +1,4 @@
{
networking.hostName = "nixos";
networking.networkmanager.enable = true;
}