-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Logic mostly insipred by (stolen from) https://github.com/kenranunderscore/dotfiles This is still missing hyprshot.
- Loading branch information
1 parent
9ea00fe
commit 8e2ea8f
Showing
15 changed files
with
222 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1 @@ | ||
hardware-configuration.nix | ||
result |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
description = "My NixOS config"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; | ||
|
||
# hyprshot.url = "github:mateusauler/hyprshot-nix"; | ||
# hyprshot.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = inputs@{ self, nixpkgs, ... }: | ||
let | ||
system = "x86_64-linux"; | ||
overlays = [ | ||
(final: prev: { | ||
lib = prev.lib // { my = import ./lib { inherit (final) lib; }; }; | ||
}) | ||
]; | ||
pkgs = import nixpkgs { | ||
inherit system overlays; | ||
config.allowUnfree = true; | ||
}; | ||
inherit (pkgs) lib; | ||
in | ||
{ | ||
nixosConfigurations = let | ||
machines = lib.my.readDirNames ./hosts; | ||
in builtins.foldl' (acc: hostname: | ||
acc // { | ||
${hostname} = | ||
lib.my.mkNixosSystem { inherit hostname system inputs pkgs; }; | ||
}) { } machines; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ config, pkgs, ... }: | ||
|
||
{ | ||
boot.loader = { | ||
systemd-boot.enable = true; | ||
efi.canTouchEfiVariables = true; | ||
timeout = 0; | ||
}; | ||
|
||
environment.systemPackages = with pkgs; [ | ||
efibootmgr | ||
refind | ||
]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ config, pkgs, ... }: | ||
|
||
{ | ||
# ssh | ||
services.openssh.enable = true; | ||
security.rtkit.enable = true; | ||
networking.firewall = { | ||
allowedTCPPorts = [ 22 ]; | ||
allowedUDPPorts = [ 22 ]; | ||
}; | ||
# Some programs need SUID wrappers, can be configured further or are | ||
# started in user sessions. | ||
programs.mtr.enable = true; | ||
programs.gnupg.agent = { | ||
enable = true; | ||
enableSSHSupport = true; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ config, pkgs, custom, ... }: | ||
|
||
let username = custom.username; | ||
in { | ||
imports = [ ./hardware-configuration.nix ../../generic/efi.nix ../../generic/desktop.nix ../../generic/openssh.nix ]; | ||
|
||
networking.hostName = "GLaDOS"; | ||
|
||
i18n.defaultLocale = "en_GB.UTF-8"; | ||
console = { | ||
font = "Lat2-Terminus16"; | ||
keyMap = "br-abnt"; | ||
}; | ||
|
||
programs.steam.enable = true; | ||
|
||
environment.systemPackages = with pkgs; [ | ||
lutris | ||
prismlauncher | ||
]; | ||
|
||
system.stateVersion = "22.11"; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
username = "mateus"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# 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" "nvme" "usbhid" ]; | ||
boot.initrd.kernelModules = [ ]; | ||
boot.kernelModules = [ "kvm-amd" ]; | ||
boot.extraModulePackages = [ ]; | ||
|
||
fileSystems."/" = | ||
{ device = "/dev/disk/by-label/nix_root"; | ||
fsType = "ext4"; | ||
}; | ||
|
||
fileSystems."/home" = | ||
{ device = "/dev/disk/by-label/nix_home"; | ||
fsType = "ext4"; | ||
}; | ||
|
||
fileSystems."/boot" = | ||
{ device = "/dev/disk/by-label/nix_efi"; | ||
fsType = "vfat"; | ||
}; | ||
|
||
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; | ||
|
||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; | ||
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; | ||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; | ||
} |
Submodule hyprshot
deleted from
69bf25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ lib, ... }: | ||
|
||
{ | ||
readDirNames = path: | ||
builtins.attrNames | ||
(lib.filterAttrs (_: type: type == "directory") (builtins.readDir path)); | ||
|
||
mkNixosSystem = { hostname, system, inputs, pkgs }: | ||
let | ||
inherit (inputs) home-manager nixpkgs; | ||
dir = ../hosts + "/${hostname}"; | ||
custom = (import (dir + /custom.nix)) // { inherit hostname; }; | ||
username = custom.username; | ||
specialArgs = { inherit inputs custom; }; | ||
in nixpkgs.lib.nixosSystem { | ||
inherit system pkgs specialArgs; | ||
modules = [ | ||
(dir + /configuration.nix) | ||
# home-manager.nixosModules.home-manager | ||
# { | ||
# home-manager = { | ||
# users.${username} = import (dir + /home.nix); | ||
# useGlobalPkgs = true; | ||
# useUserPackages = false; | ||
# extraSpecialArgs = specialArgs; | ||
# }; | ||
# } | ||
]; | ||
}; | ||
} |
This file was deleted.
Oops, something went wrong.