nix fmt
This commit is contained in:
parent
7904c8f3c8
commit
369c3399b5
11
flake.nix
11
flake.nix
|
@ -10,20 +10,23 @@
|
||||||
};
|
};
|
||||||
nix-index-database = {
|
nix-index-database = {
|
||||||
url = "github:nix-community/nix-index-database";
|
url = "github:nix-community/nix-index-database";
|
||||||
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
|
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
|
||||||
};
|
};
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager/release-23.05";
|
url = "github:nix-community/home-manager/release-23.05";
|
||||||
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
|
inputs.nixpkgs.follows = "nixpkgs"; # use the same nixpkgs as the system
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, ... }@inputs: {
|
outputs = { self, nixpkgs, ... }@inputs: {
|
||||||
|
# https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-fmt.html
|
||||||
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# Home desktop
|
# Home desktop
|
||||||
omega = nixpkgs.lib.nixosSystem {
|
omega = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = inputs; # pass flake inputs to modules
|
specialArgs = inputs; # pass flake inputs to modules
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/omega
|
./hosts/omega
|
||||||
];
|
];
|
||||||
|
@ -31,7 +34,7 @@
|
||||||
# Laptop
|
# Laptop
|
||||||
zeta = nixpkgs.lib.nixosSystem {
|
zeta = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = inputs; # pass flake inputs to modules
|
specialArgs = inputs; # pass flake inputs to modules
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/zeta
|
./hosts/zeta
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
@ -32,5 +32,5 @@
|
||||||
# You can update Home Manager without changing this value. See
|
# You can update Home Manager without changing this value. See
|
||||||
# the Home Manager release notes for a list of state version
|
# the Home Manager release notes for a list of state version
|
||||||
# changes in each release.
|
# changes in each release.
|
||||||
home-manager.users.caspervk.home.stateVersion = "23.05"; # Did you read the comment?
|
home-manager.users.caspervk.home.stateVersion = "23.05"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
[
|
||||||
|
(modulesPath + "/profiles/qemu-guest.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ];
|
||||||
|
@ -14,7 +15,7 @@
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "none";
|
device = "none";
|
||||||
fsType = "tmpfs";
|
fsType = "tmpfs";
|
||||||
options = [ "defaults" "size=2G" "mode=755" ]; # mode=755 so only root can write to those files
|
options = [ "defaults" "size=2G" "mode=755" ]; # mode=755 so only root can write to those files
|
||||||
};
|
};
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-label/BOOT";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
|
@ -26,10 +27,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
device = "/nix/persist/swapfile";
|
device = "/nix/persist/swapfile";
|
||||||
size = 16*1024; # 16 GiB
|
size = 16 * 1024; # 16 GiB
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "23.05"; # Did you read the comment?
|
system.stateVersion = "23.05"; # Did you read the comment?
|
||||||
|
|
||||||
# This value determines the Home Manager release that your
|
# This value determines the Home Manager release that your
|
||||||
# configuration is compatible with. This helps avoid breakage
|
# configuration is compatible with. This helps avoid breakage
|
||||||
|
@ -32,5 +32,5 @@
|
||||||
# You can update Home Manager without changing this value. See
|
# You can update Home Manager without changing this value. See
|
||||||
# the Home Manager release notes for a list of state version
|
# the Home Manager release notes for a list of state version
|
||||||
# changes in each release.
|
# changes in each release.
|
||||||
home-manager.users.caspervk.home.stateVersion = "23.05"; # Did you read the comment?
|
home-manager.users.caspervk.home.stateVersion = "23.05"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" ];
|
||||||
|
@ -14,7 +15,7 @@
|
||||||
fileSystems."/" = {
|
fileSystems."/" = {
|
||||||
device = "none";
|
device = "none";
|
||||||
fsType = "tmpfs";
|
fsType = "tmpfs";
|
||||||
options = [ "defaults" "size=2G" "mode=755" ]; # mode=755 so only root can write to those files
|
options = [ "defaults" "size=2G" "mode=755" ]; # mode=755 so only root can write to those files
|
||||||
};
|
};
|
||||||
fileSystems."/boot" = {
|
fileSystems."/boot" = {
|
||||||
device = "/dev/disk/by-label/BOOT";
|
device = "/dev/disk/by-label/BOOT";
|
||||||
|
@ -26,10 +27,10 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [
|
swapDevices = [
|
||||||
{
|
{
|
||||||
device = "/nix/persist/swapfile";
|
device = "/nix/persist/swapfile";
|
||||||
size = 8*1024; # 8 GiB
|
size = 8 * 1024; # 8 GiB
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
|
|
@ -16,17 +16,17 @@
|
||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
directories = [
|
directories = [
|
||||||
{ directory = "/etc/NetworkManager/system-connections"; user = "root"; group = "root"; mode = "0700"; }
|
{ directory = "/etc/NetworkManager/system-connections"; user = "root"; group = "root"; mode = "0700"; }
|
||||||
{ directory = "/tmp"; user = "root"; group = "root"; mode = "1777"; } # see comment above
|
{ directory = "/tmp"; user = "root"; group = "root"; mode = "1777"; } # see comment above
|
||||||
# With great power comes great responsibility, we get it
|
# With great power comes great responsibility, we get it
|
||||||
{ directory = "/var/db/sudo/lectured"; user = "root"; group = "root"; mode = "0700"; }
|
{ directory = "/var/db/sudo/lectured"; user = "root"; group = "root"; mode = "0700"; }
|
||||||
{ directory = "/var/log"; user = "root"; group = "root"; mode = "0755"; }
|
{ directory = "/var/log"; user = "root"; group = "root"; mode = "0755"; }
|
||||||
];
|
];
|
||||||
files = [
|
files = [
|
||||||
"/etc/machine-id" # needed for /var/log
|
"/etc/machine-id" # needed for /var/log
|
||||||
];
|
];
|
||||||
users.caspervk = {
|
users.caspervk = {
|
||||||
directories = [
|
directories = [
|
||||||
"/" # entire home directory
|
"/" # entire home directory
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,11 +8,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.persistence."/nix/persist" = {
|
environment.persistence."/nix/persist" = {
|
||||||
files = [
|
files = [
|
||||||
"/etc/ssh/ssh_host_ed25519_key"
|
"/etc/ssh/ssh_host_ed25519_key"
|
||||||
"/etc/ssh/ssh_host_ed25519_key.pub"
|
"/etc/ssh/ssh_host_ed25519_key.pub"
|
||||||
"/etc/ssh/ssh_host_rsa_key"
|
"/etc/ssh/ssh_host_rsa_key"
|
||||||
"/etc/ssh/ssh_host_rsa_key.pub"
|
"/etc/ssh/ssh_host_rsa_key.pub"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
passwordFile = "/nix/persist/passwordfile";
|
passwordFile = "/nix/persist/passwordfile";
|
||||||
extraGroups = [
|
extraGroups = [
|
||||||
"networkmanager"
|
"networkmanager"
|
||||||
"wheel" # allows sudo
|
"wheel" # allows sudo
|
||||||
"video" # allows controlling brightness
|
"video" # allows controlling brightness
|
||||||
# todo: docker, systemd-journal, audio, input, power, nix ?
|
# todo: docker, systemd-journal, audio, input, power, nix ?
|
||||||
];
|
];
|
||||||
uid = 1000;
|
uid = 1000;
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPB/qr63FB0ZqOe/iZGwIKNHD8a1Ud/mXVjQPmpIG7pM caspervk@omega"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPB/qr63FB0ZqOe/iZGwIKNHD8a1Ud/mXVjQPmpIG7pM caspervk@omega"
|
||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII71DKQziktCkyMAmL25QKRK6nG2uJDkQXioIZp5JkMZ caspervk@zeta"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAII71DKQziktCkyMAmL25QKRK6nG2uJDkQXioIZp5JkMZ caspervk@zeta"
|
||||||
];
|
];
|
||||||
packages = with pkgs; [];
|
packages = with pkgs; [ ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
# Trackpad
|
# Trackpad
|
||||||
tap = "enabled";
|
tap = "enabled";
|
||||||
natural_scroll = "enable";
|
natural_scroll = "enable";
|
||||||
dwt = "disabled"; # don't disable-while-typing
|
dwt = "disabled"; # don't disable-while-typing
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
modifier = "Mod4"; # super
|
modifier = "Mod4"; # super
|
||||||
terminal = "alacritty";
|
terminal = "alacritty";
|
||||||
workspaceAutoBackAndForth = true;
|
workspaceAutoBackAndForth = true;
|
||||||
};
|
};
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Video
|
# Video
|
||||||
programs.light.enable = true; # allows controlling screen brightness
|
programs.light.enable = true; # allows controlling screen brightness
|
||||||
|
|
||||||
# Allow sharing screen
|
# Allow sharing screen
|
||||||
#xdg.portal.wlr.enable = true;
|
#xdg.portal.wlr.enable = true;
|
||||||
|
@ -53,6 +53,6 @@
|
||||||
|
|
||||||
hardware.opengl = {
|
hardware.opengl = {
|
||||||
enable = true;
|
enable = true;
|
||||||
extraPackages = with pkgs; [intel-media-driver ];
|
extraPackages = with pkgs; [ intel-media-driver ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue