flakes for foureighty

This commit is contained in:
Cyryl Płotnicki 2021-05-30 20:41:33 +01:00
parent eb84eb2f5a
commit 0c1aa1b081
14 changed files with 266 additions and 132 deletions

View file

@ -1,11 +1,9 @@
{ config, pkgs, ... }:
{ config, pkgs, inputs, ... }:
{
networking.hostName = "foureighty";
imports = [
<home-manager/nixos>
./hardware-configuration.nix
./lte-modem.nix
../../boot.nix
../../common.nix
../../gfx-intel.nix
@ -34,22 +32,12 @@
services.hardware.bolt.enable = true;
services.fprintd = {
enable = true;
package = pkgs.unstable.fprintd;
};
home-manager.users.cyryl = {...}: {
imports = [
../../home-manager
];
home.stateVersion = config.system.stateVersion;
nixpkgs.overlays = config.nixpkgs.overlays;
nixpkgs.config = config.nixpkgs.config;
home.packages = with pkgs; [
bisq.bisq-desktop
];
};
fonts.fontconfig.enable = true;
programs.steam.enable = true;
home-manager.users.cyryl = {...}: {
home.packages = [ inputs.bisq.legacyPackages."x86_64-linux".bisq-desktop ];
};
}

View file

@ -8,6 +8,13 @@
networking.networkmanager.enable = true;
hardware.enableAllFirmware = true;
nixpkgs.config = {
allowUnfree = true;
};
hardware.enableRedistributableFirmware = true;
hardware.cpu.intel.updateMicrocode = true;
hardware.pulseaudio = {
@ -24,7 +31,7 @@
hardware.bluetooth = {
enable = true;
package = pkgs.bluezFull;
config = {
settings = {
General = { Enable = "Source,Sink,Media,Socket"; };
};
};

View file

@ -34,9 +34,11 @@
xkbOptions = "caps:ctrl_modifier";
libinput = {
enable = true;
naturalScrolling = false;
clickMethod = "clickfinger";
disableWhileTyping = true;
touchpad = {
naturalScrolling = false;
clickMethod = "clickfinger";
disableWhileTyping = true;
};
};
useGlamor = true;

View file

@ -1,92 +1,65 @@
{ config, pkgs, ... }:
{
imports =
[
./common-hardware.nix
./common-services.nix
./security.nix
./syncthing.nix
];
let
unstableTarball = fetchTarball https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz;
bisqTarball = fetchTarball https://github.com/emmanuelrosa/nixpkgs/archive/3a681b0daaed9841cbd3ea2ebd51f9cca4c836f2.tar.gz;
mindforgerTarball = fetchTarball https://github.com/cyplo/nixpkgs/archive/80286e3d62406777c08c4afbeeb5deeb1c44062b.tar.gz;
nurTarball = fetchTarball https://github.com/nix-community/NUR/archive/master.tar.gz;
in
{
imports =
[
./syncthing.nix
./gsconnect.nix
./common-hardware.nix
./common-services.nix
./security.nix
./wireguard.nix
security.allowUserNamespaces = true;
environment.enableDebugInfo = true;
environment.systemPackages = with pkgs; [
wget git gnupg curl tmux htop atop home-manager pciutils powertop fd dnsutils usbutils
];
i18n.defaultLocale = "en_GB.UTF-8";
users.users.cyryl = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" "docker" "vboxusers" "adbusers" "libvirtd" "dialout" "wireshark" ];
shell = pkgs.zsh;
};
networking.hosts = {
"10.11.99.1" = [ "remarkable" ];
};
programs.light.enable = true;
programs.adb.enable = true;
programs.wireshark.enable=true;
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
};
fonts.fonts = with pkgs; [ powerline-fonts weather-icons material-icons source-code-pro fira-code noto-fonts-emoji emojione iosevka font-awesome nerdfonts ];
services.haveged.enable = true;
nix = {
autoOptimiseStore = true;
daemonIONiceLevel = 7;
daemonNiceLevel = 19;
gc.automatic = true;
optimise.automatic = true;
nixPath = [
"nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz"
"nixos-config=/etc/nixos/configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels"
"home-manager=https://github.com/rycee/home-manager/archive/release-20.09.tar.gz"
];
security.allowUserNamespaces = true;
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
unstable = import unstableTarball {
config = config.nixpkgs.config;
};
bisq = import bisqTarball {
config = config.nixpkgs.config;
};
mindforgerPatched = import mindforgerTarball {
config = config.nixpkgs.config;
};
nur = import nurTarball {
inherit pkgs;
};
};
};
environment.enableDebugInfo = true;
environment.systemPackages = with pkgs; [
wget git gnupg curl tmux htop atop home-manager pciutils powertop fd dnsutils usbutils
];
i18n.defaultLocale = "en_GB.UTF-8";
users.users.cyryl = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "video" "scanner" "lp" "docker" "vboxusers" "adbusers" "libvirtd" "dialout" "wireshark" ];
shell = pkgs.zsh;
};
networking.hosts = {
"10.11.99.1" = [ "remarkable" ];
};
programs.light.enable = true;
programs.adb.enable = true;
programs.wireshark.enable=true;
virtualisation.docker = {
enable = true;
autoPrune.enable = true;
};
fonts.fonts = with pkgs; [ powerline-fonts weather-icons material-icons source-code-pro fira-code noto-fonts-emoji emojione iosevka font-awesome nerdfonts ];
services.haveged.enable = true;
nix = {
autoOptimiseStore = true;
daemonIONiceLevel = 7;
daemonNiceLevel = 19;
gc.automatic = true;
optimise.automatic = true;
nixPath = [
"nixpkgs=https://github.com/NixOS/nixpkgs/archive/20.09.tar.gz"
"nixos-config=/etc/nixos/configuration.nix"
"/nix/var/nix/profiles/per-user/root/channels"
"home-manager=https://github.com/rycee/home-manager/archive/release-20.09.tar.gz"
];
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
system = {
stateVersion = "20.03";
};
}
system = {
stateVersion = "20.03";
};
}

100
nixos/flake.lock Normal file
View file

@ -0,0 +1,100 @@
{
"nodes": {
"bisq": {
"locked": {
"lastModified": 1620344115,
"narHash": "sha256-xnssmdoQsDyZL8vWSuv9QmAc260JMPzBCFRYznOna78=",
"owner": "emmanuelrosa",
"repo": "nixpkgs",
"rev": "3a681b0daaed9841cbd3ea2ebd51f9cca4c836f2",
"type": "github"
},
"original": {
"owner": "emmanuelrosa",
"ref": "3a681b0daaed9841cbd3ea2ebd51f9cca4c836f2",
"repo": "nixpkgs",
"type": "github"
}
},
"futils": {
"locked": {
"lastModified": 1620759905,
"narHash": "sha256-WiyWawrgmyN0EdmiHyG2V+fqReiVi8bM9cRdMaKQOFg=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b543720b25df6ffdfcf9227afafc5b8c1fabfae8",
"type": "github"
},
"original": {
"owner": "numtide",
"ref": "master",
"repo": "flake-utils",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1622368473,
"narHash": "sha256-5/HXUr8uv+L9ZerwEF3UefYL8Ik+j4uPoMpnxealANo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "d2aaeac42c563cf8cf76ee3b90d9585dadbb91e0",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1622194753,
"narHash": "sha256-76qtvFp/vFEz46lz5iZMJ0mnsWQYmuGYlb0fHgKqqMg=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "540dccb2aeaffa9dc69bfdc41c55abd7ccc6baa3",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": {
"locked": {
"lastModified": 1622369728,
"narHash": "sha256-VLnaYJDw2DFP2p1LHDgEpV0FV6vyYGj3uV2ciJFuAiE=",
"owner": "nix-community",
"repo": "NUR",
"rev": "58be3aa3e3940dd8f2401370ea348aaf97f5bbe6",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "master",
"repo": "NUR",
"type": "github"
}
},
"root": {
"inputs": {
"bisq": "bisq",
"futils": "futils",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nur": "nur"
}
}
},
"root": "root",
"version": 7
}

64
nixos/flake.nix Normal file
View file

@ -0,0 +1,64 @@
{
description = "NixOS configuration with flakes";
inputs = {
futils = {
type = "github";
owner = "numtide";
repo = "flake-utils";
ref = "master";
};
home-manager = {
type = "github";
owner = "nix-community";
repo = "home-manager";
ref = "master";
inputs = {
nixpkgs.follows = "nixpkgs";
};
};
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
};
nur = {
type = "github";
owner = "nix-community";
repo = "NUR";
ref = "master";
};
bisq = {
type = "github";
owner = "emmanuelrosa";
repo = "nixpkgs";
ref = "3a681b0daaed9841cbd3ea2ebd51f9cca4c836f2";
};
};
outputs = { self, futils, home-manager, nixpkgs, nur, bisq } @ inputs: {
nixosConfigurations = {
foureighty = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(import ./boxes/foureighty)
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cyryl = import ./home-manager;
}
];
specialArgs = { inherit inputs; };
};
};
};
}

View file

@ -12,6 +12,8 @@
qt = {
enable = true;
platformTheme = "gnome";
style.name = "adwaita-dark";
style.package = pkgs.adwaita-qt;
};
imports = [
@ -32,30 +34,30 @@
gsettings-desktop-schemas
keybase-gui
libreoffice
mindforgerPatched.mindforger
mindforger
modem-manager-gui
passff-host
pdfarranger
python38Packages.binwalk-full
qemu aqemu
qemu
shotwell
simple-scan
slack
spotify
unstable.ssb-patchwork
unstable.discord
unstable.electrum
unstable.element-desktop
unstable.freecad
unstable.ghidra-bin
unstable.hopper
unstable.inkscape
unstable.nyxt
unstable.openscad
unstable.qcad
unstable.signal-desktop
unstable.torbrowser
unstable.wireshark
ssb-patchwork
discord
electrum
element-desktop
freecad
ghidra-bin
hopper
inkscape
nyxt
openscad
qcad
signal-desktop
torbrowser
wireshark
vlc
wineFull
xclip

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }:
{
home.packages = with pkgs.unstable; [
home.packages = with pkgs; [
(vscode-with-extensions.override {
vscodeExtensions = with vscode-extensions; [
bbenoist.Nix

View file

@ -35,9 +35,9 @@
rustup
terraform
tmux
unstable.exercism
unstable.genpass
unstable.topgrade
exercism
genpass
topgrade
unzip
veracrypt
wget

View file

@ -1,4 +1,4 @@
{ pkgs ? import <nixpkgs> {} }:
{ pkgs }:
let
myEmacs = pkgs.emacs-nox;
emacsWithPackages = (pkgs.emacsPackagesGen myEmacs).emacsWithPackages;

View file

@ -1,6 +1,6 @@
{ config, pkgs, ... }:
{
home.file.".vimrc".source = /home/cyryl/dev/dotfiles/.vimrc.nixos;
home.file.".vimrc".source = ../../../.vimrc.nixos;
programs.neovim = {
enable = true;
viAlias = true;

View file

@ -20,7 +20,6 @@
dbus = {
packages = with pkgs; [ gnome2.GConf gnome3.dconf ];
socketActivated = true;
};
fractalart.enable = true;

View file

@ -32,7 +32,7 @@ in
position = "top";
colors.background = "#002b36";
fonts = [ "Fira Code Nerd Font 10" ];
statusCommand = "${pkgs.unstable.i3status-rust}/bin/i3status-rs $HOME/dev/dotfiles/.config/i3/i3-status.toml";
statusCommand = "${pkgs.i3status-rust}/bin/i3status-rs $HOME/dev/dotfiles/.config/i3/i3-status.toml";
trayOutput = "primary";
}
];

View file

@ -5,6 +5,5 @@
user = "cyryl";
dataDir = "/home/cyryl/.syncthing";
openDefaultPorts = true;
package = pkgs.unstable.syncthing;
};
}