This commit is contained in:
mtgmonkey 2025-06-27 03:53:02 -04:00
commit 099116f79b
6 changed files with 365 additions and 0 deletions

13
cachix.nix Normal file
View file

@ -0,0 +1,13 @@
# WARN: this file will get overwritten by $ cachix use <name>
{ pkgs, lib, ... }:
let
folder = ./cachix;
toImport = name: value: folder + ("/" + name);
filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key;
imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder));
in {
inherit imports;
nix.settings.substituters = ["https://cache.nixos.org/"];
}

13
cachix/niri.nix Normal file
View file

@ -0,0 +1,13 @@
{
nix = {
settings = {
substituters = [
"https://niri.cachix.org"
];
trusted-public-keys = [
"niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964="
];
};
};
}

79
configuration.nix Normal file
View file

@ -0,0 +1,79 @@
{
pkgs,
lib,
...
}: {
imports = [
./hardware-configuration.nix
./cachix.nix
];
boot.kernelPackages = pkgs.linuxKernel.packages.linux_hardened;
boot.kernelParams = ["resume_offset=1560576"];
boot.resumeDevice = "/dev/disk/by-uuid/3b4660ec-45c5-47ca-9418-1667c373d4b2";
powerManagement.enable = true;
swapDevices = [
{
device = "/var/lib/swapfile";
size = 4 * 1024;
}
];
boot.loader = {
limine = {
enable = true;
efiSupport = true;
};
grub = {
enable = false;
devices = ["nodev"];
useOSProber = true;
efiSupport = true;
};
efi.canTouchEfiVariables = true;
timeout = lib.mkDefault 2;
};
services.displayManager = {
enable = true;
ly.enable = true;
defaultSession = "none+xmonad";
};
programs.niri.enable = true;
services.libinput.enable = true;
services.xserver = {
enable = true;
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
};
};
networking = {
hostName = "nixos";
networkmanager.enable = true;
dhcpcd.enable = false;
firewall.enable = true;
};
time.timeZone = "America/New_York";
i18n.defaultLocale = "en_US.UTF-8";
users.users.mtgmonkey = {
isNormalUser = true;
description = "mtgmonkey";
extraGroups = ["networkmanager" "wheel"];
};
users.users.test = {
isNormalUser = true;
description = "test";
extraGroups = ["networkmanager" "wheel"];
};
nix.settings.experimental-features = ["nix-command" "flakes"];
system.stateVersion = "25.11";
}

184
flake.lock generated Normal file
View file

@ -0,0 +1,184 @@
{
"nodes": {
"niri-flake": {
"inputs": {
"niri-stable": "niri-stable",
"niri-unstable": "niri-unstable",
"nixpkgs": "nixpkgs",
"nixpkgs-stable": "nixpkgs-stable",
"xwayland-satellite-stable": "xwayland-satellite-stable",
"xwayland-satellite-unstable": "xwayland-satellite-unstable"
},
"locked": {
"lastModified": 1750230031,
"narHash": "sha256-h1aDeX8j10N0pHqdvmVoLQsnTwj1TbxeTPos7x1wuZA=",
"owner": "sodiboo",
"repo": "niri-flake",
"rev": "1fc50d02ad4fe47daa5c22f9fa116ca220ab5154",
"type": "github"
},
"original": {
"owner": "sodiboo",
"repo": "niri-flake",
"type": "github"
}
},
"niri-stable": {
"flake": false,
"locked": {
"lastModified": 1748151941,
"narHash": "sha256-z4viQZLgC2bIJ3VrzQnR+q2F3gAOEQpU1H5xHtX/2fs=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "8ba57fcf25d2fc9565131684a839d58703f1dae7",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"ref": "v25.05.1",
"repo": "niri",
"type": "github"
}
},
"niri-unstable": {
"flake": false,
"locked": {
"lastModified": 1750225787,
"narHash": "sha256-7O/8CChaOhSBSu94McHE0vyH0o+J5R4exq2DDq4zHAg=",
"owner": "YaLTeR",
"repo": "niri",
"rev": "ed14e8da8476d5fde27b14d1dde03256a2f6e11b",
"type": "github"
},
"original": {
"owner": "YaLTeR",
"repo": "niri",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1750134718,
"narHash": "sha256-v263g4GbxXv87hMXMCpjkIxd/viIF7p3JpJrwgKdNiI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9e83b64f727c88a7711a2c463a7b16eedb69a84c",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1750133334,
"narHash": "sha256-urV51uWH7fVnhIvsZIELIYalMYsyr2FCalvlRTzqWRw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "36ab78dab7da2e4e27911007033713bab534187b",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1749285348,
"narHash": "sha256-frdhQvPbmDYaScPFiCnfdh3B/Vh81Uuoo0w5TkWmmjU=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3e3afe5174c561dee0df6f2c2b2236990146329f",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1714253743,
"narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"noshell": {
"inputs": {
"nixpkgs": "nixpkgs_3"
},
"locked": {
"lastModified": 1717396029,
"narHash": "sha256-NPIhvnTYkJZqTY+aabbZ6CAaMAgG6IISvh7GZo1MTfQ=",
"owner": "viperML",
"repo": "noshell",
"rev": "4d194d838a50ea106cd0e47c024e47afc154ab42",
"type": "github"
},
"original": {
"owner": "viperML",
"repo": "noshell",
"type": "github"
}
},
"root": {
"inputs": {
"niri-flake": "niri-flake",
"nixpkgs": "nixpkgs_2",
"noshell": "noshell"
}
},
"xwayland-satellite-stable": {
"flake": false,
"locked": {
"lastModified": 1748488455,
"narHash": "sha256-IiLr1alzKFIy5tGGpDlabQbe6LV1c9ABvkH6T5WmyRI=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "3ba30b149f9eb2bbf42cf4758d2158ca8cceef73",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"ref": "v0.6",
"repo": "xwayland-satellite",
"type": "github"
}
},
"xwayland-satellite-unstable": {
"flake": false,
"locked": {
"lastModified": 1749315541,
"narHash": "sha256-bEik1BfVOFnWvtOrcOHluos/edJ8f+G2y1QySbt/0Ak=",
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"rev": "da2ecb5be816de35e2efe23a408a1c49fe8b11ba",
"type": "github"
},
"original": {
"owner": "Supreeeme",
"repo": "xwayland-satellite",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

27
flake.nix Normal file
View file

@ -0,0 +1,27 @@
{
description = "Home Manager configuration of test";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
noshell.url = "github:viperML/noshell";
niri-flake.url = "github:sodiboo/niri-flake";
};
outputs = {
nixpkgs,
noshell,
niri-flake,
...
}: let
system = "x86_64-linux";
in {
nixosConfigurations."nixos" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
niri-flake.nixosModules.niri
noshell.nixosModules.default
{programs.noshell.enable = true;}
./configuration.nix
];
};
};
}

View file

@ -0,0 +1,49 @@
# 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" "sd_mod" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/3b4660ec-45c5-47ca-9418-1667c373d4b2";
fsType = "ext4";
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/46528a73-fb81-447d-bb01-a16796fe3f65";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C878-D629";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/f7ebe753-19cc-4226-9500-48fa1d4d8178";
fsType = "ext4";
};
swapDevices = [ ];
# 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.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}