a
This commit is contained in:
commit
2448f2fc1b
9 changed files with 285 additions and 0 deletions
61
cfg/winter/gui.nix
Normal file
61
cfg/winter/gui.nix
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
fonts = {
|
||||
enableDefaultFonts = true;
|
||||
fontconfig = {
|
||||
defaultFonts = {
|
||||
serif = ["NotoSerif"];
|
||||
sansSerif = ["NotoSans"];
|
||||
monospace = ["CascadiaCode"];
|
||||
};
|
||||
};
|
||||
fonts = with pkgs; [
|
||||
cascadia-code
|
||||
font-awesome-ttf
|
||||
font-awesome_4
|
||||
hanazono
|
||||
material-icons
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-extra
|
||||
open-sans
|
||||
twemoji-color-font
|
||||
unifont
|
||||
];
|
||||
};
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
autorun = false;
|
||||
displayManager = {
|
||||
lightdm.enable = lib.mkForce false;
|
||||
startx.enable = true;
|
||||
};
|
||||
desktopManager = {
|
||||
xterm.enable = false;
|
||||
};
|
||||
libinput.enable = true;
|
||||
config = ''
|
||||
Section "InputClass"
|
||||
Identifier "mouse accel"
|
||||
Driver "libinput"
|
||||
MatchIsPointer "on"
|
||||
Option "AccelProfile" "flat"
|
||||
Option "AccelSpeed" "0"
|
||||
EndSection
|
||||
'';
|
||||
windowManager.i3 = {
|
||||
enable = true;
|
||||
package = pkgs.i3-gaps;
|
||||
extraPackages = with pkgs; [
|
||||
dunst
|
||||
feh
|
||||
lxappearance
|
||||
maim
|
||||
picom
|
||||
polybar
|
||||
rofi
|
||||
xclip
|
||||
];
|
||||
};
|
||||
xkbOptions = "ctrl:swapescape";
|
||||
};
|
||||
}
|
||||
34
cfg/winter/hardware-configuration.nix
Normal file
34
cfg/winter/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
# 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 = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/25ffa0da-054d-4906-84aa-1625f94b0cf2";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/E8E8-E570";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/hdd" =
|
||||
{ device = "/dev/disk/by-uuid/d5e3cfe5-c73a-4695-b81b-fc0215d4cefe";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
}
|
||||
19
cfg/winter/kernel.nix
Normal file
19
cfg/winter/kernel.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, ...}: {
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
boot = {
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
blacklistedKernelModules = [
|
||||
"uvcvideo"
|
||||
];
|
||||
kernelParams = [
|
||||
"amdgpu.gpu_recovery=1"
|
||||
"amdgpu.si_support=1"
|
||||
"radeon.si_support=0"
|
||||
"intel_pstate=passive"
|
||||
];
|
||||
kernelPackages = pkgs.linuxPackages_lqx;
|
||||
};
|
||||
}
|
||||
49
cfg/winter/main.nix
Normal file
49
cfg/winter/main.nix
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{ config, pkgs, ... }: {
|
||||
networking.hostName = "winter";
|
||||
system.stateVersion = "20.09";
|
||||
|
||||
imports = [
|
||||
./gui.nix
|
||||
./hardware-configuration.nix
|
||||
./kernel.nix
|
||||
./networking.nix
|
||||
./packages.nix
|
||||
./security.nix
|
||||
];
|
||||
nix = {
|
||||
package = pkgs.nixUnstable;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
};
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
polybar = super.polybar.override { i3Support = true; };
|
||||
picom = super.picom.overrideAttrs(old: {
|
||||
src = pkgs.fetchFromGitHub {
|
||||
repo = "picom";
|
||||
owner = "ibhagwan";
|
||||
rev = "60eb00ce1b52aee46d343481d0530d5013ab850b";
|
||||
sha256 = "1m17znhl42sa6ry31yiy05j5ql6razajzd6s3k2wz4c63rc2fd1w";
|
||||
};
|
||||
});
|
||||
})
|
||||
];
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
# set in flakes-secrets
|
||||
# time.timeZone = "";
|
||||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
users.users.lava = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
console.useXkbConfig = true;
|
||||
}
|
||||
|
||||
18
cfg/winter/networking.nix
Normal file
18
cfg/winter/networking.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ config, ... }: {
|
||||
networking.wireless.enable = true;
|
||||
|
||||
networking.useDHCP = false;
|
||||
networking.interfaces.eno1.useDHCP = false;
|
||||
networking.interfaces.wlp3s0.useDHCP = false;
|
||||
|
||||
networking.interfaces.eno1.ipv4.addresses = [{
|
||||
address = "10.0.0.2";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
networking.interfaces.wlp3s0.ipv4.addresses = [{
|
||||
address = "192.168.100.13";
|
||||
prefixLength = 24;
|
||||
}];
|
||||
networking.defaultGateway = "192.168.100.1";
|
||||
networking.nameservers = ["192.168.100.11"];
|
||||
}
|
||||
12
cfg/winter/packages.nix
Normal file
12
cfg/winter/packages.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
git neofetch neovim nodejs rsync wget
|
||||
gnupg
|
||||
light glxinfo
|
||||
alacritty discord-canary element-desktop firefox pavucontrol tor-browser-bundle-bin
|
||||
|
||||
(pkgs.writeShellScriptBin "nix-flakes" ''
|
||||
exec ${pkgs.nixUnstable}/bin/nix --experimental-features "nix-command flakes" "$@"
|
||||
'')
|
||||
];
|
||||
}
|
||||
28
cfg/winter/security.nix
Normal file
28
cfg/winter/security.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
{ config, pkgs, ... }: {
|
||||
networking.firewall.enable = false;
|
||||
services.openssh.enable = true;
|
||||
|
||||
security = {
|
||||
polkit.enable = true;
|
||||
sudo.enable = false;
|
||||
doas = {
|
||||
enable = true;
|
||||
extraRules = [
|
||||
{
|
||||
groups = ["wheel"];
|
||||
keepEnv = true;
|
||||
persist = true;
|
||||
}
|
||||
{
|
||||
users = ["lava"];
|
||||
noPass = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
pinentryFlavor = "gnome3";
|
||||
};
|
||||
}
|
||||
43
flake.lock
generated
Normal file
43
flake.lock
generated
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1620387763,
|
||||
"narHash": "sha256-cR6e92q0fMMol0K5a+e472F2ojjEoaEighs51pKF99I=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ae1c8ede09b53007ba9b3c32f926c9c03547ae8b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"secrets": "secrets"
|
||||
}
|
||||
},
|
||||
"secrets": {
|
||||
"locked": {
|
||||
"lastModified": 1620730514,
|
||||
"narHash": "sha256-t8wBACqlxfNmIgCFMxx//25QP8VnR9wHfR1OiJCuFXU=",
|
||||
"owner": "LavaDesu",
|
||||
"repo": "flakes-secrets",
|
||||
"rev": "298393c4f21dec074654b8bd3d4b99c3ddbc0309",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "LavaDesu",
|
||||
"repo": "flakes-secrets",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
21
flake.nix
Normal file
21
flake.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; };
|
||||
#secrets = { url = "git+ssh://git@github.com/LavaDesu/flakes-secrets.git"; };
|
||||
secrets = { url = "github:LavaDesu/flakes-secrets"; };
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, secrets }: {
|
||||
nixosConfigurations."winter" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
{
|
||||
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
||||
nix.registry.nixpkgs.flake = nixpkgs;
|
||||
}
|
||||
secrets.nixosModules.winter
|
||||
./cfg/winter/main.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue