feat: added nixos config
This commit is contained in:
parent
299f3248c4
commit
8cf2612421
27
flake.lock
generated
Normal file
27
flake.lock
generated
Normal file
@ -0,0 +1,27 @@
|
||||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"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"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
31
flake.nix
Normal file
31
flake.nix
Normal file
@ -0,0 +1,31 @@
|
||||
{
|
||||
description = "OS Config";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
|
||||
nixosConfigurations = {
|
||||
x600 = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit system; };
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
12
nixos/applications.nix
Normal file
12
nixos/applications.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
darktable
|
||||
keepassxc
|
||||
amberol
|
||||
siril
|
||||
vscode
|
||||
signal-desktop
|
||||
thunderbird
|
||||
];
|
||||
}
|
67
nixos/configuration.nix
Normal file
67
nixos/configuration.nix
Normal file
@ -0,0 +1,67 @@
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
./system-packages.nix
|
||||
./applications.nix
|
||||
];
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
networking.hostName = "nixos";
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
time.timeZone = "Europe/Copenhagen";
|
||||
|
||||
i18n.defaultLocale = "en_DK.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "da_DK.UTF-8";
|
||||
LC_IDENTIFICATION = "da_DK.UTF-8";
|
||||
LC_MEASUREMENT = "da_DK.UTF-8";
|
||||
LC_MONETARY = "da_DK.UTF-8";
|
||||
LC_NAME = "da_DK.UTF-8";
|
||||
LC_NUMERIC = "da_DK.UTF-8";
|
||||
LC_PAPER = "da_DK.UTF-8";
|
||||
LC_TELEPHONE = "da_DK.UTF-8";
|
||||
LC_TIME = "da_DK.UTF-8";
|
||||
};
|
||||
|
||||
services.displayManager.gdm.enable = true;
|
||||
services.desktopManager.gnome.enable = true;
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "dk";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
console.keyMap = "dk-latin1";
|
||||
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.joshua = {
|
||||
isNormalUser = true;
|
||||
description = "Joshua Seiger-Eatwell";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
|
||||
programs.firefox.enable = true;
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
system.stateVersion = "25.05"; # Did you read the comment?
|
||||
|
||||
}
|
37
nixos/hardware-configuration.nix
Normal file
37
nixos/hardware-configuration.nix
Normal file
@ -0,0 +1,37 @@
|
||||
# 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 + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/d3cc3dcf-9bbf-4ad3-80df-55ee3a939387";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/D74E-06EA";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
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.enp1s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
6
nixos/system-packages.nix
Normal file
6
nixos/system-packages.nix
Normal file
@ -0,0 +1,6 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
vim
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue
Block a user