Initial commit

This commit is contained in:
Oliver Davies 2025-07-22 20:55:21 +01:00
commit a5cc5ad811
13 changed files with 287 additions and 0 deletions

7
modules/flake-parts.nix Normal file
View file

@ -0,0 +1,7 @@
{ inputs, ... }:
{
imports = [
inputs.flake-parts.flakeModules.modules
];
}

7
modules/formatting.nix Normal file
View file

@ -0,0 +1,7 @@
{
perSystem =
{ pkgs, ... }:
{
formatter = pkgs.nixfmt-rfc-style;
};
}

8
modules/git.nix Normal file
View file

@ -0,0 +1,8 @@
{
flake.modules.nixos.pc = { pkgs, ... }:
{
environment.systemPackages = with pkgs; [
git
];
};
}

View file

@ -0,0 +1,77 @@
{
flake.modules.nixos."nixosConfigurations/corgi" =
{
config,
pkgs,
stateVersion,
...
}:
{
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
services.xserver.enable = true;
services.xserver.displayManager.lightdm.enable = true;
services.xserver.desktopManager.cinnamon.enable = true;
services.xserver.xkb = {
layout = "gb";
variant = "";
};
console.keyMap = "uk";
services.printing.enable = true;
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
users.users.oliver = {
isNormalUser = true;
description = "oliver";
extraGroups = [
"networkmanager"
"wheel"
];
packages = with pkgs; [
];
};
programs.firefox.enable = true;
nixpkgs.config.allowUnfree = true;
environment.systemPackages = with pkgs; [
];
services.openssh.enable = true;
system.stateVersion = stateVersion;
};
}

View file

@ -0,0 +1,57 @@
{
flake.modules.nixos."nixosConfigurations/corgi" =
{
config,
pkgs,
modulesPath,
lib,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
"sr_mod"
"rtsx_usb_sdmmc"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/076c5319-e9b6-4985-b86b-5b4287be17ba";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/E090-18D3";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
swapDevices = [
{ device = "/dev/disk/by-uuid/b29480eb-56cf-4353-9b98-790e4e2512b3"; }
];
# 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.enp1s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
};
}

View file

@ -0,0 +1,7 @@
{ config, ... }:
{
flake.modules.nixos."nixosConfigurations/corgi".imports = with config.flake.modules.nixos; [
pc
];
}

View file

@ -0,0 +1,13 @@
{ config, inputs, ... }:
{
flake.nixosConfigurations.corgi = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ config.flake.modules.nixos."nixosConfigurations/corgi" ];
specialArgs = {
stateVersion = "25.05";
};
};
}

8
modules/systems.nix Normal file
View file

@ -0,0 +1,8 @@
{
systems = [
"x86_64-linux"
"aarch64-linux"
"aarch64-darwin"
"x86_64-darwin"
];
}

8
modules/tmux.nix Normal file
View file

@ -0,0 +1,8 @@
{
flake.modules.nixos.pc = { pkgs, ... }:
{
environment.systemPackages = with pkgs; [
tmux
];
};
}