2
2
mirror of https://git.feal.no/felixalb/nixos-config.git synced 2024-12-22 12:07:29 +01:00

Compare commits

...

4 Commits

11 changed files with 255 additions and 18 deletions

View File

@ -89,10 +89,10 @@
]; ];
uid = lib.mkDefault 1000; uid = lib.mkDefault 1000;
openssh.authorizedKeys.keys = lib.mkDefault [ openssh.authorizedKeys.keys = lib.mkDefault [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKzPICGew7uN0cmvRmbwkwTCodTBUgEhkoftQnZuO4Q felixalbrigtsen@gmail.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTXSL0w7OUcz1LzEt1T3I3K5RgyNV+MYz0x/1RbpDHQ felixalb@worf" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBTXSL0w7OUcz1LzEt1T3I3K5RgyNV+MYz0x/1RbpDHQ felixalb@worf"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFiPHhj0YbklJnJNcxD0IlzPxLTGfv095H5zyS/1Wb64 felixalb@edison.home.feal.no" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKzPICGew7uN0cmvRmbwkwTCodTBUgEhkoftQnZuO4Q felixalbrigtsen@gmail.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH5M7hYl3saBNMAo6sczgfUvASEJWFHuERB7xvf4gxst nix-builder-worf" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH5M7hYl3saBNMAo6sczgfUvASEJWFHuERB7xvf4gxst nix-builder-worf"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJky33ynjqyWP+hh24gFCMFIEqe3CjIIowGM9jiPbT79 felixalb@sisko.home.feal.no"
]; ];
shell = pkgs.zsh; shell = pkgs.zsh;
}; };

22
flake.lock generated
View File

@ -56,16 +56,16 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1726989464, "lastModified": 1732466619,
"narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", "narHash": "sha256-T1e5oceypZu3Q8vzICjv1X/sGs9XfJRMW5OuXHgpB3c=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", "rev": "f3111f62a23451114433888902a55cf0692b408d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "nix-community",
"ref": "release-24.05", "ref": "release-24.11",
"repo": "home-manager", "repo": "home-manager",
"type": "github" "type": "github"
} }
@ -175,11 +175,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1728018373, "lastModified": 1732837521,
"narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", "narHash": "sha256-jNRNr49UiuIwaarqijgdTR2qLPifxsVhlJrKzQ8XUIE=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "bc947f541ae55e999ffdb4013441347d83b00feb", "rev": "970e93b9f82e2a0f3675757eb0bfc73297cc6370",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -207,16 +207,16 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1731386116, "lastModified": 1732824227,
"narHash": "sha256-lKA770aUmjPHdTaJWnP3yQ9OI1TigenUqVC3wweqZuI=", "narHash": "sha256-fYNXgpu1AEeLyd3fQt4Ym0tcVP7cdJ8wRoqJ+CtTRyY=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "689fed12a013f56d4c4d3f612489634267d86529", "rev": "c71ad5c34d51dcbda4c15f44ea4e4aa6bb6ac1e9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "NixOS",
"ref": "nixos-24.05", "ref": "nixos-24.11",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }

View File

@ -2,14 +2,14 @@
description = "Felixalb System flake"; description = "Felixalb System flake";
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina nixpkgs-2211.url = "https://github.com/NixOS/nixpkgs/archive/34bfa9403e42eece93d1a3740e9d8a02fceafbca.tar.gz"; # old nixpgks for e.g. remmina
nix-darwin.url = "github:lnl7/nix-darwin/master"; nix-darwin.url = "github:lnl7/nix-darwin/master";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.url = "github:nix-community/home-manager/release-24.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs"; home-manager.inputs.nixpkgs.follows = "nixpkgs";
matrix-synapse-next.url = "github:dali99/nixos-matrix-modules/v0.6.0"; matrix-synapse-next.url = "github:dali99/nixos-matrix-modules/v0.6.0";
@ -97,6 +97,9 @@
# Web host # Web host
malcolm = normalSys "malcolm" { }; malcolm = normalSys "malcolm" { };
# Home desktop
sisko = normalSys "sisko" { };
}; };
# Daily driver macbook # Daily driver macbook

View File

@ -41,6 +41,9 @@
name = "Felix Albrigtsen"; name = "Felix Albrigtsen";
email = lib.mkDefault "felix@albrigtsen.it"; email = lib.mkDefault "felix@albrigtsen.it";
}; };
safe = {
directory = "/config";
};
}; };
ignores = [ ignores = [
"*~" "*~"

View File

@ -5,7 +5,6 @@
boot = { boot = {
zfs.extraPools = [ "tank" ]; zfs.extraPools = [ "tank" ];
supportedFilesystems = [ "zfs" ]; supportedFilesystems = [ "zfs" ];
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
}; };
services.prometheus.exporters.zfs.enable = true; services.prometheus.exporters.zfs.enable = true;

View File

@ -17,11 +17,11 @@ in {
settings = { settings = {
cache = "local"; cache = "local";
hostname = "iam.feal.no"; hostname = "iam.feal.no";
hostname-strict-backchannel = true; hostname-backchannel-dynamic = false;
http-enable = true; http-enable = true;
http-host = "127.0.1.2"; http-host = "127.0.1.2";
http-port = 5060; http-port = 5060;
proxy = "edge"; proxy-headers = "xforwarded";
}; };
}; };

View File

@ -0,0 +1,10 @@
{ config, pkgs, lib, ... }:
{
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
};
environment.systemPackages = with pkgs; [
];
}

View File

@ -0,0 +1,40 @@
{ config, pkgs, lib, ... }:
{
imports =
[
../../base.nix
../../common/metrics-exporters.nix
./hardware-configuration.nix
./desktop.nix
./applications.nix
];
networking = {
hostName = "sisko";
defaultGateway = "192.168.10.1";
interfaces.enp14s0.ipv4 = {
addresses = [
{ address = "192.168.10.172"; prefixLength = 24; }
];
};
hostId = "b716d781";
};
hardware.bluetooth.enable = true;
sops.defaultSopsFile = ../../secrets/sisko/sisko.yaml;
environment.variables = { EDITOR = "vim"; };
nixpkgs.config = {
allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"copilot.vim"
"steam"
"steam-unwrapped"
];
};
system.stateVersion = "24.11";
}

58
hosts/sisko/desktop.nix Normal file
View File

@ -0,0 +1,58 @@
{ config, pkgs, lib, ... }:
{
# Video
hardware.graphics = {
enable = true;
enable32Bit = true;
};
# services.displayManager.ly.enable = true;
programs.hyprland = {
enable = true;
withUWSM = true;
xwayland.enable = true;
};
services.xserver.enable = true;
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Audio
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
hardware.pulseaudio.enable = false;
# Misc
fonts = {
fontDir.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-sans
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
];
};
environment.sessionVariables = {
NIXOS_OZONE_WL = "1";
SSH_AUTH_SOCK = "/run/user/${toString config.users.users.felixalb.uid}/keyring/ssh";
};
services.gnome.gnome-keyring.enable = true;
home-manager.users.felixalb = {
services = {
dunst.enable = true;
};
};
}

View File

@ -0,0 +1,48 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/60a70caf-ca37-488d-8c2a-98a7e9b67d84";
fsType = "btrfs";
options = [ "subvol=root" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/60a70caf-ca37-488d-8c2a-98a7e9b67d84";
fsType = "btrfs";
options = [ "subvol=nix" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/60a70caf-ca37-488d-8c2a-98a7e9b67d84";
fsType = "btrfs";
options = [ "subvol=home" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/12CE-A600";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices = [ {
device = "/swapfile";
size = 64*1024;
} ];
networking.useDHCP = lib.mkDefault false;
# networking.interfaces.enp14s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp15s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

76
hosts/sisko/home.nix Normal file
View File

@ -0,0 +1,76 @@
{ pkgs, lib, ... }:
{
imports = [
./../../home/base.nix
./../../home/alacritty.nix
];
home.packages = with pkgs; [
bc
catimg
chromium
dante
dig
element-desktop
hunspellDicts.en_US
hunspellDicts.nb_NO
jq
libreoffice
mpv
nixpkgs-2211.remmina
openssl
pwgen
unstable.tlclient
traceroute
virt-manager
w3m
(unstable.python311.withPackages (ps: with ps; [
numpy
pycryptodome
requests
]))
];
programs = {
aerc = {
enable = true;
package = pkgs.unstable.aerc;
};
alacritty.enable = true;
firefox.enable = true;
rbw = {
enable = true;
settings = {
base_url = "https://pw.feal.no";
email = "felix@albrigtsen.it";
pinentry = pkgs.pinentry-gnome3;
};
};
rofi = {
enable = true;
theme = "iggy";
};
zsh = {
shellAliases."rebuild" = "sudo nixos-rebuild switch --flake /config";
prezto.pmodules = [ "ssh" ];
};
neovim.plugins = with pkgs.vimPlugins; [ copilot-vim ];
};
xdg.mimeApps = {
enable = true;
defaultApplications = {
"text/html" = "firefox.desktop";
"x-scheme-handler/http" = "firefox.desktop";
"x-scheme-handler/https" = "firefox.desktop";
"x-scheme-handler/about" = "firefox.desktop";
"x-scheme-handler/unknown" = "firefox.desktop";
};
};
home.stateVersion = "24.11";
}