Compare commits

..

1 Commits

Author SHA1 Message Date
coolneng bd3396bfa9
Migrate to flakes 2021-08-08 19:56:16 +01:00
7 changed files with 30 additions and 158 deletions

View File

@ -102,6 +102,7 @@
# Import other configuration modules
imports = [
<nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
./modules/hardware-configuration.nix
./modules/software.nix
./modules/networking.nix

View File

@ -1,145 +0,0 @@
{
"nodes": {
"agenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1627822587,
"narHash": "sha256-AAFgsVe/ahLh1Ij2o98x6IMxz3Z+Tr97bFwa4nthB1w=",
"owner": "ryantm",
"repo": "agenix",
"rev": "e6752e7b8592502df42066f156165471e62d902d",
"type": "github"
},
"original": {
"owner": "ryantm",
"repo": "agenix",
"type": "github"
}
},
"emacs-overlay": {
"locked": {
"lastModified": 1628443422,
"narHash": "sha256-Sq+eaw+UCYr4C5jzbjMk1bzrmLFxA5rN1pgYAGvT/AM=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "d962fd773274e8303bc96ca64fb3569aec5ac764",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "emacs-overlay",
"type": "github"
}
},
"naersk": {
"inputs": {
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1605267184,
"narHash": "sha256-0FSNlq6nN0/W88fg5kTkgRhAOQ8pI+uSZqBG9w49pMM=",
"owner": "nmattia",
"repo": "naersk",
"rev": "ce273fa593dcc94a629d0d869f07d96d2b337e37",
"type": "github"
},
"original": {
"owner": "nmattia",
"repo": "naersk",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1628287055,
"narHash": "sha256-YwxtAt25pZofJT/e4sxw9cFBaFok+zgIy04HFV0rDd0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0dde103318090f77ac95ef7fc26fe0cdd00fa0b3",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1605988311,
"narHash": "sha256-PA+kgq46NApOAJlmBNJHs5DwsIrY+jodM0e4g7VtXyY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2247d824fe07f16325596acc7faa286502faffd1",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1605988311,
"narHash": "sha256-PA+kgq46NApOAJlmBNJHs5DwsIrY+jodM0e4g7VtXyY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2247d824fe07f16325596acc7faa286502faffd1",
"type": "github"
},
"original": {
"id": "nixpkgs",
"type": "indirect"
}
},
"rnix-lsp": {
"inputs": {
"naersk": "naersk",
"nixpkgs": "nixpkgs_3",
"utils": "utils"
},
"locked": {
"lastModified": 1626644818,
"narHash": "sha256-w0hpyFXxltmOpbBKNQ2tfKRWELQzStc/ho1EcNyYaWc=",
"owner": "nix-community",
"repo": "rnix-lsp",
"rev": "1fdd7cf9bf56b8ad2dddcfd27354dae8aef2b453",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "rnix-lsp",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
"emacs-overlay": "emacs-overlay",
"nixpkgs": "nixpkgs",
"rnix-lsp": "rnix-lsp"
}
},
"utils": {
"locked": {
"lastModified": 1605370193,
"narHash": "sha256-YyMTf3URDL/otKdKgtoMChu4vfVL3vCMkRqpGifhUn0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "5021eac20303a61fafe17224c087f5519baed54d",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

View File

@ -9,7 +9,7 @@
rnix-lsp.url = "github:nix-community/rnix-lsp";
};
outputs = { self, nixpkgs, agenix, ... }@inputs:
outputs = inputs@{ self, nixpkgs, agenix, ... }:
let
system = "x86_64-linux";
@ -24,8 +24,6 @@
nixosConfigurations.panacea = lib.nixosSystem {
inherit system;
modules = [ (import ./configuration.nix) agenix.nixosModules.age ];
specialArgs = { inherit inputs; };
};
};
}

View File

@ -1,6 +1,17 @@
{ config, lib, pkgs, ... }:
{
let
soundcloud_token =
builtins.readFile /home/coolneng/.config/mopidy/soundcloud-auth;
fixed-mopidy-youtube = pkgs.mopidy-youtube.overrideAttrs (old: rec {
patchPhase = ''
sed s/bs4/beautifulsoup4/ -i setup.cfg
sed s/"PREF=hl=en;"/"PREF=hl=en; CONSENT=YES+20210329;"/ -i mopidy_youtube/backend.py
'';
});
in {
# Configure pipewire as sound server
services.pipewire = {
enable = true;
@ -34,7 +45,7 @@
extensionPackages = with pkgs; [
mopidy-mpd
mopidy-soundcloud
mopidy-youtube
fixed-mopidy-youtube
mopidy-somafm
mopidy-local
];
@ -64,7 +75,7 @@
[soundcloud]
enabled = true
auth_token = PLACEHOLDER
auth_token = ${soundcloud_token}
explore_songs = 100
[m3u]

View File

@ -1,6 +1,8 @@
{ config, lib, pkgs, ... }:
{
let tmux_config = builtins.readFile /home/coolneng/.tmux.conf;
in {
# Display manager
services.xserver.enable = true;
services.xserver.displayManager = {
@ -84,6 +86,7 @@
shortcut = "x";
terminal = "screen-256";
baseIndex = 1;
extraConfig = tmux_config;
};
# Automount external storage

View File

@ -1,10 +1,10 @@
{ config, lib, pkgs, inputs, ... }:
{ config, lib, pkgs, ... }:
with pkgs;
let
emacs-vterm = ((emacsPackagesNgGen emacsPgtkGcc).emacsWithPackages
(epkgs: [ epkgs.vterm ]));
(epkgs: with epkgs; [ vterm ]));
in {
environment.systemPackages = [
@ -16,7 +16,6 @@ in {
pass-wayland
passff-host
gitAndTools.pass-git-helper
inputs.agenix.defaultPackage.x86_64-linux
# Browsers
firefox
ungoogled-chromium
@ -84,7 +83,7 @@ in {
shfmt
## Nix
nixfmt
rnix-lsp
niv
## Python
nodePackages.pyright
black

View File

@ -1,3 +1,8 @@
{ config, lib, pkgs, inputs, ... }: {
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
{
nixpkgs.overlays = [
(import (builtins.fetchTarball {
url =
"https://github.com/nix-community/emacs-overlay/archive/master.tar.gz";
}))
];
}